#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void erro(int lin, int err) {
  switch (err) {
  case 1:
    printf("Identificador esperado na linha %d ", lin);
    exit(1);
    break;
  case 2:
    printf(" ( esperado na linha %d ", lin);
    exit(1);
    break;
  case 3:
    printf(" ) esperado na linha %d ", lin);
    exit(1);
    break;
  case 4:
    printf(" { esperado na linha %d ", lin);
    exit(1);
    break;
  case 5:
    printf(" } esperado na linha %d ", lin);
    exit(1);
    break;
  case 6:
    printf(" MAIN esperado ");
    exit(1);
    break;
  case 7:
    printf(" Declaracao esperada na linha %d", lin);
    exit(1);
    break;
  case 8:
    printf(" ; Esperado na linha %d", lin);
    exit(1);
    break;
  case 9:
    printf(" ; ou ( esperado na linha %d", lin);
    exit(1);
    break;
  case 10:
    printf("Tentativa de insercao de id com mesmo nome na linha %d ", lin);
    exit(1);
    break;
  case 11:
    printf("Id nao declarado: ");
    exit(1);
    break;
  case 12:
    printf("Tentativa em realizar operacoes com tipos diferentes");
    exit(1);
    break;
  case 13:
    printf("Tipo de parametros incompativeis: ");
    exit(1);
    break;
  case 14:
    printf("Agurmento demais moço ");
    exit(1);
    break;
  case 15:
    printf("Argumento esperado ");
    exit(1);
    break;
  }
}


