xunge/DecIR huggingface dataset:
/* Variables and functions */
int __GNU_MP_VERSION;
int __GNU_MP_VERSION_MINOR;
int __GNU_MP_VERSION_PATCHLEVEL;
char *gmp_version;
int /*<<< orphan*/ printf(char *, char *, int, int, int, char *);
int main(int argc, char **argv) {
  printf("%s: Compiled with gmp version %d.%d.%d; using %s\n", argv[0],
         __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL,
         gmp_version);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    0x2eb4(%rip),%rax
mov    (%rax),%edx
mov    0x2e93(%rip),%rax
mov    (%rax),%ecx
mov    0x2e92(%rip),%rax
mov    (%rax),%r8d
mov    0x2e78(%rip),%rax
mov    (%rax),%r9
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rsi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edx
mov    0x2eac(%rip),%rax
mov    (%rax),%ecx
mov    0x2eab(%rip),%rax
mov    (%rax),%r8d
mov    0x2e91(%rip),%rax
mov    (%rax),%r9
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"%s: Compiled with gmp version %d.%d.%d; using %s\0A\00"
@__GNU_MP_VERSION = global i32 0
@__GNU_MP_VERSION_MINOR = global i32 0
@__GNU_MP_VERSION_PATCHLEVEL = global i32 0
@gmp_version = global i8* null
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = load i32, i32* @__GNU_MP_VERSION
%10 = load i32, i32* @__GNU_MP_VERSION_MINOR
%11 = load i32, i32* @__GNU_MP_VERSION_PATCHLEVEL
%12 = load i8*, i8** @gmp_version
%13 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i32 %10, i32 %11, i8* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"%s: Compiled with gmp version %d.%d.%d; using %s\0A\00"
@__GNU_MP_VERSION = global i32 0
@__GNU_MP_VERSION_MINOR = global i32 0
@__GNU_MP_VERSION_PATCHLEVEL = global i32 0
@gmp_version = global i8* null
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i32, i32* @__GNU_MP_VERSION
%5 = load i32, i32* @__GNU_MP_VERSION_MINOR
%6 = load i32, i32* @__GNU_MP_VERSION_PATCHLEVEL
%7 = load i8*, i8** @gmp_version
%8 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4, i32 %5, i32 %6, i8* %7)
ret i32 0
}
void gdk_gc_get_screen() {}


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

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

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

LLVM IR (-O2):
define void @gdk_gc_get_screen() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fork();
int /*<<< orphan*/ setsid();
void spx_env_daemon() {
  pid_t pid;
  if ((pid = fork()) != 0) {
    exit(0);
  }
  setsid();
  if ((pid = fork()) != 0) {
    exit(0);
  }
  return;
}


x86 assembly (clang, -O0):
<spx_env_daemon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1152 <spx_env_daemon+0x22>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x0,%al
call   1030 <setsid@plt>
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1173 <spx_env_daemon+0x43>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spx_env_daemon>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
jne    1150 <spx_env_daemon+0x20>
xor    %eax,%eax
call   1030 <setsid@plt>
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
jne    1150 <spx_env_daemon+0x20>
pop    %rax
ret
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @spx_env_daemon() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 0)
unreachable
5: ; preds = %0
%6 = tail call i32 (...) @setsid()
%7 = tail call i32 (...) @fork()
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = tail call i32 @exit(i32 0)
unreachable
11: ; preds = %5
ret void
}
void loop(void) { return; }


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

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

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

LLVM IR (-O2):
define void @loop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHeader() {
  printf("inode,parent-inode,directory-depth,\"filename\"");
  printf(",\"fileExtension\",UID,GID,st_size,st_dev,st_blocks");
  printf(",st_nlink,\"st_mode\",st_atime,st_mtime,st_ctime,pw_fcount");
  printf(",pw_dirsum\n");
}


