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

    switch (funct3) {
    case 0x0:
        if (funct7 == 0x00) {
            ExecAddw(state, instr);
        } else if (funct7 == 0x01) {
            ExecMulw(state, instr);
        } else {
            ExecSubw(state, instr);
        }
        break;
    case 0x1:
        ExecSllw(state, instr);
        break;
    case 0x4:
        if (funct7 == 0x01) {
            ExecDivw(state, instr);
        }
        break;
    case 0x5:
        if (funct7 == 0x00) {
            ExecSrlw(state, instr);
        } else if (funct7 == 0x01) {
            ExecDivuw(state, instr);
        } else if (funct7 == 0x20) {
            ExecSraw(state, instr);
        }
        break;
    case 0x6:
        if (funct7 == 0x01) {
            ExecRemw(state, instr);
        }
        break;
    case 0x7:
        if (funct7 == 0x01) {
            ExecRemuw(state, instr);
        }
    }
}

// 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, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x20(%rbp), %eax
andl %ecx, %eax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x19, %eax
movl %eax, -0x1c(%rbp)
movl $0x7, %edi
callq 0x12b0
movq %rax, %rcx
movl -0x1c(%rbp), %eax
andl %ecx, %eax
movb %al, -0xe(%rbp)
movzbl -0xd(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x7, %rax
ja 0x8311
movq -0x18(%rbp), %rax
leaq 0x702c(%rip), %rcx      # 0xf254
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0xe(%rbp), %eax
cmpl $0x0, %eax
jne 0x8248
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7760
jmp 0x826d
movzbl -0xe(%rbp), %eax
cmpl $0x1, %eax
jne 0x825f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7830
jmp 0x826b
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7910
jmp 0x826d
jmp 0x8311
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x79e0
jmp 0x8311
movzbl -0xe(%rbp), %eax
cmpl $0x1, %eax
jne 0x8298
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7ae0
jmp 0x8311
movzbl -0xe(%rbp), %eax
cmpl $0x0, %eax
jne 0x82b1
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7c80
jmp 0x82e1
movzbl -0xe(%rbp), %eax
cmpl $0x1, %eax
jne 0x82c8
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7d50
jmp 0x82df
movzbl -0xe(%rbp), %eax
cmpl $0x20, %eax
jne 0x82dd
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7e80
jmp 0x82df
jmp 0x82e1
jmp 0x8311
movzbl -0xe(%rbp), %eax
cmpl $0x1, %eax
jne 0x82f8
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7f80
jmp 0x8311
movzbl -0xe(%rbp), %eax
cmpl $0x1, %eax
jne 0x830f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x8090
jmp 0x8311
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCAddi4spn
void ExecCAddi4spn(State *state, uint16_t instr) {
    uint32_t uimm =
        ((instr >> 7 & SetNBits(4)) << 6) | ((instr >> 11 & SetNBits(2)) << 4) |
        ((instr >> 5 & SetNBits(1)) << 3) | ((instr >> 6 & SetNBits(1)) << 2);
    uint8_t rd = (instr >> 2) & SetNBits(3);

    state->x[8 + rd] = state->x[2] + uimm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x58(%rbp)
movl $0x4, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x58(%rbp), %rax
andq %rcx, %rax
shlq $0x6, %rax
movq %rax, -0x48(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xb, %eax
cltq
movq %rax, -0x50(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x50(%rbp), %rcx
movq %rax, %rdx
movq -0x48(%rbp), %rax
andq %rdx, %rcx
shlq $0x4, %rcx
orq %rcx, %rax
movq %rax, -0x38(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x5, %eax
cltq
movq %rax, -0x40(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x40(%rbp), %rcx
movq %rax, %rdx
movq -0x38(%rbp), %rax
andq %rdx, %rcx
shlq $0x3, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x6, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
andq %rdx, %rcx
shlq $0x2, %rcx
orq %rcx, %rax
movl %eax, -0x10(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq 0x8018(%rax), %rdx
movl -0x10(%rbp), %eax
addq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCLw
void ExecCLw(State *state, uint16_t instr) {
    uint8_t uimm = ((instr >> 10 & SetNBits(3)) << 3) |
                   ((instr >> 5 & SetNBits(1)) << 6) |
                   ((instr >> 6 & SetNBits(1)) << 2);
    uint8_t rs1 = (instr >> 7) & SetNBits(3);
    uint8_t rd = (instr >> 2) & SetNBits(3);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xa, %eax
cltq
movq %rax, -0x50(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x50(%rbp), %rax
andq %rcx, %rax
shlq $0x3, %rax
movq %rax, -0x40(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x5, %eax
cltq
movq %rax, -0x48(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x48(%rbp), %rcx
movq %rax, %rdx
movq -0x40(%rbp), %rax
andq %rdx, %rcx
shlq $0x6, %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x6, %eax
cltq
movq %rax, -0x38(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
andq %rdx, %rcx
shlq $0x2, %rcx
orq %rcx, %rax
movb %al, -0xb(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xc(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl -0xc(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rsi
movzbl -0xb(%rbp), %eax
addq %rax, %rsi
callq 0x3100
movl %eax, %eax
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
addl $0x8, %ecx
movslq %ecx, %rcx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCLd
void ExecCLd(State *state, uint32_t instr) {
    uint8_t uimm =
        ((instr >> 5 & SetNBits(2)) << 6) | ((instr >> 10 & SetNBits(3)) << 3);
    uint8_t rs1 = instr >> 7 & SetNBits(3);
    uint8_t rd = instr >> 2 & SetNBits(3);

    state->x[8 + rd] = Read64(state, state->x[8 + rs1] + uimm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x5, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x2, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
shlq $0x6, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
shrl $0xa, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x3, %edi
callq 0x12b0
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
andq %rdx, %rcx
shlq $0x3, %rcx
orq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x2, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rsi
movzbl -0xd(%rbp), %eax
addq %rax, %rsi
callq 0x30a0
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCSw
void ExecCSw(State *state, uint16_t instr) {
    uint8_t uimm = ((instr >> 10 & SetNBits(3)) << 3) |
                   ((instr >> 5 & SetNBits(1)) << 6) |
                   ((instr >> 6 & SetNBits(1)) << 2);
    uint8_t rs1 = (instr >> 7) & SetNBits(3);
    uint8_t rs2 = (instr >> 2) & SetNBits(3);

    Write32(state, state->x[8 + rs1] + uimm, state->x[8 + rs2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xa, %eax
cltq
movq %rax, -0x48(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x48(%rbp), %rax
andq %rcx, %rax
shlq $0x3, %rax
movq %rax, -0x38(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x5, %eax
cltq
movq %rax, -0x40(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x40(%rbp), %rcx
movq %rax, %rdx
movq -0x38(%rbp), %rax
andq %rdx, %rcx
shlq $0x6, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x6, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
andq %rdx, %rcx
shlq $0x2, %rcx
orq %rcx, %rax
movb %al, -0xb(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xc(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x18(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl -0xc(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rsi
movzbl -0xb(%rbp), %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rax
movl %eax, %edx
callq 0x4310
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCSd
void ExecCSd(State *state, uint32_t instr) {
    uint8_t uimm = ((instr >> 10 & SetNBits(3)) << 3) |
                   ((instr >> 5 & SetNBits(2)) << 6);
    uint8_t rs1 = (instr >> 7) & SetNBits(3);
    uint8_t rs2 = (instr >> 2) & SetNBits(3);

    Write64(state, state->x[8 + rs1] + uimm, state->x[8 + rs2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0xa, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
shlq $0x3, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
shrl $0x5, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
andq %rdx, %rcx
shlq $0x6, %rcx
orq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
shrl $0x2, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rsi
movzbl -0xd(%rbp), %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movzbl -0xf(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rdx
callq 0x4360
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCAddi
void ExecCAddi(State *state, uint16_t instr) {
    int32_t imm = Sext(
        ((instr >> 12 & SetNBits(1)) << 5) | (instr >> 2 & SetNBits(5)), 5);

    if (imm == 0) {
        Error("Invalid c.addi immediate");
    }
    uint8_t rd = instr >> 7 & SetNBits(5);

    state->x[rd] = state->x[rd] + imm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x28(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
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 $0x5, %esi
callq 0x4470
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x8925
leaq 0x6c7e(%rip), %rdi      # 0xf59c
movb $0x0, %al
callq 0xd690
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x38(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rdx
movslq -0x10(%rbp), %rax
addq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0x11(%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: ExecCAddiw
void ExecCAddiw(State *state, uint16_t instr) {
    int32_t imm = Sext(
        ((instr >> 12 & SetNBits(1)) << 5) | ((instr >> 2) & SetNBits(5)), 5);
    uint8_t rd = (instr >> 7) & SetNBits(5);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x40(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
andq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x38(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
orq %rax, %rdi
movl $0x5, %esi
callq 0x4470
movl %eax, -0x10(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movslq -0x10(%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 -0x11(%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: ExecCLi
void ExecCLi(State *state, uint16_t instr) {
    int32_t imm = Sext(
        ((instr >> 12 & SetNBits(1)) << 5) | (instr >> 2 & SetNBits(5)), 5);
    uint8_t rd = (instr >> 7) & SetNBits(5);

    state->x[rd] = imm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x38(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x30(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
orq %rax, %rdi
movl $0x5, %esi
callq 0x4470
movl %eax, -0x10(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0x11(%rbp)
movslq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl -0x11(%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: ExecCAddi16sp
void ExecCAddi16sp(State *state, uint16_t instr) {
    int32_t imm_t = (instr >> 2) & SetNBits(5);
    int32_t imm = Sext(
        ((instr >> 12 & SetNBits(1)) << 9) | ((imm_t >> 1 & SetNBits(2)) << 7) |
            ((imm_t >> 3 & SetNBits(1)) << 6) | ((imm_t & SetNBits(1)) << 5) |
            ((imm_t >> 4 & SetNBits(1)) << 4),
        9);

    state->x[2] = state->x[2] + imm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x68(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x68(%rbp), %rax
andq %rcx, %rax
movl %eax, -0x10(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x60(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x60(%rbp), %rax
andq %rcx, %rax
shlq $0x9, %rax
movq %rax, -0x50(%rbp)
movl -0x10(%rbp), %eax
sarl %eax
cltq
movq %rax, -0x58(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x58(%rbp), %rcx
movq %rax, %rdx
movq -0x50(%rbp), %rax
andq %rdx, %rcx
shlq $0x7, %rcx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x10(%rbp), %eax
sarl $0x3, %eax
cltq
movq %rax, -0x48(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x48(%rbp), %rcx
movq %rax, %rdx
movq -0x40(%rbp), %rax
andq %rdx, %rcx
shlq $0x6, %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movslq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x1, %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 -0x10(%rbp), %eax
sarl $0x4, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
shlq $0x4, %rax
orq %rax, %rdi
movl $0x9, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x8018(%rax), %rcx
movslq -0x14(%rbp), %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8018(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCLui
void ExecCLui(State *state, uint16_t instr) {
    int32_t imm = Sext(((instr >> 12 & SetNBits(1)) << 17) |
                           ((instr >> 2 & SetNBits(5)) << 12),
                       17);
    uint8_t rd = (instr >> 7) & SetNBits(5);

    if (imm == 0)
        Error("Invalid c.lui operand");

    state->x[rd] = imm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x38(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
shlq $0x11, %rax
movq %rax, -0x30(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
shlq $0xc, %rax
orq %rax, %rdi
movl $0x11, %esi
callq 0x4470
movl %eax, -0x10(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0x11(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x8d1d
leaq 0x689f(%rip), %rdi      # 0xf5b5
movb $0x0, %al
callq 0xd690
movslq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl -0x11(%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: ExecCSrli
void ExecCSrli(State *state, uint16_t instr) {
    uint32_t uimm =
        ((instr >> 12 & SetNBits(1)) << 5) | (instr >> 2 & SetNBits(5));
    uint8_t rd = (instr >> 7) & SetNBits(3);

    state->x[8 + rd] = (uint64_t)state->x[8 + rd] >> uimm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x38(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x28(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
andq %rdx, %rcx
orq %rcx, %rax
movl %eax, -0x10(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rdx
movl -0x10(%rbp), %eax
movl %eax, %ecx
shrq %cl, %rdx
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
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: ExecCSrai
void ExecCSrai(State *state, uint16_t instr) {
    uint32_t uimm =
        ((instr >> 12 & SetNBits(1)) << 5) | ((instr >> 2) & SetNBits(5));
    uint8_t rd = (instr >> 7) & SetNBits(3);

    state->x[8 + rd] = (int32_t)state->x[8 + rd] >> uimm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x38(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x28(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
andq %rdx, %rcx
orq %rcx, %rax
movl %eax, -0x10(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rax
movl -0x10(%rbp), %ecx
sarl %cl, %eax
movslq %eax, %rdx
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
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: ExecCAndi
void ExecCAndi(State *state, uint16_t instr) {
    int32_t imm = Sext(
        ((instr >> 12 & SetNBits(1)) << 5) | ((instr >> 2) & SetNBits(5)), 5);
    uint8_t rd = (instr >> 7) & SetNBits(3);

    state->x[8 + rd] = state->x[8 + rd] & imm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x38(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
andq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x30(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
orq %rax, %rdi
movl $0x5, %esi
callq 0x4470
movl %eax, -0x10(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rdx
movslq -0x10(%rbp), %rax
andq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0x11(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
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: ExecCJ
void ExecCJ(State *state, uint16_t instr) {
    uint32_t imm_t = (instr >> 2);
    // [11|4|9:8|10|6|7|3:1|5] = [10|9|8:7|6|5|4|3:1|0]
    int32_t imm = Sext(((imm_t >> 10 & SetNBits(1)) << 11) |
                           ((imm_t >> 6 & SetNBits(1)) << 10) |
                           ((imm_t >> 7 & SetNBits(2)) << 8) |
                           ((imm_t >> 4 & SetNBits(1)) << 7) |
                           ((imm_t >> 5 & SetNBits(1)) << 6) |
                           ((imm_t >> 0 & SetNBits(1)) << 5) |
                           ((imm_t >> 9 & SetNBits(1)) << 4) |
                           ((imm_t >> 1 & SetNBits(3)) << 1),
                       11);

    state->pc += imm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
shrl $0xa, %eax
movl %eax, %eax
movq %rax, -0x90(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x90(%rbp), %rax
andq %rcx, %rax
shlq $0xb, %rax
movq %rax, -0x80(%rbp)
movl -0x10(%rbp), %eax
shrl $0x6, %eax
movl %eax, %eax
movq %rax, -0x88(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x88(%rbp), %rcx
movq %rax, %rdx
movq -0x80(%rbp), %rax
andq %rdx, %rcx
shlq $0xa, %rcx
orq %rcx, %rax
movq %rax, -0x70(%rbp)
movl -0x10(%rbp), %eax
shrl $0x7, %eax
movl %eax, %eax
movq %rax, -0x78(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x78(%rbp), %rcx
movq %rax, %rdx
movq -0x70(%rbp), %rax
andq %rdx, %rcx
shlq $0x8, %rcx
orq %rcx, %rax
movq %rax, -0x60(%rbp)
movl -0x10(%rbp), %eax
shrl $0x4, %eax
movl %eax, %eax
movq %rax, -0x68(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x68(%rbp), %rcx
movq %rax, %rdx
movq -0x60(%rbp), %rax
andq %rdx, %rcx
shlq $0x7, %rcx
orq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x10(%rbp), %eax
shrl $0x5, %eax
movl %eax, %eax
movq %rax, -0x58(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x58(%rbp), %rcx
movq %rax, %rdx
movq -0x50(%rbp), %rax
andq %rdx, %rcx
shlq $0x6, %rcx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x10(%rbp), %eax
shrl $0x0, %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 $0x5, %rcx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x10(%rbp), %eax
shrl $0x9, %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 $0x4, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x10(%rbp), %eax
shrl %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
shlq %rax
orq %rax, %rdi
movl $0xb, %esi
callq 0x4470
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCBeqz
void ExecCBeqz(State *state, uint16_t instr) {
    uint8_t rs1 = (instr >> 7) & SetNBits(3);
    int32_t imm = Sext(((instr >> 12 & SetNBits(1)) << 8) |
                           ((instr >> 5 & SetNBits(2)) << 6) |
                           ((instr >> 2 & SetNBits(1)) << 5) |
                           ((instr >> 10 & SetNBits(2)) << 3) |
                           ((instr >> 3 & SetNBits(2)) << 1),
                       8);

    if (state->x[8 + rs1] == 0)
        state->pc += imm;
    else
        state->pc += sizeof(instr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x60(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x60(%rbp), %rax
andq %rcx, %rax
movb %al, -0xb(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x58(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x58(%rbp), %rax
andq %rcx, %rax
shlq $0x8, %rax
movq %rax, -0x48(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x5, %eax
cltq
movq %rax, -0x50(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x50(%rbp), %rcx
movq %rax, %rdx
movq -0x48(%rbp), %rax
andq %rdx, %rcx
shlq $0x6, %rcx
orq %rcx, %rax
movq %rax, -0x38(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x40(%rbp)
movl $0x1, %edi
callq 0x12b0
movq -0x40(%rbp), %rcx
movq %rax, %rdx
movq -0x38(%rbp), %rax
andq %rdx, %rcx
shlq $0x5, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xa, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
andq %rdx, %rcx
shlq $0x3, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x3, %eax
cltq
movq %rax, -0x18(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
andq %rcx, %rax
shlq %rax
orq %rax, %rdi
movl $0x8, %esi
callq 0x4470
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xb(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
cmpq $0x0, 0x8008(%rax,%rcx,8)
jne 0x92c1
movslq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x92cf
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x2, %rcx
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCSubw
void ExecCSubw(State *state, uint16_t instr) {
    uint8_t rd = instr >> 7 & SetNBits(3);
    uint8_t rs2 = instr >> 2 & SetNBits(3);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movb %al, -0xb(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xc(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xb(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movq 0x8008(%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzbl -0xc(%rbp), %edx
addl $0x8, %edx
movslq %edx, %rdx
subq 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 -0xb(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
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: ExecCSlli
void ExecCSlli(State *state, uint16_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint32_t uimm =
        ((instr >> 12 & SetNBits(1)) << 5) | ((instr >> 2 & SetNBits(5)));

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xb(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x1, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq -0x20(%rbp), %rcx
movq %rax, %rdx
movq -0x18(%rbp), %rax
andq %rdx, %rcx
orq %rcx, %rax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xb(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rdx
movl -0x10(%rbp), %eax
movl %eax, %ecx
shlq %cl, %rdx
movq -0x8(%rbp), %rax
movzbl -0xb(%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: ExecCLwsp
void ExecCLwsp(State *state, uint16_t instr) {
    uint8_t rd = (instr >> 7) & SetNBits(5);
    uint32_t uimm = ((instr >> 2 & SetNBits(2)) << 6) |
                    ((instr >> 12 & SetNBits(1)) << 5) |
                    ((instr >> 4 & SetNBits(3)) << 2);

    state->x[rd] = Sext(Read32(state, state->x[2] + uimm) & SetNBits(32), 31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x48(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x48(%rbp), %rax
andq %rcx, %rax
movb %al, -0xb(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x40(%rbp)
movl $0x2, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
andq %rcx, %rax
shlq $0x6, %rax
movq %rax, -0x30(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0xc, %eax
cltq
movq %rax, -0x38(%rbp)
movl $0x1, %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, -0x20(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x4, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x3, %edi
callq 0x12b0
movq -0x28(%rbp), %rcx
movq %rax, %rdx
movq -0x20(%rbp), %rax
andq %rdx, %rcx
shlq $0x2, %rcx
orq %rcx, %rax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8018(%rax), %rsi
movl -0x10(%rbp), %eax
addq %rax, %rsi
callq 0x3100
movl %eax, %eax
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 -0xb(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCLdsp
void ExecCLdsp(State *state, uint32_t instr) {
    uint8_t rd = instr >> 7 & SetNBits(5);
    uint32_t uimm = (instr >> 2 & SetNBits(3)) << 6 |
                    (instr >> 12 & SetNBits(1)) << 5 |
                    (instr >> 5 & SetNBits(2)) << 3;

    state->x[rd] = Read64(state, state->x[2] + uimm);
}

// 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, -0x48(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x48(%rbp), %rax
andq %rcx, %rax
movb %al, -0xd(%rbp)
movl -0xc(%rbp), %eax
shrl $0x2, %eax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
andq %rcx, %rax
shlq $0x6, %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
shrl $0xc, %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 $0x5, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
shrl $0x5, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x28(%rbp), %rcx
movq %rax, %rdx
movq -0x20(%rbp), %rax
andq %rdx, %rcx
shlq $0x3, %rcx
orq %rcx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8018(%rax), %rsi
movl -0x14(%rbp), %eax
addq %rax, %rsi
callq 0x30a0
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCJalr
void ExecCJalr(State *state, uint16_t instr) {
    uint8_t rs1 = (instr >> 7) & SetNBits(5);

    int64_t t = state->pc + 2;
    state->pc = state->x[rs1];
    state->x[1] = t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movb %al, -0xb(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xb(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8010(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCSwsp
void ExecCSwsp(State *state, uint16_t instr) {
    uint8_t rs2 = (instr >> 2) & SetNBits(5);
    uint32_t uimm =
        ((instr >> 9 & SetNBits(4)) << 2) | ((instr >> 7 & SetNBits(2)) << 6);

    Write32(state, state->x[2] + uimm, state->x[rs2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x2, %eax
cltq
movq %rax, -0x30(%rbp)
movl $0x5, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
movb %al, -0xb(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x9, %eax
cltq
movq %rax, -0x28(%rbp)
movl $0x4, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
shlq $0x2, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
sarl $0x7, %eax
cltq
movq %rax, -0x20(%rbp)
movl $0x2, %edi
callq 0x12b0
movq -0x20(%rbp), %rcx
movq %rax, %rdx
movq -0x18(%rbp), %rax
andq %rdx, %rcx
shlq $0x6, %rcx
orq %rcx, %rax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8018(%rax), %rsi
movl -0x10(%rbp), %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movzbl -0xb(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
movl %eax, %edx
callq 0x4310
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCSdsp
void ExecCSdsp(State *state, uint32_t instr) {
    uint8_t rs2 = instr >> 2 & SetNBits(5);
    uint32_t uimm =
        (instr >> 7 & SetNBits(3)) << 6 | (instr >> 10 & SetNBits(3)) << 3;

    Write64(state, state->x[2] + uimm, 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 $0x2, %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 $0x7, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x3, %edi
callq 0x12b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
andq %rcx, %rax
shlq $0x6, %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
shrl $0xa, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movl $0x3, %edi
callq 0x12b0
movq -0x28(%rbp), %rcx
movq %rax, %rdx
movq -0x20(%rbp), %rax
andq %rdx, %rcx
shlq $0x3, %rcx
orq %rcx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8018(%rax), %rsi
movl -0x14(%rbp), %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rdx
callq 0x4360
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecEcall
void ExecEcall(State *state, uint32_t instr) {
    // printf("ecall: Exception: pc: 0x%llx\n", state->pc);
    // printf("ecall: a0: %llx, a1: %llx, a7: %llx\n", state->x[10], state->x[11], state->x[17]);
    state->excepted = true;
    int exception_code;
    if (state->mode == 0x3) {
        exception_code = EnvironmentCallFromMMode;
    } else if (state->mode == 0x1) {
        exception_code = EnvironmentCallFromSMode;
    } else if (state->mode == 0x0) {
        exception_code = EnvironmentCallFromUMode;
    } else {
        state->excepted = false;
        return;
    }

    state->exception_code = exception_code;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movb $0x1, 0x8138(%rax)
movq -0x8(%rbp), %rax
movzbl 0x8148(%rax), %eax
cmpl $0x3, %eax
jne 0xab7f
movl $0xb, -0x10(%rbp)
jmp 0xabc2
movq -0x8(%rbp), %rax
movzbl 0x8148(%rax), %eax
cmpl $0x1, %eax
jne 0xab98
movl $0x9, -0x10(%rbp)
jmp 0xabc0
movq -0x8(%rbp), %rax
movzbl 0x8148(%rax), %eax
cmpl $0x0, %eax
jne 0xabb1
movl $0x8, -0x10(%rbp)
jmp 0xabbe
movq -0x8(%rbp), %rax
movb $0x0, 0x8138(%rax)
jmp 0xabd1
jmp 0xabc0
jmp 0xabc2
movslq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8140(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecWfi
void ExecWfi(State *state, uint32_t instr) {
    printf("wfi\n");
    PrintRegisters(state, false);
    exit(state->x[10]);
    while (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x49f3(%rip), %rdi      # 0xf629
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xdb20
movq -0x8(%rbp), %rax
movq 0x8058(%rax), %rax
movl %eax, %edi
callq 0x11a0
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecMret
void ExecMret(State *state, uint32_t instr) {
    Require(state, MACHINE);
    state->pc = state->csr[MEPC];
    state->mode = ReadCSR(state, MSTATUS, 11, 12);
    uint64_t mpie = ReadCSR(state, MSTATUS, 7, 7);
    WriteCSR(state, MSTATUS, 3, 3, mpie);
    WriteCSR(state, MSTATUS, 7, 7, 1);
    WriteCSR(state, MSTATUS, 11, 12, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x43b0
movq -0x8(%rbp), %rax
movq 0x1a10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movl $0x300, %esi            # imm = 0x300
movl $0xb, %edx
movl $0xc, %ecx
callq 0x1600
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x8148(%rax)
movq -0x8(%rbp), %rdi
movl $0x300, %esi            # imm = 0x300
movl $0x7, %ecx
movl %ecx, %edx
callq 0x1600
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %r8
movl $0x300, %esi            # imm = 0x300
movl $0x3, %ecx
movl %ecx, %edx
callq 0x1690
movq -0x8(%rbp), %rdi
movl $0x300, %esi            # imm = 0x300
movl $0x7, %ecx
movl $0x1, %r8d
movl %ecx, %edx
callq 0x1690
movq -0x8(%rbp), %rdi
movl $0x300, %esi            # imm = 0x300
movl $0xb, %edx
movl $0xc, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0x1690
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecSret
void ExecSret(State *state, uint32_t instr) {
    // printf("sret: mode: %d, pc: 0x%llx, sepc: 0x%llx, sstatus: %llx\n", state->mode, state->pc, state->csr[SEPC], state->csr[SSTATUS]);
    if (!Require(state, SUPERVISOR)) {
        return;
    }
    state->pc = state->csr[SEPC];
    state->mode = ReadCSR(state, SSTATUS, 8, 8);
    uint64_t spie = ReadCSR(state, SSTATUS, 5, 5);
    WriteCSR(state, SSTATUS, 1, 1, spie);
    WriteCSR(state, SSTATUS, 5, 5, 1);
    WriteCSR(state, SSTATUS, 8, 8, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x43b0
testb $0x1, %al
jne 0xad56
jmp 0xadf0
movq -0x8(%rbp), %rax
movq 0xa10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x8, %ecx
movl %ecx, %edx
callq 0x1600
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x8148(%rax)
movq -0x8(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x5, %ecx
movl %ecx, %edx
callq 0x1600
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %r8
movl $0x100, %esi            # imm = 0x100
movl $0x1, %ecx
movl %ecx, %edx
callq 0x1690
movq -0x8(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x5, %ecx
movl $0x1, %r8d
movl %ecx, %edx
callq 0x1690
movq -0x8(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x8, %ecx
xorl %eax, %eax
movl %eax, %r8d
movl %ecx, %edx
callq 0x1690
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCsrrw
void ExecCsrrw(State *state, uint32_t instr) {
    uint8_t rd = instr >> 7 & SetNBits(5);
    uint8_t rs1 = instr >> 15 & SetNBits(5);
    uint32_t csr = instr >> 20 & SetNBits(12);

    int64_t t = state->csr[csr];
    state->csr[csr] = state->x[rs1];
    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 %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x20(%rbp), %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: ExecCsrrc
void ExecCsrrc(State *state, uint32_t instr) {
    uint8_t rd = instr >> 7 & SetNBits(5);
    uint8_t rs1 = instr >> 15 & SetNBits(5);
    uint32_t csr = instr >> 20 & SetNBits(12);

    int64_t t = state->csr[csr];
    state->csr[csr] = t & ~state->x[rs1];
    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 %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl -0xe(%rbp), %ecx
movq 0x8008(%rax,%rcx,8), %rax
xorq $-0x1, %rax
andq %rax, %rdx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hobo0xcc[P]rve/src/cpu.c
// Function: ExecCsrrwi
void ExecCsrrwi(State *state, uint32_t instr) {
    uint8_t rd = instr >> 7 & SetNBits(5);
    uint8_t zimm = instr >> 15 & SetNBits(5);
    uint32_t csr = instr >> 20 & SetNBits(12);

    state->x[rd] = state->csr[csr];
    state->csr[csr] = zimm;
}

// 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 %rax, %rcx
movq -0x20(%rbp), %rax
andq %rcx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movzbl -0xd(%rbp), %ecx
movq %rdx, 0x8008(%rax,%rcx,8)
movzbl -0xe(%rbp), %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movq %rdx, 0x8(%rax,%rcx,8)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)