// File: /workspace/github_c_makefile_star2_O0/leiradel[P]zx48k-libretro/src/main.c
// Function: main_set_register
static int main_set_register(unsigned reg, uint64_t value) {
    switch (reg) {
        case HC_Z80_A: z80_set_a(&zx48k.zx.cpu, value); break;
        case HC_Z80_F: z80_set_f(&zx48k.zx.cpu, value); break;
        case HC_Z80_BC: z80_set_bc(&zx48k.zx.cpu, value); break;
        case HC_Z80_DE: z80_set_de(&zx48k.zx.cpu, value); break;
        case HC_Z80_HL: z80_set_hl(&zx48k.zx.cpu, value); break;
        case HC_Z80_IX: z80_set_ix(&zx48k.zx.cpu, value); break;
        case HC_Z80_IY: z80_set_iy(&zx48k.zx.cpu, value); break;
        case HC_Z80_AF2: z80_set_af_(&zx48k.zx.cpu, value); break;
        case HC_Z80_BC2: z80_set_bc_(&zx48k.zx.cpu, value); break;
        case HC_Z80_DE2: z80_set_de_(&zx48k.zx.cpu, value); break;
        case HC_Z80_HL2: z80_set_hl_(&zx48k.zx.cpu, value); break;
        case HC_Z80_I: z80_set_i(&zx48k.zx.cpu, value); break;
        case HC_Z80_R: z80_set_r(&zx48k.zx.cpu, value); break;
        case HC_Z80_SP: z80_set_sp(&zx48k.zx.cpu, value); break;
        case HC_Z80_PC: z80_set_pc(&zx48k.zx.cpu, value); break;

        case HC_Z80_IFF:
        case HC_Z80_IM:
        case HC_Z80_WZ: return 0;
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x11, %rax
ja 0x239d3
movq -0x18(%rbp), %rax
leaq 0x1095(%rip), %rcx      # 0x24900
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
leaq 0x9b91(%rip), %rdi      # 0x2d410
movzbl %al, %esi
callq 0x3150
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9b79(%rip), %rdi      # 0x2d410
movzbl %al, %esi
callq 0x34c0
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9b61(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x3070
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9b49(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x33d0
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9b31(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x3360
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9b19(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x3310
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9b01(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x30f0
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9ae9(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x34f0
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9ad1(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x3450
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9ab9(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x32b0
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9aa4(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x3390
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9a8f(%rip), %rdi      # 0x2d410
movzbl %al, %esi
callq 0x31e0
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9a7a(%rip), %rdi      # 0x2d410
movzbl %al, %esi
callq 0x34d0
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9a65(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x3540
jmp 0x239d3
movq -0x10(%rbp), %rax
leaq 0x9a50(%rip), %rdi      # 0x2d410
movzwl %ax, %esi
callq 0x30d0
jmp 0x239d3
movl $0x0, -0x4(%rbp)
jmp 0x239da
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)