#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*/ exibe();
int /*<<< orphan*/ insere(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ remover();
void main(void) {
  for (int j = 0; j < 12 - 3; j++) {
    insere(j + 2);
  }
  printf("Antes da remoção\n");
  exibe();
  printf("======");
  printf("Depois da remoção\n");
  remover();
  exibe();
  printf("======");
  printf("Depois de mais uma remoção\n");
  remover();
  exibe();
  printf("======\n");
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jge    1172 <main+0x32>
mov    -0x4(%rbp),%edi
add    $0x2,%edi
call   1060 <insere@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114f <main+0xf>
lea    0xe87(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <exibe@plt>
lea    0xe88(%rip),%rdi
call   1050 <printf@plt>
lea    0xe83(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <remover@plt>
mov    $0x0,%al
call   1030 <exibe@plt>
lea    0xe62(%rip),%rdi
call   1050 <printf@plt>
lea    0xe72(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <remover@plt>
mov    $0x0,%al
call   1030 <exibe@plt>
lea    0xe76(%rip),%rdi
call   1050 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%edi
call   1070 <insere@plt>
mov    $0x3,%edi
call   1070 <insere@plt>
mov    $0x4,%edi
call   1070 <insere@plt>
mov    $0x5,%edi
call   1070 <insere@plt>
mov    $0x6,%edi
call   1070 <insere@plt>
mov    $0x7,%edi
call   1070 <insere@plt>
mov    $0x8,%edi
call   1070 <insere@plt>
mov    $0x9,%edi
call   1070 <insere@plt>
mov    $0xa,%edi
call   1070 <insere@plt>
lea    0xe4e(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <exibe@plt>
lea    0xe7f(%rip),%rbx
mov    %rbx,%rdi
call   1060 <printf@plt>
lea    0xe3f(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <remover@plt>
xor    %eax,%eax
call   1030 <exibe@plt>
mov    %rbx,%rdi
call   1060 <printf@plt>
lea    0xe31(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <remover@plt>
xor    %eax,%eax
call   1030 <exibe@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Antes da remo\C3\A7\C3\A3o\0A\00"
@.str.1 = [7 x i8] c"======\00"
@.str.2 = [21 x i8] c"Depois da remo\C3\A7\C3\A3o\0A\00"
@.str.3 = [30 x i8] c"Depois de mais uma remo\C3\A7\C3\A3o\0A\00"
@.str.4 = [8 x i8] c"======\0A\00"
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 9
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 2
%8 = call i32 @insere(i32 %7)
br label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @exibe()
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 (...) @remover()
%18 = call i32 (...) @exibe()
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 (...) @remover()
%22 = call i32 (...) @exibe()
%23 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"Antes da remo\C3\A7\C3\A3o\00"
@str.5 = [20 x i8] c"Depois da remo\C3\A7\C3\A3o\00"
@str.6 = [29 x i8] c"Depois de mais uma remo\C3\A7\C3\A3o\00"
@str.7 = [7 x i8] c"======\00"
define void @main() {
%1 = tail call i32 @insere(i32 2)
%2 = tail call i32 @insere(i32 3)
%3 = tail call i32 @insere(i32 4)
%4 = tail call i32 @insere(i32 5)
%5 = tail call i32 @insere(i32 6)
%6 = tail call i32 @insere(i32 7)
%7 = tail call i32 @insere(i32 8)
%8 = tail call i32 @insere(i32 9)
%9 = tail call i32 @insere(i32 10)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 (...) @exibe()
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%14 = tail call i32 (...) @remover()
%15 = tail call i32 (...) @exibe()
%16 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.6, i64 0, i64 0))
%18 = tail call i32 (...) @remover()
%19 = tail call i32 (...) @exibe()
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
ret void
}