// File: /workspace/github_c_makefile_star2_O2/thiagok00[P]INF1715-Compilers/ArvoreSintaticaAbstrata.c
// Function: print_exp
static void print_exp(Exp *e, int nivel) {
      ExpL *auxparam;
      int nivelparams;

      if(e == NULL) return;
      switch (e->tag) {
        case EXP_ARITH:
        case EXP_AND:
        case EXP_OR:
        case EXP_CMP:
          print_exp_binaria(e,nivel);
        break;
        case EXP_UNARIA:
          print_exp_unaria(e,nivel);
        break;
        case EXP_CTE:
          printf("%d\t [Exp Constante : %s]\n",nivel, getStringTipo(e->tipo));
          print_constante(e->u.expcte,nivel+1);
        break;
        case EXP_VAR:
          printf("%d\t [Exp Variavel : %s]\n",nivel,getStringTipo(e->tipo));
          print_variavel(e->u.expvar,nivel+1);
        break;
        case EXP_CHAMADA:
          auxparam = e->u.expchamada.params;
          nivelparams = nivel;
          if (e->tipo == NULL)
            printf("%d\t [Exp Chamada : %s] %s\n",nivel, getStringTipo(e->tipo), e->u.expchamada.idFunc);
          else
            printf("%d\t [Exp Chamada : %s] %s\n",nivel, getStringTipo(e->tipo),e->u.expchamada.idFunc);
          while (auxparam != NULL) {
            nivelparams++;
            print_exp(auxparam->e,nivel);
            auxparam = auxparam->prox;
          }
        break;
        case EXP_NEW:
          printf("%d [Exp\t New : %s]\n",nivel, getStringTipo(e->tipo));
          print_exp(e->u.expnewas.exp,nivel+1);
          printf("%d\t [Tipo] %s\n",nivel+1,getStringTipo(e->u.expnewas.tipo));
        break;
        case EXP_AS:
          printf("%d\t [Exp As : %s]\n",nivel, getStringTipo(e->tipo));
          print_exp(e->u.expnewas.exp,nivel+1);
        break;
        default:
          printf("EXP N RECONHECIDA\n   ");
      }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x3d7f(%rip), %r13      # 0x7080
leaq 0x3dbc(%rip), %r15      # 0x70c4
testq %r14, %r14
je 0x34fa
movl (%r14), %eax
cmpq $0x9, %rax
ja 0x3482
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl 0x20(%r14), %eax
cmpq $0xb, %rax
ja 0x3351
movslq (%r15,%rax,4), %r12
addq %r15, %r12
movq 0x8(%r14), %rdi
callq 0x2e8c
movq %r12, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %rdi
incl %ebx
movl %ebx, %esi
callq 0x32e7
addq $0x18, %r14
jmp 0x33ac
movl 0x18(%r14), %eax
leaq 0x4146(%rip), %rdi      # 0x74b5
testl %eax, %eax
je 0x337f
cmpl $0x1, %eax
jne 0x33a6
leaq 0x4144(%rip), %rdi      # 0x74c3
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
jmp 0x33a6
movq 0x8(%r14), %rdi
callq 0x2e8c
leaq 0x3fe4(%rip), %rdi      # 0x737e
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
addq $0x10, %r14
incl %ebx
movq (%r14), %r14
jmp 0x3308
movq 0x8(%r14), %rdi
callq 0x2e8c
leaq 0x3f97(%rip), %rdi      # 0x735b
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %rdi
incl %ebx
movl %ebx, %esi
callq 0x32e7
movq 0x18(%r14), %rdi
callq 0x2e8c
leaq 0x3f82(%rip), %rdi      # 0x736f
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
movq 0x8(%r14), %rdi
movq 0x10(%r14), %r15
testq %rdi, %rdi
jne 0x3416
xorl %edi, %edi
callq 0x2e8c
movq 0x18(%r14), %rcx
leaq 0x3f1a(%rip), %rdi      # 0x7340
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
testq %r15, %r15
je 0x34fa
movq (%r15), %rdi
movl %ebx, %esi
callq 0x32e7
movq 0x8(%r15), %r15
jmp 0x3432
movq 0x8(%r14), %rdi
callq 0x2e8c
leaq 0x3ecc(%rip), %rdi      # 0x7327
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %rdi
incl %ebx
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3231
leaq 0x3f08(%rip), %rdi      # 0x7391
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
movq 0x8(%r14), %rdi
callq 0x2e8c
leaq 0x3e5f(%rip), %rdi      # 0x730d
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x34fa
incl %ebx
leaq 0x4007(%rip), %rdi      # 0x74d3
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
movl (%r14), %eax
cmpl $0x2, %eax
je 0x351f
cmpl $0x1, %eax
je 0x3509
testl %eax, %eax
jne 0x3531
movl 0x8(%r14), %esi
leaq 0x4985(%rip), %rdi      # 0x7e76
xorl %eax, %eax
callq 0x10c0
jmp 0x3531
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cvtss2sd 0x8(%r14), %xmm0
leaq 0x3fce(%rip), %rdi      # 0x74e4
movb $0x1, %al
callq 0x10c0
jmp 0x3531
movq 0x8(%r14), %rsi
leaq 0x45f6(%rip), %rdi      # 0x7b20
xorl %eax, %eax
callq 0x10c0
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1040
nop