xunge/DecIR huggingface dataset:
int x264_clip3(int v, int i_min, int i_max) {
  return ((v < i_min) ? i_min : (v > i_max) ? i_max : v);
}


x86 assembly (clang, -O0):
<x264_clip3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1124 <x264_clip3+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <x264_clip3+0x47>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113b <x264_clip3+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <x264_clip3+0x41>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x264_clip3>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @x264_clip3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i32, i32* %5
br label %22
12: ; preds = %3
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i32, i32* %6
br label %20
18: ; preds = %12
%19 = load i32, i32* %4
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i32 [ %11, %10 ], [ %21, %20 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @x264_clip3(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
int re_match(bufp, string, size, pos, regs)
struct re_pattern_buffer *bufp;
char *string;
int size, pos;
struct re_registers *regs;
{
  return re_match_2(bufp, 0, 0, string, size, pos, regs, size);
}


x86 assembly (clang, -O0):
<re_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    -0x20(%rbp),%r10
mov    -0x14(%rbp),%eax
xor    %edx,%edx
mov    %edx,%esi
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <re_match_2@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_match>:
push   %rax
mov    %r8,%r10
mov    %ecx,%r9d
mov    %edx,%r8d
mov    %rsi,%rcx
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
push   %r8
push   %r10
call   1030 <re_match_2@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.re_pattern_buffer = type opaque
%struct.re_registers = type opaque
define i32 @re_match(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i32 %3, %struct.re_registers* %4) {
%6 = alloca %struct.re_pattern_buffer*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.re_registers*
store %struct.re_pattern_buffer* %0, %struct.re_pattern_buffer** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store %struct.re_registers* %4, %struct.re_registers** %10
%11 = load %struct.re_pattern_buffer*, %struct.re_pattern_buffer** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load %struct.re_registers*, %struct.re_registers** %10
%16 = load i32, i32* %8
%17 = call i32 (%struct.re_pattern_buffer*, i32, i32, i8*, i32, i32, %struct.re_registers*, i32, ...) bitcast (i32 (...)* @re_match_2 to i32 (%struct.re_pattern_buffer*, i32, i32, i8*, i32, i32, %struct.re_registers*, i32, ...)*)(%struct.re_pattern_buffer* %11, i32 0, i32 0, i8* %12, i32 %13, i32 %14, %struct.re_registers* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
%struct.re_pattern_buffer = type opaque
%struct.re_registers = type opaque
define i32 @re_match(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i32 %3, %struct.re_registers* %4) {
%6 = tail call i32 (%struct.re_pattern_buffer*, i32, i32, i8*, i32, i32, %struct.re_registers*, i32, ...) bitcast (i32 (...)* @re_match_2 to i32 (%struct.re_pattern_buffer*, i32, i32, i8*, i32, i32, %struct.re_registers*, i32, ...)*)(%struct.re_pattern_buffer* %0, i32 0, i32 0, i8* %1, i32 %2, i32 %3, %struct.re_registers* %4, i32 %2)
ret i32 %6
}
/* Variables and functions */
int rand();
int getRandomNum(int min, int max) {
  int res = min + rand() % max;
  return res;
}


x86 assembly (clang, -O0):
<getRandomNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x8(%rbp)
mov    -0x10(%rbp),%eax
add    %edx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandomNum>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getRandomNum(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 (...) @rand()
%8 = load i32, i32* %4
%9 = srem i32 %7, %8
%10 = add nsw i32 %6, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @getRandomNum(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, %1
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ foo(unsigned short);
__attribute__((no, noclone)) unsigned short f19(unsigned short x,
                                                unsigned short y) {
  unsigned short r = x + y;
  if (y <= r)
    foo(r);
  return r;
}


x86 assembly (clang, -O0):
<f19>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x4(%rbp),%eax
movzwl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     114d <f19+0x3d>
movzwl -0x6(%rbp),%edi
call   1030 <foo@plt>
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f19>:
push   %rbx
mov    %esi,%ebx
add    %di,%bx
jb     1120 <f19+0x10>
movzwl %bx,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @f19(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = add nsw i32 %7, %9
%11 = trunc i32 %10 to i16
store i16 %11, i16* %5
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = icmp sle i32 %13, %15
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i16, i16* %5
%19 = call i32 @foo(i16 zeroext %18)
br label %20
20: ; preds = %17, %2
%21 = load i16, i16* %5
ret i16 %21
}

LLVM IR (-O2):
define zeroext i16 @f19(i16 zeroext %0, i16 zeroext %1) {
%3 = add i16 %1, %0
%4 = icmp ult i16 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @foo(i16 zeroext %3)
br label %7
7: ; preds = %5, %2
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xef() {
  Assert_real((islower(239) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              1200, ("islower should be 0 for 0xef"));
}


x86 assembly (clang, -O0):
<t_islower_0xef>:
push   %rbp
mov    %rsp,%rbp
mov    $0xef,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4b0,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0xef>:
push   %rax
mov    $0xef,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4b0,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xef\00"
define void @t_islower_0xef() {
%1 = call i64 @islower(i32 239)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1200, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xef\00"
define void @t_islower_0xef() {
%1 = tail call i64 @islower(i32 239)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1200, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strstr(char *, char *);
short eq(char *a, char *b) { return strstr(a, b) != 0; }


x86 assembly (clang, -O0):
<eq>:
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 <strstr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
push   %rax
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @eq(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 i64 @strstr(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @eq(i8* %0, i8* %1) {
%3 = tail call i64 @strstr(i8* %0, i8* %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i16
ret i16 %5
}
/* Variables and functions */
double EvalAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double);
double funcAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double *x, double *par) {
  double result;
  result = par[0] * EvalAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngDist_alpha1_3minus_2plus_15097_L1_L3_L5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngDist_alpha1_3minus_2plus_15097_L1_L3_L5@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngDist_alpha1_3minus_2plus_15097_L1_L3_L5>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngDist_alpha1_3minus_2plus_15097_L1_L3_L5@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _MPI_safeFree(void *buffer, char *message) {
  ;
  if (buffer)
    free(buffer);
}


x86 assembly (clang, -O0):
<_MPI_safeFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <_MPI_safeFree+0x24>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MPI_safeFree>:
test   %rdi,%rdi
je     111a <_MPI_safeFree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @_MPI_safeFree(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @_MPI_safeFree(i8* %0, i8* nocapture readnone %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %4, %2
ret void
}
int divide(int op1, int op2) { return op1 / op2; }


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @divide(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @divide(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int floor(double);
double square(double phase, double bias) {
  return 2 * (floor(phase) - floor(phase - 0.5 + bias)) - 1;
}


x86 assembly (clang, -O0):
<square>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec4(%rip),%xmm1
subsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
call   1030 <floor@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<square>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
call   1030 <floor@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
addsd  0xecc(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
call   1030 <floor@plt>
sub    %eax,%ebx
lea    (%rbx,%rbx,1),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @square(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call i32 @floor(double %5)
%7 = load double, double* %3
%8 = fsub double %7, 5.000000e-01
%9 = load double, double* %4
%10 = fadd double %8, %9
%11 = call i32 @floor(double %10)
%12 = sub nsw i32 %6, %11
%13 = mul nsw i32 2, %12
%14 = sub nsw i32 %13, 1
%15 = sitofp i32 %14 to double
ret double %15
}

LLVM IR (-O2):
define double @square(double %0, double %1) {
%3 = tail call i32 @floor(double %0)
%4 = fadd double %0, -5.000000e-01
%5 = fadd double %4, %1
%6 = tail call i32 @floor(double %5)
%7 = sub nsw i32 %3, %6
%8 = shl nsw i32 %7, 1
%9 = add nsw i32 %8, -1
%10 = sitofp i32 %9 to double
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ bubble_sort(int *, int);
int /*<<< orphan*/ display(int *, int);
int main() {
  int n = 10;
  int a1[] = {2, 3, 6, 4, 76, 11, 9, 4, 33, 87};
  bubble_sort(a1, n);
  display(a1, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <bubble_sort@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <display@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <bubble_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <display@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a1 = [10 x i32] [i32 2, i32 3, i32 6, i32 4, i32 76, i32 11, i32 9, i32 4, i32 33, i32 87]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
store i32 0, i32* %1
store i32 10, i32* %2
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @bubble_sort(i32* %5, i32 %6)
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 @display(i32* %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a1 = [10 x i32] [i32 2, i32 3, i32 6, i32 4, i32 76, i32 11, i32 9, i32 4, i32 33, i32 87]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @bubble_sort(i32* %3, i32 10)
%5 = call i32 @display(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getMessage(unsigned int *, int);
int /*<<< orphan*/ putMessage(unsigned char *, int);
unsigned int nrf_reg_read(unsigned char reg, unsigned char size) {
  unsigned char cmd;
  unsigned int data;
  cmd = 0x03;
  putMessage(&cmd, 1);
  getMessage(&data, 2);
  return data;
}


x86 assembly (clang, -O0):
<nrf_reg_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movb   $0x3,-0x3(%rbp)
lea    -0x3(%rbp),%rdi
mov    $0x1,%esi
call   1040 <putMessage@plt>
lea    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <getMessage@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_reg_read>:
push   %rax
movb   $0x3,0x3(%rsp)
lea    0x3(%rsp),%rdi
mov    $0x1,%esi
call   1040 <putMessage@plt>
lea    0x4(%rsp),%rdi
mov    $0x2,%esi
call   1030 <getMessage@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrf_reg_read(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i8 3, i8* %5
%7 = call i32 @putMessage(i8* %5, i32 1)
%8 = call i32 @getMessage(i32* %6, i32 2)
%9 = load i32, i32* %6
ret i32 %9
}

LLVM IR (-O2):
define i32 @nrf_reg_read(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i8 3, i8* %3
%6 = call i32 @putMessage(i8* %3, i32 1)
%7 = call i32 @getMessage(i32* %4, i32 2)
%8 = load i32, i32* %4
ret i32 %8
}
/* Variables and functions */
int mktemp_internal(char *, int /*<<< orphan*/, int, int /*<<< orphan*/);
int mkstemp(char *path) { return (mktemp_internal(path, 0, 1, 0)); }


x86 assembly (clang, -O0):
<mkstemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%esi
call   1030 <mktemp_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemp>:
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
jmp    1030 <mktemp_internal@plt>

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

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = tail call i32 @mktemp_internal(i8* %0, i32 0, i32 1, i32 0)
ret i32 %2
}
int isupper(int c) { return ((c >= 'A') && (c <= 'Z')); }


x86 assembly (clang, -O0):
<isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int MAP_HUGETLB;
int /*<<< orphan*/ mmap_chunks_higher(int, int);
int /*<<< orphan*/ printf(char *);
void alloc_16g_above_hint() {
  printf("Allocating 16G chunks > 128TB \n");
  mmap_chunks_higher(1, (MAP_HUGETLB | (34 << 26)));
}


x86 assembly (clang, -O0):
<alloc_16g_above_hint>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
or     $0x88000000,%esi
mov    $0x1,%edi
call   1040 <mmap_chunks_higher@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_16g_above_hint>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ebc(%rip),%rax
mov    $0x88000000,%esi
or     (%rax),%esi
mov    $0x1,%edi
pop    %rax
jmp    1040 <mmap_chunks_higher@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Allocating 16G chunks > 128TB \0A\00"
@MAP_HUGETLB = global i32 0
define void @alloc_16g_above_hint() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @MAP_HUGETLB
%3 = or i32 %2, -2013265920
%4 = call i32 @mmap_chunks_higher(i32 1, i32 %3)
ret void
}

LLVM IR (-O2):
@MAP_HUGETLB = global i32 0
@str = [31 x i8] c"Allocating 16G chunks > 128TB \00"
define void @alloc_16g_above_hint() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @MAP_HUGETLB
%3 = or i32 %2, -2013265920
%4 = tail call i32 @mmap_chunks_higher(i32 1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ GL_TEXTURE_MIN_FILTER;
int /*<<< orphan*/ glTexParameterf(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ glutPostRedisplay();
void minifySelect(int value) {
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, value);
  glutPostRedisplay();
}


x86 assembly (clang, -O0):
<minifySelect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    -0x4(%rbp),%edx
call   1040 <glTexParameterf@plt>
mov    $0x0,%al
call   1030 <glutPostRedisplay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minifySelect>:
push   %rax
mov    %edi,%edx
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
call   1040 <glTexParameterf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glutPostRedisplay@plt>

LLVM IR (-O0):
@GL_TEXTURE_2D = global i32 0
@GL_TEXTURE_MIN_FILTER = global i32 0
define void @minifySelect(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @GL_TEXTURE_2D
%4 = load i32, i32* @GL_TEXTURE_MIN_FILTER
%5 = load i32, i32* %2
%6 = call i32 @glTexParameterf(i32 %3, i32 %4, i32 %5)
%7 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
@GL_TEXTURE_2D = global i32 0
@GL_TEXTURE_MIN_FILTER = global i32 0
define void @minifySelect(i32 %0) {
%2 = load i32, i32* @GL_TEXTURE_2D
%3 = load i32, i32* @GL_TEXTURE_MIN_FILTER
%4 = tail call i32 @glTexParameterf(i32 %2, i32 %3, i32 %0)
%5 = tail call i32 (...) @glutPostRedisplay()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(const time_t *timep) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @ctime(i32* nocapture readnone %0) {
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Bool;

/* Variables and functions */
Bool XScreenSaverQueryExtension(Display *dpy, int *event_base_return,
                                int *error_base_return) {}


x86 assembly (clang, -O0):
<XScreenSaverQueryExtension>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @XScreenSaverQueryExtension(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @XScreenSaverQueryExtension(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 undef
}
void finish_rendering(void) {}


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

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

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

LLVM IR (-O2):
define void @finish_rendering() {
ret void
}
void g_main_context_ref() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_ref() {
ret void
}
unsigned int getPidTypeCount(void) { return 6; }


x86 assembly (clang, -O0):
<getPidTypeCount>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPidTypeCount>:
mov    $0x6,%eax
ret

LLVM IR (-O0):
define i32 @getPidTypeCount() {
ret i32 6
}

LLVM IR (-O2):
define i32 @getPidTypeCount() {
ret i32 6
}
/* Variables and functions */
int /*<<< orphan*/ do_moan(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void writestr(int fd, char *s) {
  do_moan(write(fd, s, strlen(s)), "write (fd, s, strlen (s))", 126);
}


x86 assembly (clang, -O0):
<writestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %eax,%edi
lea    0xe93(%rip),%rsi
mov    $0x7e,%edx
call   1050 <do_moan@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writestr>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xead(%rip),%rsi
mov    %eax,%edi
mov    $0x7e,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <do_moan@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"write (fd, s, strlen (s))\00"
define void @writestr(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @write(i32 %5, i8* %6, i32 %8)
%10 = call i32 @do_moan(i32 %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 126)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"write (fd, s, strlen (s))\00"
define void @writestr(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
%5 = tail call i32 @do_moan(i32 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 126)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t u8_from_le(const unsigned char *x) { return (uint8_t)x[0]; }


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

x86 assembly (clang, -O2):
<u8_from_le>:
movzbl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @u8_from_le(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @u8_from_le(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
ret i32 %3
}
double FTtoCM(double FT) { return FT * 30.48; }


x86 assembly (clang, -O0):
<FTtoCM>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FTtoCM>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @FTtoCM(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 3.048000e+01
ret double %4
}

LLVM IR (-O2):
define double @FTtoCM(double %0) {
%2 = fmul double %0, 3.048000e+01
ret double %2
}
unsigned int minimo(unsigned int a, unsigned int b, unsigned int c) {
  return (a < b && a < c ? a : (b < c ? b : c));
}


x86 assembly (clang, -O0):
<minimo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1130 <minimo+0x30>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1130 <minimo+0x30>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1153 <minimo+0x53>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1147 <minimo+0x47>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114d <minimo+0x4d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimo>:
cmp    %edx,%esi
mov    %edx,%ecx
cmovb  %esi,%ecx
cmp    %edx,%edi
mov    %ecx,%eax
cmovb  %edi,%eax
cmp    %esi,%edi
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @minimo(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load i32, i32* %6
%13 = icmp ult i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i32, i32* %4
br label %26
16: ; preds = %10, %3
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp ult i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = load i32, i32* %5
br label %24
22: ; preds = %16
%23 = load i32, i32* %6
br label %24
24: ; preds = %22, %20
%25 = phi i32 [ %21, %20 ], [ %23, %22 ]
br label %26
26: ; preds = %24, %14
%27 = phi i32 [ %15, %14 ], [ %25, %24 ]
ret i32 %27
}

LLVM IR (-O2):
define i32 @minimo(i32 %0, i32 %1, i32 %2) {
%4 = icmp ult i32 %0, %1
%5 = icmp ult i32 %0, %2
%6 = and i1 %4, %5
%7 = icmp ult i32 %1, %2
%8 = select i1 %7, i32 %1, i32 %2
%9 = select i1 %6, i32 %0, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ rand_r(unsigned int *);
int main() {
  unsigned int seed = 0xbeaf;
  (void)rand_r(&seed);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xbeaf,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <rand_r@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 48815, i32* %2
%3 = call i32 @rand_r(i32* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 48815, i32* %1
%3 = call i32 @rand_r(i32* %1)
ret i32 0
}
/* Variables and functions */
int maxValue(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int x, y, z;
  scanf("%d %d %d", &x, &y, &z);
  printf("%d", maxValue(x, y, z));
  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
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <maxValue@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1030 <maxValue@plt>
lea    0xe9f(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @maxValue(i32 %6, i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @maxValue(i32 %8, i32 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
int /*<<< orphan*/ outnbyte(char);
void outlongendian() {
  outbyte('_');
  outnbyte('l');
}


x86 assembly (clang, -O0):
<outlongendian>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5f,%edi
call   1040 <outbyte@plt>
mov    $0x6c,%edi
call   1030 <outnbyte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<outlongendian>:
push   %rax
mov    $0x5f,%edi
call   1040 <outbyte@plt>
mov    $0x6c,%edi
pop    %rax
jmp    1030 <outnbyte@plt>

LLVM IR (-O0):
define void @outlongendian() {
%1 = call i32 @outbyte(i8 signext 95)
%2 = call i32 @outnbyte(i8 signext 108)
ret void
}

LLVM IR (-O2):
define void @outlongendian() {
%1 = tail call i32 @outbyte(i8 signext 95)
%2 = tail call i32 @outnbyte(i8 signext 108)
ret void
}
void selinux_setfscreatecon(const char *file, const char *devname,
                            unsigned int mode) {}


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

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

LLVM IR (-O0):
define void @selinux_setfscreatecon(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @selinux_setfscreatecon(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
void INT_Excep_PERIB_INTB134(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB134() {
ret void
}
void test_ar_2_UCHAR(void *d, unsigned char n) {
  if ((0x7f * 2 + 1) - 2 <= n && n <= (0x7f * 2 + 1) - 1)
    n = (0x7f * 2 + 1) - 3;
  __builtin_memset(d, 0, n);
}


x86 assembly (clang, -O0):
<test_ar_2_UCHAR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%ecx
mov    $0xfd,%eax
cmp    %ecx,%eax
jg     1146 <test_ar_2_UCHAR+0x36>
movzbl -0x9(%rbp),%eax
cmp    $0xfe,%eax
jg     1146 <test_ar_2_UCHAR+0x36>
movb   $0xfc,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%eax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ar_2_UCHAR>:
lea    0x3(%rsi),%eax
cmp    $0x2,%al
mov    $0xfc,%edx
cmovae %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @test_ar_2_UCHAR(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp sle i32 253, %6
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = icmp sle i32 %10, 254
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 -4, i8* %4
br label %13
13: ; preds = %12, %8, %2
%14 = load i8*, i8** %3
%15 = load i8, i8* %4
%16 = zext i8 %15 to i64
ret void
}

LLVM IR (-O2):
define void @test_ar_2_UCHAR(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = add i8 %1, 3
%4 = icmp ult i8 %3, 2
%5 = select i1 %4, i8 -4, i8 %1
%6 = zext i8 %5 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %6, i1 false)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fhandle_printf_w(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ file_unix_getstderr();
void nocc_outwarnmsg(char *string) {
  fhandle_printf_w((file_unix_getstderr()), "%s\n", string);
  return;
}


x86 assembly (clang, -O0):
<nocc_outwarnmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <file_unix_getstderr@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fhandle_printf_w@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nocc_outwarnmsg>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <file_unix_getstderr@plt>
lea    0xece(%rip),%rsi
mov    %eax,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <fhandle_printf_w@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @nocc_outwarnmsg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @file_unix_getstderr()
%4 = load i8*, i8** %2
%5 = call i32 @fhandle_printf_w(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @nocc_outwarnmsg(i8* %0) {
%2 = tail call i32 (...) @file_unix_getstderr()
%3 = tail call i32 @fhandle_printf_w(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test2(int x) {
  if (x < 0)
    return 0;
  else
    return x + test2(x - 1);
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1131 <test2+0x21>
movl   $0x0,-0x4(%rbp)
jmp    114c <test2+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <test2@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
test   %edi,%edi
js     1118 <test2+0x18>
mov    %edi,%eax
mov    %edi,%ecx
lea    -0x1(%rax),%edx
imul   %rcx,%rdx
shr    %rdx
imul   %eax,%eax
sub    %edx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = call i32 @test2(i32 %10)
%12 = add nsw i32 %8, %11
store i32 %12, i32* %2
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @test2(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = zext i32 %0 to i33
%5 = add nsw i32 %0, -1
%6 = zext i32 %5 to i33
%7 = mul i33 %4, %6
%8 = lshr i33 %7, 1
%9 = trunc i33 %8 to i32
%10 = mul i32 %0, %0
%11 = sub i32 %10, %9
br label %12
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %11, %3 ]
ret i32 %13
}
double(acos)(double x) { return 0.0; }


x86 assembly (clang, -O0):
<acos>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<acos>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @acos(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @acos(double %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void fin_intr_pic2(void) {
  outb(0x20, 0x20);
  outb(0xA0, 0x20);
}


x86 assembly (clang, -O0):
<fin_intr_pic2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fin_intr_pic2>:
push   %rax
mov    $0x20,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x20,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @fin_intr_pic2() {
%1 = call i32 @outb(i32 32, i32 32)
%2 = call i32 @outb(i32 160, i32 32)
ret void
}

LLVM IR (-O2):
define void @fin_intr_pic2() {
%1 = tail call i32 @outb(i32 32, i32 32)
%2 = tail call i32 @outb(i32 160, i32 32)
ret void
}
double divide(a, b)
double a;
double b;
{ return a / b; }


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @divide(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @divide(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
void skiptospace(p) char **p;
{
  while (((int)**p != ' ') && ((int)**p != 9) && (int)**p != '\0')
    *p = *p + 1;
}


x86 assembly (clang, -O0):
<skiptospace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     114b <skiptospace+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x9(%rbp)
je     114b <skiptospace+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115b <skiptospace+0x5b>
jmp    1172 <skiptospace+0x72>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1108 <skiptospace+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skiptospace>:
mov    (%rdi),%rax
add    $0x1,%rax
movabs $0x100000201,%rcx
jmp    1127 <skiptospace+0x27>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,(%rdi)
add    $0x1,%rax
movzbl -0x1(%rax),%edx
cmp    $0x20,%rdx
ja     1120 <skiptospace+0x20>
bt     %rdx,%rcx
jae    1120 <skiptospace+0x20>
ret

LLVM IR (-O0):
define void @skiptospace(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %23, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 32
br i1 %8, label %9, label %21
9: ; preds = %3
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 9
br i1 %14, label %15, label %21
15: ; preds = %9
%16 = load i8**, i8*** %2
%17 = load i8*, i8** %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 0
br label %21
21: ; preds = %15, %9, %3
%22 = phi i1 [ false, %9 ], [ false, %3 ], [ %20, %15 ]
br i1 %22, label %23, label %28
23: ; preds = %21
%24 = load i8**, i8*** %2
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = load i8**, i8*** %2
store i8* %26, i8** %27
br label %3
28: ; preds = %21
ret void
}

LLVM IR (-O2):
define void @skiptospace(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 32, label %8
i8 9, label %8
i8 0, label %8
]
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3, %3, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
int main(int argc, const char *argv[]) {
  int i;
  for (i = 0; i < argc; i++) {
    printf("argv[%d] = %s\n", i, argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"argv[%d] = %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"argv[%d] = %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void sighandler(int dummy) { exit((2)); }


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<sighandler>:
push   %rax
mov    $0x2,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
define void @sighandler(i32 %0) {
%2 = tail call i32 @exit(i32 2)
unreachable
}