// File: /workspace/github_c_makefile_star2_O3/thiagok00[P]INF1715-Compilers/TabelaSimbolos.c
// Function: tipa_bloco
static Simbolo* tipa_bloco(Simbolo *s, Bloco *b,int nivelEscopo) {

    DefVarL *auxvars;
    CMDL *auxcmds;

    if (b == NULL) return s;

    auxvars = b->declVars;
    while (auxvars != NULL) {
      s = cria_no_var(s,auxvars->v,nivelEscopo);
      auxvars = auxvars->prox;
    }

    auxcmds = b->cmds;
    while(auxcmds != NULL) {
      CMD *cmd = auxcmds->c;
      tipa_comando(s,cmd,nivelEscopo);
      auxcmds = auxcmds->prox;
    }

    //print_simbolos(s);
    //desempilha variaveis do escopo
    while (s != NULL && s->escopo >= nivelEscopo) {
      s = destroi_simbolo_final(s);
    }
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
testq %rsi, %rsi
je 0x3d46
movl %edx, %ebx
movq %rsi, %r15
movq (%rsi), %r12
testq %r12, %r12
je 0x3b6c
movq (%r12), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x3a3d
movq %rax, %r14
movq 0x8(%r12), %r12
jmp 0x3b4f
movq %rbx, -0x38(%rbp)
movq 0x8(%r15), %r13
testq %r13, %r13
je 0x3d37
movq -0x38(%rbp), %rax
incl %eax
movl %eax, -0x2c(%rbp)
leaq 0x3977(%rip), %r15      # 0x7504
movq (%r13), %r12
movl (%r12), %eax
cmpq $0x9, %rax
ja 0x3cc3
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x3e07
movq 0x10(%r12), %rsi
jmp 0x3c84
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x3e47
movq 0x8(%r12), %rax
movq 0x8(%rax), %rdi
movl 0x4(%rdi), %eax
cmpl $0x1, %eax
je 0x3cc3
andl $-0x2, %eax
cmpl $0x2, %eax
je 0x3cc3
cmpl $0x1, (%rdi)
je 0x3cc3
jmp 0x3d8c
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x4335
movq 0x10(%r12), %rsi
movq %r14, %rdi
callq 0x3e47
movq 0x8(%r12), %rax
movq 0x10(%r12), %rdi
movq 0x8(%rax), %rax
movl 0x4(%rax), %esi
movq 0x8(%rdi), %rbx
testl %esi, %esi
jne 0x3c38
cmpl $0x0, 0x4(%rbx)
je 0x3d08
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x3cd2
testl %ecx, %ecx
jne 0x3d08
cmpl $0x0, (%rbx)
jne 0x3d08
movl 0x4(%rbx), %eax
cmpl $0x2, %eax
je 0x3ce8
cmpl $0x1, %eax
jne 0x3ced
cmpl $0x2, %esi
jne 0x3ced
jmp 0x3cc3
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x3e47
jmp 0x3cc3
movq 0x8(%r12), %rsi
movq %r14, %rdi
movl -0x2c(%rbp), %edx
jmp 0x3cbe
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x3e07
movq 0x10(%r12), %rsi
movq %r14, %rdi
movq %r15, %rbx
movl -0x2c(%rbp), %r15d
movl %r15d, %edx
callq 0x3b2a
movq 0x18(%r12), %rsi
movq %rax, %rdi
movl %r15d, %edx
movq %rbx, %r15
callq 0x3b2a
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x3b8d
jmp 0x3d37
cmpl $0x1, (%rbx)
jne 0x3d08
movq %rax, %rdi
movq %rbx, %rsi
callq 0x447c
testl %eax, %eax
je 0x3cc3
jmp 0x3d08
cmpl $0x1, %esi
je 0x3cc3
cmpl %eax, %esi
jbe 0x3d06
callq 0x4406
movq 0x10(%r12), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x10(%r12)
jmp 0x3cc3
jae 0x3cc3
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rbx
movq 0x8(%r12), %rax
movq 0x8(%rax), %rdi
callq 0x31d0
leaq 0x38f2(%rip), %rdi      # 0x761a
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10c0
jmp 0x3da2
testq %r14, %r14
je 0x3d77
movq -0x38(%rbp), %rbx
cmpl %ebx, 0x10(%r14)
jge 0x3d4b
movq %r14, %r15
jmp 0x3d7a
movq 0x20(%r14), %r15
testq %r15, %r15
je 0x3d6f
movq 0x28(%r14), %rax
movq %rax, 0x28(%r15)
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
cmpl %ebx, 0x10(%r15)
jge 0x3d4b
jmp 0x3d7a
movq %r14, %rdi
callq 0x1030
xorl %r15d, %r15d
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x31d0
leaq 0x385d(%rip), %rdi      # 0x75f5
movq %rax, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x11c0