xunge/DecIR huggingface dataset:
void *rslab_data(struct rslab *slab) { return (char *)slab + rslab_sizeof(); }


x86 assembly (clang, -O0):
<rslab_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rslab_sizeof@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rslab_data>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rslab_sizeof@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.rslab = type opaque
define i8* @rslab_data(%struct.rslab* %0) {
%2 = alloca %struct.rslab*
store %struct.rslab* %0, %struct.rslab** %2
%3 = load %struct.rslab*, %struct.rslab** %2
%4 = bitcast %struct.rslab* %3 to i8*
%5 = call i32 (...) @rslab_sizeof()
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
ret i8* %7
}

LLVM IR (-O2):
%struct.rslab = type opaque
define i8* @rslab_data(%struct.rslab* readnone %0) {
%2 = bitcast %struct.rslab* %0 to i8*
%3 = tail call i32 (...) @rslab_sizeof()
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ ciaF(int *);
void ciaF2(int *x) { ciaF(x); }


x86 assembly (clang, -O0):
<ciaF2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ciaF@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ciaF2>:
jmp    1030 <ciaF@plt>

LLVM IR (-O0):
define void @ciaF2(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ciaF(i32* %3)
ret void
}

LLVM IR (-O2):
define void @ciaF2(i32* %0) {
%2 = tail call i32 @ciaF(i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ pcheck(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  scanf(" %d", &n);
  if (pcheck(n)) {
    printf("%d is a palindromic number.\n", n);
    return 0;
  } else {
    printf("%d is not a palindromic number.\n", n);
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <pcheck@plt>
cmp    $0x0,%rax
je     117c <main+0x4c>
mov    -0x8(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1192 <main+0x62>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <pcheck@plt>
test   %rax,%rax
mov    0x4(%rsp),%esi
lea    0xec8(%rip),%rax
lea    0xea4(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %d\00"
@.str.1 = [29 x i8] c"%d is a palindromic number.\0A\00"
@.str.2 = [33 x i8] c"%d is not a palindromic number.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i64 @pcheck(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %8)
store i32 0, i32* %1
br label %13
10: ; preds = %0
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %11)
store i32 0, i32* %1
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [4 x i8] c" %d\00"
@.str.1 = [29 x i8] c"%d is a palindromic number.\0A\00"
@.str.2 = [33 x i8] c"%d is not a palindromic number.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i64 @pcheck(i32 %4)
%6 = icmp eq i64 %5, 0
%7 = load i32, i32* %1
%8 = select i1 %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0)
%9 = call i32 @printf(i8* %8, i32 %7)
ret i32 0
}
void local_mcu_GlobalInterrupts_targetInit__I() {}


x86 assembly (clang, -O0):
<local_mcu_GlobalInterrupts_targetInit__I>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_mcu_GlobalInterrupts_targetInit__I>:
ret

LLVM IR (-O0):
define void @local_mcu_GlobalInterrupts_targetInit__I() {
ret void
}

LLVM IR (-O2):
define void @local_mcu_GlobalInterrupts_targetInit__I() {
ret void
}
void g_gstring_get_type() {}


x86 assembly (clang, -O0):
<g_gstring_get_type>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_gstring_get_type>:
ret

LLVM IR (-O0):
define void @g_gstring_get_type() {
ret void
}

LLVM IR (-O2):
define void @g_gstring_get_type() {
ret void
}
/* Type definitions */
struct ssds_class {
  int dummy;
};

/* Variables and functions */
void *ssds_find_item_new(struct ssds_class *, char *, int /*<<< orphan*/ *);
void *ssds_find_item(struct ssds_class *pclass, char *name) {
  return ssds_find_item_new(pclass, name, NULL);
}


x86 assembly (clang, -O0):
<ssds_find_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <ssds_find_item_new@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssds_find_item>:
xor    %edx,%edx
jmp    1030 <ssds_find_item_new@plt>

LLVM IR (-O0):
%struct.ssds_class = type { i32 }
define i8* @ssds_find_item(%struct.ssds_class* %0, i8* %1) {
%3 = alloca %struct.ssds_class*
%4 = alloca i8*
store %struct.ssds_class* %0, %struct.ssds_class** %3
store i8* %1, i8** %4
%5 = load %struct.ssds_class*, %struct.ssds_class** %3
%6 = load i8*, i8** %4
%7 = call i8* @ssds_find_item_new(%struct.ssds_class* %5, i8* %6, i32* null)
ret i8* %7
}

LLVM IR (-O2):
%struct.ssds_class = type { i32 }
define i8* @ssds_find_item(%struct.ssds_class* %0, i8* %1) {
%3 = tail call i8* @ssds_find_item_new(%struct.ssds_class* %0, i8* %1, i32* null)
ret i8* %3
}
char *procprt_WCANCEL_e(struct tstat *curstat, int avgval, int nsecs) {
  return "     -";
}


x86 assembly (clang, -O0):
<procprt_WCANCEL_e>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xeeb(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<procprt_WCANCEL_e>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct.tstat = type opaque
@.str = [7 x i8] c" -\00"
define i8* @procprt_WCANCEL_e(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type opaque
@.str = [7 x i8] c" -\00"
define i8* @procprt_WCANCEL_e(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ rng_uint64();
int rng_int32(void) { return (int)rng_uint64(); }


x86 assembly (clang, -O0):
<rng_int32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rng_uint64@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rng_int32>:
xor    %eax,%eax
jmp    1030 <rng_uint64@plt>

LLVM IR (-O0):
define i32 @rng_int32() {
%1 = call i64 (...) @rng_uint64()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @rng_int32() {
%1 = tail call i64 (...) @rng_uint64()
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
char *func2(void) {
  printf("This is func2\n");
  return (0);
}


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"This is func2\0A\00"
define i8* @func2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@str = [14 x i8] c"This is func2\00"
define noalias i8* @func2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
int GetCurrentProcessId();
int adns_getpid() { return GetCurrentProcessId(); }


x86 assembly (clang, -O0):
<adns_getpid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GetCurrentProcessId@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adns_getpid>:
xor    %eax,%eax
jmp    1030 <GetCurrentProcessId@plt>

LLVM IR (-O0):
define i32 @adns_getpid() {
%1 = call i32 (...) @GetCurrentProcessId()
ret i32 %1
}

LLVM IR (-O2):
define i32 @adns_getpid() {
%1 = tail call i32 (...) @GetCurrentProcessId()
ret i32 %1
}
/* Type definitions */
struct forth_instance {
  int dummy;
};

/* Variables and functions */
scalar_t__ st_pop(struct forth_instance *);
int /*<<< orphan*/ st_push(struct forth_instance *, intptr_t);
void c_fetch(struct forth_instance *fi) {
  st_push(fi, (intptr_t) * ((char *)st_pop(fi)));
}


x86 assembly (clang, -O0):
<c_fetch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <st_pop@plt>
mov    -0x10(%rbp),%rdi
movsbq (%rax),%rsi
call   1040 <st_push@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_fetch>:
push   %rbx
mov    %rdi,%rbx
call   1030 <st_pop@plt>
movsbq (%rax),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <st_push@plt>

LLVM IR (-O0):
%struct.forth_instance = type { i32 }
define void @c_fetch(%struct.forth_instance* %0) {
%2 = alloca %struct.forth_instance*
store %struct.forth_instance* %0, %struct.forth_instance** %2
%3 = load %struct.forth_instance*, %struct.forth_instance** %2
%4 = load %struct.forth_instance*, %struct.forth_instance** %2
%5 = call i64 @st_pop(%struct.forth_instance* %4)
%6 = inttoptr i64 %5 to i8*
%7 = load i8, i8* %6
%8 = sext i8 %7 to i64
%9 = call i32 @st_push(%struct.forth_instance* %3, i64 %8)
ret void
}

LLVM IR (-O2):
%struct.forth_instance = type { i32 }
define void @c_fetch(%struct.forth_instance* %0) {
%2 = tail call i64 @st_pop(%struct.forth_instance* %0)
%3 = inttoptr i64 %2 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i64
%6 = tail call i32 @st_push(%struct.forth_instance* %0, i64 %5)
ret void
}
/* Variables and functions */
double pow(int, int);
double binomial(int k, int n, double x) {
  return pow(x, k) * pow(1 - x, n - k);
}


x86 assembly (clang, -O0):
<binomial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xec3(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
mov    -0x8(%rbp),%esi
sub    -0x4(%rbp),%esi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binomial>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %esi,%ebx
mov    %edi,%ebp
cvttsd2si %xmm0,%edi
mov    %ebp,%esi
call   1030 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xec7(%rip),%xmm0
subsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
sub    %ebp,%ebx
mov    %ebx,%esi
call   1030 <pow@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @binomial(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = fptosi double %7 to i32
%9 = load i32, i32* %4
%10 = call double @pow(i32 %8, i32 %9)
%11 = load double, double* %6
%12 = fsub double 1.000000e+00, %11
%13 = fptosi double %12 to i32
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = sub nsw i32 %14, %15
%17 = call double @pow(i32 %13, i32 %16)
%18 = fmul double %10, %17
ret double %18
}

LLVM IR (-O2):
define double @binomial(i32 %0, i32 %1, double %2) {
%4 = fptosi double %2 to i32
%5 = tail call double @pow(i32 %4, i32 %0)
%6 = fsub double 1.000000e+00, %2
%7 = fptosi double %6 to i32
%8 = sub nsw i32 %1, %0
%9 = tail call double @pow(i32 %7, i32 %8)
%10 = fmul double %5, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ cnfImpn(char *const, int, int, char *);
int /*<<< orphan*/ emsSetd(char *, double);
void ems_setd_(char *const token, double *const dvalue, int token_length) {
  char ctok[15 + 1];

  cnfImpn(token, token_length, 15, ctok);
  emsSetd(ctok, *dvalue);
  return;
}


x86 assembly (clang, -O0):
<ems_setd_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x30(%rbp),%rcx
mov    $0xf,%edx
call   1030 <cnfImpn@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1040 <emsSetd@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ems_setd_>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %edx,%esi
mov    $0xf,%edx
mov    %r14,%rcx
call   1030 <cnfImpn@plt>
movsd  (%rbx),%xmm0
mov    %r14,%rdi
call   1040 <emsSetd@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ems_setd_(i8* %0, double* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca double*
%6 = alloca i32
%7 = alloca [16 x i8]
store i8* %0, i8** %4
store double* %1, double** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%11 = call i32 @cnfImpn(i8* %8, i32 %9, i32 15, i8* %10)
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = load double*, double** %5
%14 = load double, double* %13
%15 = call i32 @emsSetd(i8* %12, double %14)
ret void
}

LLVM IR (-O2):
define void @ems_setd_(i8* %0, double* nocapture %1, i32 %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = call i32 @cnfImpn(i8* %0, i32 %2, i32 15, i8* %5)
%7 = load double, double* %1
%8 = call i32 @emsSetd(i8* %5, double %7)
ret void
}
/* Type definitions */
struct room {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct room *);
void _Shiva(struct room **dungeon, int size) {
  int i;
  for (i = 0; i < size; i++) {
    free(dungeon[i]);
  }
}


x86 assembly (clang, -O0):
<_Shiva>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <_Shiva+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <_Shiva+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Shiva>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1142 <_Shiva+0x32>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <_Shiva+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.room = type { i32 }
define void @_Shiva(%struct.room** %0, i32 %1) {
%3 = alloca %struct.room**
%4 = alloca i32
%5 = alloca i32
store %struct.room** %0, %struct.room*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load %struct.room**, %struct.room*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds %struct.room*, %struct.room** %11, i64 %13
%15 = load %struct.room*, %struct.room** %14
%16 = call i32 @free(%struct.room* %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.room = type { i32 }
define void @_Shiva(%struct.room** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds %struct.room*, %struct.room** %0, i64 %7
%9 = load %struct.room*, %struct.room** %8
%10 = tail call i32 @free(%struct.room* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void pgStatistics(FILE *f) {}


x86 assembly (clang, -O0):
<pgStatistics>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgStatistics>:
ret

LLVM IR (-O0):
define void @pgStatistics(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret void
}

LLVM IR (-O2):
define void @pgStatistics(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void chk_free(void **pptr) {
  if (pptr == NULL || *pptr == NULL)
    return;
  free(*pptr);
  *pptr = NULL;
}


x86 assembly (clang, -O0):
<chk_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1135 <chk_free+0x25>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    113a <chk_free+0x2a>
jmp    1151 <chk_free+0x41>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_free>:
push   %rbx
test   %rdi,%rdi
je     112d <chk_free+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <chk_free+0x1d>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @chk_free(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %5, %1
br label %15
10: ; preds = %5
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = call i32 @free(i8* %12)
%14 = load i8**, i8*** %2
store i8* null, i8** %14
br label %15
15: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @chk_free(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(i8* %4)
store i8* null, i8** %0
br label %8
8: ; preds = %1, %3, %6
ret void
}
/* Variables and functions */
scalar_t__ LINES;
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ mvaddstr(scalar_t__, int /*<<< orphan*/, char *);
int /*<<< orphan*/ my_exit(int /*<<< orphan*/);
int /*<<< orphan*/ refresh();
void fatal(char *s) {
  mvaddstr(LINES - 2, 0, s);
  refresh();
  endwin();
  my_exit(0);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%rdi
sub    $0x2,%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1060 <mvaddstr@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
xor    %edi,%edi
call   1030 <my_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatal>:
push   %rax
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rax
mov    (%rax),%rdi
add    $0xfffffffffffffffe,%rdi
xor    %esi,%esi
call   1060 <mvaddstr@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <my_exit@plt>

LLVM IR (-O0):
@LINES = global i64 0
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @LINES
%4 = sub nsw i64 %3, 2
%5 = load i8*, i8** %2
%6 = call i32 @mvaddstr(i64 %4, i32 0, i8* %5)
%7 = call i32 (...) @refresh()
%8 = call i32 (...) @endwin()
%9 = call i32 @my_exit(i32 0)
ret void
}

LLVM IR (-O2):
@LINES = global i64 0
define void @fatal(i8* %0) {
%2 = load i64, i64* @LINES
%3 = add nsw i64 %2, -2
%4 = tail call i32 @mvaddstr(i64 %3, i32 0, i8* %0)
%5 = tail call i32 (...) @refresh()
%6 = tail call i32 (...) @endwin()
%7 = tail call i32 @my_exit(i32 0)
ret void
}
/* Variables and functions */
char *lib_ltrim(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ lib_rtrim(char *, char const *);
char *lib_trim(char *str, const char *seps) {
  return lib_ltrim(lib_rtrim(str, seps), seps);
}


x86 assembly (clang, -O0):
<lib_trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <lib_rtrim@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <lib_ltrim@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lib_trim>:
push   %rbx
mov    %rsi,%rbx
call   1030 <lib_rtrim@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <lib_ltrim@plt>

LLVM IR (-O0):
define i8* @lib_trim(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @lib_rtrim(i8* %5, i8* %6)
%8 = load i8*, i8** %4
%9 = call i8* @lib_ltrim(i32 %7, i8* %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @lib_trim(i8* %0, i8* %1) {
%3 = tail call i32 @lib_rtrim(i8* %0, i8* %1)
%4 = tail call i8* @lib_ltrim(i32 %3, i8* %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  puts("main");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"main\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"main\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, char *);
void toomany(char *s) {
  char buffer[200];
  sprintf(buffer, "limit of %d exceeded, too many %s", 32767, s);
  fatal(buffer);
}


x86 assembly (clang, -O0):
<toomany>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rcx
lea    0xebf(%rip),%rsi
mov    $0x7fff,%edx
call   1030 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1040 <fatal@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toomany>:
push   %rbx
sub    $0xd0,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x7fff,%edx
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <fatal@plt>
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"limit of %d exceeded, too many %s\00"
define void @toomany(i8* %0) {
%2 = alloca i8*
%3 = alloca [200 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 32767, i8* %5)
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%8 = call i32 @fatal(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"limit of %d exceeded, too many %s\00"
define void @toomany(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 32767, i8* %0)
%5 = call i32 @fatal(i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int set_socket_flag_non_block(int, int /*<<< orphan*/);
int /*<<< orphan*/ set_socket_send_timeout(int, int /*<<< orphan*/);
int set_socket_block(int socket, uint64_t usec) {
  set_socket_send_timeout(socket, usec);
  return set_socket_flag_non_block(socket, 0);
}


x86 assembly (clang, -O0):
<set_socket_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <set_socket_send_timeout@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <set_socket_flag_non_block@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_socket_block>:
push   %rbx
mov    %edi,%ebx
call   1030 <set_socket_send_timeout@plt>
mov    %ebx,%edi
xor    %esi,%esi
pop    %rbx
jmp    1040 <set_socket_flag_non_block@plt>

LLVM IR (-O0):
define i32 @set_socket_block(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @set_socket_send_timeout(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @set_socket_flag_non_block(i32 %8, i32 0)
ret i32 %9
}

LLVM IR (-O2):
define i32 @set_socket_block(i32 %0, i32 %1) {
%3 = tail call i32 @set_socket_send_timeout(i32 %0, i32 %1)
%4 = tail call i32 @set_socket_flag_non_block(i32 %0, i32 0)
ret i32 %4
}
void foo193(int p) {}


x86 assembly (clang, -O0):
<foo193>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo193>:
ret

LLVM IR (-O0):
define void @foo193(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo193(i32 %0) {
ret void
}
/* Variables and functions */
int bar(int);
__attribute__((no)) int foo(int dwarf_test_param) {
  return bar(dwarf_test_param);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <bar@plt>

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @bar(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @bar(i32 %0)
ret i32 %2
}
int str_len2(char *s) {
  char *p = s;
  while (*p != '\0')
    p++;
  return p - s;
}


x86 assembly (clang, -O0):
<str_len2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1131 <str_len2+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <str_len2+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_len2>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <str_len2+0x10>
ret

LLVM IR (-O0):
define i32 @str_len2(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %10, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %5
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = ptrtoint i8* %14 to i64
%17 = ptrtoint i8* %15 to i64
%18 = sub i64 %16, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @str_len2(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ send_ipi(int /*<<< orphan*/ *, int, int);
void apic_send_ipi_self(uint8_t *baseapic, uint16_t type) {
  uint32_t high = 0x0f000000;
  uint32_t low = (1 << 18) | type;
  send_ipi(baseapic, high, low);
}


x86 assembly (clang, -O0):
<apic_send_ipi_self>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xf000000,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     $0x40000,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <send_ipi@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apic_send_ipi_self>:
mov    %esi,%edx
or     $0x40000,%edx
mov    $0xf000000,%esi
jmp    1030 <send_ipi@plt>

LLVM IR (-O0):
define void @apic_send_ipi_self(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 251658240, i32* %5
%7 = load i32, i32* %4
%8 = or i32 262144, %7
store i32 %8, i32* %6
%9 = load i32*, i32** %3
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @send_ipi(i32* %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @apic_send_ipi_self(i32* %0, i32 %1) {
%3 = or i32 %1, 262144
%4 = tail call i32 @send_ipi(i32* %0, i32 251658240, i32 %3)
ret void
}
/* Variables and functions */
int CSTOPB;
int cStopSize(int numbits) {
  if (numbits == 2) {
    return (CSTOPB);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<cStopSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1122 <cStopSize+0x22>
mov    0x2ec0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1129 <cStopSize+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cStopSize>:
xor    %eax,%eax
cmp    $0x2,%edi
jne    1110 <cStopSize+0x10>
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@CSTOPB = global i32 0
define i32 @cStopSize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 2
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* @CSTOPB
store i32 %7, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@CSTOPB = global i32 0
define i32 @cStopSize(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = load i32, i32* @CSTOPB
%4 = select i1 %2, i32 %3, i32 0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *my_malloc2(int, int);
void test3() {
  void *data = my_malloc2(1, 4);
  free(data);
  data = my_malloc2(1, 4);
  free(data);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rax
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,%rdi
call   1030 <free@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @test3() {
%1 = alloca i8*
%2 = call i8* @my_malloc2(i32 1, i32 4)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @free(i8* %3)
%5 = call i8* @my_malloc2(i32 1, i32 4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @test3() {
%1 = tail call i8* @my_malloc2(i32 1, i32 4)
%2 = tail call i32 @free(i8* %1)
%3 = tail call i8* @my_malloc2(i32 1, i32 4)
%4 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
*allocateVector(int tamanho) {
  int *v = (int *)malloc(tamanho * sizeof(int));
  if (v == NULL) {
    printf("Allocation error: vector\n");
    exit(EXIT_FAILURE);
  }
  return v;
}


x86 assembly (clang, -O0):
<allocateVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <allocateVector+0x43>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocateVector>:
push   %rax
shl    $0x2,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <allocateVector+0x10>
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Allocation error: vector\0A\00"
@EXIT_FAILURE = global i32 0
define i32* @allocateVector(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %16
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %1
%17 = load i32*, i32** %3
ret i32* %17
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [25 x i8] c"Allocation error: vector\00"
define i32* @allocateVector(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %3 to i32*
ret i32* %10
}
int time_to_min(int t1, int t2) { return t1 * 60 + t2; }


x86 assembly (clang, -O0):
<time_to_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x3c,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_to_min>:
imul   $0x3c,%edi,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @time_to_min(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 60
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @time_to_min(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 60
%4 = add nsw i32 %3, %1
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *const, struct stat *);
int exists(const char *const path) {
  struct stat file_stat;
  return stat(path, &file_stat) == 0;
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float m;
  printf("Area em Metros Quadrados: ");
  scanf("%f", &m);
  printf("Area em Hectares: %f", m * 0.0001);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea2(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeae(%rip),%xmm0
lea    0xeca(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Area em Metros Quadrados: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [21 x i8] c"Area em Hectares: %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fmul double %6, 1.000000e-04
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Area em Metros Quadrados: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [21 x i8] c"Area em Hectares: %f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fmul double %6, 1.000000e-04
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
void EC_GROUP_get_seed_len(void) {}


x86 assembly (clang, -O0):
<EC_GROUP_get_seed_len>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EC_GROUP_get_seed_len>:
ret

LLVM IR (-O0):
define void @EC_GROUP_get_seed_len() {
ret void
}

LLVM IR (-O2):
define void @EC_GROUP_get_seed_len() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
long int PulseF3(long int trig) {
  long int stat = 0;
  BNCIO(46);
  BNCIO(3);
  BNCIO(1);
  return (stat);
}


x86 assembly (clang, -O0):
<PulseF3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x2e,%edi
call   1030 <BNCIO@plt>
mov    $0x3,%edi
call   1030 <BNCIO@plt>
mov    $0x1,%edi
call   1030 <BNCIO@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PulseF3>:
push   %rax
mov    $0x2e,%edi
call   1030 <BNCIO@plt>
mov    $0x3,%edi
call   1030 <BNCIO@plt>
mov    $0x1,%edi
call   1030 <BNCIO@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @PulseF3(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
%4 = call i32 @BNCIO(i32 46)
%5 = call i32 @BNCIO(i32 3)
%6 = call i32 @BNCIO(i32 1)
%7 = load i64, i64* %3
ret i64 %7
}

LLVM IR (-O2):
define i64 @PulseF3(i64 %0) {
%2 = tail call i32 @BNCIO(i32 46)
%3 = tail call i32 @BNCIO(i32 3)
%4 = tail call i32 @BNCIO(i32 1)
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
foo(unsigned int z) {
  if (z != 3)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     112c <foo+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x3,%edi
jne    1116 <foo+0x6>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp eq i32 %0, 3
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret i32 undef
}
/* Variables and functions */
int putc_unlocked(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int putchar_unlocked(int c) { return putc_unlocked(c, stdout); }


x86 assembly (clang, -O0):
<putchar_unlocked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <putc_unlocked@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar_unlocked>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <putc_unlocked@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @putchar_unlocked(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @putc_unlocked(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @putchar_unlocked(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @putc_unlocked(i32 %0, i32 %2)
ret i32 %3
}
void cache_disable(unsigned int cache_bit) { return; }


x86 assembly (clang, -O0):
<cache_disable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cache_disable>:
ret

LLVM IR (-O0):
define void @cache_disable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @cache_disable(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init(int, char **);
int /*<<< orphan*/ run();
int main(int argc, char *argv[]) {
  init(argc, argv);
  run();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <init@plt>
mov    $0x0,%al
call   1030 <run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <init@plt>
xor    %eax,%eax
call   1030 <run@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @init(i32 %6, i8** %7)
%9 = call i32 (...) @run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @init(i32 %0, i8** %1)
%4 = tail call i32 (...) @run()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, float);
void print_result(int hour, int min, float result_angle) {
  printf("The angle difference of %2d:%2d is %0.1f\n", hour, min, result_angle);
}


x86 assembly (clang, -O0):
<print_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
movss  -0xc(%rbp),%xmm0
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_result>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"The angle difference of %2d:%2d is %0.1f\0A\00"
define void @print_result(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load float, float* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, float %9)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"The angle difference of %2d:%2d is %0.1f\0A\00"
define void @print_result(i32 %0, i32 %1, float %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, float %2)
ret void
}
int cmpInt(const void *a, const void *b) { return (*(int *)a - *(int *)b); }


x86 assembly (clang, -O0):
<cmpInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpInt>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @cmpInt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmpInt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void batadv_arp_change_timeout(struct net_device *soft_iface,
                               const char *name) {}


x86 assembly (clang, -O0):
<batadv_arp_change_timeout>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<batadv_arp_change_timeout>:
ret

LLVM IR (-O0):
%struct.net_device = type opaque
define void @batadv_arp_change_timeout(%struct.net_device* %0, i8* %1) {
%3 = alloca %struct.net_device*
%4 = alloca i8*
store %struct.net_device* %0, %struct.net_device** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.net_device = type opaque
define void @batadv_arp_change_timeout(%struct.net_device* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int dlclose(void *);
int dlclose4029(uintptr_t handle) { return dlclose((void *)(handle)); }


x86 assembly (clang, -O0):
<dlclose4029>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <dlclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlclose4029>:
jmp    1030 <dlclose@plt>

LLVM IR (-O0):
define i32 @dlclose4029(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
%5 = call i32 @dlclose(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @dlclose4029(i64 %0) {
%2 = inttoptr i64 %0 to i8*
%3 = tail call i32 @dlclose(i8* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void bounds_check_fault(void) {
  panic("exception(fault): bounds check failed");
}


x86 assembly (clang, -O0):
<bounds_check_fault>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bounds_check_fault>:
lea    0xee9(%rip),%rdi
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"exception(fault): bounds check failed\00"
define void @bounds_check_fault() {
%1 = call i32 @panic(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"exception(fault): bounds check failed\00"
define void @bounds_check_fault() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}
int __VERIFIER_plot(char *s) { return 0; }


x86 assembly (clang, -O0):
<__VERIFIER_plot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_plot>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__VERIFIER_plot(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @__VERIFIER_plot(i8* nocapture readnone %0) {
ret i32 0
}