xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
__attribute((constructor)) void myinit(void) {
  open("t/test06.c", O_RDONLY);
  printf("If you see this, you lose!\n");
}


x86 assembly (clang, -O0):
<myinit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1040 <open@plt>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<myinit>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <open@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"t/test06.c\00"
@O_RDONLY = global i32 0
@.str.1 = [28 x i8] c"If you see this, you lose!\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @myinit, i8* null }]
define void @myinit() {
%1 = load i32, i32* @O_RDONLY
%2 = call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"t/test06.c\00"
@O_RDONLY = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @myinit, i8* null }]
@str = [27 x i8] c"If you see this, you lose!\00"
define void @myinit() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int fgSetCurFilePlace(FILE *fp, long fileplace) {
  if (fp == NULL) {
    fprintf(stderr, "fgSetCurFilePlace, param is null\n");
    return -1;
  }
  return fseek(fp, fileplace, SEEK_SET);
}


x86 assembly (clang, -O0):
<fgSetCurFilePlace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <fgSetCurFilePlace+0x3c>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <fgSetCurFilePlace+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgSetCurFilePlace>:
push   %rax
test   %rdi,%rdi
je     1135 <fgSetCurFilePlace+0x15>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
pop    %rax
jmp    1040 <fseek@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"fgSetCurFilePlace, param is null\0A\00"
@SEEK_SET = global i32 0
define i32 @fgSetCurFilePlace(i32* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
%6 = load i32*, i32** %4
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %16
11: ; preds = %2
%12 = load i32*, i32** %4
%13 = load i64, i64* %5
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"fgSetCurFilePlace, param is null\0A\00"
@SEEK_SET = global i32 0
define i32 @fgSetCurFilePlace(i32* %0, i64 %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %2
%8 = load i32, i32* @SEEK_SET
%9 = tail call i32 @fseek(i32* %0, i64 %1, i32 %8)
br label %10
10: ; preds = %7, %4
%11 = phi i32 [ -1, %4 ], [ %9, %7 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, int);
void xfree(void *ptr, int size) { munmap(ptr, size); }


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

x86 assembly (clang, -O2):
<xfree>:
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define void @xfree(i8* %0, i32 %1) {
%3 = tail call i32 @munmap(i8* %0, i32 %1)
ret void
}
void v3copy(const float *v1, float *v2) {
  register int i;
  for (i = 0; i < 3; i++)
    v2[i] = v1[i];
}


x86 assembly (clang, -O0):
<v3copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1145 <v3copy+0x45>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <v3copy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<v3copy>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rsi)
movss  0x4(%rdi),%xmm0
movss  %xmm0,0x4(%rsi)
movss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rsi)
ret

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

