xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x04() {
  Assert_real((isodigit(4) == 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_isodigit.c",
              25, ("isodigit should be 0 for 0x04"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x04>:
push   %rax
mov    $0x4,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x19,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x04\00"
define void @t_isodigit_0x04() {
%1 = call i64 @isodigit(i32 4)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x04\00"
define void @t_isodigit_0x04() {
%1 = tail call i64 @isodigit(i32 4)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
atarihello() {}


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

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

LLVM IR (-O0):
define i32 @atarihello() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @atarihello() {
ret i32 undef
}
/* Variables and functions */
int log(int);
int pow(double, int);
double sqrt(double);
double val_t_tilde(double r) {
  double r_sq = sqrt(r);
  return -2. / 3. * pow(r_sq, 3) - 2 * r_sq + 2 * log(1 + r_sq);
}


x86 assembly (clang, -O0):
<val_t_tilde>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x3,%edi
call   1040 <pow@plt>
cvtsi2sd %eax,%xmm0
movsd  0xea9(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe7d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe60(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <log@plt>
movsd  -0x18(%rbp),%xmm0
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<val_t_tilde>:
sub    $0x18,%rsp
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1144 <val_t_tilde+0x14>
sqrtsd %xmm0,%xmm0
jmp    1149 <val_t_tilde+0x19>
call   1050 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3,%edi
call   1040 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xe98(%rip),%xmm1
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm0
addsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
addsd  0xe80(%rip),%xmm2
cvttsd2si %xmm2,%edi
call   1030 <log@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @val_t_tilde(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @sqrt(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call i32 @pow(double %6, i32 3)
%8 = sitofp i32 %7 to double
%9 = load double, double* %3
%10 = fmul double 2.000000e+00, %9
%11 = fneg double %10
%12 = call double @llvm.fmuladd.f64(double 0xBFE5555555555555, double %8, double %11)
%13 = load double, double* %3
%14 = fadd double 1.000000e+00, %13
%15 = fptosi double %14 to i32
%16 = call i32 @log(i32 %15)
%17 = mul nsw i32 2, %16
%18 = sitofp i32 %17 to double
%19 = fadd double %12, %18
ret double %19
}

LLVM IR (-O2):
define double @val_t_tilde(double %0) {
%2 = tail call double @sqrt(double %0)
%3 = tail call i32 @pow(double %2, i32 3)
%4 = sitofp i32 %3 to double
%5 = fmul double %2, -2.000000e+00
%6 = tail call double @llvm.fmuladd.f64(double %4, double 0xBFE5555555555555, double %5)
%7 = fadd double %2, 1.000000e+00
%8 = fptosi double %7 to i32
%9 = tail call i32 @log(i32 %8)
%10 = shl nsw i32 %9, 1
%11 = sitofp i32 %10 to double
%12 = fadd double %6, %11
ret double %12
}
double deltat_longterm_morrison_stephenson(double tjd) {
  double Ygreg = 2000.0 + (tjd - 2451545.0) / 365.2425;
  double u = (Ygreg - 1820) / 100.0;
  return (-20 + 32 * u * u);
}


x86 assembly (clang, -O0):
<deltat_longterm_morrison_stephenson>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xf1a(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xf06(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xef2(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xec0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xea7(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe89(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deltat_longterm_morrison_stephenson>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
addsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @deltat_longterm_morrison_stephenson(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fsub double %5, 0x4142B42C80000000
%7 = fdiv double %6, 0x4076D3E147AE147B
%8 = fadd double 2.000000e+03, %7
store double %8, double* %3
%9 = load double, double* %3
%10 = fsub double %9, 1.820000e+03
%11 = fdiv double %10, 1.000000e+02
store double %11, double* %4
%12 = load double, double* %4
%13 = fmul double 3.200000e+01, %12
%14 = load double, double* %4
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double -2.000000e+01)
ret double %15
}

LLVM IR (-O2):
define double @deltat_longterm_morrison_stephenson(double %0) {
%2 = fadd double %0, 0xC142B42C80000000
%3 = fdiv double %2, 0x4076D3E147AE147B
%4 = fadd double %3, 2.000000e+03
%5 = fadd double %4, -1.820000e+03
%6 = fdiv double %5, 1.000000e+02
%7 = fmul double %6, 3.200000e+01
%8 = tail call double @llvm.fmuladd.f64(double %7, double %6, double -2.000000e+01)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void wcsdealloc(void *ptr) {
  free(ptr);
  return;
}


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

x86 assembly (clang, -O2):
<wcsdealloc>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @wcsdealloc(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void bar(int **aa) {
  *aa = *aa + 1;
  *aa -= 1;
  **aa = 49;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movl   $0x31,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    (%rdi),%rax
movl   $0x31,(%rax)
ret

LLVM IR (-O0):
define void @bar(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = load i32**, i32*** %2
store i32* %5, i32** %6
%7 = load i32**, i32*** %2
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 -1
store i32* %9, i32** %7
%10 = load i32**, i32*** %2
%11 = load i32*, i32** %10
store i32 49, i32* %11
ret void
}

LLVM IR (-O2):
define void @bar(i32** nocapture %0) {
%2 = load i32*, i32** %0
store i32 49, i32* %2
ret void
}
float CG_GetValue(int ownerDraw, int type) { return -1; }


x86 assembly (clang, -O0):
<CG_GetValue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  0xeee(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @CG_GetValue(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret float -1.000000e+00
}

LLVM IR (-O2):
define float @CG_GetValue(i32 %0, i32 %1) {
ret float -1.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_setscope(pthread_attr_t *attr, int scope) {
  ;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pthread_attr_setscope(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @pthread_attr_setscope(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
void deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @deinit() {
ret void
}
void t() {
  int a, b, c[10];
#pragma acc update self(a) if_present
#pragma acc update device(b) async if_present
#pragma acc update host(c [1:3]) wait(4) if_present
#pragma acc update self(c) device(b) host(a) async(10) if (a == 5) if_present
#pragma acc update self(a)
#pragma acc update device(b) async
#pragma acc update host(c [1:3]) wait(4)
#pragma acc update self(c) device(b) host(a) async(10) if (a == 5)
}


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

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

LLVM IR (-O0):
define void @t() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
ret void
}

LLVM IR (-O2):
define void @t() {
ret void
}
void update_hand_score(int hand_score[], int trick_score, int trick_winner) {
  hand_score[trick_winner] += trick_score;
}


x86 assembly (clang, -O0):
<update_hand_score>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
add    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_hand_score>:
movslq %edx,%rax
add    %esi,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @update_hand_score(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* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = add nsw i32 %12, %7
store i32 %13, i32* %11
ret void
}

LLVM IR (-O2):
define void @update_hand_score(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = add nsw i32 %6, %1
store i32 %7, i32* %5
ret void
}
/* Variables and functions */
double SCHAR_MIN;
extern double cmin_schar() { return SCHAR_MIN; }


x86 assembly (clang, -O0):
<cmin_schar>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmin_schar>:
mov    0x2ed9(%rip),%rax
movsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@SCHAR_MIN = global double 0.000000e+00
define double @cmin_schar() {
%1 = load double, double* @SCHAR_MIN
ret double %1
}

LLVM IR (-O2):
@SCHAR_MIN = global double 0.000000e+00
define double @cmin_schar() {
%1 = load double, double* @SCHAR_MIN
ret double %1
}
int hash(key)
char *key;
{
  register char *cp;
  register int k;
  cp = key;
  k = 0;
  while (*cp)
    k = ((k << 1) ^ (*cp++)) & 0x3fff;
  return (k % 1009);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <hash+0x4b>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
xor    %ecx,%eax
and    $0x3fff,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <hash+0x17>
mov    -0x14(%rbp),%eax
mov    $0x3f1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     114a <hash+0x4a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
add    %eax,%eax
movsbl %cl,%ecx
xor    %ecx,%eax
and    $0x3fff,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
imul   $0x3cf,%eax,%ecx
shr    $0x10,%ecx
mov    %eax,%edx
sub    %ecx,%edx
movzwl %dx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x9,%edx
imul   $0x3f1,%edx,%ecx
sub    %ecx,%eax
movzwl %ax,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
store i32 0, i32* %4
br label %6
6: ; preds = %10, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32, i32* %4
%12 = shl i32 %11, 1
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
%15 = load i8, i8* %13
%16 = sext i8 %15 to i32
%17 = xor i32 %12, %16
%18 = and i32 %17, 16383
store i32 %18, i32* %4
br label %6
19: ; preds = %6
%20 = load i32, i32* %4
%21 = srem i32 %20, 1009
ret i32 %21
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl nuw nsw i32 %6, 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = xor i32 %8, %10
%12 = and i32 %11, 16383
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4
%16 = trunc i32 %12 to i16
%17 = urem i16 %16, 1009
%18 = zext i16 %17 to i32
br label %19
19: ; preds = %15, %1
%20 = phi i32 [ 0, %1 ], [ %18, %15 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ set_case(int /*<<< orphan*/);
void op_dncase() { set_case(0); }


x86 assembly (clang, -O0):
<op_dncase>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <set_case@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_dncase>:
xor    %edi,%edi
jmp    1030 <set_case@plt>

LLVM IR (-O0):
define void @op_dncase() {
%1 = call i32 @set_case(i32 0)
ret void
}

LLVM IR (-O2):
define void @op_dncase() {
%1 = tail call i32 @set_case(i32 0)
ret void
}
unsigned char *
_ZN10Subsmall_X11BadIfNotAnaEPi(struct l_class_OC_Subsmall_X *llvm_cbe_this,
                                unsigned int *llvm_cbe_p) {
  unsigned char *llvm_cbe_retval;
  struct l_class_OC_Subsmall_X *llvm_cbe_this_2e_addr;
  unsigned int *llvm_cbe_p_2e_addr;
  struct l_class_OC_Subsmall_X *llvm_cbe_this1;
  unsigned char *llvm_cbe_tmp__17;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  *(&llvm_cbe_p_2e_addr) = llvm_cbe_p;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  *(&llvm_cbe_retval) = ((unsigned char *)0);
  llvm_cbe_tmp__17 = *(&llvm_cbe_retval);
  return llvm_cbe_tmp__17;
}


x86 assembly (clang, -O0):
<_ZN10Subsmall_X11BadIfNotAnaEPi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.l_class_OC_Subsmall_X = type opaque
define i8* @_ZN10Subsmall_X11BadIfNotAnaEPi(%struct.l_class_OC_Subsmall_X* %0, i32* %1) {
%3 = alloca %struct.l_class_OC_Subsmall_X*
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca %struct.l_class_OC_Subsmall_X*
%7 = alloca i32*
%8 = alloca %struct.l_class_OC_Subsmall_X*
%9 = alloca i8*
store %struct.l_class_OC_Subsmall_X* %0, %struct.l_class_OC_Subsmall_X** %3
store i32* %1, i32** %4
%10 = load %struct.l_class_OC_Subsmall_X*, %struct.l_class_OC_Subsmall_X** %3
store %struct.l_class_OC_Subsmall_X* %10, %struct.l_class_OC_Subsmall_X** %6
%11 = load i32*, i32** %4
store i32* %11, i32** %7
%12 = load %struct.l_class_OC_Subsmall_X*, %struct.l_class_OC_Subsmall_X** %6
store %struct.l_class_OC_Subsmall_X* %12, %struct.l_class_OC_Subsmall_X** %8
store i8* null, i8** %5
%13 = load i8*, i8** %5
store i8* %13, i8** %9
%14 = load i8*, i8** %9
ret i8* %14
}

LLVM IR (-O2):
%struct.l_class_OC_Subsmall_X = type opaque
define noalias i8* @_ZN10Subsmall_X11BadIfNotAnaEPi(%struct.l_class_OC_Subsmall_X* nocapture readnone %0, i32* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
size_t ZSTD_decompress(void *, size_t, void const *, size_t);
size_t ZSTDv02_decompress(void *dst, size_t maxOriginalSize, const void *src,
                          size_t compressedSize) {
  return ZSTD_decompress(dst, maxOriginalSize, src, compressedSize);
}


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

x86 assembly (clang, -O2):
<ZSTDv02_decompress>:
jmp    1030 <ZSTD_decompress@plt>

LLVM IR (-O0):
define i64 @ZSTDv02_decompress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i64 @ZSTD_decompress(i8* %9, i64 %10, i8* %11, i64 %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @ZSTDv02_decompress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i64 @ZSTD_decompress(i8* %0, i64 %1, i8* %2, i64 %3)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ exact_square(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  do {
    printf("\n Enter Number: ");
    scanf("%d", &num);
  } while (num < 0);
  exact_square(num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     113f <main+0xf>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%r14
lea    0xeca(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
test   %edi,%edi
js     1150 <main+0x20>
call   1040 <exact_square@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0A Enter Number: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = call i32 @exact_square(i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"\0A Enter Number: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 0
br i1 %7, label %3, label %8
8: ; preds = %3
%9 = call i32 @exact_square(i32 %6)
ret i32 0
}
/* Variables and functions */
int bic(int, int);
int bool_and(int x, int y) { return bic(x, bic(x, y)); }


x86 assembly (clang, -O0):
<bool_and>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <bic@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <bic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bool_and>:
push   %rbx
mov    %edi,%ebx
call   1030 <bic@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <bic@plt>

LLVM IR (-O0):
define i32 @bool_and(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* %3
%7 = load i32, i32* %4
%8 = call i32 @bic(i32 %6, i32 %7)
%9 = call i32 @bic(i32 %5, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @bool_and(i32 %0, i32 %1) {
%3 = tail call i32 @bic(i32 %0, i32 %1)
%4 = tail call i32 @bic(i32 %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int sizes_greater_equal(size_t a, size_t b) { return a >= b; }


x86 assembly (clang, -O0):
<sizes_greater_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizes_greater_equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
setae  %al
ret

LLVM IR (-O0):
define i32 @sizes_greater_equal(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp uge i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @sizes_greater_equal(i64 %0, i64 %1) {
%3 = icmp uge i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *strchr(char const *, char);
int find_count_of_char(const char *str, char ch) {
  const char *find_ptr = str;
  int times = 0;
  do {
    find_ptr = strchr(find_ptr, ch);
    if (find_ptr) {
      times++;
      find_ptr++;
    }
  } while (find_ptr != NULL);
  return times;
}


x86 assembly (clang, -O0):
<find_count_of_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1162 <find_count_of_char+0x52>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1167 <find_count_of_char+0x57>
cmpq   $0x0,-0x18(%rbp)
jne    1131 <find_count_of_char+0x21>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_count_of_char>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffff,%ebx
movsbl %sil,%ebp
nopl   0x0(%rax)
mov    %ebp,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rdi
add    $0x1,%ebx
test   %rax,%rax
jne    1120 <find_count_of_char+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @find_count_of_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8 %1, i8* %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
store i32 0, i32* %6
br label %8
8: ; preds = %20, %2
%9 = load i8*, i8** %5
%10 = load i8, i8* %4
%11 = call i8* @strchr(i8* %9, i8 signext %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %19
14: ; preds = %8
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %5
br label %19
19: ; preds = %14, %8
br label %20
20: ; preds = %19
%21 = load i8*, i8** %5
%22 = icmp ne i8* %21, null
br i1 %22, label %8, label %23
23: ; preds = %20
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
define i32 @find_count_of_char(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = phi i32 [ 0, %2 ], [ %8, %3 ]
%6 = tail call i8* @strchr(i8* dereferenceable(1) %4, i8 signext %1)
%7 = icmp eq i8* %6, null
%8 = add nuw nsw i32 %5, 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
br i1 %7, label %10, label %3
10: ; preds = %3
ret i32 %5
}
/* Variables and functions */
scalar_t__ GC_malloc_atomic(int);
int /*<<< orphan*/ _throw_badalloc();
void *_cycalloc_atomic(int n) {
  void *ans = (void *)GC_malloc_atomic(n);
  if (!ans)
    _throw_badalloc();
  return ans;
}


x86 assembly (clang, -O0):
<_cycalloc_atomic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <GC_malloc_atomic@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <_cycalloc_atomic+0x29>
mov    $0x0,%al
call   1040 <_throw_badalloc@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cycalloc_atomic>:
push   %rbx
call   1030 <GC_malloc_atomic@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <_cycalloc_atomic+0x15>
xor    %eax,%eax
call   1040 <_throw_badalloc@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_cycalloc_atomic(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @GC_malloc_atomic(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 (...) @_throw_badalloc()
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @_cycalloc_atomic(i32 %0) {
%2 = tail call i64 @GC_malloc_atomic(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @_throw_badalloc()
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
int test_imm_81int16_reg(short val) {
  return ((val) & (-0x81 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_81int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff7f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_81int16_reg>:
test   $0xff7f,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_81int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -129
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_81int16_reg(i16 signext %0) {
%2 = and i16 %0, -129
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void step(unsigned int *x, unsigned int *y, unsigned int *mv) {
  y[*mv] = *y;
  x[*mv] = *x;
}


x86 assembly (clang, -O0):
<step>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<step>:
mov    (%rsi),%eax
mov    (%rdx),%ecx
mov    %eax,(%rsi,%rcx,4)
mov    (%rdi),%eax
mov    (%rdx),%ecx
mov    %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @step(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** %5
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
store i32 %8, i32* %13
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = load i32*, i32** %4
%17 = load i32*, i32** %6
%18 = load i32, i32* %17
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %16, i64 %19
store i32 %15, i32* %20
ret void
}

LLVM IR (-O2):
define void @step(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
store i32 %4, i32* %7
%8 = load i32, i32* %0
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
store i32 %8, i32* %11
ret void
}
/* Variables and functions */
int Ue(unsigned char *, unsigned int, unsigned int *);
int Se(unsigned char *pBuff, unsigned int nLen, unsigned int *nStartBit) {
  int UeVal = Ue(pBuff, nLen, nStartBit);
  int nValue = UeVal / 2;
  if (nValue > 0)
    nValue += UeVal & 0x01;
  if (UeVal % 2 == 0)
    nValue = -nValue;
  return nValue;
}


x86 assembly (clang, -O0):
<Se>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <Ue@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    115a <Se+0x4a>
mov    -0x1c(%rbp),%eax
and    $0x1,%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1176 <Se+0x66>
xor    %eax,%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Se>:
push   %rax
call   1030 <Ue@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
mov    %eax,%edx
and    $0x1,%edx
xor    %esi,%esi
cmp    $0x2,%eax
cmovge %edx,%esi
add    %ecx,%esi
mov    %esi,%eax
neg    %eax
test   %edx,%edx
cmovne %esi,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Se(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i32*, i32** %6
%12 = call i32 @Ue(i8* %9, i32 %10, i32* %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = sdiv i32 %13, 2
store i32 %14, i32* %8
%15 = load i32, i32* %8
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %3
%18 = load i32, i32* %7
%19 = and i32 %18, 1
%20 = load i32, i32* %8
%21 = add nsw i32 %20, %19
store i32 %21, i32* %8
br label %22
22: ; preds = %17, %3
%23 = load i32, i32* %7
%24 = srem i32 %23, 2
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i32, i32* %8
%28 = sub nsw i32 0, %27
store i32 %28, i32* %8
br label %29
29: ; preds = %26, %22
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @Se(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @Ue(i8* %0, i32 %1, i32* %2)
%5 = sdiv i32 %4, 2
%6 = icmp sgt i32 %4, 1
%7 = and i32 %4, 1
%8 = select i1 %6, i32 %7, i32 0
%9 = add nsw i32 %8, %5
%10 = icmp eq i32 %7, 0
%11 = sub nsw i32 0, %9
%12 = select i1 %10, i32 %11, i32 %9
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ x(int);
int /*<<< orphan*/ x2(int);
void test_x() {
  x(5);
  x2(5);
}


x86 assembly (clang, -O0):
<test_x>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <x@plt>
mov    $0x5,%edi
call   1040 <x2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_x>:
push   %rax
mov    $0x5,%edi
call   1030 <x@plt>
mov    $0x5,%edi
pop    %rax
jmp    1040 <x2@plt>

LLVM IR (-O0):
define void @test_x() {
%1 = call i32 @x(i32 5)
%2 = call i32 @x2(i32 5)
ret void
}

LLVM IR (-O2):
define void @test_x() {
%1 = tail call i32 @x(i32 5)
%2 = tail call i32 @x2(i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ extended_euclid(long, long, long *, long *, long *);
int /*<<< orphan*/ printf(char *, long, long, long);
int main(void) {
  long a = 4864, b = 3458, d, x, y;
  extended_euclid(a, b, &x, &y, &d);
  printf("x = %ld y = %ld d = %ld\n", x, y, d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1300,-0x10(%rbp)
movq   $0xd82,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0x20(%rbp),%r8
call   1030 <extended_euclid@plt>
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
lea    0x10(%rsp),%r8
mov    $0x1300,%edi
mov    $0xd82,%esi
call   1030 <extended_euclid@plt>
mov    0x8(%rsp),%rsi
mov    (%rsp),%rdx
mov    0x10(%rsp),%rcx
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [25 x i8] c"x = %ld y = %ld d = %ld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = call i32 @extended_euclid(i64 4864, i64 3458, i64* %2, i64* %3, i64* %1)
%8 = load i64, i64* %2
%9 = load i64, i64* %3
%10 = load i64, i64* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %8, i64 %9, i64 %10)
ret i32 0
}
/* Variables and functions */
int __internal_syscall(int, long, long, long, long);
int _open(const char *name, int flags, int mode) {
  return __internal_syscall(1024, (long)(name), (long)(flags), (long)(mode),
                            (long)(0));
}


x86 assembly (clang, -O0):
<_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rdx
movslq -0x10(%rbp),%rcx
mov    $0x400,%edi
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <__internal_syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_open>:
mov    %rdi,%rax
movslq %esi,%r8
movslq %edx,%rcx
mov    $0x400,%edi
mov    %rax,%rsi
mov    %r8,%rdx
xor    %r8d,%r8d
jmp    1030 <__internal_syscall@plt>

LLVM IR (-O0):
define i32 @_open(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = call i32 @__internal_syscall(i32 1024, i64 %8, i64 %10, i64 %12, i64 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @_open(i8* %0, i32 %1, i32 %2) {
%4 = ptrtoint i8* %0 to i64
%5 = sext i32 %1 to i64
%6 = sext i32 %2 to i64
%7 = tail call i32 @__internal_syscall(i32 1024, i64 %4, i64 %5, i64 %6, i64 0)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ SSL_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
void init_ssl() {
  SSL_load_error_strings();
  SSL_library_init();
}


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

x86 assembly (clang, -O2):
<init_ssl>:
push   %rax
xor    %eax,%eax
call   1040 <SSL_load_error_strings@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SSL_library_init@plt>

LLVM IR (-O0):
define void @init_ssl() {
%1 = call i32 (...) @SSL_load_error_strings()
%2 = call i32 (...) @SSL_library_init()
ret void
}

LLVM IR (-O2):
define void @init_ssl() {
%1 = tail call i32 (...) @SSL_load_error_strings()
%2 = tail call i32 (...) @SSL_library_init()
ret void
}
/* Type definitions */
struct vec2i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_snap(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *);
__attribute__((always_)) struct vec2i *
psvec2i_snap(struct vec2i *result, struct vec2i *a, struct vec2i *b) {
  vec2i_snap((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec2i_snap>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2i_snap@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_snap(%struct.vec2i* %0, %struct.vec2i* %1, %struct.vec2i* %2) {
%4 = alloca %struct.vec2i*
%5 = alloca %struct.vec2i*
%6 = alloca %struct.vec2i*
store %struct.vec2i* %0, %struct.vec2i** %4
store %struct.vec2i* %1, %struct.vec2i** %5
store %struct.vec2i* %2, %struct.vec2i** %6
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = load %struct.vec2i*, %struct.vec2i** %5
%10 = bitcast %struct.vec2i* %9 to i32*
%11 = load %struct.vec2i*, %struct.vec2i** %6
%12 = bitcast %struct.vec2i* %11 to i32*
%13 = call i32 @vec2i_snap(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec2i*, %struct.vec2i** %4
ret %struct.vec2i* %14
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_snap(%struct.vec2i* returned %0, %struct.vec2i* %1, %struct.vec2i* %2) {
%4 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec2i, %struct.vec2i* %2, i64 0, i32 0
%7 = tail call i32 @vec2i_snap(i32* %4, i32* %5, i32* %6)
ret %struct.vec2i* %0
}
void p(int *a, int i) { __builtin_prefetch(&a[i]); }


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
prefetcht0 (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<p>:
movslq %esi,%rax
prefetcht0 (%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @p(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = bitcast i32* %8 to i8*
ret void
}

LLVM IR (-O2):
define void @p(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = bitcast i32* %4 to i8*
tail call void @llvm.prefetch.p0i8(i8* %5, i32 0, i32 3, i32 1)
ret void
}
void gtk_tree_view_column_cell_is_visible() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_cell_is_visible() {
ret void
}
int is_leap_year(int n) {
  return (n % 4 == 0 && n % 100 != 0) || (n % 400 == 0);
}


x86 assembly (clang, -O0):
<is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1134 <is_leap_year+0x34>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1148 <is_leap_year+0x48>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year>:
test   $0x3,%dil
jne    112c <is_leap_year+0x2c>
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%ecx
mov    %edi,%edx
mov    $0x1,%eax
sub    %ecx,%edx
je     112c <is_leap_year+0x2c>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_leap_year(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp ne i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp eq i32 %4, 0
%6 = or i1 %3, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ 1, %1 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int fcntl(int fd, int flag, int arg) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<fcntl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec3(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcntl>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @fcntl(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* @EINVAL
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @fcntl(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @EINVAL
store i32 %4, i32* @errno
ret i32 -1
}
unsigned int NI_PFI_OUTPUT_RTSI(unsigned rtsi_channel) {
  return 18 + rtsi_channel;
}


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

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

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

LLVM IR (-O2):
define i32 @NI_PFI_OUTPUT_RTSI(i32 %0) {
%2 = add i32 %0, 18
ret i32 %2
}
double MinDouble(double a, double b) { return (a <= b) ? a : b; }


x86 assembly (clang, -O0):
<MinDouble>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1131 <MinDouble+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <MinDouble+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MinDouble>:
movapd %xmm0,%xmm2
cmplesd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @MinDouble(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 = fcmp ole double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @MinDouble(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
double pow(double, double);
double phim_dyer(double zeta, double L) {
  double phim;
  phim = pow((1.0 - 16.0 * zeta), -0.25);
  return (phim);
}


x86 assembly (clang, -O0):
<phim_dyer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phim_dyer>:
mulsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @phim_dyer(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* %3
%7 = call double @llvm.fmuladd.f64(double -1.600000e+01, double %6, double 1.000000e+00)
%8 = call double @pow(double %7, double -2.500000e-01)
store double %8, double* %5
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @phim_dyer(double %0, double %1) {
%3 = tail call double @llvm.fmuladd.f64(double %0, double -1.600000e+01, double 1.000000e+00)
%4 = tail call double @pow(double %3, double -2.500000e-01)
ret double %4
}
int is_space(char c) {
  int n;
  if (c == 32)
    n = 1;
  else
    n = 0;
  return n;
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jne    1123 <is_space+0x23>
movl   $0x1,-0x8(%rbp)
jmp    112a <is_space+0x2a>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
xor    %eax,%eax
cmp    $0x20,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = zext i1 %2 to i32
ret i32 %3
}
unsigned long get_unique_taint_count(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @get_unique_taint_count() {
ret i64 0
}

LLVM IR (-O2):
define i64 @get_unique_taint_count() {
ret i64 0
}