// File: /workspace/github_c_makefile_star2_O0/thiagok00[P]INF1715-Compilers/ArvoreSintaticaAbstrata.c
// Function: print_cmd
static void print_cmd(CMD *c,int nivel) {
    if(c == NULL) return;
    switch (c->tag) {

      case CMD_ATR:
        printf("%d\t [CMD ATRIBUIÇAO]\n",nivel);
        print_variavel(c->u.atr.var,nivel+1);
        print_exp(c->u.atr.exp,nivel+1);
      break;
      case CMD_WHILE:
        printf("%d\t [CMD WHILE]\n",nivel);
        print_exp(c->u.cmdwhile.exp,nivel+1);
        print_bloco(c->u.cmdwhile.bloco,nivel+1);
      break;
      case CMD_IF:
        printf("%d\t [CMD IF]\n",nivel);
        print_exp(c->u.cmdif.exp,nivel+1);
        print_bloco(c->u.cmdif.bloco,nivel+1);
      break;
      case CMD_IFELSE:
        printf("%d\t [CMD IF ELSE]\n",nivel);
        print_exp(c->u.cmdifelse.exp,nivel+1);
        print_bloco(c->u.cmdifelse.blocoif,nivel+1);
        print_bloco(c->u.cmdifelse.blocoelse,nivel+1);
      break;
      case CMD_RETURN:
        printf("%d\t [CMD RETURN]\n",nivel);
        print_exp(c->u.e,nivel+1);
      break;
      case CMD_RETURNVOID:
        printf("%d\t [CMD RETURN VOID]\n",nivel);
      break;
      case CMD_CHAMADA:
        printf("%d\t [CMD CHAMADA]\n",nivel);
        print_exp(c->u.e,nivel+1);
      break;
      case CMD_BLOCK:
        printf("%d\t [CMD BLOCK]\n",nivel);
        print_bloco(c->u.bloco,nivel+1);
      break;
      case CMD_PRINT:
        printf("%d\t [CMD PRINT]\n",nivel);
        print_exp(c->u.e,nivel+1);
      break;
      case CMD_SKIP:
        printf("%d\t [CMD SKIP]\n",nivel);
      break;
      default:
        printf("TAG CMD ERRADO");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x4f6b
jmp 0x5168
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x9, %rax
ja 0x515a
movq -0x18(%rbp), %rax
leaq 0x51ba(%rip), %rcx      # 0xa144
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0xc(%rbp), %esi
leaq 0x5349(%rip), %rdi      # 0xa2e6
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5170
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5240
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x5324(%rip), %rdi      # 0xa2fd
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5240
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4e70
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x52f9(%rip), %rdi      # 0xa30e
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5240
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4e70
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x52cb(%rip), %rdi      # 0xa31c
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5240
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4e70
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4e70
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x528f(%rip), %rdi      # 0xa32f
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5240
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x5278(%rip), %rdi      # 0xa341
movb $0x0, %al
callq 0x10a0
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x5279(%rip), %rdi      # 0xa358
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5240
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x5266(%rip), %rdi      # 0xa36b
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x4e70
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x5251(%rip), %rdi      # 0xa37c
movb $0x0, %al
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5240
jmp 0x5168
movl -0xc(%rbp), %esi
leaq 0x523c(%rip), %rdi      # 0xa38d
movb $0x0, %al
callq 0x10a0
jmp 0x5168
leaq 0x523c(%rip), %rdi      # 0xa39d
movb $0x0, %al
callq 0x10a0
addq $0x20, %rsp
popq %rbp
retq
nop