xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int trace_sum_difference(int n, int *f, double *d) {
  int fail;
  fail = _ada_use_c2phc(57, &n, f, d);
  return fail;
}


x86 assembly (clang, -O0):
<trace_sum_difference>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x39,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_sum_difference>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x39,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @trace_sum_difference(i32 %0, i32* %1, double* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store double* %2, double** %6
%8 = load i32*, i32** %5
%9 = load double*, double** %6
%10 = call i32 @_ada_use_c2phc(i32 57, i32* %4, i32* %8, double* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
ret i32 %11
}

LLVM IR (-O2):
define i32 @trace_sum_difference(i32 %0, i32* %1, double* %2) {
%4 = alloca i32
store i32 %0, i32* %4
%5 = call i32 @_ada_use_c2phc(i32 57, i32* %4, i32* %1, double* %2)
ret i32 %5
}
/* Type definitions */
struct gate {
  int dummy;
};

/* Variables and functions */
int get_pin_value(struct gate const *, int /*<<< orphan*/);
int not_op(const struct gate *gate) {
  int truth = get_pin_value(gate, 0);
  return truth == -1 ? truth : !truth;
}


x86 assembly (clang, -O0):
<not_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <get_pin_value@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    113f <not_op+0x2f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1150 <not_op+0x40>
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_op>:
push   %rax
xor    %esi,%esi
call   1030 <get_pin_value@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
cmp    $0xffffffff,%eax
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.gate = type { i32 }
define i32 @not_op(%struct.gate* %0) {
%2 = alloca %struct.gate*
%3 = alloca i32
store %struct.gate* %0, %struct.gate** %2
%4 = load %struct.gate*, %struct.gate** %2
%5 = call i32 @get_pin_value(%struct.gate* %4, i32 0)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %3
br label %15
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %10, %8
%16 = phi i32 [ %9, %8 ], [ %14, %10 ]
ret i32 %16
}

LLVM IR (-O2):
%struct.gate = type { i32 }
define i32 @not_op(%struct.gate* %0) {
%2 = tail call i32 @get_pin_value(%struct.gate* %0, i32 0)
%3 = icmp eq i32 %2, -1
%4 = icmp eq i32 %2, 0
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
int compare_doubles(const void *a, const void *b) {
  double *pa = (double *)a;
  double *pb = (double *)b;
  if ((*pa - *pb) > 0) {
    return 1;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<compare_doubles>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1145 <compare_doubles+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <compare_doubles+0x4c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_doubles>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @compare_doubles(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
store double* %9, double** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to double*
store double* %11, double** %7
%12 = load double*, double** %6
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = fsub double %13, %15
%17 = fcmp ogt double %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %2
store i32 1, i32* %3
br label %20
19: ; preds = %2
store i32 -1, i32* %3
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @compare_doubles(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = fcmp ogt double %7, 0.000000e+00
%9 = select i1 %8, i32 1, i32 -1
ret i32 %9
}
void INT_Excep_SCIFA8_TXIF8(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCIFA8_TXIF8() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lentoks(char *);
int main() {
  char *test = "  The quick brown fox   ";
  char *test2 = "  select * from mytable where city = \"Auckland\" ; ";
  lentoks(test);
  lentoks(test2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xee8(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <lentoks@plt>
mov    -0x18(%rbp),%rdi
call   1030 <lentoks@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c" The quick brown fox \00"
@.str.1 = [51 x i8] c" select * from mytable where city = \22Auckland\22 ; \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = call i32 @lentoks(i8* %4)
%6 = load i8*, i8** %3
%7 = call i32 @lentoks(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c" The quick brown fox \00"
@.str.1 = [51 x i8] c" select * from mytable where city = \22Auckland\22 ; \00"
define i32 @main() {
%1 = tail call i32 @lentoks(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @lentoks(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double average(float *, int const);
int /*<<< orphan*/ printf(char *, double);
int main() {
  const int ARRAY_LEN = 6;
  float nums[] = {4.32, 6.28, 0.0, -5.23, 3.0, 12.0};
  printf("avg = %g\n", average(nums, ARRAY_LEN));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x6,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
call   1040 <average@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
call   1040 <average@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.nums = [6 x float] [float 0x401147AE20000000, float 0x40191EB860000000, float 0.000000e+00, float 0xC014EB8520000000, float 3.000000e+00, float 1.200000e+01]
@.str = [10 x i8] c"avg = %g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x float]
store i32 6, i32* %1
%3 = bitcast [6 x float]* %2 to i8*
%4 = getelementptr inbounds [6 x float], [6 x float]* %2, i64 0, i64 0
%5 = call double @average(float* %4, i32 6)
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums = [6 x float] [float 0x401147AE20000000, float 0x40191EB860000000, float 0.000000e+00, float 0xC014EB8520000000, float 3.000000e+00, float 1.200000e+01]
@.str = [10 x i8] c"avg = %g\0A\00"
define i32 @main() {
%1 = alloca [6 x float]
%2 = bitcast [6 x float]* %1 to i8*
%3 = getelementptr inbounds [6 x float], [6 x float]* %1, i64 0, i64 0
%4 = call double @average(float* %3, i32 6)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int test(void) {
  time_t time;
  struct tm *timestruct;
  timestruct = localtime(&time);
  return (timestruct != NULL);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @test() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %3, %struct.tm** %2
%4 = load %struct.tm*, %struct.tm** %2
%5 = icmp ne %struct.tm* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call %struct.tm* @localtime(i32* %1)
%4 = icmp ne %struct.tm* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
void XtUninstallTranslations() {}


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

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

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

LLVM IR (-O2):
define void @XtUninstallTranslations() {
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *__rehash_alloc(void *cc, size_t n) { return malloc(n); }


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

x86 assembly (clang, -O2):
<__rehash_alloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @__rehash_alloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @__rehash_alloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char rep_buff[1000];
  scanf("%s", rep_buff);
  printf("child pipe print : %s", rep_buff);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
lea    0xee4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [22 x i8] c"child pipe print : %s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
void f(void) {
  int c[42];
  typeof((void)0, c) d;
  d = c;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0xb0(%rbp),%rax
mov    %rax,-0xb8(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca [42 x i32]
%2 = alloca i32*
%3 = getelementptr inbounds [42 x i32], [42 x i32]* %1, i64 0, i64 0
store i32* %3, i32** %2
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
adr0regx1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*((short *)10000000)) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adr0regx1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0x989680,%eax
movswl (%rax),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     1147 <adr0regx1+0x47>
movl   $0x1,-0x4(%rbp)
jmp    114e <adr0regx1+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0regx1>:
movzwl 0x989680,%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @adr0regx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = load i16, i16* inttoptr (i64 10000000 to i16*)
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i16, i16* %5, i64 %8
%10 = load i16, i16* %9
%11 = icmp sle i16 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_netmaildir(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_netmaildir>:
jmp    1030 <mock@plt>

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

LLVM IR (-O2):
define i8* @cf_s_netmaildir(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
char *nextInt(char *ptr) {
  for (; *ptr && *ptr != ','; ptr++)
    ;
  return ptr;
}


x86 assembly (clang, -O0):
<nextInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <nextInt+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <nextInt+0x3d>
jmp    1153 <nextInt+0x53>
jmp    1142 <nextInt+0x42>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <nextInt+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextInt>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <nextInt+0x22>
cmp    $0x2c,%cl
je     1122 <nextInt+0x22>
add    $0x1,%rax
jmp    1110 <nextInt+0x10>
ret

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

LLVM IR (-O2):
define i8* @nextInt(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 44, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
ret i8* %3
}
char *gettext(const char *msg) { return (char *)msg; }


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

x86 assembly (clang, -O2):
<gettext>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @gettext(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int getchar();
int ask_confirmation() {
  int c = '\0';
  int ret = 0;
  while (c != '\n') {
    c = getchar();
    if (c != '\n') {
      ret = ((c == 'y') || (c == 'Y')) ? 1 : 0;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<ask_confirmation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
je     1175 <ask_confirmation+0x65>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
je     1170 <ask_confirmation+0x60>
mov    $0x1,%al
cmpl   $0x79,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     115d <ask_confirmation+0x4d>
cmpl   $0x59,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <ask_confirmation+0x16>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ask_confirmation>:
push   %rbx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ecx,%ebx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%edx
and    $0xffffffdf,%edx
xor    %ecx,%ecx
cmp    $0x59,%edx
sete   %cl
cmp    $0xa,%eax
jne    1120 <ask_confirmation+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ask_confirmation() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %20, %0
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %21
6: ; preds = %3
%7 = call i32 (...) @getchar()
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = icmp ne i32 %8, 10
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 121
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 89
br label %16
16: ; preds = %13, %10
%17 = phi i1 [ true, %10 ], [ %15, %13 ]
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 1, i32 0
store i32 %19, i32* %2
br label %20
20: ; preds = %16, %6
br label %3
21: ; preds = %3
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @ask_confirmation() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = tail call i32 (...) @getchar()
%4 = icmp eq i32 %3, 10
%5 = and i32 %3, -33
%6 = icmp eq i32 %5, 89
%7 = zext i1 %6 to i32
br i1 %4, label %8, label %1
8: ; preds = %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Athena_GetContainingDirectoryStaticN(char *,
                                                        int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void Athena_GetContainingDirectoryStatic(char *in) {
  if (in)
    Athena_GetContainingDirectoryStaticN(in, strlen(in));
}


x86 assembly (clang, -O0):
<Athena_GetContainingDirectoryStatic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1153 <Athena_GetContainingDirectoryStatic+0x33>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <Athena_GetContainingDirectoryStaticN@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Athena_GetContainingDirectoryStatic>:
test   %rdi,%rdi
je     1139 <Athena_GetContainingDirectoryStatic+0x19>
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <Athena_GetContainingDirectoryStaticN@plt>
ret

LLVM IR (-O0):
define void @Athena_GetContainingDirectoryStatic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @Athena_GetContainingDirectoryStaticN(i8* %6, i32 %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @Athena_GetContainingDirectoryStatic(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @Athena_GetContainingDirectoryStaticN(i8* %0, i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
void av_expr_parse_and_eval() {}


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

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

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

LLVM IR (-O2):
define void @av_expr_parse_and_eval() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ create_letter_distribution_diagram();
void main() { create_letter_distribution_diagram(); }


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

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

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @create_letter_distribution_diagram()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @create_letter_distribution_diagram()
ret void
}
void CounterToLocalTimeC$0$Counter$overflow(void) {}


x86 assembly (clang, -O0):
<CounterToLocalTimeC$0$Counter$overflow>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CounterToLocalTimeC$0$Counter$overflow>:
ret

LLVM IR (-O0):
define void @"CounterToLocalTimeC$0$Counter$overflow"() {
ret void
}

LLVM IR (-O2):
define void @"CounterToLocalTimeC$0$Counter$overflow"() {
ret void
}
int foo(int x) { return x + 1; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int addTwo(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<addTwo>:
lea    (%rdi,%rsi,1),%eax
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ CDE_end_readlink_internal(struct tcb *, int /*<<< orphan*/,
                                             int);
void CDE_end_readlink(struct tcb *tcp) { CDE_end_readlink_internal(tcp, 0, 1); }


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

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

LLVM IR (-O0):
%struct.tcb = type { i32 }
define void @CDE_end_readlink(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 @CDE_end_readlink_internal(%struct.tcb* %3, i32 0, i32 1)
ret void
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
define void @CDE_end_readlink(%struct.tcb* %0) {
%2 = tail call i32 @CDE_end_readlink_internal(%struct.tcb* %0, i32 0, i32 1)
ret void
}
unsigned long gfx_get_max_supported_pixel_clock(void) { return 157500; }


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

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

LLVM IR (-O0):
define i64 @gfx_get_max_supported_pixel_clock() {
ret i64 157500
}

LLVM IR (-O2):
define i64 @gfx_get_max_supported_pixel_clock() {
ret i64 157500
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(int, unsigned char *);
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(int, unsigned char);
void SensorSetMirrorFlip_PO3030K(unsigned char val) {
  unsigned char x;
  val = ~val;
  VIM_SIF_I2cReadByte(0x1e, &x);
  x &= 0x3f;
  val = (val & 0x03) << 6;
  x |= val;
  VIM_SIF_I2cWriteByte(0x1e, x);
}


x86 assembly (clang, -O0):
<SensorSetMirrorFlip_PO3030K>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0x1(%rbp)
mov    $0x1e,%edi
lea    -0x2(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
movzbl -0x2(%rbp),%eax
and    $0x3f,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x3,%eax
shl    $0x6,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
movzbl -0x2(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x2(%rbp)
mov    $0x1e,%edi
movzbl -0x2(%rbp),%esi
call   1040 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetMirrorFlip_PO3030K>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xf(%rsp),%rsi
mov    $0x1e,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    0xf(%rsp),%al
and    $0x3f,%al
not    %bl
shl    $0x6,%bl
or     %al,%bl
mov    %bl,0xf(%rsp)
movzbl %bl,%esi
mov    $0x1e,%edi
call   1040 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @SensorSetMirrorFlip_PO3030K(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = xor i32 %5, -1
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
%8 = call i32 @VIM_SIF_I2cReadByte(i32 30, i8* %3)
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = and i32 %10, 63
%12 = trunc i32 %11 to i8
store i8 %12, i8* %3
%13 = load i8, i8* %2
%14 = zext i8 %13 to i32
%15 = and i32 %14, 3
%16 = shl i32 %15, 6
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
%18 = load i8, i8* %2
%19 = zext i8 %18 to i32
%20 = load i8, i8* %3
%21 = zext i8 %20 to i32
%22 = or i32 %21, %19
%23 = trunc i32 %22 to i8
store i8 %23, i8* %3
%24 = load i8, i8* %3
%25 = call i32 @VIM_SIF_I2cWriteByte(i32 30, i8 zeroext %24)
ret void
}

LLVM IR (-O2):
define void @SensorSetMirrorFlip_PO3030K(i8 zeroext %0) {
%2 = alloca i8
%3 = call i32 @VIM_SIF_I2cReadByte(i32 30, i8* %2)
%4 = load i8, i8* %2
%5 = and i8 %4, 63
%6 = xor i8 %0, -1
%7 = shl i8 %6, 6
%8 = or i8 %5, %7
store i8 %8, i8* %2
%9 = call i32 @VIM_SIF_I2cWriteByte(i32 30, i8 zeroext %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main() {
  printf("   *\n  ***\n *****\n  ||\n  ||\n\n");
  system("pause");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [30 x i8] c" *\0A ***\0A *****\0A ||\0A ||\0A\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"pause\00"
@str = [29 x i8] c" *\0A ***\0A *****\0A ||\0A ||\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void f(void) {
  int n = 10, m = 20;
  int v[n + 1][m * 2];
#pragma omp task shared(v)
  { v[n - 1][m - 1] = 3; }
#pragma omp taskwait
  if (v[9][19] != 3) {
    fprintf(stderr, "v[9][19] != 3\n");
    abort();
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xa,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%edx
mov    -0x8(%rbp),%eax
add    %eax,%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
mov    %rdx,%rax
imul   %rcx,%rax
lea    0xf(,%rax,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rax
sub    %rsi,%rax
mov    %rax,%rsp
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rsi
imul   %rcx,%rsi
shl    $0x2,%rsi
mov    %rax,%rdx
add    %rsi,%rdx
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
movslq %esi,%rsi
movl   $0x3,(%rdx,%rsi,4)
imul   $0x9,%rcx,%rcx
cmpl   $0x3,0x4c(%rax,%rcx,4)
je     11c2 <f+0xa2>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
lea    0xe4a(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"v[9][19] != 3\0A\00"
define void @f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i32 10, i32* %1
store i32 20, i32* %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = mul nsw i32 %9, 2
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %3
%13 = mul nuw i64 %8, %11
%14 = alloca i32, i64 %13
store i64 %8, i64* %4
store i64 %11, i64* %5
%15 = load i32, i32* %1
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = mul nsw i64 %17, %11
%19 = getelementptr inbounds i32, i32* %14, i64 %18
%20 = load i32, i32* %2
%21 = sub nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %19, i64 %22
store i32 3, i32* %23
%24 = mul nsw i64 9, %11
%25 = getelementptr inbounds i32, i32* %14, i64 %24
%26 = getelementptr inbounds i32, i32* %25, i64 19
%27 = load i32, i32* %26
%28 = icmp ne i32 %27, 3
br i1 %28, label %29, label %33
29: ; preds = %0
%30 = load i32, i32* @stderr
%31 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%32 = call i32 (...) @abort()
unreachable
33: ; preds = %0
%34 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cwrapper_q_sort_double(double *, int /*<<< orphan*/, int);
void quicksort_double_(double numbers[], int *array_size) {
  cwrapper_q_sort_double(numbers, 0, (*array_size) - 1);
}


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

x86 assembly (clang, -O2):
<quicksort_double_>:
mov    (%rsi),%edx
add    $0xffffffff,%edx
xor    %esi,%esi
jmp    1030 <cwrapper_q_sort_double@plt>

LLVM IR (-O0):
define void @quicksort_double_(double* %0, i32* %1) {
%3 = alloca double*
%4 = alloca i32*
store double* %0, double** %3
store i32* %1, i32** %4
%5 = load double*, double** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = sub nsw i32 %7, 1
%9 = call i32 @cwrapper_q_sort_double(double* %5, i32 0, i32 %8)
ret void
}

LLVM IR (-O2):
define void @quicksort_double_(double* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, -1
%5 = tail call i32 @cwrapper_q_sort_double(double* %0, i32 0, i32 %4)
ret void
}
int test4(int d) { return (d | 1) & 1; }


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x1,%eax
and    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = or i32 %3, 1
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @test4(i32 %0) {
ret i32 1
}
void sdi_uninit_platform_driver(void) {}


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

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

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

LLVM IR (-O2):
define void @sdi_uninit_platform_driver() {
ret void
}
void skip_blank(const char **ptr) {
  while (1) {
    switch (**ptr) {
    case ' ':
    case '\f':
    case '\t':
    case '\n':
    case '\r':
      break;
    default:
      return;
    }
    (*ptr)++;
  }
}


x86 assembly (clang, -O0):
<skip_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     114b <skip_blank+0x4b>
jmp    1126 <skip_blank+0x26>
mov    -0xc(%rbp),%eax
add    $0xfffffff4,%eax
sub    $0x2,%eax
jb     114b <skip_blank+0x4b>
jmp    113a <skip_blank+0x3a>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    1150 <skip_blank+0x50>
jmp    114b <skip_blank+0x4b>
jmp    1152 <skip_blank+0x52>
pop    %rbp
ret
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <skip_blank+0x8>

x86 assembly (clang, -O2):
<skip_blank>:
mov    (%rdi),%rax
add    $0x1,%rax
movabs $0x100003600,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl -0x1(%rax),%edx
cmp    $0x20,%edx
ja     1138 <skip_blank+0x38>
bt     %rdx,%rcx
jae    1138 <skip_blank+0x38>
mov    %rax,(%rdi)
add    $0x1,%rax
jmp    1120 <skip_blank+0x20>
ret

LLVM IR (-O0):
define void @skip_blank(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %1, %10
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %9 [
i32 32, label %8
i32 12, label %8
i32 9, label %8
i32 10, label %8
i32 13, label %8
]
8: ; preds = %3, %3, %3, %3, %3
br label %10
9: ; preds = %3
ret void
10: ; preds = %8
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %11
br label %3
}

LLVM IR (-O2):
define void @skip_blank(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %1, %8
%4 = phi i8* [ %2, %1 ], [ %9, %8 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %7 [
i32 32, label %8
i32 12, label %8
i32 9, label %8
i32 10, label %8
i32 13, label %8
]
7: ; preds = %3
ret void
8: ; preds = %3, %3, %3, %3, %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %9, i8** %0
br label %3
}
/* Variables and functions */
int atoi(char const *);
scalar_t__ isnumber(char const *);
int strtoi(int *out, const char *str_in) {
  if (str_in && out && isnumber(str_in)) {
    *out = atoi(str_in);
    return (int)0;
  }
  return (int)-1;
}


x86 assembly (clang, -O0):
<strtoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1176 <strtoi+0x56>
cmpq   $0x0,-0x10(%rbp)
je     1176 <strtoi+0x56>
mov    -0x18(%rbp),%rdi
call   1030 <isnumber@plt>
cmp    $0x0,%rax
je     1176 <strtoi+0x56>
mov    -0x18(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    117d <strtoi+0x5d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoi>:
push   %rbp
push   %r14
push   %rbx
mov    $0xffffffff,%r14d
test   %rdi,%rdi
je     1154 <strtoi+0x34>
mov    %rsi,%rbp
test   %rsi,%rsi
je     1154 <strtoi+0x34>
mov    %rdi,%rbx
mov    %rbp,%rdi
call   1030 <isnumber@plt>
test   %rax,%rax
je     1154 <strtoi+0x34>
mov    %rbp,%rdi
call   1040 <atoi@plt>
mov    %eax,(%rbx)
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @strtoi(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %19
8: ; preds = %2
%9 = load i32*, i32** %4
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i8*, i8** %5
%13 = call i64 @isnumber(i8* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8*, i8** %5
%17 = call i32 @atoi(i8* %16)
%18 = load i32*, i32** %4
store i32 %17, i32* %18
store i32 0, i32* %3
br label %20
19: ; preds = %11, %8, %2
store i32 -1, i32* %3
br label %20
20: ; preds = %19, %15
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @strtoi(i32* writeonly %0, i8* %1) {
%3 = icmp ne i8* %1, null
%4 = icmp ne i32* %0, null
%5 = and i1 %4, %3
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = tail call i64 @isnumber(i8* %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @atoi(i8* %1)
store i32 %10, i32* %0
br label %11
11: ; preds = %2, %6, %9
%12 = phi i32 [ 0, %9 ], [ -1, %6 ], [ -1, %2 ]
ret i32 %12
}
float Back__easeOut(float t, float b, float c, float d, float s, float p1) {
  if (-1 == s) {
    s = 1.70158f;
  }
  return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
}


x86 assembly (clang, -O0):
<Back__easeOut>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  0xed6(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jne    1147 <Back__easeOut+0x47>
jp     1147 <Back__easeOut+0x47>
movss  0xec2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
divss  -0x10(%rbp),%xmm2
movss  0xeaa(%rip),%xmm1
subss  %xmm1,%xmm2
movss  %xmm2,-0x4(%rbp)
mulss  -0x4(%rbp),%xmm2
movss  0xe94(%rip),%xmm1
addss  -0x14(%rbp),%xmm1
movss  -0x4(%rbp),%xmm4
movss  -0x14(%rbp),%xmm3
mulss  %xmm4,%xmm1
addss  %xmm3,%xmm1
mulss  %xmm1,%xmm2
movss  0xe71(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Back__easeOut>:
movss  0xef8(%rip),%xmm5
movaps %xmm4,%xmm6
cmpeqss %xmm5,%xmm6
movss  0xeec(%rip),%xmm7
andps  %xmm6,%xmm7
andnps %xmm4,%xmm6
orps   %xmm7,%xmm6
divss  %xmm3,%xmm0
addss  %xmm5,%xmm0
movss  0xed7(%rip),%xmm3
movaps %xmm6,%xmm4
addss  %xmm3,%xmm4
mulss  %xmm0,%xmm4
mulss  %xmm0,%xmm0
addss  %xmm6,%xmm4
mulss  %xmm4,%xmm0
addss  %xmm3,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Back__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %11
%14 = fcmp oeq float -1.000000e+00, %13
br i1 %14, label %15, label %16
15: ; preds = %6
store float 0x3FFB39AC00000000, float* %11
br label %16
16: ; preds = %15, %6
%17 = load float, float* %9
%18 = load float, float* %7
%19 = load float, float* %10
%20 = fdiv float %18, %19
%21 = fsub float %20, 1.000000e+00
store float %21, float* %7
%22 = load float, float* %7
%23 = fmul float %21, %22
%24 = load float, float* %11
%25 = fadd float %24, 1.000000e+00
%26 = load float, float* %7
%27 = load float, float* %11
%28 = call float @llvm.fmuladd.f32(float %25, float %26, float %27)
%29 = call float @llvm.fmuladd.f32(float %23, float %28, float 1.000000e+00)
%30 = load float, float* %8
%31 = call float @llvm.fmuladd.f32(float %17, float %29, float %30)
ret float %31
}

LLVM IR (-O2):
define float @Back__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fcmp oeq float %4, -1.000000e+00
%8 = select i1 %7, float 0x3FFB39AC00000000, float %4
%9 = fdiv float %0, %3
%10 = fadd float %9, -1.000000e+00
%11 = fmul float %10, %10
%12 = fadd float %8, 1.000000e+00
%13 = tail call float @llvm.fmuladd.f32(float %12, float %10, float %8)
%14 = tail call float @llvm.fmuladd.f32(float %11, float %13, float 1.000000e+00)
%15 = tail call float @llvm.fmuladd.f32(float %2, float %14, float %1)
ret float %15
}
void sample() { return; }


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

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

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

LLVM IR (-O2):
define void @sample() {
ret void
}
/* Variables and functions */
size_t strlen(char const *);
int strncasecmp(char const *, char const *, size_t);
int strcasecmpstart(const char *s1, const char *s2) {
  size_t n = strlen(s2);
  return strncasecmp(s1, s2, n);
}


x86 assembly (clang, -O0):
<strcasecmpstart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <strncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcasecmpstart>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strncasecmp@plt>

LLVM IR (-O0):
define i32 @strcasecmpstart(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i32 @strncasecmp(i8* %8, i8* %9, i64 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @strcasecmpstart(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i32 @strncasecmp(i8* %0, i8* %1, i64 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xcd() {
  Assert_real((isdigit(205) == 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_isdigit.c",
              1030, ("isdigit should be 0 for 0xcd"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xcd>:
push   %rax
mov    $0xcd,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x406,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xcd\00"
define void @t_isdigit_0xcd() {
%1 = call i64 @isdigit(i32 205)
%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 1030, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xcd\00"
define void @t_isdigit_0xcd() {
%1 = tail call i64 @isdigit(i32 205)
%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 1030, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct nlattr {
  int dummy;
};

/* Variables and functions */
int NLA_HDRLEN;
void *libbpf_nla_data(const struct nlattr *nla) {
  return (void *)nla + NLA_HDRLEN;
}


x86 assembly (clang, -O0):
<libbpf_nla_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ecd(%rip),%rcx
movslq (%rcx),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libbpf_nla_data>:
mov    0x2ed9(%rip),%rax
movslq (%rax),%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
%struct.nlattr = type { i32 }
@NLA_HDRLEN = global i32 0
define i8* @libbpf_nla_data(%struct.nlattr* %0) {
%2 = alloca %struct.nlattr*
store %struct.nlattr* %0, %struct.nlattr** %2
%3 = load %struct.nlattr*, %struct.nlattr** %2
%4 = bitcast %struct.nlattr* %3 to i8*
%5 = load i32, i32* @NLA_HDRLEN
%6 = sext i32 %5 to i64
%7 = getelementptr i8, i8* %4, i64 %6
ret i8* %7
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
@NLA_HDRLEN = global i32 0
define i8* @libbpf_nla_data(%struct.nlattr* readnone %0) {
%2 = bitcast %struct.nlattr* %0 to i8*
%3 = load i32, i32* @NLA_HDRLEN
%4 = sext i32 %3 to i64
%5 = getelementptr i8, i8* %2, i64 %4
ret i8* %5
}