// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/compiler.c
// Function: unary
static void unary(bool can_assign) {
    UNUSED(can_assign);

    TokenType operator_type = parser.previous.type;

    parse_precedence(PREC_UNARY);

    switch (operator_type) {
        case TOKEN_BANG: {
            int ret = alloc_register();
            uint8_t reg = (uint8_t) ret;

            if (ret < 0) {
                error_alloc_register();
            } else {
                emit_stack_pop(reg);
                emit_opcode(OP_REV);
                emit_register(reg);
                emit_stack_push(reg);

                free_register(reg);
            }
            break;
        }
        case TOKEN_MINUS: {
            int ret = alloc_register();
            uint8_t reg = (uint8_t) ret;
            
            if (ret < 0) {
                error_alloc_register();
            } else {
                emit_stack_pop(reg);
                emit_opcode(OP_MULI);
                emit_register(reg);
                emit_dword(-1);
                emit_stack_push(reg);

                free_register(reg);
            }
            break;
        }
        default:
            return;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x1280e(%rip), %ebx     # 0x175d0
movl $0x8, %edi
callq 0x606f
cmpl $0xc, %ebx
je 0x4dfd
cmpl $0x5, %ebx
jne 0x4f29
xorl %eax, %eax
leaq 0x127c5(%rip), %r14     # 0x175a8
cmpb $0x1, 0x7a(%rax,%r14)
je 0x4e27
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x4de3
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4e33
xorl %eax, %eax
leaq 0x127a2(%rip), %r14     # 0x175a8
cmpb $0x1, 0x7a(%rax,%r14)
je 0x4ea4
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x4e06
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4eb0
movb $0x0, 0x7a(%rax,%r14)
incl 0x12765(%rip)           # 0x17598
testl %eax, %eax
js 0x4f31
movzbl %al, %ebx
movl %ebx, %edi
callq 0x61cc
leaq 0x2(%rsp), %rdx
movb $0x1d, (%rdx)
movq 0x1274c(%rip), %rdi     # 0x175a0
movq 0x1278d(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
leaq 0x3(%rsp), %rdx
movb %bl, (%rdx)
movq 0x1272d(%rip), %rdi     # 0x175a0
movq 0x1276e(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
leaq 0x4(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
movq 0x1270a(%rip), %rdi     # 0x175a0
movq 0x1274b(%rip), %rcx     # 0x175e8
movl $0x4, %esi
jmp 0x4ef6
movb $0x0, 0x7a(%rax,%r14)
incl 0x126e8(%rip)           # 0x17598
testl %eax, %eax
js 0x4f31
movzbl %al, %ebx
movl %ebx, %edi
callq 0x61cc
movq %rsp, %rdx
movb $0x12, (%rdx)
movq 0x126d5(%rip), %rdi     # 0x175a0
movq 0x12716(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
leaq 0x1(%rsp), %rdx
movb %bl, (%rdx)
movq 0x126b6(%rip), %rdi     # 0x175a0
movq 0x126f7(%rip), %rcx     # 0x175e8
movl $0x1, %esi
callq 0x4574
movl %ebx, %edi
callq 0x6180
cmpb $0x1, 0x7a(%rbx,%r14)
jne 0x4f1d
leaq 0x126bf(%rip), %rdi     # 0x175d0
leaq 0x53dc(%rip), %rsi      # 0xa2f4
callq 0x6108
movb $0x1, 0x7a(%rbx,%r14)
decl 0x1266f(%rip)           # 0x17598
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x12698(%rip), %rdi     # 0x175d0
leaq 0x5399(%rip), %rsi      # 0xa2d8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6108