// File: /workspace/github_c_makefile_star2_O0/jtuu[P]quesler/src/compiler.c
// Function: print_statement
static void print_statement(void) {
    expression();
    consume(TOKEN_SEMICOLON, "Expected ';' after expression");

    int ret = alloc_register();
    if (ret < 0) {
        error_alloc_register();
    } else {
        uint8_t reg = (uint8_t) ret;

        emit_stack_pop(reg);

        char reg_str[3];
        size_t reg_str_len = 1;
        uint8_t x = reg;

        reg_str[2] = (char) ('0' + x % 10);
        x /= 10;

        if (x > 0) {
            reg_str[1] = (char) ('0' + x % 10);
            reg_str_len++;
            x /= 10;

            if (x > 0) {
                reg_str[0] = (char) ('0' + x % 10);
                reg_str_len++;
            }
        }

        size_t str_size = (reg_str_len + 4) * 2;
        uint16_t* str = malloc(str_size);
        str[0] = (uint16_t) '<';
        str[1] = (uint16_t) 'r';

        for (size_t i = 0; i < reg_str_len; i++) {
            str[2 + i] = (uint16_t) reg_str[3 - reg_str_len + i];
        }

        str[2 + reg_str_len] = (uint16_t) '>';
        str[str_size - 1] = 0;

        emit_opcode(OP_ARG_PUSHS);
        emit_string(str);

        emit_opcode(OP_WINDOW_MSG);
        emit_opcode(OP_WINEND);

        free_register(reg);

        free(str);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
callq 0x57e0
movl $0x7, %edi
leaq 0x57b8(%rip), %rsi      # 0xc511
callq 0x57f0
callq 0x5bc0
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x6d76
callq 0x5c30
jmp 0x6eea
movl -0x4(%rbp), %eax
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %edi
callq 0x5cb0
movq $0x1, -0x10(%rbp)
movb -0x5(%rbp), %al
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %al
movb %al, -0x6(%rbp)
movzbl -0x11(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jle 0x6e19
movzbl -0x11(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %al
movb %al, -0x7(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movzbl -0x11(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jle 0x6e17
movzbl -0x11(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %al
movb %al, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6e19
movq -0x10(%rbp), %rax
addq $0x4, %rax
shlq %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4120
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movw $0x3c, (%rax)
movq -0x28(%rbp), %rax
movw $0x72, 0x2(%rax)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x6e8d
movl $0x3, %eax
subq -0x10(%rbp), %rax
addq -0x30(%rbp), %rax
movsbl -0x8(%rbp,%rax), %eax
movw %ax, %dx
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movw %dx, (%rax,%rcx,2)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6e50
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x2, %rcx
movw $0x3e, (%rax,%rcx,2)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movw $0x0, (%rax,%rcx,2)
movl $0x4e, %edi
callq 0x5ce0
movq -0x28(%rbp), %rdi
callq 0x7270
movl $0x5a, %edi
callq 0x5ce0
movl $0x5e, %edi
callq 0x5ce0
movzbl -0x5(%rbp), %edi
callq 0x5c50
movq -0x28(%rbp), %rdi
callq 0x4030
addq $0x30, %rsp
popq %rbp
retq