x86 assembly (clang, -O0):
<erro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xe,%eax
ja     12da <erro+0x1ba>
mov    -0x10(%rbp),%rax
lea    0xeb2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%esi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%esi
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%esi
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%esi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%esi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%esi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%esi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xf11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erro>:
push   %rax
add    $0xffffffff,%esi
cmp    $0xe,%esi
jbe    112b <erro+0xb>
pop    %rax
ret
mov    %edi,%eax
lea    0xecc(%rip),%rcx
movslq (%rcx,%rsi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xef8(%rip),%rdi
jmp    1195 <erro+0x75>
lea    0xf13(%rip),%rdi
jmp    1195 <erro+0x75>
lea    0xf23(%rip),%rdi
jmp    1195 <erro+0x75>
lea    0xf33(%rip),%rdi
jmp    1195 <erro+0x75>
lea    0xf43(%rip),%rdi
jmp    1195 <erro+0x75>
lea    0xf53(%rip),%rdi
jmp    11d3 <erro+0xb3>
lea    0xf5a(%rip),%rdi
jmp    1195 <erro+0x75>
lea    0xf72(%rip),%rdi
jmp    1195 <erro+0x75>
lea    0xf81(%rip),%rdi
jmp    1195 <erro+0x75>
lea    0xf95(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xfb3(%rip),%rdi
jmp    11d3 <erro+0xb3>
lea    0xfbd(%rip),%rdi
jmp    11d3 <erro+0xb3>
lea    0xfe9(%rip),%rdi
jmp    11d3 <erro+0xb3>
lea    0x1003(%rip),%rdi
jmp    11d3 <erro+0xb3>
lea    0x1012(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Identificador esperado na linha %d \00"
@.str.1 = [25 x i8] c" ( esperado na linha %d \00"
@.str.2 = [25 x i8] c" ) esperado na linha %d \00"
@.str.3 = [25 x i8] c" { esperado na linha %d \00"
@.str.4 = [25 x i8] c" } esperado na linha %d \00"
@.str.5 = [16 x i8] c" MAIN esperado \00"
@.str.6 = [33 x i8] c" Declaracao esperada na linha %d\00"
@.str.7 = [24 x i8] c" ; Esperado na linha %d\00"
@.str.8 = [29 x i8] c" ; ou ( esperado na linha %d\00"
@.str.9 = [56 x i8] c"Tentativa de insercao de id com mesmo nome na linha %d \00"
@.str.10 = [19 x i8] c"Id nao declarado: \00"
@.str.11 = [53 x i8] c"Tentativa em realizar operacoes com tipos diferentes\00"
@.str.12 = [35 x i8] c"Tipo de parametros incompativeis: \00"
@.str.13 = [24 x i8] c"Agurmento demais mo\C3\A7o \00"
@.str.14 = [20 x i8] c"Argumento esperado \00"
define void @erro(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %60 [
i32 1, label %6
i32 2, label %10
i32 3, label %14
i32 4, label %18
i32 5, label %22
i32 6, label %26
i32 7, label %29
i32 8, label %33
i32 9, label %37
i32 10, label %41
i32 11, label %45
i32 12, label %48
i32 13, label %51
i32 14, label %54
i32 15, label %57
]
6: ; preds = %2
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = load i32, i32* %3
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %2
%23 = load i32, i32* %3
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %23)
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %2
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %2
%30 = load i32, i32* %3
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 %30)
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %2
%34 = load i32, i32* %3
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 %34)
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %2
%38 = load i32, i32* %3
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 %38)
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %2
%42 = load i32, i32* %3
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0), i32 %42)
%44 = call i32 @exit(i32 1)
unreachable
45: ; preds = %2
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %2
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.11, i64 0, i64 0))
%50 = call i32 @exit(i32 1)
unreachable
51: ; preds = %2
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0))
%53 = call i32 @exit(i32 1)
unreachable
54: ; preds = %2
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%56 = call i32 @exit(i32 1)
unreachable
57: ; preds = %2
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
%59 = call i32 @exit(i32 1)
unreachable
60: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Identificador esperado na linha %d \00"
@.str.1 = [25 x i8] c" ( esperado na linha %d \00"
@.str.2 = [25 x i8] c" ) esperado na linha %d \00"
@.str.3 = [25 x i8] c" { esperado na linha %d \00"
@.str.4 = [25 x i8] c" } esperado na linha %d \00"
@.str.5 = [16 x i8] c" MAIN esperado \00"
@.str.6 = [33 x i8] c" Declaracao esperada na linha %d\00"
@.str.7 = [24 x i8] c" ; Esperado na linha %d\00"
@.str.8 = [29 x i8] c" ; ou ( esperado na linha %d\00"
@.str.9 = [56 x i8] c"Tentativa de insercao de id com mesmo nome na linha %d \00"
@.str.10 = [19 x i8] c"Id nao declarado: \00"
@.str.11 = [53 x i8] c"Tentativa em realizar operacoes com tipos diferentes\00"
@.str.12 = [35 x i8] c"Tipo de parametros incompativeis: \00"
@.str.13 = [24 x i8] c"Agurmento demais mo\C3\A7o \00"
@.str.14 = [20 x i8] c"Argumento esperado \00"
define void @erro(i32 %0, i32 %1) {
switch i32 %1, label %48 [
i32 1, label %3
i32 2, label %6
i32 3, label %9
i32 4, label %12
i32 5, label %15
i32 6, label %18
i32 7, label %21
i32 8, label %24
i32 9, label %27
i32 10, label %30
i32 11, label %33
i32 12, label %36
i32 13, label %39
i32 14, label %42
i32 15, label %45
]
3: ; preds = %2
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %2
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %0)
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %0)
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%20 = tail call i32 @exit(i32 1)
unreachable
21: ; preds = %2
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 %0)
%23 = tail call i32 @exit(i32 1)
unreachable
24: ; preds = %2
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 %0)
%26 = tail call i32 @exit(i32 1)
unreachable
27: ; preds = %2
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 %0)
%29 = tail call i32 @exit(i32 1)
unreachable
30: ; preds = %2
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0), i32 %0)
%32 = tail call i32 @exit(i32 1)
unreachable
33: ; preds = %2
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%35 = tail call i32 @exit(i32 1)
unreachable
36: ; preds = %2
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.11, i64 0, i64 0))
%38 = tail call i32 @exit(i32 1)
unreachable
39: ; preds = %2
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0))
%41 = tail call i32 @exit(i32 1)
unreachable
42: ; preds = %2
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%44 = tail call i32 @exit(i32 1)
unreachable
45: ; preds = %2
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
%47 = tail call i32 @exit(i32 1)
unreachable
48: ; preds = %2
ret void
}