x86 assembly (clang, -O0):
<printHeader>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf5a(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHeader>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xefa(%rip),%rdi
call   1040 <printf@plt>
lea    0xf20(%rip),%rdi
call   1040 <printf@plt>
lea    0xf4d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"inode,parent-inode,directory-depth,\22filename\22\00"
@.str.1 = [50 x i8] c",\22fileExtension\22,UID,GID,st_size,st_dev,st_blocks\00"
@.str.2 = [57 x i8] c",st_nlink,\22st_mode\22,st_atime,st_mtime,st_ctime,pw_fcount\00"
@.str.3 = [12 x i8] c",pw_dirsum\0A\00"
define void @printHeader() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"inode,parent-inode,directory-depth,\22filename\22\00"
@.str.1 = [50 x i8] c",\22fileExtension\22,UID,GID,st_size,st_dev,st_blocks\00"
@.str.2 = [57 x i8] c",st_nlink,\22st_mode\22,st_atime,st_mtime,st_ctime,pw_fcount\00"
@str = [11 x i8] c",pw_dirsum\00"
define void @printHeader() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
int test31(void) {
  int a;
  if (a == 1)
    return 2;
  else if (a == 2)
    return 3;
  else
    return 1;
}


x86 assembly (clang, -O0):
<test31>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x1,-0x8(%rbp)
jne    111a <test31+0x1a>
movl   $0x2,-0x4(%rbp)
jmp    1137 <test31+0x37>
cmpl   $0x2,-0x8(%rbp)
jne    1130 <test31+0x30>
movl   $0x3,-0x4(%rbp)
jmp    1137 <test31+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test31() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ disable_int();
int /*<<< orphan*/ enable_int();
int /*<<< orphan*/ out_byte(int, unsigned int);
void set_cursor(unsigned int position) {
  disable_int();
  out_byte(0x3D4, 0xE);
  out_byte(0x3D5, (position >> 8) & 0xFF);
  out_byte(0x3D4, 0xF);
  out_byte(0x3D5, position & 0xFF);
  enable_int();
}


x86 assembly (clang, -O0):
<set_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <disable_int@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1050 <out_byte@plt>
mov    -0x4(%rbp),%esi
shr    $0x8,%esi
and    $0xff,%esi
mov    $0x3d5,%edi
call   1050 <out_byte@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1050 <out_byte@plt>
mov    -0x4(%rbp),%esi
and    $0xff,%esi
mov    $0x3d5,%edi
call   1050 <out_byte@plt>
mov    $0x0,%al
call   1030 <enable_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cursor>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <disable_int@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1050 <out_byte@plt>
movzbl %bh,%esi
mov    $0x3d5,%edi
call   1050 <out_byte@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1050 <out_byte@plt>
movzbl %bl,%esi
mov    $0x3d5,%edi
call   1050 <out_byte@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <enable_int@plt>

LLVM IR (-O0):
define void @set_cursor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @disable_int()
%4 = call i32 @out_byte(i32 980, i32 14)
%5 = load i32, i32* %2
%6 = lshr i32 %5, 8
%7 = and i32 %6, 255
%8 = call i32 @out_byte(i32 981, i32 %7)
%9 = call i32 @out_byte(i32 980, i32 15)
%10 = load i32, i32* %2
%11 = and i32 %10, 255
%12 = call i32 @out_byte(i32 981, i32 %11)
%13 = call i32 (...) @enable_int()
ret void
}

