🔌 v2 plugin system initialized from nyash.toml
✅ v2 plugin system fully configured
🚀 Nyash MIR Compiler - Processing file: local_tests/typeop_in_if_loop_poc.hako 🚀
🚀 MIR Output for local_tests/typeop_in_if_loop_poc.hako:
; MIR Module: main

; Module Statistics:
;   Functions: 1
;   Globals: 0
;   Total Blocks: 7
;   Total Instructions: 38
;   Pure Functions: 1

define void @main() {
  ; Function Statistics:
  ;   Blocks: 7
  ;   Instructions: 38
  ;   Values: 0
  ;   Phi Functions: 3
  ;   Pure: yes
  ;   TypeOp: 2 (check: 2, cast: 0)

bb0:
    0: safepoint
    1: %1 = const 1
    2: %2 = new IntegerBox(%1)
    3: call %2.birth(%1)
    4: %3 = typeop check %2 Integer
    5: br %3, label bb1, label bb2
    ; effects: pure|read|alloc

bb1:
    0: %4 = const "ok-if"
    1: %5 = new StringBox(%4)
    2: call %5.birth(%4)
    3: print %5
    4: br label bb3
    ; effects: pure|io|read|alloc

bb2:
    0: %6 = const "ng-if"
    1: %7 = new StringBox(%6)
    2: call %7.birth(%6)
    3: print %7
    4: br label bb3
    ; effects: pure|io|read|alloc

bb3:
    0: %8 = phi [%5, bb1], [%7, bb2]
    1: %10 = const 0
    2: %11 = new IntegerBox(%10)
    3: call %11.birth(%10)
    4: br label bb4
    ; effects: pure|read|alloc

bb4:  ; preds(bb5)
    0: %13 = phi [%2, bb3], [%13, bb5]
    1: %12 = phi [%11, bb3], [%20, bb5]
    2: %14 = const 1
    3: %15 = new IntegerBox(%14)
    4: call %15.birth(%14)
    5: %16 = icmp Lt %12, %15
    6: br %16, label bb5, label bb6
    ; effects: pure|read|alloc

bb5:
    0: safepoint
    1: %17 = typeop check %13 Integer
    2: print %17
    3: %18 = const 1
    4: %19 = new IntegerBox(%18)
    5: call %19.birth(%18)
    6: %20 = %12 Add %19
    7: br label bb4
    ; effects: pure|io|read|alloc

bb6:
    0: %21 = const void
    1: ret %21
}
