(module
 (type $0 (func (result i32)))
 (type $1 (func))
 (type $2 (func (param i32)))
 (import "spectest" "print" (func $print (param i32)))
 (memory $0 1 1)
 (export "mem" (memory $0))
 (start $main)
 (func $check (result i32)
  (if
   (i32.eq
    (i32.load
     (i32.const 4)
    )
    (i32.const 120)
   )
   (then
    (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
  (local $0 i32)
  (local $1 i32)
  (i32.store
   (i32.const 8)
   (i32.const 67)
  )
  (i32.store
   (i32.const 12)
   (i32.const 131)
  )
  (i32.store
   (i32.const 16)
   (i32.const 49)
  )
  (i32.store
   (i32.const 20)
   (i32.const 36)
  )
  (i32.store
   (i32.const 24)
   (i32.const 112)
  )
  (i32.store
   (i32.const 28)
   (i32.const 161)
  )
  (i32.store
   (i32.const 32)
   (i32.const 62)
  )
  (i32.store
   (i32.const 36)
   (i32.const 166)
  )
  (i32.store
   (i32.const 40)
   (i32.const 16)
  )
  (i32.store
   (i32.const 44)
   (i32.const 88)
  )
  (i32.store
   (i32.const 48)
   (i32.const 176)
  )
  (i32.store
   (i32.const 52)
   (i32.const 152)
  )
  (i32.store
   (i32.const 56)
   (i32.const 161)
  )
  (i32.store
   (i32.const 60)
   (i32.const 194)
  )
  (i32.store
   (i32.const 64)
   (i32.const 117)
  )
  (i32.store
   (i32.const 68)
   (i32.const 180)
  )
  (i32.store
   (i32.const 72)
   (i32.const 60)
  )
  (i32.store
   (i32.const 76)
   (i32.const 166)
  )
  (i32.store
   (i32.const 80)
   (i32.const 55)
  )
  (i32.store
   (i32.const 84)
   (i32.const 183)
  )
  (i32.store
   (i32.const 88)
   (i32.const 150)
  )
  (i32.store
   (i32.const 92)
   (i32.const 73)
  )
  (i32.store
   (i32.const 96)
   (i32.const 196)
  )
  (i32.store
   (i32.const 100)
   (i32.const 143)
  )
  (i32.store
   (i32.const 104)
   (i32.const 76)
  )
  (i32.store
   (i32.const 108)
   (i32.const 182)
  )
  (i32.store
   (i32.const 112)
   (i32.const 97)
  )
  (i32.store
   (i32.const 116)
   (i32.const 140)
  )
  (i32.store
   (i32.const 120)
   (i32.const 126)
  )
  (i32.store
   (i32.const 124)
   (i32.const 3)
  )
  (block
   (block $block$10$break
    (block $block$4$break
     (block $block$3$break
      (block
       (call $print
        (i32.const 0)
       )
       (local.set $0
        (call $check)
       )
      )
      (if
       (i32.eq
        (i32.rem_u
         (local.get $0)
         (i32.const 4)
        )
        (i32.const 0)
       )
       (then
        (br $block$3$break)
       )
       (else
        (if
         (i32.eq
          (i32.rem_u
           (local.get $0)
           (i32.const 4)
          )
          (i32.const 2)
         )
         (then
          (block
           (block
            (call $print
             (i32.const 7)
            )
            (local.set $0
             (call $check)
            )
           )
           (if
            (i32.eq
             (i32.rem_u
              (local.get $0)
              (i32.const 3)
             )
             (i32.const 0)
            )
            (then
             (br $block$3$break)
            )
            (else
             (br $block$10$break)
            )
           )
          )
         )
         (else
          (br $block$4$break)
         )
        )
       )
      )
     )
     (block
      (block
       (call $print
        (i32.const 2)
       )
       (local.set $0
        (call $check)
       )
      )
      (if
       (i32.eq
        (i32.rem_u
         (local.get $0)
         (i32.const 2)
        )
        (i32.const 0)
       )
       (then
        (br $block$4$break)
       )
       (else
        (br $block$10$break)
       )
      )
     )
    )
    (loop $shape$6$continue
     (block
      (call $print
       (i32.const 3)
      )
      (local.set $0
       (call $check)
      )
     )
     (block
      (br $shape$6$continue)
     )
    )
   )
   (block
    (block
     (call $print
      (i32.const 9)
     )
     (local.set $0
      (call $check)
     )
    )
   )
  )
 )
)
(module
 (type $0 (func (result i32)))
 (type $1 (func))
 (type $2 (func (param i32)))
 (import "spectest" "print" (func $print (param i32)))
 (memory $0 1 1)
 (export "mem" (memory $0))
 (start $main)
 (func $check (result i32)
  (if
   (i32.eq
    (i32.load
     (i32.const 4)
    )
    (i32.const 120)
   )
   (then
    (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
  (local $0 i32)
  (i32.store
   (i32.const 8)
   (i32.const 67)
  )
  (i32.store
   (i32.const 12)
   (i32.const 131)
  )
  (i32.store
   (i32.const 16)
   (i32.const 49)
  )
  (i32.store
   (i32.const 20)
   (i32.const 36)
  )
  (i32.store
   (i32.const 24)
   (i32.const 112)
  )
  (i32.store
   (i32.const 28)
   (i32.const 161)
  )
  (i32.store
   (i32.const 32)
   (i32.const 62)
  )
  (i32.store
   (i32.const 36)
   (i32.const 166)
  )
  (i32.store
   (i32.const 40)
   (i32.const 16)
  )
  (i32.store
   (i32.const 44)
   (i32.const 88)
  )
  (i32.store
   (i32.const 48)
   (i32.const 176)
  )
  (i32.store
   (i32.const 52)
   (i32.const 152)
  )
  (i32.store
   (i32.const 56)
   (i32.const 161)
  )
  (i32.store
   (i32.const 60)
   (i32.const 194)
  )
  (i32.store
   (i32.const 64)
   (i32.const 117)
  )
  (i32.store
   (i32.const 68)
   (i32.const 180)
  )
  (i32.store
   (i32.const 72)
   (i32.const 60)
  )
  (i32.store
   (i32.const 76)
   (i32.const 166)
  )
  (i32.store
   (i32.const 80)
   (i32.const 55)
  )
  (i32.store
   (i32.const 84)
   (i32.const 183)
  )
  (i32.store
   (i32.const 88)
   (i32.const 150)
  )
  (i32.store
   (i32.const 92)
   (i32.const 73)
  )
  (i32.store
   (i32.const 96)
   (i32.const 196)
  )
  (i32.store
   (i32.const 100)
   (i32.const 143)
  )
  (i32.store
   (i32.const 104)
   (i32.const 76)
  )
  (i32.store
   (i32.const 108)
   (i32.const 182)
  )
  (i32.store
   (i32.const 112)
   (i32.const 97)
  )
  (i32.store
   (i32.const 116)
   (i32.const 140)
  )
  (i32.store
   (i32.const 120)
   (i32.const 126)
  )
  (i32.store
   (i32.const 124)
   (i32.const 3)
  )
  (call $print
   (i32.const 0)
  )
  (block $block$10$break
   (block $block$4$break
    (if
     (i32.and
      (local.tee $0
       (call $check)
      )
      (i32.const 3)
     )
     (then
      (if
       (i32.eq
        (i32.and
         (local.get $0)
         (i32.const 3)
        )
        (i32.const 2)
       )
       (then
        (call $print
         (i32.const 7)
        )
        (br_if $block$10$break
         (i32.rem_u
          (call $check)
          (i32.const 3)
         )
        )
       )
       (else
        (br $block$4$break)
       )
      )
     )
    )
    (call $print
     (i32.const 2)
    )
    (br_if $block$10$break
     (i32.and
      (call $check)
      (i32.const 1)
     )
    )
   )
   (loop $shape$6$continue
    (call $print
     (i32.const 3)
    )
    (drop
     (call $check)
    )
    (br $shape$6$continue)
   )
  )
  (call $print
   (i32.const 9)
  )
  (drop
   (call $check)
  )
 )
)
