xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
char *fgets(char *, int, int /*<<< orphan*/ *);
char *fgets_or_exit(char *buffer, int size, FILE *stream) {
  char *c;
  if ((c = fgets(buffer, size, stream)) == NULL)
    exit(1);
  return c;
}


x86 assembly (clang, -O0):
<fgets_or_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    115b <fgets_or_exit+0x3b>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgets_or_exit>:
push   %rax
call   1030 <fgets@plt>
test   %rax,%rax
je     112d <fgets_or_exit+0xd>
pop    %rcx
ret
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i8* @fgets_or_exit(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = call i8* @fgets(i8* %8, i32 %9, i32* %10)
store i8* %11, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %3
%16 = load i8*, i8** %7
ret i8* %16
}

LLVM IR (-O2):
define i8* @fgets_or_exit(i8* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i8* @fgets(i8* %0, i32 %1, i32* %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int mmapListDataInp(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int openFileInp(char *oname) {
  int fd;
  char infile[200] = "\0";
  strcpy(infile, oname);
  fd = mmapListDataInp(infile);
  return (fd);
}


x86 assembly (clang, -O0):
<openFileInp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1040 <memset@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0xe0(%rbp),%rdi
call   1050 <mmapListDataInp@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFileInp>:
push   %rbx
sub    $0xd0,%rsp
mov    %rdi,%rsi
xorps  %xmm0,%xmm0
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0xc0(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <mmapListDataInp@plt>
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @openFileInp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [200 x i8]
store i8* %0, i8** %2
%5 = bitcast [200 x i8]* %4 to i8*
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%10 = call i32 @mmapListDataInp(i8* %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @openFileInp(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
%5 = call i32 @mmapListDataInp(i8* %3)
ret i32 %5
}
void copy(void) {
  int i = 0;
  extern char line[], longest[];
  while ((longest[i] = line[i]) != '\0') {
    ++i;
  }
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2ed2(%rip),%rax
mov    (%rax,%rcx,1),%al
movslq -0x4(%rbp),%rdx
mov    0x2eb4(%rip),%rcx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1141 <copy+0x41>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copy+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
xor    %eax,%eax
mov    0x2edf(%rip),%rsi
mov    0x2ec8(%rip),%rdx
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdx,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copy+0x10>
ret

LLVM IR (-O0):
@line = external global [0 x i8]
@longest = external global [0 x i8]
define void @copy() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @line, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8], [0 x i8]* @longest, i64 0, i64 %8
store i8 %6, i8* %9
%10 = sext i8 %6 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@line = external global [0 x i8]
@longest = external global [0 x i8]
define void @copy() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ %7, %1 ], [ 0, %0 ]
%3 = getelementptr inbounds [0 x i8], [0 x i8]* @line, i64 0, i64 %2
%4 = load i8, i8* %3
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @longest, i64 0, i64 %2
store i8 %4, i8* %5
%6 = icmp eq i8 %4, 0
%7 = add nuw i64 %2, 1
br i1 %6, label %8, label %1
8: ; preds = %1
ret void
}
/* Variables and functions */
int ec_send_processdata_group(int /*<<< orphan*/);
int ec_send_processdata(void) { return ec_send_processdata_group(0); }


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

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

LLVM IR (-O0):
define i32 @ec_send_processdata() {
%1 = call i32 @ec_send_processdata_group(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @ec_send_processdata() {
%1 = tail call i32 @ec_send_processdata_group(i32 0)
ret i32 %1
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int standard_collapse_diagonal(int k, int d) {
  int a[2], *b, fail;
  double *c;
  a[0] = k;
  a[1] = d;
  fail = _ada_use_c2phc(170, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<standard_collapse_diagonal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0xaa,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @standard_collapse_diagonal(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i32]
%6 = alloca i32*
%7 = alloca i32
%8 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %9, i32* %10
%11 = load i32, i32* %4
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %11, i32* %12
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%14 = load i32*, i32** %6
%15 = load double*, double** %8
%16 = call i32 @_ada_use_c2phc(i32 170, i32* %13, i32* %14, double* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @standard_collapse_diagonal(i32 %0, i32 %1) {
%3 = alloca [2 x i32]
%4 = bitcast [2 x i32]* %3 to i8*
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %0, i32* %5
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 %1, i32* %6
%7 = call i32 @_ada_use_c2phc(i32 170, i32* %5, i32* undef, double* undef)
ret i32 %7
}
/* Variables and functions */
int M_PI;
float sin(int);
float waveshaper_sine(float signal, float curve) {
  signal = (0.5f * sin(2 * M_PI * curve * signal) + 0.5f) * signal;
  return signal;
}


x86 assembly (clang, -O0):
<waveshaper_sine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%edi
call   1030 <sin@plt>
movss  0xeb3(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waveshaper_sine>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cvtsi2ss %eax,%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm0,%xmm2
cvttss2si %xmm2,%edi
call   1030 <sin@plt>
movss  0xec1(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  %xmm1,%xmm0
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global i32 0
define float @waveshaper_sine(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load i32, i32* @M_PI
%6 = mul nsw i32 2, %5
%7 = sitofp i32 %6 to float
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = load float, float* %3
%11 = fmul float %9, %10
%12 = fptosi float %11 to i32
%13 = call float @sin(i32 %12)
%14 = call float @llvm.fmuladd.f32(float 5.000000e-01, float %13, float 5.000000e-01)
%15 = load float, float* %3
%16 = fmul float %14, %15
store float %16, float* %3
%17 = load float, float* %3
ret float %17
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @waveshaper_sine(float %0, float %1) {
%3 = load i32, i32* @M_PI
%4 = shl nsw i32 %3, 1
%5 = sitofp i32 %4 to float
%6 = fmul float %5, %1
%7 = fmul float %6, %0
%8 = fptosi float %7 to i32
%9 = tail call float @sin(i32 %8)
%10 = tail call float @llvm.fmuladd.f32(float %9, float 5.000000e-01, float 5.000000e-01)
%11 = fmul float %10, %0
ret float %11
}
/* Variables and functions */
double exp(double);
double func(double x) { return exp(-1.0 * x); }


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
xorps  0xee9(%rip),%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @func(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double -1.000000e+00, %3
%5 = call double @exp(double %4)
ret double %5
}

LLVM IR (-O2):
define double @func(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
ret double %3
}
/* Variables and functions */
int fnmatchx(char const *, char const *, int, int);
int fnmatch(const char *pattern, const char *string, int flags) {
  return fnmatchx(pattern, string, flags, 64);
}


x86 assembly (clang, -O0):
<fnmatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x40,%ecx
call   1030 <fnmatchx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnmatch>:
mov    $0x40,%ecx
jmp    1030 <fnmatchx@plt>

LLVM IR (-O0):
define i32 @fnmatch(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @fnmatchx(i8* %7, i8* %8, i32 %9, i32 64)
ret i32 %10
}

LLVM IR (-O2):
define i32 @fnmatch(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @fnmatchx(i8* %0, i8* %1, i32 %2, i32 64)
ret i32 %4
}
/* Variables and functions */
int PAPI_add_events(int, int *, int);
void PAPIF_ADD_EVENTS(int *EventSet, int *Events, int *number, int *check) {
  *check = PAPI_add_events(*EventSet, Events, *number);
}


x86 assembly (clang, -O0):
<PAPIF_ADD_EVENTS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
call   1030 <PAPI_add_events@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_ADD_EVENTS>:
push   %rbx
mov    %rcx,%rbx
mov    (%rdi),%edi
mov    (%rdx),%edx
call   1030 <PAPI_add_events@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_ADD_EVENTS(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32, i32* %12
%14 = call i32 @PAPI_add_events(i32 %10, i32* %11, i32 %13)
%15 = load i32*, i32** %8
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @PAPIF_ADD_EVENTS(i32* nocapture %0, i32* %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = load i32, i32* %2
%7 = tail call i32 @PAPI_add_events(i32 %5, i32* %1, i32 %6)
store i32 %7, i32* %3
ret void
}
/* Variables and functions */
int fetch_common_data(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @fetch_common_data() {
ret i32 -1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ y;
};
struct TYPE_4__ {
  TYPE_1__ xbutton;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xbutton_y(void *_p) { return (int)((XEvent *)_p)->xbutton.y; }


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xbutton_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
float elCollV1(float sp1, float sp2, float m1, float m2) {
  return ((sp1 * (m1 - m2)) + (2 * m2 * sp2)) / (m1 + m2);
}


x86 assembly (clang, -O0):
<elCollV1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
subss  -0x10(%rbp),%xmm2
movss  0xed1(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
addss  -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<elCollV1>:
movaps %xmm2,%xmm4
subss  %xmm3,%xmm4
addss  %xmm3,%xmm2
addss  %xmm3,%xmm3
mulss  %xmm1,%xmm3
mulss  %xmm4,%xmm0
addss  %xmm3,%xmm0
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @elCollV1(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %7
%11 = load float, float* %8
%12 = fsub float %10, %11
%13 = load float, float* %8
%14 = fmul float 2.000000e+00, %13
%15 = load float, float* %6
%16 = fmul float %14, %15
%17 = call float @llvm.fmuladd.f32(float %9, float %12, float %16)
%18 = load float, float* %7
%19 = load float, float* %8
%20 = fadd float %18, %19
%21 = fdiv float %17, %20
ret float %21
}

LLVM IR (-O2):
define float @elCollV1(float %0, float %1, float %2, float %3) {
%5 = fsub float %2, %3
%6 = fmul float %3, 2.000000e+00
%7 = fmul float %6, %1
%8 = tail call float @llvm.fmuladd.f32(float %0, float %5, float %7)
%9 = fadd float %2, %3
%10 = fdiv float %8, %9
ret float %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
FILE *areaConfCreate(void) {
  FILE *fp, *fopen();
  if ((fp = fopen("area.conf", "w")) == NULL)
    perror("area.conf");
  return fp;
}


x86 assembly (clang, -O0):
<areaConfCreate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1155 <areaConfCreate+0x35>
lea    0xeb0(%rip),%rdi
call   1040 <perror@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<areaConfCreate>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <areaConfCreate+0x21>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
jmp    113c <areaConfCreate+0x1c>

LLVM IR (-O0):
@.str = [10 x i8] c"area.conf\00"
@.str.1 = [2 x i8] c"w\00"
define i32* @areaConfCreate() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = load i32*, i32** %1
ret i32* %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"area.conf\00"
@.str.1 = [2 x i8] c"w\00"
define noalias i32* @areaConfCreate() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32* %1
}
int fn(int arr[][10]) { return 0; }


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

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

LLVM IR (-O0):
define i32 @fn([10 x i32]* %0) {
%2 = alloca [10 x i32]*
store [10 x i32]* %0, [10 x i32]** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @fn([10 x i32]* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ timer_t;
struct itimerspec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int timer_gettime(timer_t timerid, struct itimerspec *value) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<timer_gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_gettime>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.itimerspec = type { i32 }
@ENOSYS = global i32 0
define i32 @timer_gettime(i32 %0, %struct.itimerspec* %1) {
%3 = alloca i32
%4 = alloca %struct.itimerspec*
store i32 %0, i32* %3
store %struct.itimerspec* %1, %struct.itimerspec** %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
%struct.itimerspec = type { i32 }
@ENOSYS = global i32 0
define i32 @timer_gettime(i32 %0, %struct.itimerspec* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
__attribute__((always_)) int
__test_and_change_bit(int nr, volatile unsigned long *addr) {
  int oldbit;
  asm volatile("btc %2,%1\n\t"
               "sbb %0,%0"
               : "=r"(oldbit), "+m"(*(volatile long *)(addr))
               : "Ir"(nr)
               : "memory");
  return oldbit;
}


x86 assembly (clang, -O0):
<__test_and_change_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
btc    %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__test_and_change_bit>:
btc    %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__test_and_change_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = load i32, i32* %3
%8 = call i32 asm sideeffect "btc $2,$1\0A\09sbb $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %6, i32 %7, i64* elementtype(i64) %6)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @__test_and_change_bit(i32 %0, i64* %1) {
%3 = tail call i32 asm sideeffect "btc $2,$1\0A\09sbb $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0, i64* elementtype(i64) %1)
ret i32 %3
}
int extractListNoMalloc_il(void *ail, unsigned int id, unsigned int *list,
                           unsigned int *len) {
  1;
}


x86 assembly (clang, -O0):
<extractListNoMalloc_il>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @extractListNoMalloc_il(i8* %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @extractListNoMalloc_il(i8* nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i32* nocapture readnone %3) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int null_readtoc_session(uint8_t id, uint8_t *b, int msf, int maxlen) {
  return (0);
}


x86 assembly (clang, -O0):
<null_readtoc_session>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @null_readtoc_session(i32 %0, i32* nocapture readnone %1, i32 %2, i32 %3) {
ret i32 0
}
/* Type definitions */
struct window_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ init_window_state(struct window_state *, double, double,
                                     double, double, double, double);
void init_default_new_size(struct window_state *state, double size) {
  init_window_state(state, -1.0, -1.0, 1.0, 1.0, size, 0.01);
}


x86 assembly (clang, -O0):
<init_default_new_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm4
movsd  0xece(%rip),%xmm1
movsd  0xece(%rip),%xmm3
movsd  0xece(%rip),%xmm5
movaps %xmm1,%xmm0
movaps %xmm3,%xmm2
call   1030 <init_window_state@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_default_new_size>:
movaps %xmm0,%xmm4
movsd  0xee5(%rip),%xmm0
movsd  0xee5(%rip),%xmm2
movsd  0xee5(%rip),%xmm5
movaps %xmm0,%xmm1
movaps %xmm2,%xmm3
jmp    1030 <init_window_state@plt>

LLVM IR (-O0):
%struct.window_state = type { i32 }
define void @init_default_new_size(%struct.window_state* %0, double %1) {
%3 = alloca %struct.window_state*
%4 = alloca double
store %struct.window_state* %0, %struct.window_state** %3
store double %1, double* %4
%5 = load %struct.window_state*, %struct.window_state** %3
%6 = load double, double* %4
%7 = call i32 @init_window_state(%struct.window_state* %5, double -1.000000e+00, double -1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %6, double 1.000000e-02)
ret void
}

LLVM IR (-O2):
%struct.window_state = type { i32 }
define void @init_default_new_size(%struct.window_state* %0, double %1) {
%3 = tail call i32 @init_window_state(%struct.window_state* %0, double -1.000000e+00, double -1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %1, double 1.000000e-02)
ret void
}
/* Variables and functions */
double fabs(float);
int eq(float x, float y) { return (fabs(x - y) < 1.0e-6); }


x86 assembly (clang, -O0):
<eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xec4(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
push   %rax
subss  %xmm1,%xmm0
call   1030 <fabs@plt>
movsd  0xede(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @eq(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fsub float %5, %6
%8 = call double @fabs(float %7)
%9 = fcmp olt double %8, 0x3EB0C6F7A0B5ED8D
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @eq(float %0, float %1) {
%3 = fsub float %0, %1
%4 = tail call double @fabs(float %3)
%5 = fcmp olt double %4, 0x3EB0C6F7A0B5ED8D
%6 = zext i1 %5 to i32
ret i32 %6
}
int inlocuieste(char *sir, char ch, char recp) {}


x86 assembly (clang, -O0):
<inlocuieste>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @inlocuieste(i8* nocapture readnone %0, i8 signext %1, i8 signext %2) {
ret i32 undef
}
/* Variables and functions */
int is_valid_id(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", is_valid_id("int;"));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1040 <is_valid_id@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"int;\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @is_valid_id(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"int;\00"
define i32 @main() {
%1 = tail call i32 @is_valid_id(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int strncmp(char *, char *, int);
int check_magic(char *ident) {
  int check = strncmp(ident + 1, "ELF", 3);
  return (ident[0] == 0x7f && check == 0) ? 1 : 0;
}


x86 assembly (clang, -O0):
<check_magic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x7f,%ecx
mov    %al,-0xd(%rbp)
jne    1157 <check_magic+0x47>
cmpl   $0x0,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_magic>:
push   %rbx
mov    %rdi,%rbx
add    $0x1,%rdi
lea    0xee1(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmpb   $0x7f,(%rbx)
sete   %cl
test   %eax,%eax
sete   %al
and    %cl,%al
movzbl %al,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"ELF\00"
define i32 @check_magic(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = call i32 @strncmp(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 127
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 0
br label %15
15: ; preds = %12, %1
%16 = phi i1 [ false, %1 ], [ %14, %12 ]
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 1, i32 0
ret i32 %18
}

LLVM IR (-O2):
@.str = [4 x i8] c"ELF\00"
define i32 @check_magic(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = tail call i32 @strncmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 127
%6 = icmp eq i32 %3, 0
%7 = select i1 %5, i1 %6, i1 false
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int rand();
int randomNumber(void) {
  int n;
  n = rand();
  n %= 7;
  return (n);
}


x86 assembly (clang, -O0):
<randomNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomNumber>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rcx
imul   $0xffffffff92492493,%rcx,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%edx
shr    $0x1f,%edx
sar    $0x2,%eax
add    %edx,%eax
lea    0x0(,%rax,8),%edx
sub    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @randomNumber() {
%1 = alloca i32
%2 = call i32 (...) @rand()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = srem i32 %3, 7
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @randomNumber() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 7
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xe4() {
  Assert_real((isodigit(228) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              1145, ("isodigit should be 0 for 0xe4"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xe4\00"
define void @t_isodigit_0xe4() {
%1 = tail call i64 @isodigit(i32 228)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1145, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
char *messalloc(int n) {
  char *result;
  if (!(result = (char *)malloc(n))) {
    fprintf(stderr, "MALLOC failure reqesting %d bytes - aborting\n", n);
    exit(-1);
  }
  return result;
}


x86 assembly (clang, -O0):
<messalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1173 <messalloc+0x43>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<messalloc>:
push   %rbx
mov    %edi,%ebx
call   1040 <malloc@plt>
test   %rax,%rax
je     113f <messalloc+0xf>
pop    %rbx
ret
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"MALLOC failure reqesting %d bytes - aborting\0A\00"
define i8* @messalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i32, i32* %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"MALLOC failure reqesting %d bytes - aborting\0A\00"
define i8* @messalloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to i8*
ret i8* %9
}
/* Variables and functions */
scalar_t__ malloc(int);
char *realloc(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
int strlen(char *);
char *int_Para_String(int numero) {
  char *string;
  string = (char *)malloc(sizeof(char) * 200);
  sprintf(string, "%d", numero);
  string = realloc(string, sizeof(char) * strlen(string));
  return string;
}


x86 assembly (clang, -O0):
<int_Para_String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xc8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe99(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_Para_String>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0xc8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xea7(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <realloc@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @int_Para_String(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 200)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = sext i32 %11 to i64
%13 = mul i64 1, %12
%14 = trunc i64 %13 to i32
%15 = call i8* @realloc(i8* %9, i32 %14)
store i8* %15, i8** %3
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @int_Para_String(i32 %0) {
%2 = tail call i64 @malloc(i32 200)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = tail call i32 @strlen(i8* %3)
%6 = tail call i8* @realloc(i8* %3, i32 %5)
ret i8* %6
}
int add_one(int x, int y) { return x + 1; }


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

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

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

LLVM IR (-O2):
define i32 @add_one(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
ret i32 %3
}
/* Variables and functions */
int mx_chinode(int, char const *, short, short, int);
int mx_chown(int device, const char *path, short owner, short group) {
  return mx_chinode(device, path, owner, group, -1);
}


x86 assembly (clang, -O0):
<mx_chown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x12(%rbp),%ax
mov    $0xffffffff,%r8d
movswl %ax,%edx
movswl -0x14(%rbp),%ecx
call   1030 <mx_chinode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mx_chown>:
mov    $0xffffffff,%r8d
jmp    1030 <mx_chinode@plt>

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

LLVM IR (-O2):
define i32 @mx_chown(i32 %0, i8* %1, i16 signext %2, i16 signext %3) {
%5 = tail call i32 @mx_chinode(i32 %0, i8* %1, i16 signext %2, i16 signext %3, i32 -1)
ret i32 %5
}
int simulated_while_constant() {
  int i = 0;
  int j = 3 * i;
LOOP_COND:
  if (i < 30) {
    goto INCR;
  } else {
    goto RETURN;
  }
INCR:
  j = j + i;
  i++;
  goto LOOP_COND;
RETURN:
  return j;
}


x86 assembly (clang, -O0):
<simulated_while_constant>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
imul   $0x3,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1e,-0x4(%rbp)
jge    1121 <simulated_while_constant+0x21>
jmp    1126 <simulated_while_constant+0x26>
jmp    113d <simulated_while_constant+0x3d>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <simulated_while_constant+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @simulated_while_constant() {
ret i32 435
}
/* Variables and functions */
int /*<<< orphan*/ SP();
int /*<<< orphan*/ Z();
int /*<<< orphan*/ printf(char *);
void S() {
  printf("S -> ZS'\n");
  Z();
  SP();
}


x86 assembly (clang, -O0):
<S>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <Z@plt>
mov    $0x0,%al
call   1030 <SP@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<S>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <Z@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SP@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"S -> ZS'\0A\00"
define void @S() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @Z()
%3 = call i32 (...) @SP()
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"S -> ZS'\00"
define void @S() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @Z()
%3 = tail call i32 (...) @SP()
ret void
}
int tegra_cpu_edp_update_thermal_index(struct platform_device *pdev,
                                       unsigned long new_idx) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.platform_device = type opaque
define i32 @tegra_cpu_edp_update_thermal_index(%struct.platform_device* %0, i64 %1) {
%3 = alloca %struct.platform_device*
%4 = alloca i64
store %struct.platform_device* %0, %struct.platform_device** %3
store i64 %1, i64* %4
ret i32 0
}

LLVM IR (-O2):
%struct.platform_device = type opaque
define i32 @tegra_cpu_edp_update_thermal_index(%struct.platform_device* nocapture readnone %0, i64 %1) {
ret i32 0
}
void rop3_90_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D ^ T;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


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

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

LLVM IR (-O0):
define void @rop3_90_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%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* %7
%16 = zext i8 %15 to i32
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = xor i32 %18, -1
%20 = and i32 %16, %19
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = xor i32 %22, -1
%24 = and i32 %20, %23
%25 = load i8*, i8** %4
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = and i32 %27, %29
%31 = or i32 %24, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %6
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = trunc i32 %38 to i8
%40 = load i8*, i8** %4
store i8 %39, i8* %40
ret void
}

LLVM IR (-O2):
define void @rop3_90_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ERR_load_ERR_strings();
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
void dv_openssl_add_all_algorighms(void) {
  OpenSSL_add_all_algorithms();
  ERR_load_ERR_strings();
  ERR_load_crypto_strings();
}


x86 assembly (clang, -O0):
<dv_openssl_add_all_algorighms>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   1040 <ERR_load_ERR_strings@plt>
mov    $0x0,%al
call   1050 <ERR_load_crypto_strings@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dv_openssl_add_all_algorighms>:
push   %rax
xor    %eax,%eax
call   1030 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   1040 <ERR_load_ERR_strings@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <ERR_load_crypto_strings@plt>

LLVM IR (-O0):
define void @dv_openssl_add_all_algorighms() {
%1 = call i32 (...) @OpenSSL_add_all_algorithms()
%2 = call i32 (...) @ERR_load_ERR_strings()
%3 = call i32 (...) @ERR_load_crypto_strings()
ret void
}

LLVM IR (-O2):
define void @dv_openssl_add_all_algorighms() {
%1 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%2 = tail call i32 (...) @ERR_load_ERR_strings()
%3 = tail call i32 (...) @ERR_load_crypto_strings()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int draw_block4x4_uncompressed_rgb_half_float(const unsigned char *bitstring,
                                              unsigned int *image_buffer,
                                              int flags) {
  *(uint64_t *)&image_buffer[0] = *(uint64_t *)&bitstring[0];
  return 1;
}


x86 assembly (clang, -O0):
<draw_block4x4_uncompressed_rgb_half_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @draw_block4x4_uncompressed_rgb_half_float(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 = getelementptr inbounds i8, i8* %7, i64 0
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = load i32*, i32** %5
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
ret i32 1
}

LLVM IR (-O2):
define i32 @draw_block4x4_uncompressed_rgb_half_float(i8* nocapture %0, i32* nocapture writeonly %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %1
ret i32 1
}