(module
    (global $g1 (mut i32) (i32.const 0))
    (global $g2 (mut i32) (i32.const 99))
    (func $main (export "main")
        (if (i32.eq (get_global $g1) (i32.const 0))
            (then)
            (else unreachable)
        )
        (if (i32.eq (get_global $g2) (i32.const 99))
            (then)
            (else unreachable)
        )

        (set_global $g1 (i32.add (get_global $g1) (i32.const 1)))
        (set_global $g2 (i32.sub (get_global $g2) (i32.const 1)))

        (if (i32.eq (get_global $g1) (i32.const 1))
            (then)
            (else unreachable)
        )
        (if (i32.eq (get_global $g2) (i32.const 98))
            (then)
            (else unreachable)
        )
    )
)
