#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*/ AdicionarLabelsFixos();
int /*<<< orphan*/ DetectarLabels();
int /*<<< orphan*/ MontarInstrucoes();
int /*<<< orphan*/ parser_Message(char *);
int /*<<< orphan*/ parser_Write(char *);
int /*<<< orphan*/ parser_flush_program();
int /*<<< orphan*/ parser_init_out_buffer();
void Montar(void) {
  parser_Message("Encontrando labels...");
  AdicionarLabelsFixos();
  DetectarLabels();
  parser_Message("Montando codigo...");
  parser_Write("-- Codigo gerado pelo montador");
  parser_Write("WIDTH=16;");
  parser_Write("DEPTH=32768;");
  parser_Write("ADDRESS_RADIX=UNS;");
  parser_Write("DATA_RADIX=BIN;");
  parser_Write("CONTENT BEGIN");
  parser_Message("Inicializando buffer de saida...");
  parser_init_out_buffer();
  MontarInstrucoes();
  parser_Message("Descarregando buffer de saida...");
  parser_flush_program();
  parser_Write("END;");
  parser_Message("Concluido.");
}


x86 assembly (clang, -O0):
<Montar>:
push   %rbp
mov    %rsp,%rbp
lea    0xe85(%rip),%rdi
call   1090 <parser_Message@plt>
mov    $0x0,%al
call   1050 <AdicionarLabelsFixos@plt>
mov    $0x0,%al
call   1040 <DetectarLabels@plt>
lea    0xe81(%rip),%rdi
call   1090 <parser_Message@plt>
lea    0xe88(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xe9b(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xe99(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xe9a(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xea1(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xea5(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xea7(%rip),%rdi
call   1090 <parser_Message@plt>
mov    $0x0,%al
call   1030 <parser_init_out_buffer@plt>
mov    $0x0,%al
call   1080 <MontarInstrucoes@plt>
lea    0xeae(%rip),%rdi
call   1090 <parser_Message@plt>
mov    $0x0,%al
call   1060 <parser_flush_program@plt>
lea    0xebc(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xeb5(%rip),%rdi
call   1090 <parser_Message@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Montar>:
push   %rax
lea    0xe88(%rip),%rdi
call   1090 <parser_Message@plt>
xor    %eax,%eax
call   1050 <AdicionarLabelsFixos@plt>
xor    %eax,%eax
call   1040 <DetectarLabels@plt>
lea    0xe84(%rip),%rdi
call   1090 <parser_Message@plt>
lea    0xe8b(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xe9e(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xe9c(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xe9d(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xea4(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xea8(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xeaa(%rip),%rdi
call   1090 <parser_Message@plt>
xor    %eax,%eax
call   1030 <parser_init_out_buffer@plt>
xor    %eax,%eax
call   1080 <MontarInstrucoes@plt>
lea    0xeb1(%rip),%rdi
call   1090 <parser_Message@plt>
xor    %eax,%eax
call   1060 <parser_flush_program@plt>
lea    0xebf(%rip),%rdi
call   1070 <parser_Write@plt>
lea    0xeb8(%rip),%rdi
pop    %rax
jmp    1090 <parser_Message@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Encontrando labels...\00"
@.str.1 = [19 x i8] c"Montando codigo...\00"
@.str.2 = [31 x i8] c"-- Codigo gerado pelo montador\00"
@.str.3 = [10 x i8] c"WIDTH=16;\00"
@.str.4 = [13 x i8] c"DEPTH=32768;\00"
@.str.5 = [19 x i8] c"ADDRESS_RADIX=UNS;\00"
@.str.6 = [16 x i8] c"DATA_RADIX=BIN;\00"
@.str.7 = [14 x i8] c"CONTENT BEGIN\00"
@.str.8 = [33 x i8] c"Inicializando buffer de saida...\00"
@.str.9 = [33 x i8] c"Descarregando buffer de saida...\00"
@.str.10 = [5 x i8] c"END;\00"
@.str.11 = [11 x i8] c"Concluido.\00"
define void @Montar() {
%1 = call i32 @parser_Message(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @AdicionarLabelsFixos()
%3 = call i32 (...) @DetectarLabels()
%4 = call i32 @parser_Message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @parser_Write(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @parser_Write(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @parser_Write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @parser_Write(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @parser_Write(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @parser_Write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @parser_Message(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 (...) @parser_init_out_buffer()
%13 = call i32 (...) @MontarInstrucoes()
%14 = call i32 @parser_Message(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%15 = call i32 (...) @parser_flush_program()
%16 = call i32 @parser_Write(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 @parser_Message(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Encontrando labels...\00"
@.str.1 = [19 x i8] c"Montando codigo...\00"
@.str.2 = [31 x i8] c"-- Codigo gerado pelo montador\00"
@.str.3 = [10 x i8] c"WIDTH=16;\00"
@.str.4 = [13 x i8] c"DEPTH=32768;\00"
@.str.5 = [19 x i8] c"ADDRESS_RADIX=UNS;\00"
@.str.6 = [16 x i8] c"DATA_RADIX=BIN;\00"
@.str.7 = [14 x i8] c"CONTENT BEGIN\00"
@.str.8 = [33 x i8] c"Inicializando buffer de saida...\00"
@.str.9 = [33 x i8] c"Descarregando buffer de saida...\00"
@.str.10 = [5 x i8] c"END;\00"
@.str.11 = [11 x i8] c"Concluido.\00"
define void @Montar() {
%1 = tail call i32 @parser_Message(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @AdicionarLabelsFixos()
%3 = tail call i32 (...) @DetectarLabels()
%4 = tail call i32 @parser_Message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @parser_Write(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @parser_Write(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @parser_Write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @parser_Write(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @parser_Write(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 @parser_Write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 @parser_Message(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 (...) @parser_init_out_buffer()
%13 = tail call i32 (...) @MontarInstrucoes()
%14 = tail call i32 @parser_Message(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%15 = tail call i32 (...) @parser_flush_program()
%16 = tail call i32 @parser_Write(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%17 = tail call i32 @parser_Message(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
ret void
}