// File: /workspace/github_c_makefile_star2_O3/ryvnf[P]czc/codegen.c
// Function: codegen_to_file
void codegen_to_file(struct ast *ast, FILE *fp)
{
    struct scope *predecl_symtbl = scope_new(NULL, 1, 64);

    scope_add_typesym(predecl_symtbl, "int", sym_new_type(int_type));
    scope_add_typesym(predecl_symtbl, "int8", sym_new_type(int8_type));
    scope_add_typesym(predecl_symtbl, "int16", sym_new_type(int16_type));
    scope_add_typesym(predecl_symtbl, "int32", sym_new_type(int32_type));
    scope_add_typesym(predecl_symtbl, "int64", sym_new_type(int64_type));
    scope_add_typesym(predecl_symtbl, "ssize", sym_new_type(ssize_type));
    scope_add_typesym(predecl_symtbl, "uint", sym_new_type(uint_type));
    scope_add_typesym(predecl_symtbl, "uint8", sym_new_type(uint8_type));
    scope_add_typesym(predecl_symtbl, "uint16", sym_new_type(uint16_type));
    scope_add_typesym(predecl_symtbl, "uint32", sym_new_type(uint32_type));
    scope_add_typesym(predecl_symtbl, "uint64", sym_new_type(uint64_type));
    scope_add_typesym(predecl_symtbl, "size", sym_new_type(size_type));
    scope_add_typesym(predecl_symtbl, "float", sym_new_type(float_type));
    scope_add_typesym(predecl_symtbl, "double", sym_new_type(double_type));
    scope_add_typesym(predecl_symtbl, "bool", sym_new_type(bool_type));
    scope_add_typesym(predecl_symtbl, "char", sym_new_type(char_type));
    scope_add_typesym(predecl_symtbl, "void", sym_new_type(void_type));

    current_scope = global_scope = scope_new(predecl_symtbl, 65536, 8192);

    zc_type_decls_rope = NULL;
    zc_type_defs_rope = NULL;
    zc_prog_decls_rope = NULL;
    zc_prog_defs_rope = NULL;

    decl_pass(ast);
    codegen_pass(ast);

    ast_unref(ast);

    struct rope *zc_file_rope = zc_type_decls_rope;
    zc_file_rope = rope_new_tree(zc_file_rope, zc_type_defs_rope);
    zc_file_rope = rope_new_tree(zc_file_rope, zc_prog_decls_rope);
    zc_file_rope = rope_new_tree(zc_file_rope, zc_prog_defs_rope);
    rope_print_to_file(zc_file_rope, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %r14
xorl %r12d, %r12d
movl $0x1, %esi
movl $0x40, %edx
xorl %edi, %edi
callq 0xb040
movq %rax, %r15
leaq 0xf20c(%rip), %rdi      # 0x13d18
callq 0xb332
leaq 0x9ead(%rip), %rsi      # 0xe9c5
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf1f2(%rip), %rdi      # 0x13d1c
callq 0xb332
leaq 0x8da5(%rip), %rsi      # 0xd8db
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf1d8(%rip), %rdi      # 0x13d20
callq 0xb332
leaq 0x8d8d(%rip), %rsi      # 0xd8e1
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf1be(%rip), %rdi      # 0x13d24
callq 0xb332
leaq 0x8d76(%rip), %rsi      # 0xd8e8
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf1a4(%rip), %rdi      # 0x13d28
callq 0xb332
leaq 0x8d5f(%rip), %rsi      # 0xd8ef
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf18e(%rip), %rdi      # 0x13d30
callq 0xb332
leaq 0x8d21(%rip), %rsi      # 0xd8cf
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf174(%rip), %rdi      # 0x13d34
callq 0xb332
leaq 0x8d09(%rip), %rsi      # 0xd8d5
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf15a(%rip), %rdi      # 0x13d38
callq 0xb332
leaq 0x8cf0(%rip), %rsi      # 0xd8da
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf140(%rip), %rdi      # 0x13d3c
callq 0xb332
leaq 0x8cd8(%rip), %rsi      # 0xd8e0
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf126(%rip), %rdi      # 0x13d40
callq 0xb332
leaq 0x8cc1(%rip), %rsi      # 0xd8e7
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf10c(%rip), %rdi      # 0x13d44
callq 0xb332
leaq 0x8caa(%rip), %rsi      # 0xd8ee
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf0f6(%rip), %rdi      # 0x13d4c
callq 0xb332
leaq 0x8c6e(%rip), %rsi      # 0xd8d0
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf0dc(%rip), %rdi      # 0x13d50
callq 0xb332
leaq 0x8c75(%rip), %rsi      # 0xd8f5
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf0c2(%rip), %rdi      # 0x13d54
callq 0xb332
leaq 0x8c5d(%rip), %rsi      # 0xd8fb
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf0b0(%rip), %rdi      # 0x13d60
callq 0xb332
leaq 0x8c46(%rip), %rsi      # 0xd902
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf096(%rip), %rdi      # 0x13d64
callq 0xb332
leaq 0x9cce(%rip), %rsi      # 0xe9a8
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
leaq 0xf07c(%rip), %rdi      # 0x13d68
callq 0xb332
leaq 0x92ec(%rip), %rsi      # 0xdfe4
movq %r15, %rdi
movq %rax, %rdx
callq 0xb093
movl $0x10000, %esi          # imm = 0x10000
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
callq 0xb040
leaq 0xf0cc(%rip), %rcx      # 0x13de8
movq %rax, (%rcx)
leaq 0xf0ba(%rip), %rcx      # 0x13de0
movq %rax, (%rcx)
leaq 0xf0c8(%rip), %r15      # 0x13df8
movq %r12, (%r15)
leaq 0xf0c6(%rip), %r13      # 0x13e00
movq %r12, (%r13)
leaq 0xf0c3(%rip), %rbp      # 0x13e08
movq %r12, (%rbp)
leaq 0xf0c0(%rip), %rbx      # 0x13e10
movq %r12, (%rbx)
movq %r14, %rdi
callq 0x47c8
movq %r14, %rdi
callq 0x4a20
movq %r14, %rdi
callq 0x26ef
movq (%r15), %rdi
movq (%r13), %rsi
callq 0xaebf
movq (%rbp), %rsi
movq %rax, %rdi
callq 0xaebf
movq (%rbx), %rsi
movq %rax, %rdi
callq 0xaebf
movq %rax, %rdi
movq (%rsp), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xafed