// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
je 0x375b
movl %esi, %ebx
movq %rdi, %r14
leaq 0x39d3(%rip), %r13      # 0x7080
leaq 0x3a10(%rip), %r15      # 0x70c4
movl (%r14), %eax
cmpq $0x9, %rax
ja 0x3898
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl 0x20(%r14), %eax
cmpq $0xb, %rax
ja 0x36f4
movslq (%r15,%rax,4), %r12
addq %r15, %r12
movq 0x8(%r14), %rdi
callq 0x31d0
movq %r12, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %rdi
incl %ebx
movl %ebx, %esi
callq 0x368a
addq $0x18, %r14
jmp 0x374f
movl 0x18(%r14), %eax
leaq 0x3da3(%rip), %rdi      # 0x74b5
testl %eax, %eax
je 0x3722
cmpl $0x1, %eax
jne 0x3749
leaq 0x3da1(%rip), %rdi      # 0x74c3
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
jmp 0x3749
movq 0x8(%r14), %rdi
callq 0x31d0
leaq 0x3c41(%rip), %rdi      # 0x737e
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
addq $0x10, %r14
incl %ebx
movq (%r14), %r14
testq %r14, %r14
jne 0x36b4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdi
callq 0x31d0
leaq 0x3be1(%rip), %rdi      # 0x735b
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %rdi
incl %ebx
movl %ebx, %esi
callq 0x368a
movq 0x18(%r14), %rdi
callq 0x31d0
leaq 0x3bcc(%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 0x37cc
xorl %edi, %edi
callq 0x31d0
movq %rax, %rdx
movq 0x18(%r14), %rcx
leaq 0x3b61(%rip), %rdi      # 0x7340
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
testq %r15, %r15
je 0x375b
movq (%r15), %rdi
movl %ebx, %esi
callq 0x368a
movq 0x8(%r15), %r15
jmp 0x37e8
movq 0x8(%r14), %rdi
callq 0x31d0
leaq 0x3b16(%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 0x35d4
movq 0x8(%r14), %rdi
callq 0x31d0
leaq 0x3ac5(%rip), %rdi      # 0x730d
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x375b
incl %ebx
leaq 0x3c69(%rip), %rdi      # 0x74d3
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
movl (%r14), %eax
cmpl $0x2, %eax
je 0x38ca
cmpl $0x1, %eax
je 0x38b4
testl %eax, %eax
jne 0x38dc
movl 0x8(%r14), %esi
leaq 0x45e7(%rip), %rdi      # 0x7e76
xorl %eax, %eax
callq 0x10c0
jmp 0x38dc
leaq 0x3af2(%rip), %rdi      # 0x7391
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
cvtss2sd 0x8(%r14), %xmm0
leaq 0x3c23(%rip), %rdi      # 0x74e4
movb $0x1, %al
callq 0x10c0
jmp 0x38dc
movq 0x8(%r14), %rsi
leaq 0x424b(%rip), %rdi      # 0x7b20
xorl %eax, %eax
callq 0x10c0
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1040