xunge/DecIR huggingface dataset:
/* Variables and functions */
int compared2(long const *, long const *);
int __nedf2(double a, double b) {
  return compared2(((const long *)&a), ((const long *)&b));
}


x86 assembly (clang, -O0):
<__nedf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <compared2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__nedf2>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <compared2@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @__nedf2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = bitcast double* %3 to i64*
%6 = bitcast double* %4 to i64*
%7 = call i32 @compared2(i64* %5, i64* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @__nedf2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = bitcast double* %3 to i64*
%6 = bitcast double* %4 to i64*
%7 = call i32 @compared2(i64* %5, i64* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ print_clnt_list(int);
int /*<<< orphan*/ print_serv_list(int);
void print_stats_list(int opt_srv, int opt_clt, int opt_prt) {
  if (opt_srv)
    print_serv_list(opt_prt);
  if (opt_clt)
    print_clnt_list(opt_prt);
}


x86 assembly (clang, -O0):
<print_stats_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1143 <print_stats_list+0x23>
mov    -0xc(%rbp),%edi
call   1040 <print_serv_list@plt>
cmpl   $0x0,-0x8(%rbp)
je     1155 <print_stats_list+0x35>
mov    -0xc(%rbp),%edi
call   1030 <print_clnt_list@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_stats_list>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
test   %edi,%edi
je     1132 <print_stats_list+0x12>
mov    %ebx,%edi
call   1040 <print_serv_list@plt>
test   %ebp,%ebp
je     1143 <print_stats_list+0x23>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <print_clnt_list@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @print_stats_list(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %6
%11 = call i32 @print_serv_list(i32 %10)
br label %12
12: ; preds = %9, %3
%13 = load i32, i32* %5
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %6
%17 = call i32 @print_clnt_list(i32 %16)
br label %18
18: ; preds = %15, %12
ret void
}

LLVM IR (-O2):
define void @print_stats_list(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @print_serv_list(i32 %2)
br label %7
7: ; preds = %5, %3
%8 = icmp eq i32 %1, 0
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @print_clnt_list(i32 %2)
br label %11
11: ; preds = %9, %7
ret void
}
void gtk_frame_get_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_frame_get_label() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  long do_not_propagate_mask;
};
typedef TYPE_1__ XSetWindowAttributes;

/* Variables and functions */
void set_XSetWindowAttributes_do_not_propagate_mask(void *_p, long _v) {
  ((XSetWindowAttributes *)_p)->do_not_propagate_mask = (long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XSetWindowAttributes_do_not_propagate_mask(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XSetWindowAttributes_do_not_propagate_mask(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R_raw(int *, int *, int);
void R_r(int *a, int *b) { R_raw(a, b, 1); }


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

x86 assembly (clang, -O2):
<R_r>:
mov    $0x1,%edx
jmp    1030 <R_raw@plt>

LLVM IR (-O0):
define void @R_r(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i32 @R_raw(i32* %5, i32* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @R_r(i32* %0, i32* %1) {
%3 = tail call i32 @R_raw(i32* %0, i32* %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mem_error();
void *realloc(void *, size_t);
void *mem_resize(void *x, size_t s) {
  void *y = realloc(x, s);
  if (!y)
    mem_error();
  return y;
}


x86 assembly (clang, -O0):
<mem_resize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <mem_resize+0x33>
mov    $0x0,%al
call   1040 <mem_error@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @mem_resize(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @mem_error()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
double d_sin_xx_8(double xx) {
  return 0.7853981633974483 + xx * (-0.08074551202387524 +
                                    xx * (0.002490393182719242 +
                                          xx * (-3.657233242102226e-05 +
                                                xx * (3.089664734016052e-07))));
}


x86 assembly (clang, -O0):
<d_sin_xx_8>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm3
movsd  0xef3(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xeef(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xecf(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeb7(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_sin_xx_8>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @d_sin_xx_8(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double %6, double 0x3E94BC00EB9ED001, double 0xBF032CA7C603B161)
%8 = call double @llvm.fmuladd.f64(double %5, double %7, double 0x3F6466BBA8C448CE)
%9 = call double @llvm.fmuladd.f64(double %4, double %8, double 0xBFB4ABBCE570FA47)
%10 = call double @llvm.fmuladd.f64(double %3, double %9, double 0x3FE921FB54442D18)
ret double %10
}

LLVM IR (-O2):
define double @d_sin_xx_8(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0x3E94BC00EB9ED001, double 0xBF032CA7C603B161)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double 0x3F6466BBA8C448CE)
%4 = tail call double @llvm.fmuladd.f64(double %0, double %3, double 0xBFB4ABBCE570FA47)
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double 0x3FE921FB54442D18)
ret double %5
}
char ascii_to_dec(char x) {
  if (x >= '0' && x <= '9')
    return x - 48;
  if (x >= 'A' && x <= 'F')
    return x - 55;
  return 0;
}


x86 assembly (clang, -O0):
<ascii_to_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <ascii_to_dec+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <ascii_to_dec+0x33>
movsbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1160 <ascii_to_dec+0x60>
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     115c <ascii_to_dec+0x5c>
movsbl -0x2(%rbp),%eax
cmp    $0x46,%eax
jg     115c <ascii_to_dec+0x5c>
movsbl -0x2(%rbp),%eax
sub    $0x37,%eax
mov    %al,-0x1(%rbp)
jmp    1160 <ascii_to_dec+0x60>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_to_dec>:
lea    -0x30(%rdi),%eax
lea    -0x41(%rdi),%ecx
add    $0xc9,%dil
xor    %edx,%edx
cmp    $0x6,%cl
movzbl %dil,%ecx
cmovae %edx,%ecx
cmp    $0xa,%al
movzbl %al,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @ascii_to_dec(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %30
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 65
br i1 %19, label %20, label %29
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 70
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = sub nsw i32 %26, 55
%28 = trunc i32 %27 to i8
store i8 %28, i8* %2
br label %30
29: ; preds = %20, %16
store i8 0, i8* %2
br label %30
30: ; preds = %29, %24, %11
%31 = load i8, i8* %2
ret i8 %31
}

LLVM IR (-O2):
define signext i8 @ascii_to_dec(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = add i8 %0, -65
%5 = icmp ult i8 %4, 6
%6 = add i8 %0, -55
%7 = select i1 %5, i8 %6, i8 0
%8 = select i1 %3, i8 %2, i8 %7
ret i8 %8
}
int changetmperature(int i, int flag) {
  int temperature = 0;
  if (flag == 0)
    temperature = (i * 9) / 5 + 32;
  else
    temperature = 5 * (i - 32) / 9;
  return temperature;
}


x86 assembly (clang, -O0):
<changetmperature>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1132 <changetmperature+0x32>
imul   $0x9,-0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
add    $0x20,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <changetmperature+0x46>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<changetmperature>:
test   %esi,%esi
je     1123 <changetmperature+0x23>
lea    (%rdi,%rdi,4),%eax
add    $0xffffff60,%eax
cltq
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
ret
lea    (%rdi,%rdi,8),%eax
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
sar    $0x21,%rcx
shr    $0x3f,%rax
add    %ecx,%eax
add    $0x20,%eax
ret

LLVM IR (-O0):
define i32 @changetmperature(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, 9
%11 = sdiv i32 %10, 5
%12 = add nsw i32 %11, 32
store i32 %12, i32* %5
br label %18
13: ; preds = %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 32
%16 = mul nsw i32 5, %15
%17 = sdiv i32 %16, 9
store i32 %17, i32* %5
br label %18
18: ; preds = %13, %8
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @changetmperature(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = mul nsw i32 %0, 9
%6 = sdiv i32 %5, 5
%7 = add nsw i32 %6, 32
br label %12
8: ; preds = %2
%9 = mul i32 %0, 5
%10 = add i32 %9, -160
%11 = sdiv i32 %10, 9
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ %7, %4 ], [ %11, %8 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ ftell(int /*<<< orphan*/ *);
size_t fsize(FILE *fd) {
  fseek(fd, 0, SEEK_END);
  size_t size = (size_t)ftell(fd);
  fseek(fd, 0, SEEK_SET);
  return size;
}


x86 assembly (clang, -O0):
<fsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
movslq %eax,%r14
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i32 @ftell(i32* %7)
%9 = sext i32 %8 to i64
store i64 %9, i64* %3
%10 = load i32*, i32** %2
%11 = load i32, i32* @SEEK_SET
%12 = call i32 @fseek(i32* %10, i32 0, i32 %11)
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i32 @ftell(i32* %0)
%5 = sext i32 %4 to i64
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i32 0, i32 %6)
ret i64 %5
}
void gtk_text_iter_forward_char() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_forward_char() {
ret void
}
void rop3_129_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk1 = S ^ T;
  stk2 = *D ^ S;
  stk1 = stk1 | stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_129_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_129_0_0>:
xor    %esi,%edx
mov    (%rdi),%al
xor    %sil,%al
or     %dl,%al
not    %al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_129_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %5
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %8
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %8
%25 = zext i8 %24 to i32
%26 = or i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %7
%28 = load i8, i8* %7
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = trunc i32 %30 to i8
store i8 %31, i8* %7
%32 = load i8, i8* %7
%33 = load i8*, i8** %4
store i8 %32, i8* %33
ret void
}

LLVM IR (-O2):
define void @rop3_129_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %5, %1
%7 = or i8 %6, %4
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
char tolower(char);
char *cstrlwr(char *s) {
  for (; s; ++s)
    *s = tolower(*s);
  return s;
}


x86 assembly (clang, -O0):
<cstrlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114c <cstrlwr+0x3c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <cstrlwr+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstrlwr>:
push   %rbx
test   %rdi,%rdi
je     1130 <cstrlwr+0x20>
mov    %rdi,%rbx
nopl   0x0(%rax)
movsbl (%rbx),%edi
call   1030 <tolower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
jmp    1120 <cstrlwr+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @cstrlwr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %7, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call signext i8 @tolower(i8 signext %5)
store i8 %6, i8* %4
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
8: ; preds = %1
ret i8* null
}
/* Variables and functions */
float cosf_c(float);
float cosf_neon_sfp(float x) { return cosf_c(x); }


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

x86 assembly (clang, -O2):
<cosf_neon_sfp>:
jmp    1030 <cosf_c@plt>

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

LLVM IR (-O2):
define float @cosf_neon_sfp(float %0) {
%2 = tail call float @cosf_c(float %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
scalar_t__ SYS_read;
int /*<<< orphan*/ syscall(long, long, long, long);
ssize_t read(int fd, void *buf, size_t count) {
  return syscall((long)SYS_read, (long)fd, (long)buf, (long)count);
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%rdi
movslq -0x4(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2ecb(%rip),%rax
mov    (%rax),%rax
movslq %edi,%rsi
mov    %rax,%rdi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@SYS_read = global i64 0
define i32 @read(i32 %0, i8* %1, i64 %2) {
%4 = load i64, i64* @SYS_read
%5 = sext i32 %0 to i64
%6 = ptrtoint i8* %1 to i64
%7 = tail call i32 @syscall(i64 %4, i64 %5, i64 %6, i64 %2)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void destroy_owning_ptr(void *ptr) { free(*(void **)ptr); }


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

x86 assembly (clang, -O2):
<destroy_owning_ptr>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @destroy_owning_ptr(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
int Operand_soffsetx4_encode(unsigned int *valp) {
  unsigned offset_0, soffsetx4_0;
  soffsetx4_0 = *valp;
  offset_0 = ((soffsetx4_0 - 0x4) >> 2) & 0x3ffff;
  *valp = offset_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_soffsetx4_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
shr    $0x2,%eax
and    $0x3ffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_soffsetx4_encode>:
mov    $0xffffc,%eax
add    (%rdi),%eax
shr    $0x2,%eax
and    $0x3ffff,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_soffsetx4_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sub i32 %7, 4
%9 = lshr i32 %8, 2
%10 = and i32 %9, 262143
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32*, i32** %2
store i32 %11, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_soffsetx4_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add i32 %2, 1048572
%4 = lshr i32 %3, 2
%5 = and i32 %4, 262143
store i32 %5, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ execv(char *, char **);
int main(int argc, char **argv) {
  argv[0] = "gcc";
  execv("/vsta/bin/gcc", argv);
  return (1);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef2(%rip),%rax
mov    %rax,(%rsi)
lea    0xede(%rip),%rdi
call   1030 <execv@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"gcc\00"
@.str.1 = [14 x i8] c"/vsta/bin/gcc\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i8**, i8*** %5
%9 = call i32 @execv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8** %8)
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c"gcc\00"
@.str.1 = [14 x i8] c"/vsta/bin/gcc\00"
define i32 @main(i32 %0, i8** %1) {
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = tail call i32 @execv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8** %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ __assert_fail(char *, int);
int foo();
int main() {
  if (!(foo() == 3))
    __assert_fail("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/orodley/naive/refs/heads/"
                  "master/tests/ncc/conversion_on_return/in.c",
                  11);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
cmp    $0x3,%eax
je     1150 <main+0x30>
lea    0xeba(%rip),%rdi
mov    $0xb,%esi
call   1030 <__assert_fail@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0x3,%eax
je     113e <main+0x1e>
lea    0xecc(%rip),%rdi
mov    $0xb,%esi
call   1030 <__assert_fail@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/orodley/naive/refs/heads/master/tests/ncc/conversion_on_return/in.c\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo()
%3 = icmp eq i32 %2, 3
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 @__assert_fail(i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0), i32 11)
br label %6
6: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/orodley/naive/refs/heads/master/tests/ncc/conversion_on_return/in.c\00"
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = icmp eq i32 %1, 3
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @__assert_fail(i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0), i32 11)
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int syscall(int, char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int chown(const char *path, uid_t uid, gid_t gid) {
  return syscall(212, path, uid, gid);
}


x86 assembly (clang, -O0):
<chown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0xd4,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chown>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xd4,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @chown(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 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @syscall(i32 212, i8* %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @chown(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 212, i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void recur(int n) {
  printf("Entering recur(%d)\n", n);
  if (n > 0) {
    recur(n - 1);
  }
  printf("Exiting recur()\n");
}


x86 assembly (clang, -O0):
<recur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1151 <recur+0x31>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <recur@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recur>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    1151 <recur+0x21>
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1050 <recur@plt>
lea    0xebc(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"Entering recur(%d)\0A\00"
@str = [16 x i8] c"Exiting recur()\00"
define void @recur(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = add nsw i32 %0, -1
tail call void @recur(i32 %5)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int condition_reduction(int *, int);
int main(void) {
  int a[27] = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1,  2,  3, 4,
               5,  6,  7,  8,  9,  10, 21, 22, 23, 24, 25, 26, 27};
  int ret = condition_reduction(a, 46);
  if (ret != 27 + 96)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x6c,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
mov    $0x2e,%esi
call   1050 <condition_reduction@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x7b,-0x74(%rbp)
je     1179 <main+0x49>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
movups 0xf31(%rip),%xmm0
movups %xmm0,0x5c(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe8d(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x2e,%esi
call   1040 <condition_reduction@plt>
cmp    $0x7b,%eax
jne    1190 <main+0x70>
xor    %eax,%eax
add    $0x78,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.a = [27 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27]
define i32 @main() {
%1 = alloca i32
%2 = alloca [27 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [27 x i32]* %2 to i8*
%5 = getelementptr inbounds [27 x i32], [27 x i32]* %2, i64 0, i64 0
%6 = call i32 @condition_reduction(i32* %5, i32 46)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 123
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [27 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27]
define i32 @main() {
%1 = alloca [27 x i32]
%2 = bitcast [27 x i32]* %1 to i8*
%3 = getelementptr inbounds [27 x i32], [27 x i32]* %1, i64 0, i64 0
%4 = call i32 @condition_reduction(i32* %3, i32 46)
%5 = icmp eq i32 %4, 123
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ def_date();
int /*<<< orphan*/ def_from(char *);
int /*<<< orphan*/ def_mid();
int /*<<< orphan*/ def_to(int, char **);
void def_headers(int argc, char **argv, char *from) {
  def_to(argc, argv);
  def_date();
  def_from(from);
  def_mid();
}


x86 assembly (clang, -O0):
<def_headers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <def_to@plt>
mov    $0x0,%al
call   1050 <def_date@plt>
mov    -0x18(%rbp),%rdi
call   1030 <def_from@plt>
mov    $0x0,%al
call   1060 <def_mid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_headers>:
push   %rbx
mov    %rdx,%rbx
call   1040 <def_to@plt>
xor    %eax,%eax
call   1050 <def_date@plt>
mov    %rbx,%rdi
call   1030 <def_from@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <def_mid@plt>

LLVM IR (-O0):
define void @def_headers(i32 %0, i8** %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @def_to(i32 %7, i8** %8)
%10 = call i32 (...) @def_date()
%11 = load i8*, i8** %6
%12 = call i32 @def_from(i8* %11)
%13 = call i32 (...) @def_mid()
ret void
}

LLVM IR (-O2):
define void @def_headers(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @def_to(i32 %0, i8** %1)
%5 = tail call i32 (...) @def_date()
%6 = tail call i32 @def_from(i8* %2)
%7 = tail call i32 (...) @def_mid()
ret void
}
unsigned long get_eflags(void) {
  unsigned long eflags;
  asm volatile("subq $128, %%rsp\n\t"
               "pushfq\n\t"
               "popq %0\n\t"
               "addq $128, %%rsp"
               : "=r"(eflags)::"memory");
  return eflags;
}


x86 assembly (clang, -O0):
<get_eflags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
pushf
pop    %rax
add    $0x80,%rsp
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_eflags>:
sub    $0x80,%rsp
pushf
pop    %rax
add    $0x80,%rsp
ret

LLVM IR (-O0):
define i64 @get_eflags() {
%1 = alloca i64
%2 = call i64 asm sideeffect "subq $$128, %rsp\0A\09pushfq\0A\09popq $0\0A\09addq $$128, %rsp", "=r,~{memory},~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @get_eflags() {
%1 = tail call i64 asm sideeffect "subq $$128, %rsp\0A\09pushfq\0A\09popq $0\0A\09addq $$128, %rsp", "=r,~{memory},~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void fini_2(void) { write(STDOUT_FILENO, "fini array 2\n", 13); }


x86 assembly (clang, -O0):
<fini_2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0xd,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fini_2>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
mov    $0xd,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [14 x i8] c"fini array 2\0A\00"
define void @fini_2() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [14 x i8] c"fini array 2\0A\00"
define void @fini_2() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn_that_could_write_back_a_value(int *);
int test_void(int i) {
  int j;
  if (i == 0) {
    if (i < j) {
      return 0;
    } else {
      return 1;
    }
  } else {
    fn_that_could_write_back_a_value(&j);
    if (i < j) {
      return 2;
    } else {
      return j;
    }
  }
}


x86 assembly (clang, -O0):
<test_void>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1149 <test_void+0x39>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113d <test_void+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1170 <test_void+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1170 <test_void+0x60>
lea    -0xc(%rbp),%rdi
call   1030 <fn_that_could_write_back_a_value@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116a <test_void+0x5a>
movl   $0x2,-0x4(%rbp)
jmp    1170 <test_void+0x60>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_void>:
test   %edi,%edi
je     1139 <test_void+0x29>
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xc(%rsp),%rdi
call   1030 <fn_that_could_write_back_a_value@plt>
mov    0xc(%rsp),%ecx
cmp    %ebx,%ecx
mov    $0x2,%eax
cmovle %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @test_void(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = icmp eq i32 %0, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = call i32 @fn_that_could_write_back_a_value(i32* %2)
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, %0
%9 = select i1 %8, i32 2, i32 %7
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int tracepoint_probe_unregister(char *, void *);
__attribute__((always_)) int unregister_trace_kfree(
    void (*probe)(unsigned long call_site, const void *ptr)) {
  return tracepoint_probe_unregister("kfree", (void *)probe);
}


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

x86 assembly (clang, -O2):
<unregister_trace_kfree>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <tracepoint_probe_unregister@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"kfree\00"
define i32 @unregister_trace_kfree(void (i64, i8*)* %0) {
%2 = alloca void (i64, i8*)*
store void (i64, i8*)* %0, void (i64, i8*)** %2
%3 = load void (i64, i8*)*, void (i64, i8*)** %2
%4 = bitcast void (i64, i8*)* %3 to i8*
%5 = call i32 @tracepoint_probe_unregister(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"kfree\00"
define i32 @unregister_trace_kfree(void (i64, i8*)* %0) {
%2 = bitcast void (i64, i8*)* %0 to i8*
%3 = tail call i32 @tracepoint_probe_unregister(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void InitTable(uint8_t table[]) {
  int k;
  for (k = 0; k < 100; k++)
    table[k] = 0;
}


x86 assembly (clang, -O0):
<InitTable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1137 <InitTable+0x37>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <InitTable+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitTable>:
push   %rax
mov    $0x320,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @InitTable(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i64*, i64** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %8, i64 %10
store i64 0, i64* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @InitTable(i64* nocapture writeonly %0) {
%2 = bitcast i64* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fexpect(char *, int, int, int);
int t8(int a, ...) {
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/function.c",
          65, 23, a);
  ;
}


x86 assembly (clang, -O0):
<t8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
lea    0xedb(%rip),%rdi
mov    $0x41,%esi
mov    $0x17,%edx
call   1030 <fexpect@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t8>:
mov    %edi,%ecx
lea    0xee7(%rip),%rdi
mov    $0x41,%esi
mov    $0x17,%edx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/function.c\00"
define i32 @t8(i32 %0, ...) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @fexpect(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i32 65, i32 23, i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/function.c\00"
define i32 @t8(i32 %0, ...) {
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i32 65, i32 23, i32 %0)
ret i32 undef
}
int f(int i) {
  int t = i == 1;
  int g = t == 2;
  int h = g == 3;
  return h;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 2
%11 = zext i1 %10 to i32
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 3
%14 = zext i1 %13 to i32
store i32 %14, i32* %5
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 0
}
int fun913() { return 913; }


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

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

LLVM IR (-O0):
define i32 @fun913() {
ret i32 913
}

LLVM IR (-O2):
define i32 @fun913() {
ret i32 913
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(const char *prog_name) {
  fprintf(stderr, "Usage:\n");
  fprintf(stderr, "  %s -n <string_name> -o <out.h> <in.txt>\n", prog_name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xecf(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [43 x i8] c" %s -n <string_name> -o <out.h> <in.txt>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [43 x i8] c" %s -n <string_name> -o <out.h> <in.txt>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
off_t xfstat(int fd, void *stat) { return -1; }


x86 assembly (clang, -O0):
<xfstat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xfstat(i32 %0, i8* nocapture readnone %1) {
ret i32 -1
}
void g(int v, int u) {
  int z = v;
  int arg = u;
}


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

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

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

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