# expected: 000001BC, 000003BC, 000002BC, 000004BC, 000000BC, 000000AC
    .text
_start:
    li x5, 0x0
    # case1: unsigned greater -> should jump -> write 0x1BC
    add x1, x0, 0x0F0
    add x2, x0, 0x00F
    bgeu 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 jump -> write 0x2BC
    add x1, x0, 0x1BC
    add x2, x0, 0x1BC
    bgeu x1, x2, case2_target
    add x31, x0, 0x3BC
case2_target:
    add x31, x0, 0x2BC

    # case3: unsigned less -> should not jump -> write 0x4BC
    add x1, x0, 0x001
    add x2, x0, 0x002
    bgeu x1, x2, case3_target
    add x31, x0, 0x4BC
case3_target:
    # backward branch trigger
    add x5, x0, 0x1
    add x1, x0, 0x002
    add x2, x0, 0x001
    bgeu x1, x2, back_label

    # same-register unsigned -> should jump
    add x1, x0, 0x00A
    bgeu x1, x1, same_reg_target
    add x31, x0, 0x6BC
same_reg_target:
    add x31, x0, 0x0AC

after_backward:
    add x31, x0, 0x0AC
