xunge/DecIR huggingface dataset:
int min(int num1, int num2) { return num1 < num2 ? num1 : num2; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
char *langRomTypeMsxMusic() { return "MSX Music"; }


x86 assembly (clang, -O0):
<langRomTypeMsxMusic>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"MSX Music\00"
define i8* @langRomTypeMsxMusic() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"MSX Music\00"
define i8* @langRomTypeMsxMusic() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, char **, double *, double *);
int main() {
  char nome[1];
  double a, b;
  scanf("%s %lf %lf", &nome, &a, &b);
  printf("TOTAL = R$ %.2f\n", a + b * 0.15);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x5(%rbp),%rsi
lea    0xece(%rip),%rdi
lea    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xea7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xeb3(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%s %lf %lf\00"
@.str.1 = [17 x i8] c"TOTAL = R$ %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x i8]
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = bitcast [1 x i8]* %2 to i8**
%6 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %5, double* %3, double* %4)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call double @llvm.fmuladd.f64(double %8, double 1.500000e-01, double %7)
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s %lf %lf\00"
@.str.1 = [17 x i8] c"TOTAL = R$ %.2f\0A\00"
define i32 @main() {
%1 = alloca [1 x i8]
%2 = alloca double
%3 = alloca double
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = bitcast [1 x i8]* %1 to i8**
%8 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %7, double* %2, double* %3)
%9 = load double, double* %2
%10 = load double, double* %3
%11 = call double @llvm.fmuladd.f64(double %10, double 1.500000e-01, double %9)
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double %11)
ret i32 0
}
/* Type definitions */
struct fb_bitfield {
  unsigned int length;
  unsigned int offset;
};

/* Variables and functions */
unsigned int create_bitmask(struct fb_bitfield *bf) {
  return ~(~0u << bf->length) << bf->offset;
}


x86 assembly (clang, -O0):
<create_bitmask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_bitmask>:
mov    (%rdi),%cl
mov    0x4(%rdi),%dl
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
mov    %edx,%ecx
shl    %cl,%eax
ret