LLVM IR (-O2):
define void @v3copy(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
store float %3, float* %1
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %1, i64 1
store float %5, float* %6
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 2
store float %8, float* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glmSin3f(float *, float *);
void glmSin3f_(float angle[3]) { glmSin3f(angle, angle); }


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

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

LLVM IR (-O0):
define void @glmSin3f_(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float*, float** %2
%5 = call i32 @glmSin3f(float* %3, float* %4)
ret void
}

LLVM IR (-O2):
define void @glmSin3f_(float* %0) {
%2 = tail call i32 @glmSin3f(float* %0, float* %0)
ret void
}
/* Variables and functions */
int rnd();
int f3() { return rnd() & 1; }


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rnd@plt>
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rax
xor    %eax,%eax
call   1030 <rnd@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f3() {
%1 = call i32 (...) @rnd()
%2 = and i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @f3() {
%1 = tail call i32 (...) @rnd()
%2 = and i32 %1, 1
ret i32 %2
}
float sum(const float *const __restrict v, const unsigned n) {
  float s = 0.0f;
  const float *c = v + n;
  while (c-- > v)
    s += *c;
  return s;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x18(%rbp)
cmp    -0x8(%rbp),%rax
jbe    1155 <sum+0x55>
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1125 <sum+0x25>
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
test   %esi,%esi
je     111f <sum+0x1f>
mov    %esi,%eax
lea    (%rdi,%rax,4),%rax
xorps  %xmm0,%xmm0
nopl   (%rax)
addss  -0x4(%rax),%xmm0
add    $0xfffffffffffffffc,%rax
cmp    %rdi,%rax
ja     1110 <sum+0x10>
ret
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @sum(float* noalias %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca float
%6 = alloca float*
store float* %0, float** %3
store i32 %1, i32* %4
store float 0.000000e+00, float* %5
%7 = load float*, float** %3
%8 = load i32, i32* %4
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds float, float* %7, i64 %9
store float* %10, float** %6
br label %11
11: ; preds = %16, %2
%12 = load float*, float** %6
%13 = getelementptr inbounds float, float* %12, i32 -1
store float* %13, float** %6
%14 = load float*, float** %3
%15 = icmp ugt float* %12, %14
br i1 %15, label %16, label %21
16: ; preds = %11
%17 = load float*, float** %6
%18 = load float, float* %17
%19 = load float, float* %5
%20 = fadd float %19, %18
store float %20, float* %5
br label %11
21: ; preds = %11
%22 = load float, float* %5
ret float %22
}

LLVM IR (-O2):
define float @sum(float* noalias %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds float, float* %0, i64 %5
br label %7
7: ; preds = %4, %7
%8 = phi float* [ %10, %7 ], [ %6, %4 ]
%9 = phi float [ %12, %7 ], [ 0.000000e+00, %4 ]
%10 = getelementptr inbounds float, float* %8, i64 -1
%11 = load float, float* %10
%12 = fadd float %9, %11
%13 = icmp ugt float* %10, %0
br i1 %13, label %7, label %14
14: ; preds = %7, %2
%15 = phi float [ 0.000000e+00, %2 ], [ %12, %7 ]
ret float %15
}
/* Variables and functions */
short alaw_to_s16(unsigned char);
void alaw_dec(char *alaw_data, char *s16_data, int limit) {
  int i;
  for (i = 0; i < limit; i++) {
    ((signed short *)s16_data)[i] = alaw_to_s16((unsigned char)alaw_data[i]);
  }
}


x86 assembly (clang, -O0):
<alaw_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1164 <alaw_dec+0x54>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <alaw_to_s16@plt>
mov    %ax,%dx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <alaw_dec+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alaw_dec>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1148 <alaw_dec+0x38>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%edi
call   1030 <alaw_to_s16@plt>
mov    %ax,(%r14,%rbx,2)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <alaw_dec+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @alaw_dec(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %24, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %27
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call signext i16 @alaw_to_s16(i8 zeroext %17)
%19 = load i8*, i8** %5
%20 = bitcast i8* %19 to i16*
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i16, i16* %20, i64 %22
store i16 %18, i16* %23
br label %24
24: ; preds = %12
%25 = load i32, i32* %7
%26 = add nsw i32 %25, 1
store i32 %26, i32* %7
br label %8
27: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @alaw_dec(i8* nocapture %0, i8* nocapture writeonly %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %16
5: ; preds = %3
%6 = bitcast i8* %1 to i16*
%7 = zext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %14, %8 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call signext i16 @alaw_to_s16(i8 zeroext %11)
%13 = getelementptr inbounds i16, i16* %6, i64 %9
store i16 %12, i16* %13
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %7
br i1 %15, label %16, label %8
16: ; preds = %8, %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int type;
};
typedef TYPE_1__ XCirculateRequestEvent;

/* Variables and functions */
void set_XCirculateRequestEvent_type(void *_p, int _v) {
  ((XCirculateRequestEvent *)_p)->type = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XCirculateRequestEvent_type>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XCirculateRequestEvent_type(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %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 i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XCirculateRequestEvent_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int statlibfunc();
int main(void) { return statlibfunc(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <statlibfunc@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @statlibfunc()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @statlibfunc()
ret i32 %1
}
RX0AX1(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (p0[x0]) = (((char *)11111111)[x1]); }


x86 assembly (clang, -O0):
<RX0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,1),%dl
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0AX1>:
movslq %ecx,%rax
mov    0xa98ac7(%rax),%al
movslq %edx,%rcx
mov    %al,(%r8,%rcx,1)
ret

LLVM IR (-O0):
define i32 @RX0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* inttoptr (i64 11111111 to i8*), i64 %17
%19 = load i8, i8* %18
%20 = load i8*, i8** %12
%21 = load i32, i32* %10
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8 %19, i8* %23
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @RX0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture writeonly %4, i8* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i8, i8* inttoptr (i64 11111111 to i8*), i64 %7
%9 = load i8, i8* %8
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds i8, i8* %4, i64 %10
store i8 %9, i8* %11
ret i32 undef
}
/* Variables and functions */
char *blue_line(int);
int /*<<< orphan*/ blue_send(int, char *);
int /*<<< orphan*/ process_device_line(char *);
void process_list(int in_f, int out_f) {
  char *line;
  blue_send(in_f, "devices\n");
  line = blue_line(out_f);
  while (line) {
    process_device_line(line);
    line = blue_line(out_f);
  }
}


x86 assembly (clang, -O0):
<process_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    0xeb8(%rip),%rsi
call   1030 <blue_send@plt>
mov    -0x8(%rbp),%edi
call   1050 <blue_line@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     117e <process_list+0x4e>
mov    -0x10(%rbp),%rdi
call   1040 <process_device_line@plt>
mov    -0x8(%rbp),%edi
call   1050 <blue_line@plt>
mov    %rax,-0x10(%rbp)
jmp    1159 <process_list+0x29>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_list>:
push   %rbx
mov    %esi,%ebx
lea    0xec6(%rip),%rsi
call   1030 <blue_send@plt>
nop
mov    %ebx,%edi
call   1050 <blue_line@plt>
test   %rax,%rax
je     1156 <process_list+0x26>
mov    %rax,%rdi
call   1040 <process_device_line@plt>
jmp    1140 <process_list+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"devices\0A\00"
define void @process_list(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @blue_send(i32 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = call i8* @blue_line(i32 %8)
store i8* %9, i8** %5
br label %10
10: ; preds = %13, %2
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = call i32 @process_device_line(i8* %14)
%16 = load i32, i32* %4
%17 = call i8* @blue_line(i32 %16)
store i8* %17, i8** %5
br label %10
18: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"devices\0A\00"
define void @process_list(i32 %0, i32 %1) {
%3 = tail call i32 @blue_send(i32 %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i8* @blue_line(i32 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %9, %6 ], [ %4, %2 ]
%8 = tail call i32 @process_device_line(i8* %7)
%9 = tail call i8* @blue_line(i32 %1)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %6
11: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ integer_to_value(char *, char *, int);
void integer_to_money(char integer[], char money[]) {
  integer_to_value(integer, money, 8);
}


x86 assembly (clang, -O0):
<integer_to_money>:
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    $0x8,%edx
call   1030 <integer_to_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer_to_money>:
mov    $0x8,%edx
jmp    1030 <integer_to_value@plt>

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

LLVM IR (-O2):
define void @integer_to_money(i8* %0, i8* %1) {
%3 = tail call i32 @integer_to_value(i8* %0, i8* %1, i32 8)
ret void
}
main() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
bool nrf52_errata_118(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf52_errata_118() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf52_errata_118() {
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int mapcon_clear_maps(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(432, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<mapcon_clear_maps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1b0,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapcon_clear_maps>:
mov    $0x1b0,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @mapcon_clear_maps() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 432, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @mapcon_clear_maps() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 432, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
long double test1l(long double x) { return __builtin_sqrtl(x); }


x86 assembly (clang, -O0):
<test1l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sqrtl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1l>:
jmp    1030 <sqrtl@plt>

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

LLVM IR (-O2):
define x86_fp80 @test1l(x86_fp80 %0) {
%2 = tail call x86_fp80 @sqrtl(x86_fp80 %0)
ret x86_fp80 %2
}
const char *player_get_build_name_info(void) { return " Unknow "; }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c" Unknow \00"
define i8* @player_get_build_name_info() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x6c() {
  Assert_real((isprint(108)),
              "/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_isprint.c",
              545, ("isprint should be 1 for l"));
}


x86 assembly (clang, -O0):
<t_isprint_0x6c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6c,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x221,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x6c>:
push   %rax
mov    $0x6c,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x221,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for l\00"
define void @t_isprint_0x6c() {
%1 = call i32 @isprint(i32 108)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for l\00"
define void @t_isprint_0x6c() {
%1 = tail call i32 @isprint(i32 108)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int handleOptionsInternal(int, char **);
void handleOptions(int argc, char **argv) {
  int result = handleOptionsInternal(argc, argv);
  if (result != 0) {
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<handleOptions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <handleOptionsInternal@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1152 <handleOptions+0x32>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleOptions>:
push   %rax
call   1030 <handleOptionsInternal@plt>
test   %eax,%eax
jne    112c <handleOptions+0xc>
pop    %rax
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @handleOptions(i32 %0, i8** %1) {
%3 = tail call i32 @handleOptionsInternal(i32 %0, i8** %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %2
ret void
}
int ssock_update(struct ssock *self) { return 1; }


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

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

LLVM IR (-O0):
%struct.ssock = type opaque
define i32 @ssock_update(%struct.ssock* %0) {
%2 = alloca %struct.ssock*
store %struct.ssock* %0, %struct.ssock** %2
ret i32 1
}

LLVM IR (-O2):
%struct.ssock = type opaque
define i32 @ssock_update(%struct.ssock* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
double stdc_519EBB77(double);
double floor(double x) { return stdc_519EBB77(x); }


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

x86 assembly (clang, -O2):
<floor>:
jmp    1030 <stdc_519EBB77@plt>

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

LLVM IR (-O2):
define double @floor(double %0) {
%2 = tail call double @stdc_519EBB77(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x17() {
  Assert_real((islower(23) == 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_islower.c",
              120, ("islower should be 0 for 0x17"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x17>:
push   %rax
mov    $0x17,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x78,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x17\00"
define void @t_islower_0x17() {
%1 = tail call i64 @islower(i32 23)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 120, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void Sys_AppActivate(void) {}


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

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

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

LLVM IR (-O2):
define void @Sys_AppActivate() {
ret void
}
void __zero__(dp, len) register double *dp;
register int len;
{
  if ((len * sizeof(double)) > 0)
    memset(((char *)dp), '\0', (len * sizeof(double)));
}


x86 assembly (clang, -O0):
<__zero__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
cmp    $0x0,%rax
jbe    1144 <__zero__+0x34>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__zero__>:
test   %esi,%esi
je     1122 <__zero__+0x12>
movslq %esi,%rdx
shl    $0x3,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>
ret

LLVM IR (-O0):
define void @__zero__(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = mul i64 %6, 8
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load double*, double** %3
%11 = bitcast double* %10 to i8*
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = mul i64 %13, 8
br label %15
15: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @__zero__(double* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = sext i32 %1 to i64
%6 = shl nsw i64 %5, 3
%7 = bitcast double* %0 to i8*
tail call void @llvm.memset.p0i8.i64(i8* align 1 %7, i8 0, i64 %6, i1 false)
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ rul___emit_string(char *);
void rul__emit_tab(unsigned int number_of_tabs) {
  unsigned int i;
  assert(number_of_tabs >= 1);
  for (i = 0; i < number_of_tabs; i++)
    rul___emit_string("\t");
}


x86 assembly (clang, -O0):
<rul__emit_tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1169 <rul__emit_tab+0x49>
lea    0xeaa(%rip),%rdi
call   1030 <rul___emit_string@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <rul__emit_tab+0x23>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rul__emit_tab>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1040 <assert@plt>
test   %ebx,%ebx
je     114d <rul__emit_tab+0x2d>
lea    0xec2(%rip),%r14
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <rul___emit_string@plt>
add    $0xffffffff,%ebx
jne    1140 <rul__emit_tab+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\09\00"
define void @rul__emit_tab(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp uge i32 %4, 1
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
store i32 0, i32* %3
br label %8
8: ; preds = %14, %1
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp ult i32 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = call i32 @rul___emit_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12
%15 = load i32, i32* %3
%16 = add i32 %15, 1
store i32 %16, i32* %3
br label %8
17: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\09\00"
define void @rul__emit_tab(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp eq i32 %0, 0
br i1 %5, label %11, label %6
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ 0, %1 ]
%8 = tail call i32 @rul___emit_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = add nuw i32 %7, 1
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %6
11: ; preds = %6, %1
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int /*<<< orphan*/, int, int /*<<< orphan*/);
extern struct SN_env *spanish_ISO_8859_1_create_env(void) {
  return SN_create_env(0, 3, 0);
}


x86 assembly (clang, -O0):
<spanish_ISO_8859_1_create_env>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x3,%esi
mov    %edx,%edi
call   1030 <SN_create_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spanish_ISO_8859_1_create_env>:
xor    %edi,%edi
mov    $0x3,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @spanish_ISO_8859_1_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 0, i32 3, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @spanish_ISO_8859_1_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 0, i32 3, i32 0)
ret %struct.SN_env* %1
}
int do_436() { return 436; }


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

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

LLVM IR (-O0):
define i32 @do_436() {
ret i32 436
}

LLVM IR (-O2):
define i32 @do_436() {
ret i32 436
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtsi32_si128(int);
__m128i test_mm_cvtsi32_si128(int A) { return _mm_cvtsi32_si128(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvtsi32_si128>:
jmp    1030 <_mm_cvtsi32_si128@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvtsi32_si128(i32 %0) {
%2 = tail call i32 @_mm_cvtsi32_si128(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int f11_handler(char **save) {
  write_instr(0x00);
  write_imm(0x44);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<f11_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x44,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f11_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x44,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f11_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 68)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @f11_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 68)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
/* Type definitions */
struct dns_rr {
  int dummy;
};
struct dns_ptr {
  int dummy;
};
struct dns_packet {
  int dummy;
};
struct dns_ns {
  int dummy;
};

/* Variables and functions */
int dns_ns_parse(struct dns_ns *, struct dns_rr *, struct dns_packet *);
int dns_ptr_parse(struct dns_ptr *ptr, struct dns_rr *rr,
                  struct dns_packet *P) {
  return dns_ns_parse((struct dns_ns *)ptr, rr, P);
}


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

x86 assembly (clang, -O2):
<dns_ptr_parse>:
jmp    1030 <dns_ns_parse@plt>

LLVM IR (-O0):
%struct.dns_ptr = type { i32 }
%struct.dns_rr = type { i32 }
%struct.dns_packet = type { i32 }
%struct.dns_ns = type { i32 }
define i32 @dns_ptr_parse(%struct.dns_ptr* %0, %struct.dns_rr* %1, %struct.dns_packet* %2) {
%4 = alloca %struct.dns_ptr*
%5 = alloca %struct.dns_rr*
%6 = alloca %struct.dns_packet*
store %struct.dns_ptr* %0, %struct.dns_ptr** %4
store %struct.dns_rr* %1, %struct.dns_rr** %5
store %struct.dns_packet* %2, %struct.dns_packet** %6
%7 = load %struct.dns_ptr*, %struct.dns_ptr** %4
%8 = bitcast %struct.dns_ptr* %7 to %struct.dns_ns*
%9 = load %struct.dns_rr*, %struct.dns_rr** %5
%10 = load %struct.dns_packet*, %struct.dns_packet** %6
%11 = call i32 @dns_ns_parse(%struct.dns_ns* %8, %struct.dns_rr* %9, %struct.dns_packet* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.dns_ptr = type { i32 }
%struct.dns_rr = type { i32 }
%struct.dns_packet = type { i32 }
%struct.dns_ns = type { i32 }
define i32 @dns_ptr_parse(%struct.dns_ptr* %0, %struct.dns_rr* %1, %struct.dns_packet* %2) {
%4 = bitcast %struct.dns_ptr* %0 to %struct.dns_ns*
%5 = tail call i32 @dns_ns_parse(%struct.dns_ns* %4, %struct.dns_rr* %1, %struct.dns_packet* %2)
ret i32 %5
}
int hum_should_skip(int i, int j) { return !(j / i & 1); }


x86 assembly (clang, -O0):
<hum_should_skip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hum_should_skip>:
mov    %esi,%eax
cltd
idiv   %edi
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @hum_should_skip(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sdiv i32 %5, %6
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @hum_should_skip(i32 %0, i32 %1) {
%3 = sdiv i32 %1, %0
%4 = and i32 %3, 1
%5 = xor i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ int80(int, int /*<<< orphan*/, char *, int,
                         int /*<<< orphan*/, int /*<<< orphan*/);
int getc() {
  char a[2];
  int80(3, 0, a, 2, 0, 0);
  if (*a == 0)
    return -1;
  return *a;
}


x86 assembly (clang, -O0):
<getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x6(%rbp),%rdx
mov    $0x3,%edi
xor    %r9d,%r9d
mov    $0x2,%ecx
mov    %r9d,%esi
mov    %r9d,%r8d
call   1030 <int80@plt>
movsbl -0x6(%rbp),%eax
cmp    $0x0,%eax
jne    114d <getc+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <getc+0x44>
movsbl -0x6(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getc>:
push   %rax
lea    0x6(%rsp),%rdx
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x2,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <int80@plt>
mov    0x6(%rsp),%al
cmp    $0x1,%al
sbb    %ecx,%ecx
or     %al,%cl
movsbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getc() {
%1 = alloca i32
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 @int80(i32 3, i32 0, i8* %3, i32 2, i32 0, i32 0)
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 -1, i32* %1
br label %14
10: ; preds = %0
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
store i32 %13, i32* %1
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @getc() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 @int80(i32 3, i32 0, i8* %2, i32 2, i32 0, i32 0)
%4 = load i8, i8* %2
%5 = icmp eq i8 %4, 0
%6 = select i1 %5, i8 -1, i8 %4
%7 = sext i8 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
int /*<<< orphan*/ scanf(char *, double *);
double get_number(char coord_vector, int coord_num) {
  double temp_coord = 0.0;
  printf("Enter %c coord %d: ", coord_vector, coord_num);
  scanf("%lf", &temp_coord);
  return temp_coord;
}


x86 assembly (clang, -O0):
<get_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
lea    0xeba(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_number>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
movq   $0x0,(%rsp)
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter %c coord %d: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_number(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca double
store i8 %0, i8* %3
store i32 %1, i32* %4
store double 0.000000e+00, double* %5
%6 = load i8, i8* %3
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 signext %6, i32 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%10 = load double, double* %5
ret double %10
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter %c coord %d: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_number(i8 signext %0, i32 %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 signext %0, i32 %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = load double, double* %3
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ Reserved55_DriverIRQHandler();
__attribute__((weak)) void Reserved55_IRQHandler(void) {
  Reserved55_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @Reserved55_IRQHandler() {
%1 = call i32 (...) @Reserved55_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @Reserved55_IRQHandler() {
%1 = tail call i32 (...) @Reserved55_DriverIRQHandler()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int random_number() {
  int r;
  time_t t;
  srand((unsigned)time(&t));
  r = rand() % 2;
  return r;
}


x86 assembly (clang, -O0):
<random_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_number>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @random_number() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 @time(i32* %2)
%4 = trunc i64 %3 to i32
%5 = call i32 @srand(i32 %4)
%6 = call i32 (...) @rand()
%7 = srem i32 %6, 2
store i32 %7, i32* %1
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @random_number() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @time(i32* %1)
%4 = trunc i64 %3 to i32
%5 = call i32 @srand(i32 %4)
%6 = call i32 (...) @rand()
%7 = srem i32 %6, 2
ret i32 %7
}
void jump_start(void *init, void *exit_func, void *entry) {
  register long rsp __asm__("rsp") = init;
  register long rdx __asm__("rdx") = 0;
  __asm__ __volatile__("jmp *(%0)\n" : : "r"(entry), "r"(rsp), "r"(rdx) :);
}


x86 assembly (clang, -O0):
<jump_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rdx
mov    %rcx,%rsp
jmp    *(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<jump_start>:
mov    %rdx,%rax
mov    %rdi,%rsp
xor    %edx,%edx
jmp    *(%rax)
ret

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

LLVM IR (-O2):
define void @jump_start(i8* %0, i8* nocapture readnone %1, i8* %2) {
%4 = ptrtoint i8* %0 to i64
tail call void asm sideeffect "jmp *($0)\0A", "r,{rsp},{rdx},~{dirflag},~{fpsr},~{flags}"(i8* %2, i64 %4, i64 0)
ret void
}