(module
 (type $i (func (result i32)))
 (type $v (func))
 (type $vi (func (param i32)))
 (import "spectest" "print" (func $print (param i32)))
 (memory $0 1 1)
 (export "mem" (memory $0))
 (start $main)
 (func $check (; 1 ;) (type $i) (result i32)
  (if
   (i32.eq
    (i32.load
     (i32.const 4)
    )
    (i32.const 108)
   )
   (unreachable)
  )
  (i32.store
   (i32.const 4)
   (i32.add
    (i32.load
     (i32.const 4)
    )
    (i32.const 4)
   )
  )
  (call $print
   (i32.sub
    (i32.const 0)
    (i32.load offset=4
     (i32.load
      (i32.const 4)
     )
    )
   )
  )
  (i32.load offset=4
   (i32.load
    (i32.const 4)
   )
  )
 )
 (func $main (; 2 ;) (type $v)
  (local $0 i32)
  (local $1 i32)
  (i32.store
   (i32.const 8)
   (i32.const 89)
  )
  (i32.store
   (i32.const 12)
   (i32.const 12)
  )
  (i32.store
   (i32.const 16)
   (i32.const 78)
  )
  (i32.store
   (i32.const 20)
   (i32.const 149)
  )
  (i32.store
   (i32.const 24)
   (i32.const 118)
  )
  (i32.store
   (i32.const 28)
   (i32.const 179)
  )
  (i32.store
   (i32.const 32)
   (i32.const 127)
  )
  (i32.store
   (i32.const 36)
   (i32.const 80)
  )
  (i32.store
   (i32.const 40)
   (i32.const 21)
  )
  (i32.store
   (i32.const 44)
   (i32.const 34)
  )
  (i32.store
   (i32.const 48)
   (i32.const 119)
  )
  (i32.store
   (i32.const 52)
   (i32.const 98)
  )
  (i32.store
   (i32.const 56)
   (i32.const 38)
  )
  (i32.store
   (i32.const 60)
   (i32.const 29)
  )
  (i32.store
   (i32.const 64)
   (i32.const 36)
  )
  (i32.store
   (i32.const 68)
   (i32.const 147)
  )
  (i32.store
   (i32.const 72)
   (i32.const 13)
  )
  (i32.store
   (i32.const 76)
   (i32.const 55)
  )
  (i32.store
   (i32.const 80)
   (i32.const 166)
  )
  (i32.store
   (i32.const 84)
   (i32.const 16)
  )
  (i32.store
   (i32.const 88)
   (i32.const 143)
  )
  (i32.store
   (i32.const 92)
   (i32.const 52)
  )
  (i32.store
   (i32.const 96)
   (i32.const 130)
  )
  (i32.store
   (i32.const 100)
   (i32.const 150)
  )
  (i32.store
   (i32.const 104)
   (i32.const 176)
  )
  (i32.store
   (i32.const 108)
   (i32.const 91)
  )
  (i32.store
   (i32.const 112)
   (i32.const 34)
  )
  (block
   (block
    (block $block$6$break
     (block $block$5$break
      (block
       (call $print
        (i32.const 0)
       )
       (set_local $0
        (call $check)
       )
      )
      (if
       (i32.eq
        (i32.rem_u
         (get_local $0)
         (i32.const 2)
        )
        (i32.const 0)
       )
       (block
        (set_local $1
         (i32.const 6)
        )
        (br $block$6$break)
       )
       (block
        (block
         (call $print
          (i32.const 8)
         )
         (set_local $0
          (call $check)
         )
        )
        (block
         (br $block$5$break)
        )
       )
      )
     )
    )
   )
   (loop $shape$3$continue
    (block $block$5$break0
     (if
      (i32.eq
       (get_local $1)
       (i32.const 6)
      )
      (block
       (set_local $1
        (i32.const 0)
       )
       (block
        (call $print
         (i32.const 5)
        )
        (set_local $0
         (call $check)
        )
       )
       (if
        (i32.eq
         (i32.rem_u
          (get_local $0)
          (i32.const 2)
         )
         (i32.const 0)
        )
        (br $shape$3$continue)
        (block
         (set_local $1
          (i32.const 6)
         )
         (br $shape$3$continue)
        )
       )
      )
     )
    )
    (block
     (block $block$3$break
      (block
       (call $print
        (i32.const 4)
       )
       (set_local $0
        (call $check)
       )
      )
      (if
       (i32.eq
        (i32.rem_u
         (get_local $0)
         (i32.const 3)
        )
        (i32.const 0)
       )
       (br $shape$3$continue)
       (if
        (i32.eq
         (i32.rem_u
          (get_local $0)
          (i32.const 3)
         )
         (i32.const 1)
        )
        (block
         (set_local $1
          (i32.const 6)
         )
         (br $shape$3$continue)
        )
        (br $block$3$break)
       )
      )
     )
     (block
      (block
       (call $print
        (i32.const 2)
       )
       (set_local $0
        (call $check)
       )
      )
      (block
       (set_local $1
        (i32.const 6)
       )
       (br $shape$3$continue)
      )
     )
    )
   )
  )
 )
)
(module
 (type $i (func (result i32)))
 (type $v (func))
 (type $vi (func (param i32)))
 (import "spectest" "print" (func $print (param i32)))
 (memory $0 1 1)
 (export "mem" (memory $0))
 (start $main)
 (func $check (; 1 ;) (type $i) (result i32)
  (if
   (i32.eq
    (i32.load
     (i32.const 4)
    )
    (i32.const 108)
   )
   (unreachable)
  )
  (i32.store
   (i32.const 4)
   (i32.add
    (i32.load
     (i32.const 4)
    )
    (i32.const 4)
   )
  )
  (call $print
   (i32.sub
    (i32.const 0)
    (i32.load offset=4
     (i32.load
      (i32.const 4)
     )
    )
   )
  )
  (i32.load offset=4
   (i32.load
    (i32.const 4)
   )
  )
 )
 (func $main (; 2 ;) (type $v)
  (local $0 i32)
  (local $1 i32)
  (i32.store
   (i32.const 8)
   (i32.const 89)
  )
  (i32.store
   (i32.const 12)
   (i32.const 12)
  )
  (i32.store
   (i32.const 16)
   (i32.const 78)
  )
  (i32.store
   (i32.const 20)
   (i32.const 149)
  )
  (i32.store
   (i32.const 24)
   (i32.const 118)
  )
  (i32.store
   (i32.const 28)
   (i32.const 179)
  )
  (i32.store
   (i32.const 32)
   (i32.const 127)
  )
  (i32.store
   (i32.const 36)
   (i32.const 80)
  )
  (i32.store
   (i32.const 40)
   (i32.const 21)
  )
  (i32.store
   (i32.const 44)
   (i32.const 34)
  )
  (i32.store
   (i32.const 48)
   (i32.const 119)
  )
  (i32.store
   (i32.const 52)
   (i32.const 98)
  )
  (i32.store
   (i32.const 56)
   (i32.const 38)
  )
  (i32.store
   (i32.const 60)
   (i32.const 29)
  )
  (i32.store
   (i32.const 64)
   (i32.const 36)
  )
  (i32.store
   (i32.const 68)
   (i32.const 147)
  )
  (i32.store
   (i32.const 72)
   (i32.const 13)
  )
  (i32.store
   (i32.const 76)
   (i32.const 55)
  )
  (i32.store
   (i32.const 80)
   (i32.const 166)
  )
  (i32.store
   (i32.const 84)
   (i32.const 16)
  )
  (i32.store
   (i32.const 88)
   (i32.const 143)
  )
  (i32.store
   (i32.const 92)
   (i32.const 52)
  )
  (i32.store
   (i32.const 96)
   (i32.const 130)
  )
  (i32.store
   (i32.const 100)
   (i32.const 150)
  )
  (i32.store
   (i32.const 104)
   (i32.const 176)
  )
  (i32.store
   (i32.const 108)
   (i32.const 91)
  )
  (i32.store
   (i32.const 112)
   (i32.const 34)
  )
  (call $print
   (i32.const 0)
  )
  (if
   (i32.rem_u
    (call $check)
    (i32.const 2)
   )
   (block
    (call $print
     (i32.const 8)
    )
    (drop
     (call $check)
    )
   )
   (set_local $0
    (i32.const 6)
   )
  )
  (loop $shape$3$continue
   (if
    (i32.eq
     (get_local $0)
     (i32.const 6)
    )
    (block
     (set_local $0
      (i32.const 0)
     )
     (call $print
      (i32.const 5)
     )
     (br_if $shape$3$continue
      (i32.eqz
       (i32.rem_u
        (call $check)
        (i32.const 2)
       )
      )
     )
     (set_local $0
      (i32.const 6)
     )
     (br $shape$3$continue)
    )
   )
   (call $print
    (i32.const 4)
   )
   (br_if $shape$3$continue
    (i32.eqz
     (i32.rem_u
      (tee_local $1
       (call $check)
      )
      (i32.const 3)
     )
    )
   )
   (if
    (i32.eq
     (i32.rem_u
      (get_local $1)
      (i32.const 3)
     )
     (i32.const 1)
    )
    (block
     (set_local $0
      (i32.const 6)
     )
     (br $shape$3$continue)
    )
    (block
     (call $print
      (i32.const 2)
     )
     (drop
      (call $check)
     )
     (set_local $0
      (i32.const 6)
     )
     (br $shape$3$continue)
    )
   )
  )
 )
)