LLVM IR (-O0):
%struct.fb_bitfield = type { i32, i32 }
define i32 @create_bitmask(%struct.fb_bitfield* %0) {
%2 = alloca %struct.fb_bitfield*
store %struct.fb_bitfield* %0, %struct.fb_bitfield** %2
%3 = load %struct.fb_bitfield*, %struct.fb_bitfield** %2
%4 = getelementptr inbounds %struct.fb_bitfield, %struct.fb_bitfield* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = shl i32 -1, %5
%7 = xor i32 %6, -1
%8 = load %struct.fb_bitfield*, %struct.fb_bitfield** %2
%9 = getelementptr inbounds %struct.fb_bitfield, %struct.fb_bitfield* %8, i32 0, i32 1
%10 = load i32, i32* %9
%11 = shl i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
%struct.fb_bitfield = type { i32, i32 }
define i32 @create_bitmask(%struct.fb_bitfield* nocapture %0) {
%2 = getelementptr inbounds %struct.fb_bitfield, %struct.fb_bitfield* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = shl nsw i32 -1, %3
%5 = xor i32 %4, -1
%6 = getelementptr inbounds %struct.fb_bitfield, %struct.fb_bitfield* %0, i64 0, i32 1
%7 = load i32, i32* %6
%8 = shl i32 %5, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ log_d(char *);
int no_room(void) {
  log_d("no room left for HTTP headers");
  return -1;
}


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

x86 assembly (clang, -O2):
<no_room>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <log_d@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"no room left for HTTP headers\00"
define i32 @no_room() {
%1 = call i32 @log_d(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [30 x i8] c"no room left for HTTP headers\00"
define i32 @no_room() {
%1 = tail call i32 @log_d(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int checkFileExist(char *filePath) {
  struct stat statStruct;
  return (stat(filePath, &statStruct)) == 0;
}


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

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

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @checkFileExist(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fn_p(int volatile);
void __attribute__((no, noclone)) fn3(void) {
  volatile int a[5];
  fn_p(a[5]);
}


x86 assembly (clang, -O0):
<fn3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0xc(%rbp),%edi
call   1030 <fn_p@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn3>:
jmp    1030 <fn_p@plt>

LLVM IR (-O0):
define void @fn3() {
%1 = alloca [5 x i32]
%2 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 5
%3 = load volatile i32, i32* %2
%4 = call i32 @fn_p(i32 %3)
ret void
}

LLVM IR (-O2):
define void @fn3() {
%1 = tail call i32 @fn_p(i32 poison)
ret void
}
int floorInt(float number) {
  float ret = (number - (int)number > 0) ? (number) : (number - 1.0);
  return (int)ret;
}


x86 assembly (clang, -O0):
<floorInt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvttss2si -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    113a <floorInt+0x3a>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1154 <floorInt+0x54>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb5(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
cvttss2si -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorInt>:
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
movaps %xmm0,%xmm2
subss  %xmm1,%xmm2
movss  0xeea(%rip),%xmm1
addss  %xmm0,%xmm1
xorps  %xmm3,%xmm3
cmpltss %xmm2,%xmm3
andps  %xmm3,%xmm0
andnps %xmm1,%xmm3
orps   %xmm0,%xmm3
cvttss2si %xmm3,%eax
ret

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

LLVM IR (-O2):
define i32 @floorInt(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fsub float %0, %3
%5 = fcmp ogt float %4, 0.000000e+00
%6 = fadd float %0, -1.000000e+00
%7 = select i1 %5, float %0, float %6
%8 = fptosi float %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ calcY(double *, double);
int /*<<< orphan*/ printf(char *, double);
int main() {
  double x, y;
  x = 1e10;
  calcY(&y, x);
  calcY(&y, x);
  printf("%e\n", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1040 <calcY@plt>
movsd  -0x10(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1040 <calcY@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
movsd  0xece(%rip),%xmm0
mov    %rbx,%rdi
call   1040 <calcY@plt>
mov    %rbx,%rdi
movsd  0xebb(%rip),%xmm0
call   1040 <calcY@plt>
movsd  0x8(%rsp),%xmm0
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @calcY(double* %1, double 1.000000e+10)
%4 = call i32 @calcY(double* %1, double 1.000000e+10)
%5 = load double, double* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %5)
ret i32 0
}
char *langRomTypeNormal4000() { return "Normal 4000h"; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Normal 4000h\00"
define i8* @langRomTypeNormal4000() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"Normal 4000h\00"
define i8* @langRomTypeNormal4000() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ bounce_south();
void do_north(void) { bounce_south(); }


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

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

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

LLVM IR (-O2):
define void @do_north() {
%1 = tail call i32 (...) @bounce_south()
ret void
}
int isEqualTo(int valve, int data) { return (data == valve); }


x86 assembly (clang, -O0):
<isEqualTo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEqualTo>:
xor    %eax,%eax
cmp    %edi,%esi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isEqualTo(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct CMD {
  int dummy;
};

/* Variables and functions */
int detruire_repertoire(char *);
int /*<<< orphan*/ perreur(char *);
int /*<<< orphan*/ scanf(char *, char *);
void rd(struct CMD *c) {
  char arg[300];
  scanf("%s", arg);
  if (detruire_repertoire(arg) == -1)
    perreur(arg);
}


x86 assembly (clang, -O0):
<rd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x140(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x140(%rbp),%rdi
call   1030 <detruire_repertoire@plt>
cmp    $0xffffffff,%eax
jne    1173 <rd+0x43>
lea    -0x140(%rbp),%rdi
call   1050 <perreur@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd>:
push   %rbx
sub    $0x130,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <detruire_repertoire@plt>
cmp    $0xffffffff,%eax
jne    115f <rd+0x2f>
mov    %rsp,%rdi
call   1050 <perreur@plt>
add    $0x130,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.CMD = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @rd(%struct.CMD* %0) {
%2 = alloca %struct.CMD*
%3 = alloca [300 x i8]
store %struct.CMD* %0, %struct.CMD** %2
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%7 = call i32 @detruire_repertoire(i8* %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%11 = call i32 @perreur(i8* %10)
br label %12
12: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.CMD = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @rd(%struct.CMD* nocapture readnone %0) {
%2 = alloca [300 x i8]
%3 = getelementptr inbounds [300 x i8], [300 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 = call i32 @detruire_repertoire(i8* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @perreur(i8* %3)
br label %9
9: ; preds = %7, %1
ret void
}
int tetromino_yywrap(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @tetromino_yywrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @tetromino_yywrap() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x9a() {
  Assert_real((iscntrl(154) == 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_iscntrl.c",
              775, ("iscntrl should be 0 for 0x9a"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x9a>:
push   %rax
mov    $0x9a,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x307,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x9a\00"
define void @t_iscntrl_0x9a() {
%1 = call i64 @iscntrl(i32 154)
%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 775, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x9a\00"
define void @t_iscntrl_0x9a() {
%1 = tail call i64 @iscntrl(i32 154)
%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 775, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ factorial(int);
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int num = 10;
  if (argc > 1) {
    num = atoi(argv[1]);
  }
  printf("%d! = %ld\n", num, factorial(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1167 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%ebx
cmp    $0x2,%edi
jl     1146 <main+0x16>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    %ebx,%edi
call   1030 <factorial@plt>
lea    0xeac(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d! = %ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
br label %14
14: ; preds = %9, %2
%15 = load i32, i32* %6
%16 = load i32, i32* %6
%17 = call i32 @factorial(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d! = %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ %7, %4 ], [ 10, %2 ]
%10 = tail call i32 @factorial(i32 %9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}
unsigned int inl(unsigned short port) {
  unsigned int v;
  asm volatile("inl %1,%0" : "=a"(v) : "dN"(port));
  return v;
}


x86 assembly (clang, -O0):
<inl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i32 @inl(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl $1,$0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inl(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl $1,$0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ r;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ read(int, int /*<<< orphan*/ *, int);
uint32_t randInt() {
  int urand;
  uint32_t r;
  urand = open("/dev/urandom", O_RDONLY);
  read(urand, &r, sizeof(r));
  close(urand);
  return r;
}


x86 assembly (clang, -O0):
<randInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <read@plt>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randInt>:
push   %rbx
sub    $0x10,%rsp
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
call   1050 <open@plt>
mov    %eax,%ebx
lea    0xc(%rsp),%rsi
mov    %eax,%edi
mov    $0x4,%edx
call   1040 <read@plt>
mov    %ebx,%edi
call   1030 <close@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
@O_RDONLY = global i32 0
define i32 @randInt() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @read(i32 %5, i32* %2, i32 4)
%7 = load i32, i32* %1
%8 = call i32 @close(i32 %7)
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
@O_RDONLY = global i32 0
define i32 @randInt() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @read(i32 %4, i32* %1, i32 4)
%6 = tail call i32 @close(i32 %4)
%7 = load i32, i32* %1
ret i32 %7
}
void onClose(int fd) { return; }


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

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

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

LLVM IR (-O2):
define void @onClose(i32 %0) {
ret void
}
/* Variables and functions */
int ls_costN_nm7_f0(double const **, double **, int *, double *, int);
int ls_costN_nm7(const double **arg, double **res, int *iw, double *w,
                 int mem) {
  return ls_costN_nm7_f0(arg, res, iw, w, mem);
}


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

x86 assembly (clang, -O2):
<ls_costN_nm7>:
jmp    1030 <ls_costN_nm7_f0@plt>

LLVM IR (-O0):
define i32 @ls_costN_nm7(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i32*, i32** %8
%14 = load double*, double** %9
%15 = load i32, i32* %10
%16 = call i32 @ls_costN_nm7_f0(double** %11, double** %12, i32* %13, double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @ls_costN_nm7(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @ls_costN_nm7_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int rec1(int);
int rec2(int j) {
  if (j <= 0)
    return 0;
  return rec1(rec2(j - 1)) - 1;
}


x86 assembly (clang, -O0):
<rec2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1141 <rec2+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1159 <rec2+0x39>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <rec2@plt>
mov    %eax,%edi
call   1040 <rec1@plt>
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec2>:
test   %edi,%edi
jle    113c <rec2+0x1c>
push   %rax
add    $0xffffffff,%edi
call   1030 <rec2@plt>
mov    %eax,%edi
call   1040 <rec1@plt>
add    $0xffffffff,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @rec2(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i32 [ %9, %5 ], [ 0, %1 ]
ret i32 %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i32 @rec2(i32 %6)
%8 = tail call i32 @rec1(i32 %7)
%9 = add nsw i32 %8, -1
br label %3
}
void bigend(unsigned int *i) {
  unsigned int t;
  ((unsigned char *)&t)[0] = ((unsigned char *)i)[3];
  ((unsigned char *)&t)[1] = ((unsigned char *)i)[2];
  ((unsigned char *)&t)[2] = ((unsigned char *)i)[1];
  ((unsigned char *)&t)[3] = ((unsigned char *)i)[0];
  *i = t;
}


x86 assembly (clang, -O0):
<bigend>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigend>:
mov    (%rdi),%eax
bswap  %eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @bigend(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = bitcast i32* %4 to i8*
%6 = getelementptr inbounds i8, i8* %5, i64 3
%7 = load i8, i8* %6
%8 = bitcast i32* %3 to i8*
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32*, i32** %2
%11 = bitcast i32* %10 to i8*
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = bitcast i32* %3 to i8*
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i32*, i32** %2
%17 = bitcast i32* %16 to i8*
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %18
%20 = bitcast i32* %3 to i8*
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i32*, i32** %2
%23 = bitcast i32* %22 to i8*
%24 = getelementptr inbounds i8, i8* %23, i64 0
%25 = load i8, i8* %24
%26 = bitcast i32* %3 to i8*
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
%28 = load i32, i32* %3
%29 = load i32*, i32** %2
store i32 %28, i32* %29
ret void
}

LLVM IR (-O2):
define void @bigend(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 3
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %2, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = load i8, i8* %7
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = shl nuw i32 %10, 24
%12 = zext i8 %8 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = zext i8 %6 to i32
%15 = shl nuw nsw i32 %14, 8
%16 = zext i8 %4 to i32
%17 = or i32 %15, %16
%18 = or i32 %17, %13
%19 = or i32 %18, %11
store i32 %19, i32* %0
ret void
}
int kata_add(int left, int right) { return left + right; }


x86 assembly (clang, -O0):
<kata_add>:
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):
<kata_add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @kata_add(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 @kata_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
char *strcpy(char *restrict s1, const char *restrict s2) {
  char *p1;
  p1 = s1;
  while ((*p1++ = *s2++) != '\0')
    ;
  return (s1);
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* noalias returned writeonly %0, i8* noalias nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
void WDT_A_IRQHandler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<WDT_A_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <WDT_A_IRQHandler+0x9>
jmp    1109 <WDT_A_IRQHandler+0x9>

x86 assembly (clang, -O2):
<WDT_A_IRQHandler>:
jmp    1100 <WDT_A_IRQHandler>

LLVM IR (-O0):
define void @WDT_A_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @WDT_A_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int list_empty(struct list_head *);
int fimg2d_queue_is_empty(struct list_head *q) { return list_empty(q); }


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

x86 assembly (clang, -O2):
<fimg2d_queue_is_empty>:
jmp    1030 <list_empty@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @fimg2d_queue_is_empty(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
%3 = load %struct.list_head*, %struct.list_head** %2
%4 = call i32 @list_empty(%struct.list_head* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @fimg2d_queue_is_empty(%struct.list_head* %0) {
%2 = tail call i32 @list_empty(%struct.list_head* %0)
ret i32 %2
}
int test_04(int a, int b) { return (a ^ b) >= 0 ? -20 : -40; }


x86 assembly (clang, -O0):
<test_04>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
xor    -0x8(%rbp),%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovge %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_04>:
xor    %esi,%edi
mov    $0xffffffec,%ecx
mov    $0xffffffd8,%eax
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_04(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 = xor i32 %5, %6
%8 = icmp sge i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 -20, i32 -40
ret i32 %10
}

LLVM IR (-O2):
define i32 @test_04(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp sgt i32 %3, -1
%5 = select i1 %4, i32 -20, i32 -40
ret i32 %5
}
/* Variables and functions */
scalar_t__ realloc(char *, size_t const);
size_t strlen(char const *);
int /*<<< orphan*/ strncpy(char *, char const *, size_t const);
void puglSetString(char **dest, const char *string) {
  const size_t len = strlen(string);
  *dest = (char *)realloc(*dest, len + 1);
  strncpy(*dest, string, len + 1);
}


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

x86 assembly (clang, -O2):
<puglSetString>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    (%r15),%rdi
lea    0x1(%rax),%rbx
mov    %rbx,%rsi
call   1050 <realloc@plt>
mov    %rax,(%r15)
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define void @puglSetString(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** %8
%10 = load i64, i64* %5
%11 = add i64 %10, 1
%12 = call i64 @realloc(i8* %9, i64 %11)
%13 = inttoptr i64 %12 to i8*
%14 = load i8**, i8*** %3
store i8* %13, i8** %14
%15 = load i8**, i8*** %3
%16 = load i8*, i8** %15
%17 = load i8*, i8** %4
%18 = load i64, i64* %5
%19 = add i64 %18, 1
%20 = call i32 @strncpy(i8* %16, i8* %17, i64 %19)
ret void
}

LLVM IR (-O2):
define void @puglSetString(i8** nocapture %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = load i8*, i8** %0
%5 = add i64 %3, 1
%6 = tail call i64 @realloc(i8* %4, i64 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %0
%8 = tail call i32 @strncpy(i8* %7, i8* %1, i64 %5)
ret void
}
int xcshift(int x, int shft) {
  int a, b;
  if (shft == 0)
    return x;
  a = x << shft;
  b = x >> (32 - shft);
  return a ^ b;
}


x86 assembly (clang, -O0):
<xcshift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    111f <xcshift+0x1f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <xcshift+0x43>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
sub    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcshift>:
mov    %edi,%edx
mov    %esi,%ecx
shl    %cl,%edx
neg    %cl
mov    %edi,%eax
sar    %cl,%eax
xor    %edx,%eax
test   %esi,%esi
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @xcshift(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %4
store i32 %11, i32* %3
br label %23
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = shl i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = sub nsw i32 32, %17
%19 = ashr i32 %16, %18
store i32 %19, i32* %7
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = xor i32 %20, %21
store i32 %22, i32* %3
br label %23
23: ; preds = %12, %10
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @xcshift(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = shl i32 %0, %1
%5 = sub nsw i32 32, %1
%6 = ashr i32 %0, %5
%7 = xor i32 %6, %4
%8 = select i1 %3, i32 %0, i32 %7
ret i32 %8
}
void setval_153(unsigned *p) { *p = 3281047241U; }


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

x86 assembly (clang, -O2):
<setval_153>:
movl   $0xc390cec9,(%rdi)
ret

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

LLVM IR (-O2):
define void @setval_153(i32* nocapture writeonly %0) {
store i32 -1013920055, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x;
  scanf("%d", &x);
  printf("%d\n%d\n", x * x, x * x * x);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
mov    %edx,%esi
imul   %edx,%esi
imul   %esi,%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct entry_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_pop_back(struct genlist *);
void entry_list_pop_back(struct entry_list *tthis) {
  genlist_pop_back((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<entry_list_pop_back>:
jmp    1030 <genlist_pop_back@plt>

LLVM IR (-O0):
%struct.entry_list = type { i32 }
%struct.genlist = type { i32 }
define void @entry_list_pop_back(%struct.entry_list* %0) {
%2 = alloca %struct.entry_list*
store %struct.entry_list* %0, %struct.entry_list** %2
%3 = load %struct.entry_list*, %struct.entry_list** %2
%4 = bitcast %struct.entry_list* %3 to %struct.genlist*
%5 = call i32 @genlist_pop_back(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.entry_list = type { i32 }
%struct.genlist = type { i32 }
define void @entry_list_pop_back(%struct.entry_list* %0) {
%2 = bitcast %struct.entry_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_pop_back(%struct.genlist* %2)
ret void
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_3a(int Salt, int Parameter) {
  unsigned b = Salt * 0x314C2CD1 + 0x2B5B;
  return yahoo_M1Common(b, Parameter);
}


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

x86 assembly (clang, -O2):
<yahoo_f01_3a>:
imul   $0x314c2cd1,%edi,%edi
add    $0x2b5b,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_3a(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 827075793
%8 = add nsw i32 %7, 11099
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_3a(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 827075793
%4 = add nsw i32 %3, 11099
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void baseNotSupported() {
  fprintf(stderr, "Error: base > %d and base < 2 not supported !\n", 36);
  exit(3);
}


x86 assembly (clang, -O0):
<baseNotSupported>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x24,%edx
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<baseNotSupported>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
mov    $0x24,%edx
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"Error: base > %d and base < 2 not supported !\0A\00"
define void @baseNotSupported() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 36)
%3 = call i32 @exit(i32 3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"Error: base > %d and base < 2 not supported !\0A\00"
define void @baseNotSupported() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 36)
%3 = tail call i32 @exit(i32 3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float rad;
  scanf("%f", &rad);
  printf("%f", rad * (180.00 / 3.14));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xedc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeb5(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = fmul double %5, 0x404CA99461D59AE7
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
void oerr(void) { err(1, "stdout"); }


x86 assembly (clang, -O0):
<oerr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <err@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<oerr>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <err@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"stdout\00"
define void @oerr() {
%1 = call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"stdout\00"
define void @oerr() {
%1 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}