// File: /workspace/github_c_makefile_star2_O2/thiagok00[P]INF1715-Compilers/GeraCodigo.c
// Function: geracodigo_arvore
void geracodigo_arvore(Programa *p){
  output = fopen("monga.ll","w");
  strLst = NULL;
  if (output == NULL){
    printf("Nao conseguiu abrir arquivo de saida\n");
    exit(1);
  }
  gera_declaracoes_iniciais();
  gera_codigo_varglobais(p->defs);
  gera_codigo_funcoes(p->defs);

  gera_codigo_strings();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %r13
leaq 0x36d3(%rip), %rdi      # 0x790e
leaq 0x2806(%rip), %rsi      # 0x6a48
callq 0x1180
movq %rax, 0x5f52(%rip)      # 0xa1a0
andq $0x0, 0x5f52(%rip)      # 0xa1a8
testq %rax, %rax
je 0x454e
leaq 0x3ce8(%rip), %rdi      # 0x7f4e
pushq $0x25
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
movq %rax, %rcx
callq 0x11d0
movq 0x5f21(%rip), %rcx      # 0xa1a0
leaq 0x3cee(%rip), %rdi      # 0x7f74
pushq $0x19
popq %rsi
movq %r14, %rdx
callq 0x11d0
movq 0x5f08(%rip), %rcx      # 0xa1a0
leaq 0x3cef(%rip), %rdi      # 0x7f8e
pushq $0x31
popq %rsi
movq %r14, %rdx
callq 0x11d0
movq 0x5eef(%rip), %rcx      # 0xa1a0
leaq 0x3d08(%rip), %rdi      # 0x7fc0
pushq $0x2a
popq %rsi
movq %r14, %rdx
callq 0x11d0
movq 0x5ed6(%rip), %rsi      # 0xa1a0
pushq $0xa
popq %r14
movl %r14d, %edi
callq 0x10f0
movq 0x5ec3(%rip), %rdi      # 0xa1a0
leaq 0x3d07(%rip), %rsi      # 0x7feb
xorl %eax, %eax
callq 0x1110
movq 0x5eae(%rip), %rdi      # 0xa1a0
leaq 0x3d34(%rip), %rsi      # 0x802d
xorl %eax, %eax
callq 0x1110
movq 0x5e99(%rip), %rsi      # 0xa1a0
movl %r14d, %edi
callq 0x10f0
leaq 0x3601(%rip), %rbx      # 0x7917
leaq 0x3620(%rip), %r15      # 0x793d
movq %r13, %r12
movq (%r12), %r12
testq %r12, %r12
je 0x4386
cmpl $0x1, (%r12)
jne 0x4380
movl 0x5e79(%rip), %r14d     # 0xa1b0
leal 0x1(%r14), %eax
movl %eax, 0x5e6f(%rip)      # 0xa1b0
movq 0x8(%r12), %rax
movq 0x8(%rax), %rdi
callq 0x4145
movq 0x8(%r12), %rcx
movl %r14d, 0x10(%rcx)
movq 0x8(%r12), %rcx
movq 0x8(%rcx), %rcx
cmpl $0x3, 0x4(%rcx)
movq 0x5e34(%rip), %rdi      # 0xa1a0
movq %r15, %rsi
cmoveq %rbx, %rsi
movl %r14d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1110
addq $0x10, %r12
jmp 0x4320
movq 0x5e13(%rip), %rsi      # 0xa1a0
pushq $0xa
popq %rdi
callq 0x10f0
leaq -0x1d0(%rbp), %r14
leaq 0x35b5(%rip), %r12      # 0x7958
movq (%r13), %r13
testq %r13, %r13
je 0x44f9
cmpl $0x0, (%r13)
jne 0x44f0
movq %r13, -0x38(%rbp)
movq 0x8(%r13), %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rax), %r13
movl $0x190, %edx            # imm = 0x190
movq %r14, %rdi
xorl %esi, %esi
callq 0x10e0
movq %r13, %rbx
testq %rbx, %rbx
je 0x4428
movl 0x5dc7(%rip), %r15d     # 0xa1b0
leal 0x1(%r15), %eax
movl %eax, 0x5dbd(%rip)      # 0xa1b0
movq (%rbx), %rdi
callq 0x4145
movl %r15d, 0x10(%rbx)
cmpq $0x0, 0x18(%rbx)
leaq 0x3558(%rip), %rsi      # 0x7963
cmoveq %r12, %rsi
movq %r14, %rdi
movq %r14, %rdx
movq %rax, %rcx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x11b0
movq 0x18(%rbx), %rbx
jmp 0x43dd
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
callq 0x4145
movq 0x5d65(%rip), %rdi      # 0xa1a0
movq 0x8(%rbx), %rcx
leaq 0x352a(%rip), %rsi      # 0x7970
movq %rax, %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x1110
testq %r13, %r13
je 0x44bf
movl 0x5d51(%rip), %r15d     # 0xa1b0
leal 0x1(%r15), %eax
movl %eax, 0x5d47(%rip)      # 0xa1b0
movq (%r13), %rdi
callq 0x4145
movq %rax, %rbx
movl 0x10(%r13), %r12d
movl %r15d, 0x10(%r13)
movq 0x5d1c(%rip), %rdi      # 0xa1a0
leaq 0x34fa(%rip), %rsi      # 0x7985
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1110
movq 0x5d01(%rip), %rdi      # 0xa1a0
leaq 0x34f3(%rip), %rsi      # 0x7999
movq %rbx, %rdx
movl %r12d, %ecx
movq %rbx, %r8
movl %r15d, %r9d
xorl %eax, %eax
callq 0x1110
movq 0x18(%r13), %r13
jmp 0x4453
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x4562
movq 0x5ccd(%rip), %rcx      # 0xa1a0
leaq 0x34db(%rip), %rdi      # 0x79b5
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
movq -0x38(%rbp), %r13
leaq 0x3468(%rip), %r12      # 0x7958
addq $0x10, %r13
jmp 0x43a3
pushq $0xa
popq %rdi
callq 0x1040
movq 0x5ca0(%rip), %rax      # 0xa1a8
leaq 0x2cb8(%rip), %rbx      # 0x71c7
testq %rax, %rax
je 0x453c
movq 0x5c85(%rip), %rdi      # 0xa1a0
movq (%rax), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1110
movq 0x5c79(%rip), %rax      # 0xa1a8
movq 0x8(%rax), %rax
movq %rax, 0x5c6e(%rip)      # 0xa1a8
jmp 0x450f
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3b1c(%rip), %rdi      # 0x8071
callq 0x1070
pushq $0x1
popq %rdi
callq 0x11c0