LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecOpImmInstr
void ExecOpImmInstr(State *state, uint32_t instr) {
    uint8_t funct3 = (instr >> 12) & SetNBits(3);
    uint8_t funct7 = (instr >> 25) & SetNBits(7);
    uint8_t funct6 = (instr >> 26) & SetNBits(6);

    switch (funct3) {
    case 0x0:
        ExecAddi(state, instr);
        break;
    case 0x1:
        ExecSlli(state, instr);
        break;
    case 0x2:
        ExecSlti(state, instr);
        break;
    case 0x3:
        ExecSltiu(state, instr);
        break;
    case 0x4:
        ExecXori(state, instr);
        break;
    case 0x5:
        if (funct6 == 0x00) {
            ExecSrli(state, instr);
        } else if (funct6 == 0x10) {
            ExecSrai(state, instr);
        }
        break;
    case 0x6:
        ExecOri(state, instr);
        break;
    case 0x7:
        ExecAndi(state, instr);
        break;
    default:
        Error("Unknown OP_IMM instruction: %2x", funct3);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0xc, %eax
movl %eax, -0x24(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x24(%rbp), %eax
andl %ecx, %eax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x19, %eax
movl %eax, -0x20(%rbp)
movl $0x7, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x20(%rbp), %eax
andl %ecx, %eax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x1a, %eax
movl %eax, -0x1c(%rbp)
movl $0x6, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x1c(%rbp), %eax
andl %ecx, %eax
movb %al, -0xf(%rbp)
movzbl -0xd(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x7, %rax
ja 0x4c47
movq -0x18(%rbp), %rax
leaq 0xa622(%rip), %rcx      # 0xf1c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x44d0
jmp 0x4c59
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4580
jmp 0x4c59
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4630
jmp 0x4c59
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x46f0
jmp 0x4c59
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x47b0
jmp 0x4c59
movzbl -0xf(%rbp), %eax
cmpl $0x0, %eax
jne 0x4c12
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4860
jmp 0x4c29
movzbl -0xf(%rbp), %eax
cmpl $0x10, %eax
jne 0x4c27
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4910
jmp 0x4c29
jmp 0x4c59
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x49c0
jmp 0x4c59
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4a70
jmp 0x4c59
movzbl -0xd(%rbp), %esi
leaq 0xa8a3(%rip), %rdi      # 0xf4f5
movb $0x0, %al
callq 0xd690
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecAdd
void ExecAdd(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    state->x[rd] = state->x[rs1] + state->x[rs2];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
addq 0x8008(%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecMulh
void ExecMulh(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    state->x[rd] =
        ((__int128_t)state->x[rs1] * (__int128_t)state->x[rs2]) >> XLEN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, -0x20(%rbp)
movl $0x5, %edi
movl %edi, -0x1c(%rbp)
callq 0x12b0
movl -0x1c(%rbp), %edi
movq %rax, %rcx
movl -0x20(%rbp), %eax
andl %ecx, %eax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, -0x18(%rbp)
callq 0x12b0
movl -0x1c(%rbp), %edi
movq %rax, %rcx
movl -0x18(%rbp), %eax
andl %ecx, %eax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, -0x14(%rbp)
callq 0x12b0
movq %rax, %rcx
movl -0x14(%rbp), %eax
andl %ecx, %eax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rcx
movzbl -0xe(%rbp), %eax
movq 0x8008(%rcx,%rax,8), %rax
movzbl -0xf(%rbp), %edx
movq 0x8008(%rcx,%rdx,8), %rcx
imulq %rcx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecMulhsu
void ExecMulhsu(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    state->x[rd] =
        ((__int128_t)state->x[rs1] * (__uint128_t)(uint64_t)state->x[rs2]) >> XLEN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, -0x28(%rbp)
movl $0x5, %edi
movl %edi, -0x24(%rbp)
callq 0x12b0
movl -0x24(%rbp), %edi
movq %rax, %rcx
movl -0x28(%rbp), %eax
andl %ecx, %eax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, -0x20(%rbp)
callq 0x12b0
movl -0x24(%rbp), %edi
movq %rax, %rcx
movl -0x20(%rbp), %eax
andl %ecx, %eax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, -0x1c(%rbp)
callq 0x12b0
movq %rax, %rcx
movl -0x1c(%rbp), %eax
andl %ecx, %eax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rcx
movzbl -0xe(%rbp), %eax
movq 0x8008(%rcx,%rax,8), %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movq %rdx, -0x18(%rbp)
movzbl -0xf(%rbp), %edx
movq 0x8008(%rcx,%rdx,8), %rcx
mulq %rcx
movq -0x18(%rbp), %rax
imulq %rcx, %rax
addq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSltu
void ExecSltu(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    state->x[rd] = ((uint64_t)state->x[rs1]) < ((uint64_t)state->x[rs2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzbl -0xf(%rbp), %edx
cmpq 0x8008(%rcx,%rdx,8), %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecDiv
void ExecDiv(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    if (state->x[rs2] == 0) {
        state->x[rd] = -1;
    } else if (state->x[rs1] == -((int64_t)1 << 63) && state->x[rs2] == -1) {
        state->x[rd] = -((int64_t)1 << 63);
    } else {
        state->x[rd] = state->x[rs1] / state->x[rs2];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
cmpq $0x0, 0x8008(%rax,%rcx,8)
jne 0x5524
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq $-0x1, 0x8008(%rax,%rcx,8)
jmp 0x55a8
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
cmpq %rdx, 0x8008(%rax,%rcx,8)
jne 0x556f
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
cmpq $-0x1, 0x8008(%rax,%rcx,8)
jne 0x556f
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movq %rdx, 0x8008(%rax,%rcx,8)
jmp 0x55a6
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzbl -0xf(%rbp), %edx
movl %edx, %esi
cqto
idivq 0x8008(%rcx,%rsi,8)
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
jmp 0x55a8
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSrl
void ExecSrl(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    // In RV64I, Use SetNBits(6).
    state->x[rd] =
        ((uint64_t)state->x[rs1]) >> ((uint64_t)(state->x[rs2] & SetNBits(5)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rdx
andq %rax, %rcx
shrq %cl, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecDivu
void ExecDivu(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    if (state->x[rs2] == 0) {
        state->x[rd] = ~((uint64_t)0);
    } else {
        state->x[rd] = (uint64_t)state->x[rs1] / (uint64_t)state->x[rs2];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
cmpq $0x0, 0x8008(%rax,%rcx,8)
jne 0x5721
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq $-0x1, 0x8008(%rax,%rcx,8)
jmp 0x5758
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzbl -0xf(%rbp), %edx
movl %edx, %esi
xorl %edx, %edx
divq 0x8008(%rcx,%rsi,8)
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecJal
void ExecJal(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    int32_t offset = Sext((instr >> 31 & SetNBits(1)) << 20 |
                              (instr >> 12 & SetNBits(8)) << 12 |
                              (instr >> 20 & SetNBits(1)) << 11 |
                              (instr >> 21 & SetNBits(10)) << 1,
                          20);

    state->x[rd] = state->pc + sizeof(instr);
    state->pc += offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x58(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x58(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x1f, %eax
movl %eax, %eax
movq %rax, -0x50(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x50(%rbp), %rax
andq %rcx, %rax
shlq $0x14, %rax
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %eax
shrl $0xc, %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
movl $0x8, %edi
callq 0x12b0
movq -0x48(%rbp), %rcx
movq %rax, %rdx
movq -0x40(%rbp), %rax
andq %rdx, %rcx
shlq $0xc, %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
andq %rdx, %rcx
shlq $0xb, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
shrl $0x15, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0xa, %edi
callq 0x12b0
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
shlq %rax
orq %rax, %rdi
movl $0x14, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdx
addq $0x4, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecJalr
void ExecJalr(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    int32_t offset = Sext(instr >> 20 & SetNBits(12), 11);

    uint64_t t = state->pc + sizeof(instr);
    state->pc = (state->x[rs1] + offset) & ~1;
    state->x[rd] = t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0xc, %edi
callq 0x12b0
movq -0x28(%rbp), %rdi
andq %rax, %rdi
movl $0xb, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rcx
movslq -0x14(%rbp), %rax
addq %rax, %rcx
andq $-0x2, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecLb
void ExecLb(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    int32_t offset = Sext(instr >> 20 & SetNBits(12), 11);

    state->x[rd] = Sext(Read8(state, state->x[rs1] + offset), 7);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0xc, %edi
callq 0x12b0
movq -0x20(%rbp), %rdi
andq %rax, %rdi
movl $0xb, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
callq 0x3160
movzbl %al, %eax
movl %eax, %edi
movl $0x7, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecLw
void ExecLw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    int32_t offset = Sext(instr >> 20 & SetNBits(12), 11);

    state->x[rd] = Sext(Read32(state, state->x[rs1] + offset), 31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0xc, %edi
callq 0x12b0
movq -0x20(%rbp), %rdi
andq %rax, %rdi
movl $0xb, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
callq 0x3100
movl %eax, %eax
movl %eax, %edi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecLoadInstr
void ExecLoadInstr(State *state, uint32_t instr) {
    uint8_t funct3 = (instr >> 12) & SetNBits(3);

    switch (funct3) {
    case 0x0:
        ExecLb(state, instr);
        break;
    case 0x1:
        ExecLh(state, instr);
        break;
    case 0x2:
        ExecLw(state, instr);
        break;
    case 0x3:
        ExecLd(state, instr);
        break;
    case 0x4:
        ExecLbu(state, instr);
        break;
    case 0x5:
        ExecLhu(state, instr);
        break;
    case 0x6:
        ExecLwu(state, instr);
        break;
    default:
        Error("Unimplemented Load Instruction: funct3=0x%x", funct3);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0xc, %eax
movl %eax, -0x1c(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x1c(%rbp), %eax
andl %ecx, %eax
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x6, %rax
ja 0x6601
movq -0x18(%rbp), %rax
leaq 0x8c72(%rip), %rcx      # 0xf208
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x5fe0
jmp 0x6613
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x60b0
jmp 0x6613
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6180
jmp 0x6613
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6250
jmp 0x6613
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6310
jmp 0x6613
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x63d0
jmp 0x6613
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6490
jmp 0x6613
movzbl -0xd(%rbp), %esi
leaq 0x8f09(%rip), %rdi      # 0xf515
movb $0x0, %al
callq 0xd690
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSb
void ExecSb(State *state, uint32_t instr) {
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);
    int32_t offset = Sext(
        ((instr >> 25 & SetNBits(7)) << 5) | ((instr >> 7 & SetNBits(5))), 11);

    // printf("sb: pc: %llx, addr: %llx, val: %d\n", state->pc, state->x[rs1] + offset, (uint8_t)state->x[rs2]);
    Write8(state, state->x[rs1] + offset,
           (uint8_t)state->x[rs2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x19, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x7, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
orq %rax, %rdi
movl $0xb, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movzbl %al, %edx
callq 0x31c0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecStoreInstr
void ExecStoreInstr(State *state, uint32_t instr) {
    uint8_t funct3 = (instr >> 12) & SetNBits(3);

    switch (funct3) {
    case 0x0:
        ExecSb(state, instr);
        break;
    case 0x1:
        ExecSh(state, instr);
        break;
    case 0x2:
        ExecSw(state, instr);
        break;
    case 0x3:
        ExecSd(state, instr);
        break;
    default:
        Error("Unimplemented Store Instruction: funct3=0x%x", funct3);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0xc, %eax
movl %eax, -0x1c(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x1c(%rbp), %eax
andl %ecx, %eax
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x6a67
movq -0x18(%rbp), %rax
leaq 0x87fe(%rip), %rcx      # 0xf224
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6620
jmp 0x6a79
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6710
jmp 0x6a79
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6800
jmp 0x6a79
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x68f0
jmp 0x6a79
movzbl -0xd(%rbp), %esi
leaq 0x8acf(%rip), %rdi      # 0xf541
movb $0x0, %al
callq 0xd690
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecBeq
void ExecBeq(State *state, uint32_t instr) {
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);
    int32_t offset = Sext(((instr >> 31 & SetNBits(1)) << 12) |
                              ((instr >> 7 & SetNBits(1)) << 11) |
                              ((instr >> 25 & SetNBits(6)) << 5) |
                              ((instr >> 8 & SetNBits(4)) << 1),
                          12);

    if (state->x[rs1] == state->x[rs2])
        state->pc += offset;
    else
        state->pc += sizeof(instr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x60(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x60(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x58(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x58(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x1f, %eax
movl %eax, %eax
movq %rax, -0x50(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x50(%rbp), %rax
andq %rcx, %rax
shlq $0xc, %rax
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x48(%rbp), %rcx
movq %rax, %rdx
movq -0x40(%rbp), %rax
andq %rdx, %rcx
shlq $0xb, %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
shrl $0x19, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x6, %edi
callq 0x12b0
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
andq %rdx, %rcx
shlq $0x5, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
shrl $0x8, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x4, %edi
callq 0x12b0
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
shlq %rax
orq %rax, %rdi
movl $0xc, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzbl -0xe(%rbp), %edx
cmpq 0x8008(%rcx,%rdx,8), %rax
jne 0x6bc4
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x6bd2
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecBranchInstr
void ExecBranchInstr(State *state, uint32_t instr) {
    uint8_t funct3 = (instr >> 12) & SetNBits(3);

    switch (funct3) {
    case 0x0:
        ExecBeq(state, instr);
        break;
    case 0x1:
        ExecBne(state, instr);
        break;
    case 0x4:
        ExecBlt(state, instr);
        break;
    case 0x5:
        ExecBge(state, instr);
        break;
    case 0x6:
        ExecBltu(state, instr);
        break;
    case 0x7:
        ExecBgeu(state, instr);
        break;
    default:
        Error("Unimplemented Branch Instruction: funct3=0x%x", funct3);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0xc, %eax
movl %eax, -0x1c(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x1c(%rbp), %eax
andl %ecx, %eax
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x7, %rax
ja 0x7363
movq -0x18(%rbp), %rax
leaq 0x7f2e(%rip), %rcx      # 0xf234
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6a80
jmp 0x7375
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6be0
jmp 0x7375
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6d40
jmp 0x7375
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6ea0
jmp 0x7375
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7000
jmp 0x7375
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7160
jmp 0x7375
movzbl -0xd(%rbp), %esi
leaq 0x8200(%rip), %rdi      # 0xf56e
movb $0x0, %al
callq 0xd690
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecAddiw
void ExecAddiw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    int32_t immediate = Sext((instr >> 20) & SetNBits(12), 11);

    state->x[rd] = Sext((state->x[rs1] + immediate) & SetNBits(32), 31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0xc, %edi
callq 0x12b0
movq -0x28(%rbp), %rdi
andq %rax, %rdi
movl $0xb, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl $0x20, %edi
callq 0x12b0
movq -0x20(%rbp), %rdi
andq %rax, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSlliw
void ExecSlliw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t immediate = (instr >> 20) & SetNBits(5);

    // state->x[rd] = Sext((state->x[rs1] << (uint32_t)immediate) & SetNBits(32), 31);
    state->x[rd] = (int64_t)(int32_t)(state->x[rs1] << (uint32_t)immediate);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movzbl -0xf(%rbp), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movslq %eax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSrliw
void ExecSrliw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t immediate = (instr >> 20) & SetNBits(5);

    state->x[rd] =
        Sext((uint64_t)(state->x[rs1] & SetNBits(32)) >> immediate, 31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movl $0x20, %edi
callq 0x12b0
movq -0x18(%rbp), %rdi
andq %rax, %rdi
movzbl -0xf(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
shrq %cl, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecOpImm32Instr
void ExecOpImm32Instr(State *state, uint32_t instr) {
    uint8_t funct3 = (instr >> 12) & SetNBits(3);
    uint8_t funct7 = (instr >> 25) & SetNBits(7);

    switch (funct3) {
    case 0x0:
        ExecAddiw(state, instr);
        break;
    case 0x1:
        ExecSlliw(state, instr);
        break;
    case 0x5:
        if (funct7 == 0x00) {
            ExecSrliw(state, instr);
        } else if (funct7 == 0x20) {
            ExecSraiw(state, instr);
        }
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0xc, %eax
movl %eax, -0x1c(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x1c(%rbp), %eax
andl %ecx, %eax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x19, %eax
movl %eax, -0x18(%rbp)
movl $0x7, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x18(%rbp), %eax
andl %ecx, %eax
movb %al, -0xe(%rbp)
movzbl -0xd(%rbp), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x770c
jmp 0x76f8
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x771a
jmp 0x7702
movl -0x14(%rbp), %eax
subl $0x5, %eax
je 0x7728
jmp 0x7758
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7380
jmp 0x7758
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7450
jmp 0x7758
movzbl -0xe(%rbp), %eax
cmpl $0x0, %eax
jne 0x773f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7500
jmp 0x7756
movzbl -0xe(%rbp), %eax
cmpl $0x20, %eax
jne 0x7754
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x75d0
jmp 0x7756
jmp 0x7758
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecAddw
void ExecAddw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    state->x[rd] = Sext((state->x[rs1] + state->x[rs2]) & SetNBits(32), 31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzbl -0xf(%rbp), %edx
addq 0x8008(%rcx,%rdx,8), %rax
movq %rax, -0x18(%rbp)
movl $0x20, %edi
callq 0x12b0
movq -0x18(%rbp), %rdi
andq %rax, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSllw
void ExecSllw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    state->x[rd] =
        Sext((state->x[rs1] << (state->x[rs2] & SetNBits(5))) & SetNBits(32), 31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x28(%rbp), %rcx
movq %rax, %rdx
movq -0x20(%rbp), %rax
andq %rdx, %rcx
shlq %cl, %rax
movq %rax, -0x18(%rbp)
movl $0x20, %edi
callq 0x12b0
movq -0x18(%rbp), %rdi
andq %rax, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecDivw
void ExecDivw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    if (state->x[rs2] == 0) {
        state->x[rd] = -1;
    } else if ((int32_t)(state->x[rs1] & SetNBits(32)) == -((int32_t)1 << 31) && (int32_t)(state->x[rs2] & SetNBits(32)) == -1) {
        state->x[rd] = -((int32_t)1 << 31);
    } else {
        state->x[rd] = Sext(((int32_t)(state->x[rs1] & SetNBits(32)) / (int32_t)(state->x[rs2] & SetNBits(32))), 31);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
cmpq $0x0, 0x8008(%rax,%rcx,8)
jne 0x7b84
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq $-0x1, 0x8008(%rax,%rcx,8)
jmp 0x7c71
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movl $0x20, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
cmpl $0x80000000, %eax       # imm = 0x80000000
jne 0x7bf6
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movl $0x20, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
cmpl $-0x1, %eax
jne 0x7bf6
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq $-0x80000000, 0x8008(%rax,%rcx,8) # imm = 0x80000000
jmp 0x7c6f
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x50(%rbp), %rax
andq %rcx, %rax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movl $0x20, %edi
callq 0x12b0
movq -0x48(%rbp), %rcx
movq %rax, %rdx
movl -0x3c(%rbp), %eax
andq %rdx, %rcx
cltd
idivl %ecx
movslq %eax, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
jmp 0x7c71
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSrlw
void ExecSrlw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    state->x[rd] = Sext((uint32_t)state->x[rs1] >> state->x[rs2], 31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzbl -0xf(%rbp), %edx
movq 0x8008(%rcx,%rdx,8), %rcx
shrl %cl, %eax
movl %eax, %eax
movl %eax, %edi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecDivuw
void ExecDivuw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    if (state->x[rs2] == 0) {
        state->x[rd] = ~((uint64_t)0);
    } else {
        state->x[rd] = Sext((state->x[rs1] & SetNBits(32)) /
                                (state->x[rs2] & SetNBits(32)),
                            31);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
cmpq $0x0, 0x8008(%rax,%rcx,8)
jne 0x7df1
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq $-0x1, 0x8008(%rax,%rcx,8)
jmp 0x7e6e
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movl $0x20, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
andq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movl $0x20, %edi
callq 0x12b0
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
andq %rdx, %rcx
cqto
idivq %rcx
movq %rax, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSraw
void ExecSraw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    state->x[rd] =
        Sext((int32_t)(state->x[rs1] & SetNBits(32)) >> (uint32_t)(state->x[rs2] & SetNBits(5)), 31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movl $0x20, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x20(%rbp), %rcx
movq %rax, %rdx
movl -0x14(%rbp), %eax
andq %rdx, %rcx
sarl %cl, %eax
movslq %eax, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecRemw
void ExecRemw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    if (state->x[rs2] == 0) {
        state->x[rd] = state->x[rs1];
    } else {
        state->x[rd] = Sext((state->x[rs1] % state->x[rs2]) & SetNBits(32), 31);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
cmpq $0x0, 0x8008(%rax,%rcx,8)
jne 0x802d
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
jmp 0x8083
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzbl -0xf(%rbp), %edx
movl %edx, %esi
cqto
idivq 0x8008(%rcx,%rsi,8)
movq %rdx, -0x30(%rbp)
movl $0x20, %edi
callq 0x12b0
movq -0x30(%rbp), %rdi
andq %rax, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecRemuw
void ExecRemuw(State *state, uint32_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint8_t rs1 = (instr >> 15) & SetNBits(5);
    uint8_t rs2 = (instr >> 20) & SetNBits(5);

    if (state->x[rs2] == 0) {
        state->x[rd] = state->x[rs1];
    } else {
        state->x[rd] = Sext((state->x[rs1] & SetNBits(32)) %
                                (state->x[rs2] & SetNBits(32)),
                            31);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0xf, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x14, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
cmpq $0x0, 0x8008(%rax,%rcx,8)
jne 0x813d
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
jmp 0x81ba
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movl $0x20, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
andq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movl $0x20, %edi
callq 0x12b0
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
andq %rdx, %rcx
cqto
idivq %rcx
movq %rdx, %rdi
movl $0x1f, %esi
callq 0x4470
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq