// File: /workspace/github_c_makefile_star2_O1/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 0x3785(%rip), %r13      # 0x7080
leaq 0x37c2(%rip), %r15      # 0x70c4
testq %r14, %r14
je 0x3af1
movl (%r14), %eax
cmpq $0x9, %rax
ja 0x3a79
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl 0x20(%r14), %eax
cmpq $0xb, %rax
ja 0x394b
movslq (%r15,%rax,4), %r12
addq %r15, %r12
movq 0x8(%r14), %rdi
callq 0x3404
movq %r12, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %rdi
incl %ebx
movl %ebx, %esi
callq 0x38e1
movq 0x18(%r14), %r14
jmp 0x3902
movl 0x18(%r14), %eax
leaq 0x3b56(%rip), %rdi      # 0x74bf
testl %eax, %eax
je 0x3979
cmpl $0x1, %eax
jne 0x39a0
leaq 0x3b54(%rip), %rdi      # 0x74cd
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
jmp 0x39a0
movq 0x8(%r14), %rdi
callq 0x3404
leaq 0x39f4(%rip), %rdi      # 0x7388
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %r14
incl %ebx
jmp 0x3902
movq 0x8(%r14), %rdi
callq 0x3404
leaq 0x39aa(%rip), %rdi      # 0x7365
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %rdi
incl %ebx
movl %ebx, %esi
callq 0x38e1
movq 0x18(%r14), %rdi
callq 0x3404
leaq 0x3995(%rip), %rdi      # 0x7379
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 0x3a0d
xorl %edi, %edi
callq 0x3404
movq 0x18(%r14), %rcx
leaq 0x392d(%rip), %rdi      # 0x734a
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
testq %r15, %r15
je 0x3af1
movq (%r15), %rdi
movl %ebx, %esi
callq 0x38e1
movq 0x8(%r15), %r15
jmp 0x3a29
movq 0x8(%r14), %rdi
callq 0x3404
leaq 0x38df(%rip), %rdi      # 0x7331
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 0x382b
leaq 0x391b(%rip), %rdi      # 0x739b
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 0x3404
leaq 0x3872(%rip), %rdi      # 0x7317
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x3af1
incl %ebx
leaq 0x3a1a(%rip), %rdi      # 0x74dd
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
movl (%r14), %eax
cmpl $0x2, %eax
je 0x3b16
cmpl $0x1, %eax
je 0x3b00
testl %eax, %eax
jne 0x3b28
movl 0x8(%r14), %esi
leaq 0x4396(%rip), %rdi      # 0x7e7e
xorl %eax, %eax
callq 0x10c0
jmp 0x3b28
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cvtss2sd 0x8(%r14), %xmm0
leaq 0x39e1(%rip), %rdi      # 0x74ee
movb $0x1, %al
callq 0x10c0
jmp 0x3b28
movq 0x8(%r14), %rsi
leaq 0x4007(%rip), %rdi      # 0x7b28
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