LLVM IR (-O2):
define void @set_cursor(i32 %0) {
%2 = tail call i32 (...) @disable_int()
%3 = tail call i32 @out_byte(i32 980, i32 14)
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = tail call i32 @out_byte(i32 981, i32 %5)
%7 = tail call i32 @out_byte(i32 980, i32 15)
%8 = and i32 %0, 255
%9 = tail call i32 @out_byte(i32 981, i32 %8)
%10 = tail call i32 (...) @enable_int()
ret void
}
double sign(double x) {
  if (x > 0)
    return 1;
  if (x < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112d <sign+0x2d>
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <sign+0x55>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    114d <sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <sign+0x55>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm2
cmpltsd %xmm1,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
cmpltsd %xmm0,%xmm1
movsd  0xee2(%rip),%xmm0
andpd  %xmm1,%xmm0
andnpd %xmm3,%xmm1
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sign(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+00, double* %2
br label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store double -1.000000e+00, double* %2
br label %12
11: ; preds = %7
store double 0.000000e+00, double* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @sign(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fcmp olt double %0, 0.000000e+00
%4 = select i1 %3, double -1.000000e+00, double 0.000000e+00
%5 = select i1 %2, double 1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
void ParseCommandLine(int argc, const char **argv) {
  int i;
  char buf[256];
  for (i = argc - 1; i >= 1; i--) {
    strcpy(buf, argv[i]);
  }
}


x86 assembly (clang, -O0):
<ParseCommandLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jl     115b <ParseCommandLine+0x4b>
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <ParseCommandLine+0x1b>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParseCommandLine>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
cmp    $0x2,%edi
jl     1149 <ParseCommandLine+0x39>
mov    %rsi,%r15
mov    %edi,%ebx
add    $0x1,%rbx
mov    %rsp,%r14
nopl   (%rax)
lea    -0x2(%rbx),%eax
mov    (%r15,%rax,8),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x2,%rbx
ja     1130 <ParseCommandLine+0x20>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ParseCommandLine(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %16
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ %7, %6 ], [ %10, %8 ]
%10 = add nsw i64 %9, -1
%11 = and i64 %10, 4294967295
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = call i32 @strcpy(i8* %4, i8* %13)
%15 = icmp ugt i64 %9, 2
br i1 %15, label %8, label %16
16: ; preds = %8, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sendByte(unsigned char, unsigned char const);
void sendBlock(unsigned char reg, int len, const unsigned char *buf) {
  buf += len;
  while (len-- > 0) {
    sendByte(reg, (*--buf));
  }
}


x86 assembly (clang, -O0):
<sendBlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    116d <sendBlock+0x5d>
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
movzbl %cl,%edi
movzbl -0x1(%rax),%esi
call   1030 <sendByte@plt>
jmp    1136 <sendBlock+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendBlock>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1149 <sendBlock+0x39>
mov    %rdx,%r14
mov    %esi,%ebx
movzbl %dil,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl -0x1(%r14,%rbx,1),%esi
mov    %ebp,%edi
call   1030 <sendByte@plt>
add    $0xffffffffffffffff,%rbx
lea    0x1(%rbx),%eax
cmp    $0x1,%eax
ja     1130 <sendBlock+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @sendBlock(i8 zeroext %0, i32 %1, i8* nocapture %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %16
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %2, i64 %6
br label %8
8: ; preds = %5, %8
%9 = phi i8* [ %12, %8 ], [ %7, %5 ]
%10 = phi i32 [ %11, %8 ], [ %1, %5 ]
%11 = add nsw i32 %10, -1
%12 = getelementptr inbounds i8, i8* %9, i64 -1
%13 = load i8, i8* %12
%14 = tail call i32 @sendByte(i8 zeroext %0, i8 zeroext %13)
%15 = icmp ugt i32 %10, 1
br i1 %15, label %8, label %16
16: ; preds = %8, %3
ret void
}
void main() {
  int a = 5;
  a = 6;
  const int a_const = 5;
  const float b_const = 5.0;
  int a1[5];
  float f = 1.0;
  f = 1 + 2.0;
  int ar[2][3] = {1, 2, 3, 4, 5, 6};
  int br[2][3] = {1, 2, 3};
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
movl   $0x6,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movss  0xee7(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xec5(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x50(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.ar = [2 x [3 x i32]] [[3 x i32] [i32 1, i32 2, i32 3], [3 x i32] [i32 4, i32 5, i32 6]]
@__const.main.br = [2 x [3 x i32]] [[3 x i32] [i32 1, i32 2, i32 3], [3 x i32] zeroinitializer]
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca [5 x i32]
%5 = alloca float
%6 = alloca [2 x [3 x i32]]
%7 = alloca [2 x [3 x i32]]
store i32 5, i32* %1
store i32 6, i32* %1
store i32 5, i32* %2
store float 5.000000e+00, float* %3
store float 1.000000e+00, float* %5
store float 3.000000e+00, float* %5
%8 = bitcast [2 x [3 x i32]]* %6 to i8*
%9 = bitcast [2 x [3 x i32]]* %7 to i8*
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
__attribute__((noclone, no, noipa)) char *get_max_2(char *p) { return p + 1; }


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

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

LLVM IR (-O0):
define i8* @get_max_2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
ret i8* %4
}

LLVM IR (-O2):
define i8* @get_max_2(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %2
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int set_quaddobl_state_to_silent(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(688, a, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<set_quaddobl_state_to_silent>:
mov    $0x2b0,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @set_quaddobl_state_to_silent() {
%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_c2phc(i32 688, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @set_quaddobl_state_to_silent() {
%1 = tail call i32 @_ada_use_c2phc(i32 688, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
bool arch_spin_is_locked(pthread_mutex_t *mutex) { return true; }


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

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

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

LLVM IR (-O2):
define i32 @arch_spin_is_locked(i32* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int urn();
int int_urn(int from, int to) {
  return (((int)(urn() * (to - from + 1))) + from);
}


x86 assembly (clang, -O0):
<int_urn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <urn@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_urn>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <urn@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
imul   %ebx,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @int_urn(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @urn()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = mul nsw i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @int_urn(i32 %0, i32 %1) {
%3 = tail call i32 (...) @urn()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = mul nsw i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
unsigned xrop3_139_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T ^ D;
  stk2 = S | stk3;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_139_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_139_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    $0xff,%eax
or     %ecx,%eax
xor    $0xffffff00,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_139_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 255
%8 = or i32 %7, %4
%9 = xor i32 %8, -256
ret i32 %9
}
int is_blank(char *str, int pos) {
  if (str[pos] == '\n' || str[pos] == ' ' || str[pos] == '\t') {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     114a <is_blank+0x4a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     114a <is_blank+0x4a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
jne    1156 <is_blank+0x56>
movl   $0x0,-0x4(%rbp)
jmp    115d <is_blank+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_blank>:
movslq %esi,%rax
movzbl (%rdi,%rax,1),%ecx
cmp    $0x20,%rcx
ja     1120 <is_blank+0x20>
xor    %eax,%eax
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_blank+0x20>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_blank(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 10
br i1 %12, label %29, label %13
13: ; preds = %2
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 32
br i1 %20, label %29, label %21
21: ; preds = %13
%22 = load i8*, i8** %4
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 9
br i1 %28, label %29, label %30
29: ; preds = %21, %13, %2
store i32 0, i32* %3
br label %31
30: ; preds = %21
store i32 1, i32* %3
br label %31
31: ; preds = %30, %29
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @is_blank(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 10, label %7
i8 32, label %7
i8 9, label %7
]
6: ; preds = %2
br label %7
7: ; preds = %2, %2, %2, %6
%8 = phi i32 [ 1, %6 ], [ 0, %2 ], [ 0, %2 ], [ 0, %2 ]
ret i32 %8
}
void do_undefined_instruction() {}


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

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

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

LLVM IR (-O2):
define void @do_undefined_instruction() {
ret void
}
int addone(int N) { return N + 1; }


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

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

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

LLVM IR (-O2):
define i32 @addone(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
unsigned int strlen(char *);
void kol_path_file2dir(char *dir, char *fname) {
  unsigned i;
  strcpy(dir, fname);
  for (i = strlen(dir);; --i)
    if ('/' == dir[i]) {
      dir[i] = '\0';
      return;
    }
}


x86 assembly (clang, -O0):
<kol_path_file2dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsbl (%rax,%rcx,1),%ecx
mov    $0x2f,%eax
cmp    %ecx,%eax
jne    1172 <kol_path_file2dir+0x52>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret
jmp    1177 <kol_path_file2dir+0x57>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1149 <kol_path_file2dir+0x29>

x86 assembly (clang, -O2):
<kol_path_file2dir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%ecx
add    $0xffffffff,%eax
cmpb   $0x2f,(%rbx,%rcx,1)
jne    1140 <kol_path_file2dir+0x20>
add    $0x1,%eax
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kol_path_file2dir(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
%4 = tail call i32 @strlen(i8* %0)
br label %5
5: ; preds = %5, %2
%6 = phi i32 [ %4, %2 ], [ %11, %5 ]
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 47
%11 = add i32 %6, -1
br i1 %10, label %12, label %5
12: ; preds = %5
%13 = zext i32 %6 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
store i8 0, i8* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x0e() {
  Assert_real((islower(14) == 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",
              75, ("islower should be 0 for 0x0e"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x0e>:
push   %rax
mov    $0xe,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4b,%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 0x0e\00"
define void @t_islower_0x0e() {
%1 = call i64 @islower(i32 14)
%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 75, 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 0x0e\00"
define void @t_islower_0x0e() {
%1 = tail call i64 @islower(i32 14)
%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 75, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double flog(double x, double r) { return (4.0 * r * x * (1.0 - x)); }


x86 assembly (clang, -O0):
<flog>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xef2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xed8(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<flog>:
mulsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xef4(%rip),%xmm2
subsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @flog(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fmul double 4.000000e+00, %5
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = load double, double* %3
%10 = fsub double 1.000000e+00, %9
%11 = fmul double %8, %10
ret double %11
}

LLVM IR (-O2):
define double @flog(double %0, double %1) {
%3 = fmul double %1, 4.000000e+00
%4 = fmul double %3, %0
%5 = fsub double 1.000000e+00, %0
%6 = fmul double %5, %4
ret double %6
}
/* Type definitions */
struct zedc_fifo {
  int dummy;
};

/* Variables and functions */
int fifo_used(struct zedc_fifo *);
unsigned int fifo_free(struct zedc_fifo *fifo) {
  return 256 - fifo_used(fifo) - 1;
}


x86 assembly (clang, -O0):
<fifo_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fifo_used@plt>
mov    %eax,%ecx
mov    $0x100,%eax
sub    %ecx,%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fifo_free>:
push   %rax
call   1030 <fifo_used@plt>
mov    $0xff,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.zedc_fifo = type { i32 }
define i32 @fifo_free(%struct.zedc_fifo* %0) {
%2 = alloca %struct.zedc_fifo*
store %struct.zedc_fifo* %0, %struct.zedc_fifo** %2
%3 = load %struct.zedc_fifo*, %struct.zedc_fifo** %2
%4 = call i32 @fifo_used(%struct.zedc_fifo* %3)
%5 = sub nsw i32 256, %4
%6 = sub nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
%struct.zedc_fifo = type { i32 }
define i32 @fifo_free(%struct.zedc_fifo* %0) {
%2 = tail call i32 @fifo_used(%struct.zedc_fifo* %0)
%3 = sub i32 255, %2
ret i32 %3
}
int term_signal_shared_katcp(struct katcp_shared *s) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.katcp_shared = type opaque
define i32 @term_signal_shared_katcp(%struct.katcp_shared* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ flip(int *, int);
void sort(int *pancakes, int pivot, int n) {
  flip(pancakes, pivot);
  flip(pancakes, n);
}


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

x86 assembly (clang, -O2):
<sort>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <flip@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <flip@plt>

LLVM IR (-O0):
define void @sort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = call i32 @flip(i32* %7, i32 %8)
%10 = load i32*, i32** %4
%11 = load i32, i32* %6
%12 = call i32 @flip(i32* %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @sort(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @flip(i32* %0, i32 %1)
%5 = tail call i32 @flip(i32* %0, i32 %2)
ret void
}
void raptor_user_linux_init(void) {}


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

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

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

LLVM IR (-O2):
define void @raptor_user_linux_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int8_t int_to_int8(int n) { return (int8_t)n; }


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

x86 assembly (clang, -O2):
<int_to_int8>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @int_to_int8(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int gameplay_items_item_placed(int, int);
int /*<<< orphan*/ gameplay_items_remove(int, int);
int gameplay_items_test_remove(int position_x, int position_y) {
  if (gameplay_items_item_placed(position_x, position_y) == 1) {
    gameplay_items_remove(position_x, position_y);
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<gameplay_items_test_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <gameplay_items_item_placed@plt>
cmp    $0x1,%eax
jne    1159 <gameplay_items_test_remove+0x39>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <gameplay_items_remove@plt>
movl   $0x1,-0x4(%rbp)
jmp    1160 <gameplay_items_test_remove+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gameplay_items_test_remove>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <gameplay_items_item_placed@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1143 <gameplay_items_test_remove+0x23>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <gameplay_items_remove@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @gameplay_items_test_remove(i32 %0, i32 %1) {
%3 = tail call i32 @gameplay_items_item_placed(i32 %0, i32 %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @gameplay_items_remove(i32 %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %8
}
int is_hour(int hora) {
  if (hora >= 0 && hora < 24) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_hour>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1127 <is_hour+0x27>
cmpl   $0x18,-0x8(%rbp)
jge    1127 <is_hour+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <is_hour+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hour>:
xor    %eax,%eax
cmp    $0x18,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_hour(i32 %0) {
%2 = icmp ult i32 %0, 24
%3 = zext i1 %2 to i32
ret i32 %3
}
int i_floor(float x) {
  int z;
  z = x;
  if (z + 1 > x) {
    return z;
  } else {
    return (z + 1);
  }
}


x86 assembly (clang, -O0):
<i_floor>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
cvttss2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1130 <i_floor+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <i_floor+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_floor>:
cvttss2si %xmm0,%ecx
lea    0x1(%rcx),%eax
cvtsi2ss %eax,%xmm1
ucomiss %xmm0,%xmm1
cmova  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @i_floor(float %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
%5 = load float, float* %3
%6 = fptosi float %5 to i32
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = sitofp i32 %8 to float
%10 = load float, float* %3
%11 = fcmp ogt float %9, %10
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = load i32, i32* %4
store i32 %13, i32* %2
br label %17
14: ; preds = %1
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @i_floor(float %0) {
%2 = fptosi float %0 to i32
%3 = add nsw i32 %2, 1
%4 = sitofp i32 %3 to float
%5 = fcmp ogt float %4, %0
%6 = select i1 %5, i32 %2, i32 %3
ret i32 %6
}
void foo047() {}


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

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

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

LLVM IR (-O2):
define void @foo047() {
ret void
}
void JvRunMainName(void) {}


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

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

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

LLVM IR (-O2):
define void @JvRunMainName() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
char *__bufFromFd(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ trim(char *);
char *__readString(char *name) {
  int fd;
  char *buf;
  fd = open(name, O_RDONLY);
  if (fd == -1)
    return NULL;
  buf = __bufFromFd(fd);
  if (buf)
    trim(buf);
  return buf;
}


x86 assembly (clang, -O0):
<__readString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1168 <__readString+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1190 <__readString+0x60>
mov    -0x14(%rbp),%edi
call   1040 <__bufFromFd@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1188 <__readString+0x58>
mov    -0x20(%rbp),%rdi
call   1030 <trim@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__readString>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
cmp    $0xffffffff,%eax
je     115d <__readString+0x2d>
mov    %eax,%edi
call   1040 <__bufFromFd@plt>
test   %rax,%rax
je     115d <__readString+0x2d>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <trim@plt>
jmp    115f <__readString+0x2f>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i8* @__readString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* @O_RDONLY
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %12
11: ; preds = %1
store i8* null, i8** %2
br label %22
12: ; preds = %1
%13 = load i32, i32* %4
%14 = call i8* @__bufFromFd(i32 %13)
store i8* %14, i8** %5
%15 = load i8*, i8** %5
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i8*, i8** %5
%19 = call i32 @trim(i8* %18)
br label %20
20: ; preds = %17, %12
%21 = load i8*, i8** %5
store i8* %21, i8** %2
br label %22
22: ; preds = %20, %11
%23 = load i8*, i8** %2
ret i8* %23
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i8* @__readString(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = tail call i8* @__bufFromFd(i32 %3)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @trim(i8* %6)
br label %10
10: ; preds = %5, %8, %1
%11 = phi i8* [ null, %1 ], [ %6, %8 ], [ null, %5 ]
ret i8* %11
}
int mmap_error(void *ptr) {
  long ret = (long)ptr;
  if (ret >= 0)
    return 0;
  if (ret < -2048)
    return 0;
  return (int)ret;
}


x86 assembly (clang, -O0):
<mmap_error>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jl     1127 <mmap_error+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1148 <mmap_error+0x48>
cmpq   $0xfffffffffffff800,-0x18(%rbp)
ff
jge    1141 <mmap_error+0x41>
movl   $0x0,-0x4(%rbp)
jmp    1148 <mmap_error+0x48>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmap_error>:
xor    %ecx,%ecx
cmp    $0xfffffffffffff800,%rdi
mov    %edi,%eax
cmovl  %ecx,%eax
test   %rdi,%rdi
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mmap_error(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp sge i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %17
10: ; preds = %1
%11 = load i64, i64* %4
%12 = icmp slt i64 %11, -2048
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 0, i32* %2
br label %17
14: ; preds = %10
%15 = load i64, i64* %4
%16 = trunc i64 %15 to i32
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %13, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @mmap_error(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = icmp sgt i8* %0, inttoptr (i64 -1 to i8*)
%4 = icmp slt i8* %0, inttoptr (i64 -2048 to i8*)
%5 = or i1 %3, %4
%6 = trunc i64 %2 to i32
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ usleep(int /*<<< orphan*/);
void time_sleep(uint64_t us) { usleep(us); }


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

x86 assembly (clang, -O2):
<time_sleep>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @time_sleep(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}