(module
 (type $0 (func))
 (type $1 (func (result i32)))
 (type $2 (func (param i32) (result i32)))
 (type $3 (func (param i32)))
 (func $trivial (; 0 ;) (type $0)
  (local $0 i32)
  (return)
 )
 (func $trivial2 (; 1 ;) (type $0)
  (local $0 i32)
  (block
   (call $trivial)
   (call $trivial)
   (return)
  )
 )
 (func $return-void (; 2 ;) (type $0)
  (local $0 i32)
  (return)
 )
 (func $return-val (; 3 ;) (type $1) (result i32)
  (local $0 i32)
  (return
   (i32.const 1)
  )
 )
 (func $ifs (; 4 ;) (type $2) (param $x i32) (result i32)
  (local $1 i32)
  (block
  )
  (if
   (local.get $x)
   (block
    (block
    )
    (if
     (local.get $x)
     (block
      (return
       (i32.const 2)
      )
     )
     (block
      (return
       (i32.const 3)
      )
     )
    )
   )
   (block
    (block
    )
    (if
     (local.get $x)
     (block
      (return
       (i32.const 4)
      )
     )
     (block
      (return
       (i32.const 5)
      )
     )
    )
   )
  )
 )
 (func $loops (; 5 ;) (type $3) (param $x i32)
  (local $1 i32)
  (block $block$6$break
   (block
   )
   (if
    (local.get $x)
    (loop $shape$2$continue
     (call $trivial)
     (block
      (br $shape$2$continue)
     )
    )
    (br $block$6$break)
   )
  )
  (block
   (block $block$8$break
    (loop $shape$4$continue
     (call $trivial)
     (if
      (local.get $x)
      (br $shape$4$continue)
      (br $block$8$break)
     )
    )
   )
   (block
    (block $block$11$break
     (loop $shape$6$continue
      (call $trivial)
      (if
       (local.get $x)
       (br $shape$6$continue)
       (br $block$11$break)
      )
     )
    )
    (block
     (return)
    )
   )
  )
 )
 (func $br-out (; 6 ;) (type $3) (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 ;) (type $3) (param $x i32)
  (local $1 i32)
  (block $block$2$break
   (block
   )
   (if
    (local.get $x)
    (br $block$2$break)
    (block
     (block $block$11$break
      (call $unreachable
       (i32.const 5)
      )
      (block
       (br $block$11$break)
      )
     )
     (block
      (return)
     )
    )
   )
  )
  (block
   (block
   )
   (if
    (local.get $x)
    (block
     (block
      (call $unreachable
       (i32.const 1)
      )
      (unreachable)
     )
    )
    (block
     (block
      (call $unreachable
       (i32.const 3)
      )
      (return)
     )
    )
   )
  )
 )
 (func $empty-blocks (; 8 ;) (type $3) (param $x i32)
  (local $1 i32)
  (block $block$3$break
   (block
   )
   (block
    (br $block$3$break)
   )
  )
  (block
   (return)
  )
 )
 (func $before-and-after (; 9 ;) (type $3) (param $x i32)
  (local $1 i32)
  (block $block$3$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)
     )
    )
   )
   (if
    (local.get $x)
    (br $block$3$break)
    (block
     (call $before-and-after
      (i32.const 5)
     )
     (block
      (br $block$3$break)
     )
    )
   )
  )
  (block
   (block $block$7$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$7$break)
    )
   )
   (block
    (block $block$8$break
     (loop $shape$4$continue
      (call $before-and-after
       (i32.const 9)
      )
      (if
       (local.get $x)
       (br $shape$4$continue)
       (br $block$8$break)
      )
     )
    )
    (block
     (block $block$10$break
      (block
       (call $before-and-after
        (i32.const 10)
       )
       (call $before-and-after
        (i32.const 11)
       )
      )
      (if
       (local.get $x)
       (block
        (call $before-and-after
         (i32.const 12)
        )
        (block
         (br $block$10$break)
        )
       )
       (br $block$10$break)
      )
     )
     (block
      (block $block$13$break
       (call $before-and-after
        (i32.const 13)
       )
       (if
        (local.get $x)
        (block
         (call $before-and-after
          (i32.const 14)
         )
         (block
          (br $block$13$break)
         )
        )
        (block
         (call $before-and-after
          (i32.const 15)
         )
         (block
          (br $block$13$break)
         )
        )
       )
      )
      (block
       (block $block$16$break
        (block
        )
        (if
         (local.get $x)
         (block
          (call $before-and-after
           (i32.const 16)
          )
          (block
           (br $block$16$break)
          )
         )
         (br $block$16$break)
        )
       )
       (block
        (block $block$19$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$19$break)
         )
        )
        (block
         (block $block$21$break
          (block
           (call $before-and-after
            (i32.const 23)
           )
           (call $before-and-after
            (i32.const 24)
           )
          )
          (block
           (br $block$21$break)
          )
         )
         (block
          (block
           (call $before-and-after
            (i32.const 25)
           )
           (return)
          )
         )
        )
       )
      )
     )
    )
   )
  )
 )
 (func $switch (; 10 ;) (type $3) (param $x i32)
  (local $1 i32)
  (block $block$3$break
   (block
   )
   (block
    (br $block$3$break)
   )
  )
  (block
   (block $block$6$break
    (call $switch
     (i32.const 1)
    )
    (block $switch$3$leave
     (block $switch$3$default
      (block $switch$3$case$6
       (br_table $switch$3$case$6 $switch$3$case$6 $switch$3$case$6 $switch$3$default
        (local.get $x)
       )
      )
      (block
       (br $block$6$break)
      )
     )
     (block
      (block
       (call $switch
        (i32.const 2)
       )
       (block
        (br $block$6$break)
       )
      )
     )
    )
   )
   (block
    (block
     (call $switch
      (i32.const 3)
     )
     (return)
    )
   )
  )
 )
 (func $no-return (; 11 ;) (type $0)
  (local $0 i32)
  (block $block$4$break
   (block
   )
   (if
    (i32.const 1)
    (block
     (drop
      (i32.const 2)
     )
     (block
      (br $block$4$break)
     )
    )
    (block
     (drop
      (i32.const 3)
     )
     (block
      (br $block$4$break)
     )
    )
   )
  )
  (block
   (return)
  )
 )
 (func $if-br-wat (; 12 ;) (type $3) (param $x i32)
  (local $1 i32)
  (block $block$2$break
   (block $block$8$break
    (call $if-br-wat
     (i32.const 0)
    )
    (if
     (local.get $x)
     (block
      (call $if-br-wat
       (i32.const 1)
      )
      (block
       (br $block$8$break)
      )
     )
     (block
      (block
      )
      (if
       (local.get $x)
       (br $block$2$break)
       (br $block$8$break)
      )
     )
    )
   )
   (block
    (call $if-br-wat
     (i32.const 2)
    )
    (block
     (br $block$2$break)
    )
   )
  )
  (block
   (block
    (call $if-br-wat
     (i32.const 3)
    )
    (return)
   )
  )
 )
 (func $switcher-to-nowhere (; 13 ;) (type $2) (param $0 i32) (result i32)
  (local $1 i32)
  (block
   (block
   )
   (block $switch$1$leave
    (block $switch$1$default
     (block $switch$1$case$3
      (block $switch$1$case$4
       (br_table $switch$1$case$4 $switch$1$case$3 $switch$1$default
        (local.get $0)
       )
      )
      (block
       (block
        (return
         (i32.const 1)
        )
       )
      )
     )
     (block
      (block
       (return
        (i32.const 2)
       )
      )
     )
    )
    (block
     (block
      (return
       (i32.const 3)
      )
     )
    )
   )
  )
  (unreachable)
 )
)
(module
 (type $0 (func))
 (type $1 (func (result i32)))
 (global $global$0 (mut i32) (i32.const 1))
 (export "one" (func $0))
 (export "two" (func $1))
 (func $0 (; 0 ;) (type $0)
  (local $0 i32)
  (block
  )
  (if
   (i32.const 1)
   (block
    (return)
   )
   (block
    (block
     (global.set $global$0
      (i32.const 0)
     )
     (unreachable)
    )
   )
  )
 )
 (func $1 (; 1 ;) (type $1) (result i32)
  (local $0 i32)
  (return
   (global.get $global$0)
  )
 )
)
