# expected: 000001BC, 000003BC, 000002BC, 000003BC, 000004BC, 000000AC
    .text
_start:
    li x5, 0x0
    # case1: less -> should jump -> write 0x1BC
    add x1, x0, 0x001
    add x2, x0, 0x002
    blt x1, x2, case1_target
    add x31, x0, 0x3BC
case1_target:
    add x31, x0, 0x1BC

back_label:
    bne x5, x0, back_label_flagged
    add x1, x0, 0x000
    add x2, x0, 0x001
    add x31, x0, 0x3BC
    jal x0, back_label_cont
back_label_flagged:
    add x31, x0, 0x0BC
    add x5, x0, 0x0
    jal x0, after_backward
back_label_cont:

    # case2: equal -> should not jump -> write 0x2BC
    add x1, x0, 0x1BC
    add x2, x0, 0x1BC
    blt x1, x2, case2_target
    add x31, x0, 0x2BC
case2_target:
    add x31, x0, 0x3BC

    # case3: negative vs positive -> should jump -> write 0x4BC
    add x1, x0, -5
    add x2, x0, 0x001
    blt x1, x2, case3_target
    add x31, x0, 0x5BC
case3_target:
    add x31, x0, 0x4BC

    # backward branch trigger
    add x5, x0, 0x1
    add x1, x0, 0x002
    add x2, x0, 0x001
    blt x1, x2, back_label

    # same-register -> not taken -> write 0x0AC
    add x1, x0, 0x00A
    blt x1, x1, same_reg_target
    add x31, x0, 0x0AC
same_reg_target:
    add x31, x0, 0x6BC

after_backward:
    add x31, x0, 0x0AC
