(module
 (type $none_=>_none (func))
 (type $none_=>_i32 (func (result i32)))
 (type $i32_=>_none (func (param i32)))
 (type $none_=>_f32 (func (result f32)))
 (type $i32_=>_f32 (func (param i32) (result f32)))
 (type $none_=>_f64 (func (result f64)))
 (memory $0 1)
 (global $global (mut i32) (i32.const 0))
 (func $0 (; 0 ;) (result f64)
  (local $0 f64)
  (local $1 f64)
  (local $2 i32)
  (block
  )
  (if
   (i32.const 0)
   (block
    (unreachable)
   )
   (block
    (block
     (local.set $0
      (f64.const -nan:0xfffffd63e4e5a)
     )
     (local.set $1
      (local.get $0)
     )
     (return
      (local.get $1)
     )
    )
   )
  )
 )
 (func $1 (; 1 ;) (result i32)
  (local $0 i32)
  (local $1 i32)
  (local $2 i32)
  (block
   (block $block$6$break
    (block
    )
    (block $switch$1$leave
     (block $switch$1$default
      (block $switch$1$case$4
       (br_table $switch$1$case$4 $switch$1$case$4 $switch$1$default
        (i32.const 0)
       )
      )
      (block
       (block
        (unreachable)
       )
      )
     )
     (block
      (br $block$6$break)
     )
    )
   )
   (block
    (block
    )
    (block $switch$6$leave
     (block $switch$6$default
      (block $switch$6$case$3
       (br_table $switch$6$case$3 $switch$6$default
        (i32.const 1)
       )
      )
      (block
       (block
        (unreachable)
       )
      )
     )
     (block
      (block
       (block
        (local.set $0
         (i32.const 2)
        )
        (local.set $1
         (local.get $0)
        )
        (return
         (local.get $1)
        )
       )
      )
     )
    )
   )
  )
  (unreachable)
 )
 (func $skip-empty (; 2 ;)
  (local $0 i32)
  (block $block$2$break
   (block
   )
   (block
    (br $block$2$break)
   )
  )
  (block
   (return)
  )
 )
 (func $skip-empty-2 (; 3 ;)
  (local $0 i32)
  (block $block$5$break
   (block
   )
   (block
    (br $block$5$break)
   )
  )
  (block
   (block $block$4$break
    (call $skip-empty)
    (block
     (br $block$4$break)
    )
   )
   (block
    (block $block$2$break
     (call $skip-empty)
     (block
      (br $block$2$break)
     )
    )
    (block
     (return)
    )
   )
  )
 )
 (func $skip-empty-3 (; 4 ;)
  (local $0 i32)
  (block $block$5$break
   (block
   )
   (block
    (br $block$5$break)
   )
  )
  (block
   (block $block$4$break
    (call $skip-empty)
    (block
     (br $block$4$break)
    )
   )
   (block
    (block $block$2$break
     (call $skip-empty)
     (block
      (br $block$2$break)
     )
    )
    (block
     (return)
    )
   )
  )
 )
 (func $skip-empty-4 (; 5 ;) (param $x i32)
  (local $1 i32)
  (local $2 i32)
  (block $block$2$break
   (local.set $1
    (local.get $x)
   )
   (block
    (br $block$2$break)
   )
  )
  (block
   (return)
  )
 )
 (func $skipping (; 6 ;) (param $0 i32) (result f32)
  (local $1 f32)
  (local $2 f32)
  (local $3 f32)
  (local $4 f32)
  (local $5 i32)
  (block
  )
  (if
   (i32.const 0)
   (block
    (unreachable)
   )
   (block
    (block
     (local.set $1
      (f32.const 1)
     )
     (local.set $2
      (local.get $1)
     )
     (local.set $3
      (local.get $2)
     )
     (local.set $4
      (local.get $3)
     )
     (return
      (local.get $4)
     )
    )
   )
  )
 )
 (func $merging (; 7 ;)
  (local $0 i32)
  (block
   (block
   )
   (return)
  )
 )
 (func $unswitch (; 8 ;)
  (local $0 i32)
  (block $block$2$break
   (block
   )
   (block
    (br $block$2$break)
   )
  )
  (block
   (return)
  )
 )
 (func $skip-only-empty (; 9 ;)
  (local $0 i32)
  (block $block$3$break
   (block
   )
   (if
    (i32.const 1)
    (block
     (global.set $global
      (i32.const 0)
     )
     (block
      (br $block$3$break)
     )
    )
    (br $block$3$break)
   )
  )
  (block
   (return)
  )
 )
 (func $skip-only-one-branch-out (; 10 ;) (result i32)
  (local $0 i32)
  (local $1 i32)
  (local $2 i32)
  (block
   (block
   )
   (block
   )
  )
  (if
   (i32.const 1)
   (block
    (unreachable)
   )
   (block
    (block
     (local.set $0
      (i32.const 0)
     )
     (local.set $1
      (local.get $0)
     )
     (return
      (local.get $1)
     )
    )
   )
  )
 )
 (func $multipass-for-skips (; 11 ;) (result f32)
  (local $0 f32)
  (local $1 f32)
  (local $2 f32)
  (local $3 f32)
  (local $4 i32)
  (block $block$7$break
   (block
   )
   (if
    (i32.const 0)
    (block
     (block
      (local.set $0
       (f32.const 9223372036854775808)
      )
      (block
       (local.set $1
        (local.get $0)
       )
       (local.set $2
        (local.get $1)
       )
      )
     )
     (block
      (br $block$7$break)
     )
    )
    (block
     (local.set $2
      (f32.const 65505)
     )
     (block
      (br $block$7$break)
     )
    )
   )
  )
  (block
   (block
    (local.set $3
     (local.get $2)
    )
    (return
     (local.get $3)
    )
   )
  )
 )
 (func $branch-merge-vs-replace (; 12 ;)
  (local $0 i32)
  (block
  )
  (if
   (i32.const 0)
   (block
    (unreachable)
   )
   (block
    (return)
   )
  )
 )
 (func $unswitch-amount (; 13 ;)
  (local $0 i32)
  (block $block$2$break
   (block
   )
   (if
    (i32.const -23)
    (br $block$2$break)
    (block
     (block $block$6$break
      (block
      )
      (block $switch$4$leave
       (block $switch$4$default
        (block $switch$4$case$2
         (br_table $switch$4$case$2 $switch$4$default
          (i32.const 44064)
         )
        )
        (block
         (br $block$2$break)
        )
       )
       (block
        (br $block$6$break)
       )
      )
     )
     (block
      (unreachable)
     )
    )
   )
  )
  (block
   (return)
  )
 )
)
(module
 (type $i32_=>_none (func (param i32)))
 (type $none_=>_none (func))
 (type $i32_=>_i32 (func (param i32) (result i32)))
 (type $none_=>_i32 (func (result i32)))
 (func $trivial (; 0 ;)
  (local $0 i32)
  (return)
 )
 (func $trivial2 (; 1 ;)
  (local $0 i32)
  (block
   (block
    (call $trivial)
    (call $trivial)
   )
   (return)
  )
 )
 (func $return-void (; 2 ;)
  (local $0 i32)
  (return)
 )
 (func $return-val (; 3 ;) (result i32)
  (local $0 i32)
  (local $1 i32)
  (local $2 i32)
  (return
   (i32.const 1)
  )
 )
 (func $ifs (; 4 ;) (param $x i32) (result i32)
  (local $1 i32)
  (local $2 i32)
  (local $3 i32)
  (local $4 i32)
  (local $5 i32)
  (local $6 i32)
  (local $7 i32)
  (local $8 i32)
  (local $9 i32)
  (local $10 i32)
  (local $11 i32)
  (local $12 i32)
  (local $13 i32)
  (local $14 i32)
  (local $15 i32)
  (local $16 i32)
  (block
   (local.set $6
    (local.get $x)
   )
   (local.set $1
    (local.get $6)
   )
   (local.set $7
    (local.get $1)
   )
  )
  (if
   (local.get $7)
   (block
    (block
     (local.set $8
      (local.get $x)
     )
     (local.set $2
      (local.get $8)
     )
     (local.set $9
      (local.get $2)
     )
    )
    (if
     (local.get $9)
     (block
      (return
       (i32.const 2)
      )
     )
     (block
      (return
       (i32.const 3)
      )
     )
    )
   )
   (block
    (block
     (local.set $10
      (local.get $x)
     )
     (local.set $3
      (local.get $10)
     )
     (local.set $11
      (local.get $3)
     )
    )
    (if
     (local.get $11)
     (block
      (return
       (i32.const 4)
      )
     )
     (block
      (return
       (i32.const 5)
      )
     )
    )
   )
  )
 )
 (func $loops (; 5 ;) (param $x i32)
  (local $1 i32)
  (local $2 i32)
  (local $3 i32)
  (local $4 i32)
  (local $5 i32)
  (local $6 i32)
  (local $7 i32)
  (local $8 i32)
  (local $9 i32)
  (local $10 i32)
  (block $block$18$break
   (block
    (local.set $4
     (local.get $x)
    )
    (local.set $1
     (local.get $4)
    )
    (local.set $5
     (local.get $1)
    )
   )
   (if
    (local.get $5)
    (loop $shape$2$continue
     (call $trivial)
     (block
      (br $shape$2$continue)
     )
    )
    (br $block$18$break)
   )
  )
  (block
   (block $block$21$break
    (loop $shape$4$continue
     (block
      (call $trivial)
      (local.set $6
       (local.get $x)
      )
      (local.set $2
       (local.get $6)
      )
      (local.set $7
       (local.get $2)
      )
     )
     (if
      (local.get $7)
      (br $shape$4$continue)
      (br $block$21$break)
     )
    )
   )
   (block
    (block $block$2$break
     (loop $shape$6$continue
      (block
       (call $trivial)
       (local.set $8
        (local.get $x)
       )
       (local.set $3
        (local.get $8)
       )
       (local.set $9
        (local.get $3)
       )
      )
      (if
       (local.get $9)
       (br $shape$6$continue)
       (br $block$2$break)
      )
     )
    )
    (block
     (return)
    )
   )
  )
 )
 (func $br-out (; 6 ;) (param $x i32)
  (local $1 i32)
  (block $block$2$break
   (call $br-out
    (i32.const 5)
   )
   (block
    (br $block$2$break)
   )
  )
  (block
   (return)
  )
 )
 (func $unreachable (; 7 ;) (param $x i32)
  (local $1 i32)
  (local $2 i32)
  (local $3 i32)
  (local $4 i32)
  (local $5 i32)
  (local $6 i32)
  (local $7 i32)
  (block $block$4$break
   (block
    (local.set $3
     (local.get $x)
    )
    (local.set $1
     (local.get $3)
    )
    (local.set $4
     (local.get $1)
    )
   )
   (if
    (local.get $4)
    (br $block$4$break)
    (block
     (block $block$2$break
      (call $unreachable
       (i32.const 5)
      )
      (block
       (br $block$2$break)
      )
     )
     (block
      (return)
     )
    )
   )
  )
  (block
   (block
    (local.set $5
     (local.get $x)
    )
    (local.set $2
     (local.get $5)
    )
    (local.set $6
     (local.get $2)
    )
   )
   (if
    (local.get $6)
    (block
     (block
      (call $unreachable
       (i32.const 1)
      )
      (unreachable)
     )
    )
    (block
     (block
      (call $unreachable
       (i32.const 3)
      )
      (return)
     )
    )
   )
  )
 )
 (func $empty-blocks (; 8 ;) (param $x i32)
  (local $1 i32)
  (block $block$2$break
   (block
   )
   (block
    (br $block$2$break)
   )
  )
  (block
   (return)
  )
 )
 (func $before-and-after (; 9 ;) (param $x i32)
  (local $1 i32)
  (local $2 i32)
  (local $3 i32)
  (local $4 i32)
  (local $5 i32)
  (local $6 i32)
  (local $7 i32)
  (local $8 i32)
  (local $9 i32)
  (local $10 i32)
  (local $11 i32)
  (local $12 i32)
  (local $13 i32)
  (local $14 i32)
  (local $15 i32)
  (local $16 i32)
  (block $block$4$break
   (block
    (block
     (call $before-and-after
      (i32.const 1)
     )
     (call $before-and-after
      (i32.const 2)
     )
    )
    (block
     (call $before-and-after
      (i32.const 3)
     )
     (call $before-and-after
      (i32.const 4)
     )
     (local.set $6
      (local.get $x)
     )
     (local.set $1
      (local.get $6)
     )
     (local.set $7
      (local.get $1)
     )
    )
   )
   (if
    (local.get $7)
    (br $block$4$break)
    (block
     (call $before-and-after
      (i32.const 5)
     )
     (block
      (br $block$4$break)
     )
    )
   )
  )
  (block
   (block $block$8$break
    (block
     (block
      (call $before-and-after
       (i32.const 6)
      )
      (call $before-and-after
       (i32.const 7)
      )
     )
     (call $before-and-after
      (i32.const 8)
     )
    )
    (block
     (br $block$8$break)
    )
   )
   (block
    (block $block$10$break
     (loop $shape$4$continue
      (block
       (call $before-and-after
        (i32.const 9)
       )
       (local.set $8
        (local.get $x)
       )
       (local.set $2
        (local.get $8)
       )
       (local.set $9
        (local.get $2)
       )
      )
      (if
       (local.get $9)
       (br $shape$4$continue)
       (br $block$10$break)
      )
     )
    )
    (block
     (block $block$11$break
      (block
       (call $before-and-after
        (i32.const 10)
       )
       (block
        (call $before-and-after
         (i32.const 11)
        )
        (local.set $10
         (local.get $x)
        )
        (local.set $3
         (local.get $10)
        )
        (local.set $11
         (local.get $3)
        )
       )
      )
      (if
       (local.get $11)
       (block
        (call $before-and-after
         (i32.const 12)
        )
        (block
         (br $block$11$break)
        )
       )
       (br $block$11$break)
      )
     )
     (block
      (block $block$15$break
       (block
        (call $before-and-after
         (i32.const 13)
        )
        (local.set $12
         (local.get $x)
        )
        (local.set $4
         (local.get $12)
        )
        (local.set $13
         (local.get $4)
        )
       )
       (if
        (local.get $13)
        (block
         (call $before-and-after
          (i32.const 14)
         )
         (block
          (br $block$15$break)
         )
        )
        (block
         (call $before-and-after
          (i32.const 15)
         )
         (block
          (br $block$15$break)
         )
        )
       )
      )
      (block
       (block $block$21$break
        (block
         (local.set $14
          (local.get $x)
         )
         (local.set $5
          (local.get $14)
         )
         (local.set $15
          (local.get $5)
         )
        )
        (if
         (local.get $15)
         (block
          (call $before-and-after
           (i32.const 16)
          )
          (block
           (br $block$21$break)
          )
         )
         (br $block$21$break)
        )
       )
       (block
        (block $block$28$break
         (block
          (block
           (block
            (call $before-and-after
             (i32.const 17)
            )
            (call $before-and-after
             (i32.const 18)
            )
            (call $before-and-after
             (i32.const 19)
            )
           )
           (call $before-and-after
            (i32.const 20)
           )
          )
          (block
           (call $before-and-after
            (i32.const 21)
           )
           (call $before-and-after
            (i32.const 22)
           )
          )
         )
         (block
          (br $block$28$break)
         )
        )
        (block
         (block $block$30$break
          (block
           (call $before-and-after
            (i32.const 23)
           )
           (call $before-and-after
            (i32.const 24)
           )
          )
          (block
           (br $block$30$break)
          )
         )
         (block
          (block
           (call $before-and-after
            (i32.const 25)
           )
           (return)
          )
         )
        )
       )
      )
     )
    )
   )
  )
 )
 (func $switch (; 10 ;) (param $x i32)
  (local $1 i32)
  (local $2 i32)
  (local $3 i32)
  (local $4 i32)
  (local $5 i32)
  (local $6 i32)
  (local $7 i32)
  (block $block$3$break
   (block
    (local.set $3
     (local.get $x)
    )
    (local.set $1
     (local.get $3)
    )
    (local.set $4
     (local.get $1)
    )
   )
   (block
    (br $block$3$break)
   )
  )
  (block
   (block $block$8$break
    (block
     (call $switch
      (i32.const 1)
     )
     (local.set $5
      (local.get $x)
     )
     (local.set $2
      (local.get $5)
     )
     (local.set $6
      (local.get $2)
     )
    )
    (block $switch$3$leave
     (block $switch$3$default
      (block $switch$3$case$8
       (br_table $switch$3$case$8 $switch$3$case$8 $switch$3$case$8 $switch$3$default
        (local.get $6)
       )
      )
      (block
       (br $block$8$break)
      )
     )
     (block
      (block
       (call $switch
        (i32.const 2)
       )
       (block
        (br $block$8$break)
       )
      )
     )
    )
   )
   (block
    (block
     (call $switch
      (i32.const 3)
     )
     (return)
    )
   )
  )
 )
 (func $no-return (; 11 ;)
  (local $0 i32)
  (block $block$6$break
   (block
   )
   (if
    (i32.const 1)
    (block
     (drop
      (i32.const 2)
     )
     (block
      (br $block$6$break)
     )
    )
    (block
     (drop
      (i32.const 3)
     )
     (block
      (br $block$6$break)
     )
    )
   )
  )
  (block
   (return)
  )
 )
 (func $if-br-wat (; 12 ;) (param $x i32)
  (local $1 i32)
  (local $2 i32)
  (local $3 i32)
  (local $4 i32)
  (local $5 i32)
  (local $6 i32)
  (local $7 i32)
  (block $block$3$break
   (block $block$4$break
    (block
     (call $if-br-wat
      (i32.const 0)
     )
     (local.set $3
      (local.get $x)
     )
     (local.set $1
      (local.get $3)
     )
     (local.set $4
      (local.get $1)
     )
    )
    (if
     (local.get $4)
     (block
      (call $if-br-wat
       (i32.const 1)
      )
      (block
       (br $block$4$break)
      )
     )
     (block
      (block
       (local.set $5
        (local.get $x)
       )
       (local.set $2
        (local.get $5)
       )
       (local.set $6
        (local.get $2)
       )
      )
      (if
       (local.get $6)
       (br $block$3$break)
       (br $block$4$break)
      )
     )
    )
   )
   (block
    (call $if-br-wat
     (i32.const 2)
    )
    (block
     (br $block$3$break)
    )
   )
  )
  (block
   (block
    (call $if-br-wat
     (i32.const 3)
    )
    (return)
   )
  )
 )
 (func $switcher-to-nowhere (; 13 ;) (param $0 i32) (result i32)
  (local $1 i32)
  (local $2 i32)
  (local $3 i32)
  (local $4 i32)
  (local $5 i32)
  (local $6 i32)
  (local $7 i32)
  (local $8 i32)
  (local $9 i32)
  (local $10 i32)
  (block
   (block
    (local.set $4
     (local.get $0)
    )
    (local.set $1
     (local.get $4)
    )
    (local.set $5
     (local.get $1)
    )
   )
   (block $switch$1$leave
    (block $switch$1$default
     (block $switch$1$case$4
      (block $switch$1$case$5
       (br_table $switch$1$case$5 $switch$1$case$4 $switch$1$default
        (local.get $5)
       )
      )
      (block
       (block
        (return
         (i32.const 1)
        )
       )
      )
     )
     (block
      (block
       (return
        (i32.const 2)
       )
      )
     )
    )
    (block
     (block
      (return
       (i32.const 3)
      )
     )
    )
   )
  )
  (unreachable)
 )
)
