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

/* Variables and functions */
int SIG_BLOCK;
int SIG_SETMASK;
int SIG_UNBLOCK;
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigprocmask(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void test(void) {
  int how;
  sigset_t set;
  sigset_t oset;
  int result;
  how = SIG_BLOCK;
  how = SIG_UNBLOCK;
  how = SIG_SETMASK;
  (void)sigemptyset(&set);
  result = sigprocmask(how, &set, &oset);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    %eax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%rax
mov    (%rax),%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <sigemptyset@plt>
mov    %rsp,%rdx
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <sigprocmask@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SIG_BLOCK = global i32 0
@SIG_UNBLOCK = global i32 0
@SIG_SETMASK = global i32 0
define void @test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = load i32, i32* @SIG_BLOCK
store i32 %5, i32* %1
%6 = load i32, i32* @SIG_UNBLOCK
store i32 %6, i32* %1
%7 = load i32, i32* @SIG_SETMASK
store i32 %7, i32* %1
%8 = call i32 @sigemptyset(i32* %2)
%9 = load i32, i32* %1
%10 = call i32 @sigprocmask(i32 %9, i32* %2, i32* %3)
store i32 %10, i32* %4
ret void
}

LLVM IR (-O2):
@SIG_BLOCK = global i32 0
@SIG_UNBLOCK = global i32 0
@SIG_SETMASK = global i32 0
define void @test() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* @SIG_SETMASK
%6 = call i32 @sigemptyset(i32* %1)
%7 = call i32 @sigprocmask(i32 %5, i32* %1, i32* %2)
ret void
}
/* Variables and functions */
int MMHGtoMB(double);
double MMHGtoKPA(double INHG) {
  double KPA = MMHGtoMB(INHG) / 10;
  return KPA;
}


x86 assembly (clang, -O0):
<MMHGtoKPA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <MMHGtoMB@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMHGtoKPA>:
push   %rax
call   1030 <MMHGtoMB@plt>
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @MMHGtoKPA(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @MMHGtoMB(double %4)
%6 = sdiv i32 %5, 10
%7 = sitofp i32 %6 to double
store double %7, double* %3
%8 = load double, double* %3
ret double %8
}

LLVM IR (-O2):
define double @MMHGtoKPA(double %0) {
%2 = tail call i32 @MMHGtoMB(double %0)
%3 = sdiv i32 %2, 10
%4 = sitofp i32 %3 to double
ret double %4
}
int pai(int i) { return i / 2; }


x86 assembly (clang, -O0):
<pai>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<pai>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @pai(i32 %0) {
%2 = sdiv i32 %0, 2
ret i32 %2
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ panic(char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *mstrdup(char *s) {
  char *p;
  p = (char *)malloc(strlen(s) + 1);
  if (p == NULL)
    panic("mstrdup");
  strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<mstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117c <mstrdup+0x3c>
lea    0xe89(%rip),%rdi
call   1050 <panic@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1169 <mstrdup+0x29>
lea    0xe9c(%rip),%rdi
call   1050 <panic@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"mstrdup\00"
define i8* @mstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @panic(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %1
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [8 x i8] c"mstrdup\00"
define i8* @mstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @panic(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
error() {
  printf("USE: comp.action NAME < input_file > output_file\n");
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"USE: comp.action NAME < input_file > output_file\0A\00"
define i32 @error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [49 x i8] c"USE: comp.action NAME < input_file > output_file\00"
define i32 @error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
void loadEnv() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void file_clear(unsigned long grp_size, FILE **f) {
  unsigned long i;
  for (i = 0; i < grp_size; i++) {
    fclose(f[i]);
  }
}


x86 assembly (clang, -O0):
<file_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1158 <file_clear+0x48>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <file_clear+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_clear>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1142 <file_clear+0x32>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <fclose@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <file_clear+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @file_clear(i64 %0, i32** nocapture %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i32*, i32** %1, i64 %5
%7 = load i32*, i32** %6
%8 = tail call i32 @fclose(i32* %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %0
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Type definitions */
struct sigaction {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
  printf(">>> sigaction, sig - %d\n", sig);
  return -1;
}


x86 assembly (clang, -O0):
<sigaction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigaction>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sigaction = type { i32 }
@.str = [25 x i8] c">>> sigaction, sig - %d\0A\00"
define i32 @sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2) {
%4 = alloca i32
%5 = alloca %struct.sigaction*
%6 = alloca %struct.sigaction*
store i32 %0, i32* %4
store %struct.sigaction* %1, %struct.sigaction** %5
store %struct.sigaction* %2, %struct.sigaction** %6
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 -1
}

LLVM IR (-O2):
%struct.sigaction = type { i32 }
@.str = [25 x i8] c">>> sigaction, sig - %d\0A\00"
define i32 @sigaction(i32 %0, %struct.sigaction* nocapture readnone %1, %struct.sigaction* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 -1
}
void kvmclock_create(void) {}


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

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

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

LLVM IR (-O2):
define void @kvmclock_create() {
ret void
}
/* Type definitions */
typedef int clock_t;

/* Variables and functions */
int CLOCKS_PER_SEC;
int clock();
int main() {
  clock_t start = clock(), diff;
  for (int i = 0; i < 1000000; i++) {
  }
  diff = clock() - start;
  int msec = diff * 1000 / CLOCKS_PER_SEC;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xf4240,-0x10(%rbp)
jge    1150 <main+0x40>
jmp    1142 <main+0x32>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <main+0x20>
mov    $0x0,%al
call   1030 <clock@plt>
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
imul   $0x3e8,-0xc(%rbp),%eax
mov    0x2e7d(%rip),%rcx
cltd
idivl  (%rcx)
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
xor    %eax,%eax
call   1030 <clock@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (...) @clock()
store i32 %6, i32* %2
store i32 0, i32* %4
br label %7
7: ; preds = %11, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 1000000
br i1 %9, label %10, label %14
10: ; preds = %7
br label %11
11: ; preds = %10
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
br label %7
14: ; preds = %7
%15 = call i32 (...) @clock()
%16 = load i32, i32* %2
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = mul nsw i32 %18, 1000
%20 = load i32, i32* @CLOCKS_PER_SEC
%21 = sdiv i32 %19, %20
store i32 %21, i32* %5
ret i32 0
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @clock()
%2 = tail call i32 (...) @clock()
ret i32 0
}
/* Variables and functions */
int pow(int, int);
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  int int_max;
  int a;
  int b;
  int_max = pow(2, sizeof(int) * 8 - 1) - 1;
  a = int_max - 100;
  b = int_max - 200;
  printf("int_max = %d\n", int_max);
  printf("%d + %d = %d\n", a, b, a + b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x1f,%esi
call   1040 <pow@plt>
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x64,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0xc8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x2,%edi
mov    $0x1f,%esi
call   1040 <pow@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%esi
lea    -0x65(%rbx),%r14d
lea    -0xc9(%rbx),%ebp
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    (%rbx,%rbx,1),%ecx
add    $0xfffffed2,%ecx
lea    0xeae(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"int_max = %d\0A\00"
@.str.1 = [14 x i8] c"%d + %d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @pow(i32 2, i32 31)
%6 = sub nsw i32 %5, 1
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 100
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 200
store i32 %10, i32* %4
%11 = load i32, i32* %2
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = add nsw i32 %15, %16
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %14, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"int_max = %d\0A\00"
@.str.1 = [14 x i8] c"%d + %d = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @pow(i32 2, i32 31)
%2 = add nsw i32 %1, -1
%3 = add nsw i32 %1, -101
%4 = add nsw i32 %1, -201
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %2)
%6 = add nsw i32 %3, %4
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %4, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PUT32(int, int);
void timer_init(void) {
  PUT32(0x2000B408, 0x00F90000);
  PUT32(0x2000B408, 0x00F90200);
}


x86 assembly (clang, -O0):
<timer_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2000b408,%edi
mov    $0xf90000,%esi
call   1030 <PUT32@plt>
mov    $0x2000b408,%edi
mov    $0xf90200,%esi
call   1030 <PUT32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_init>:
push   %rax
mov    $0x2000b408,%edi
mov    $0xf90000,%esi
call   1030 <PUT32@plt>
mov    $0x2000b408,%edi
mov    $0xf90200,%esi
pop    %rax
jmp    1030 <PUT32@plt>

LLVM IR (-O0):
define void @timer_init() {
%1 = call i32 @PUT32(i32 536917000, i32 16318464)
%2 = call i32 @PUT32(i32 536917000, i32 16318976)
ret void
}

LLVM IR (-O2):
define void @timer_init() {
%1 = tail call i32 @PUT32(i32 536917000, i32 16318464)
%2 = tail call i32 @PUT32(i32 536917000, i32 16318976)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_command(int);
void test_read_country_code(const void *test_data) { test_command(0x1007); }


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

x86 assembly (clang, -O2):
<test_read_country_code>:
mov    $0x1007,%edi
jmp    1030 <test_command@plt>

LLVM IR (-O0):
define void @test_read_country_code(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @test_command(i32 4103)
ret void
}

LLVM IR (-O2):
define void @test_read_country_code(i8* nocapture readnone %0) {
%2 = tail call i32 @test_command(i32 4103)
ret void
}
int d_blt_mr1(double *a1, double a2) { return (__builtin_isless(*a1, a2)); }


x86 assembly (clang, -O0):
<d_blt_mr1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_blt_mr1>:
xor    %eax,%eax
ucomisd (%rdi),%xmm0
seta   %al
ret

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

LLVM IR (-O2):
define i32 @d_blt_mr1(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fcmp olt double %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long double);
int /*<<< orphan*/ stdout;
void cutils_cout_long_double_print(long double number) {
  fprintf(stdout, "%Lf\n", number);
}


x86 assembly (clang, -O0):
<cutils_cout_long_double_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cout_long_double_print>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [5 x i8] c"%Lf\0A\00"
define void @cutils_cout_long_double_print(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load i32, i32* @stdout
%4 = load x86_fp80, x86_fp80* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), x86_fp80 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c"%Lf\0A\00"
define void @cutils_cout_long_double_print(x86_fp80 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), x86_fp80 %0)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int _is_file(char *pathname) {
  struct stat st;
  return stat(pathname, &st) == 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<_is_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @_is_file(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ sfree(void *);
__attribute__((always_)) void sfree_stack(void *ptr) { sfree(*(void **)ptr); }


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

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

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

LLVM IR (-O2):
define void @sfree_stack(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @sfree(i8* %3)
ret void
}
void test_work2(void *priv) {
  int *myintval = priv;
  printer(__func__, *myintval);
}


x86 assembly (clang, -O0):
<test_work2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_work2>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printer@plt>

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

LLVM IR (-O2):
@__func__.test_work2 = [11 x i8] c"test_work2\00"
define void @test_work2(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @printer to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.test_work2, i64 0, i64 0), i32 %3)
ret void
}
int f_i9(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7,
         int i8) {
  return i8;
}


x86 assembly (clang, -O0):
<f_i9>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    0x20(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_i9>:
mov    0x18(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @f_i9(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @f_i9(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 returned %8) {
ret i32 %8
}
void INT_Excep_DMAC_DMAC1I(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_DMAC_DMAC1I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void close_pipe_pair(int *p) {
  if (close(p[0]) == -1 || close(p[1]) == -1) {
    perror("error calling close() in close_pipe_pair()");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<close_pipe_pair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     1165 <close_pipe_pair+0x35>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    117f <close_pipe_pair+0x4f>
lea    0xe94(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_pipe_pair>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     114f <close_pipe_pair+0x1f>
mov    0x4(%rbx),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     114f <close_pipe_pair+0x1f>
pop    %rbx
ret
lea    0xeaa(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"error calling close() in close_pipe_pair()\00"
@EXIT_FAILURE = global i32 0
define void @close_pipe_pair(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = call i32 @close(i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = call i32 @close(i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %18
14: ; preds = %8, %1
%15 = call i32 @perror(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"error calling close() in close_pipe_pair()\00"
@EXIT_FAILURE = global i32 0
define void @close_pipe_pair(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @close(i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = tail call i32 @close(i32 %7)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %5, %1
%11 = tail call i32 @perror(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = tail call i32 @exit(i32 %12)
unreachable
14: ; preds = %5
ret void
}
/* Variables and functions */
scalar_t__ cpp();
scalar_t__ ifline();
void preprocess(void) {
  if (ifline())
    return;
  while (cpp())
    ;
}


x86 assembly (clang, -O0):
<preprocess>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ifline@plt>
cmp    $0x0,%rax
je     113a <preprocess+0x1a>
jmp    1155 <preprocess+0x35>
jmp    113f <preprocess+0x1f>
mov    $0x0,%al
call   1040 <cpp@plt>
cmp    $0x0,%rax
je     1155 <preprocess+0x35>
jmp    113f <preprocess+0x1f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<preprocess>:
push   %rax
xor    %eax,%eax
call   1030 <ifline@plt>
test   %rax,%rax
jne    113c <preprocess+0x1c>
nopl   (%rax)
xor    %eax,%eax
call   1040 <cpp@plt>
test   %rax,%rax
jne    1130 <preprocess+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @preprocess() {
%1 = call i64 (...) @ifline()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %9
4: ; preds = %0
br label %5
5: ; preds = %8, %4
%6 = call i64 (...) @cpp()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
br label %5
9: ; preds = %3, %5
ret void
}

LLVM IR (-O2):
define void @preprocess() {
%1 = tail call i64 (...) @ifline()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0, %3
%4 = tail call i64 (...) @cpp()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3, %0
ret void
}
void move32(void) {}


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

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

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

LLVM IR (-O2):
define void @move32() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint64_t;
typedef int /*<<< orphan*/ uint32_t;
typedef scalar_t__ B;

/* Variables and functions */
uint64_t integerify(const void *B, size_t r) {
  const uint32_t *X = (const void *)((uintptr_t)(B) + (2 * r - 1) * 64);
  return *X;
}


x86 assembly (clang, -O0):
<integerify>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x1,%rcx
sub    $0x1,%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<integerify>:
shl    $0x7,%rsi
mov    -0x40(%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @integerify(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = load i64, i64* %4
%9 = mul i64 2, %8
%10 = sub i64 %9, 1
%11 = mul i64 %10, 64
%12 = add i64 %7, %11
%13 = inttoptr i64 %12 to i8*
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @integerify(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = shl i64 %1, 7
%5 = add i64 %3, -64
%6 = add i64 %5, %4
%7 = inttoptr i64 %6 to i32*
%8 = load i32, i32* %7
ret i32 %8
}
int _get_zero_arr_size_int(const int *orig_x, unsigned int orig_offset) {
  const int *_gres_x = orig_x;
  unsigned int _gres = 0;
  if (_gres_x != 0) {
    _gres = orig_offset;
    _gres_x += orig_offset - 1;
    while (*_gres_x != 0) {
      _gres_x++;
      _gres++;
    }
  }
  return _gres;
}


x86 assembly (clang, -O0):
<_get_zero_arr_size_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116e <_get_zero_arr_size_int+0x6e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
je     1169 <_get_zero_arr_size_int+0x69>
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1142 <_get_zero_arr_size_int+0x42>
jmp    116e <_get_zero_arr_size_int+0x6e>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_zero_arr_size_int>:
test   %rdi,%rdi
je     112d <_get_zero_arr_size_int+0x2d>
mov    %esi,%eax
lea    -0x1(%rax),%ecx
cmpl   $0x0,(%rdi,%rcx,4)
je     112c <_get_zero_arr_size_int+0x2c>
lea    (%rdi,%rcx,4),%rcx
add    $0x4,%rcx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpl   $0x0,(%rcx)
lea    0x4(%rcx),%rcx
jne    1120 <_get_zero_arr_size_int+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_get_zero_arr_size_int(i32* %0, i32 %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = add i32 %1, -1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %4, %10
%11 = phi i32 [ %14, %10 ], [ %1, %4 ]
%12 = phi i32* [ %13, %10 ], [ %7, %4 ]
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = add i32 %11, 1
%15 = load i32, i32* %13
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %10
17: ; preds = %10, %4, %2
%18 = phi i32 [ 0, %2 ], [ %1, %4 ], [ %14, %10 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_4591() {
  Assert_real((isqrt(4591) == 67),
              "/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/stdlib/isqrt.c",
              1365, ("Integer square root of 4591 should be 67"));
}


x86 assembly (clang, -O0):
<t_sqrt_4591>:
push   %rbp
mov    %rsp,%rbp
mov    $0x11ef,%edi
call   1030 <isqrt@plt>
cmp    $0x43,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x555,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_4591>:
push   %rax
mov    $0x11ef,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x43,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x555,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 4591 should be 67\00"
define void @t_sqrt_4591() {
%1 = call i32 @isqrt(i32 4591)
%2 = icmp eq i32 %1, 67
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1365, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 4591 should be 67\00"
define void @t_sqrt_4591() {
%1 = tail call i32 @isqrt(i32 4591)
%2 = icmp eq i32 %1, 67
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1365, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DAY_6;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_day_6() { return nl_langinfo(DAY_6); }


x86 assembly (clang, -O0):
<langinfo_day_6>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_day_6>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@DAY_6 = global i32 0
define i8* @langinfo_day_6() {
%1 = load i32, i32* @DAY_6
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@DAY_6 = global i32 0
define i8* @langinfo_day_6() {
%1 = load i32, i32* @DAY_6
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char const *);
void startElement(void *userData, const char *name, const char **atts) {
  int i;
  int *depthPtr = userData;
  for (i = 0; i < *depthPtr; i++)
    putchar('\t');
  puts(name);
  *depthPtr += 1;
}


x86 assembly (clang, -O0):
<startElement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    116a <startElement+0x4a>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1143 <startElement+0x23>
mov    -0x10(%rbp),%rdi
call   1040 <puts@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startElement>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
cmpl   $0x0,(%rdi)
jle    1151 <startElement+0x31>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    (%rbx),%ebp
jl     1140 <startElement+0x20>
mov    %r14,%rdi
call   1040 <puts@plt>
addl   $0x1,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @startElement(i8* nocapture %0, i8* nocapture %1, i8** nocapture readnone %2) {
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3, %7
%8 = phi i32 [ %10, %7 ], [ 0, %3 ]
%9 = tail call i32 @putchar(i8 signext 9)
%10 = add nuw nsw i32 %8, 1
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %7, label %13
13: ; preds = %7, %3
%14 = tail call i32 @puts(i8* dereferenceable(1) %1)
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
ret void
}
void time_add(long *tv_sec_to, long *tv_nsec_to, long tv_sec, long tv_nsec) {
  *tv_sec_to = *tv_sec_to + tv_sec;
  *tv_nsec_to = *tv_nsec_to + tv_nsec;
  if (*tv_nsec_to > 1000000000L) {
    *tv_nsec_to = *tv_nsec_to - 1000000000L;
    *tv_sec_to = *tv_sec_to + 1;
  }
  return;
}


x86 assembly (clang, -O0):
<time_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x3b9aca00,(%rax)
jle    1170 <time_add+0x70>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
sub    $0x3b9aca00,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_add>:
add    %rdx,(%rdi)
add    (%rsi),%rcx
mov    %rcx,(%rsi)
cmp    $0x3b9aca01,%rcx
jl     1120 <time_add+0x20>
add    $0xffffffffc4653600,%rcx
mov    %rcx,(%rsi)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @time_add(i64* %0, i64* %1, i64 %2, i64 %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i64
store i64* %0, i64** %5
store i64* %1, i64** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64*, i64** %5
%10 = load i64, i64* %9
%11 = load i64, i64* %7
%12 = add nsw i64 %10, %11
%13 = load i64*, i64** %5
store i64 %12, i64* %13
%14 = load i64*, i64** %6
%15 = load i64, i64* %14
%16 = load i64, i64* %8
%17 = add nsw i64 %15, %16
%18 = load i64*, i64** %6
store i64 %17, i64* %18
%19 = load i64*, i64** %6
%20 = load i64, i64* %19
%21 = icmp sgt i64 %20, 1000000000
br i1 %21, label %22, label %31
22: ; preds = %4
%23 = load i64*, i64** %6
%24 = load i64, i64* %23
%25 = sub nsw i64 %24, 1000000000
%26 = load i64*, i64** %6
store i64 %25, i64* %26
%27 = load i64*, i64** %5
%28 = load i64, i64* %27
%29 = add nsw i64 %28, 1
%30 = load i64*, i64** %5
store i64 %29, i64* %30
br label %31
31: ; preds = %22, %4
ret void
}

LLVM IR (-O2):
define void @time_add(i64* nocapture %0, i64* nocapture %1, i64 %2, i64 %3) {
%5 = load i64, i64* %0
%6 = add nsw i64 %5, %2
store i64 %6, i64* %0
%7 = load i64, i64* %1
%8 = add nsw i64 %7, %3
store i64 %8, i64* %1
%9 = icmp sgt i64 %8, 1000000000
br i1 %9, label %10, label %14
10: ; preds = %4
%11 = add nsw i64 %8, -1000000000
store i64 %11, i64* %1
%12 = load i64, i64* %0
%13 = add nsw i64 %12, 1
store i64 %13, i64* %0
br label %14
14: ; preds = %10, %4
ret void
}
void P_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @P_RestoreConfig() {
ret void
}
void gtk_icon_view_set_orientation() {}


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

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

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

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

/* Variables and functions */
int i2c_write(int, int /*<<< orphan*/ *, int);
int i2c_write_byte(int file_handle, uint8_t value) {
  int return_value = i2c_write(file_handle, &value, 1);
  if (return_value < 0)
    return -1;
  else if (return_value != 1)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<i2c_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x1,%edx
call   1030 <i2c_write@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1148 <i2c_write_byte+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <i2c_write_byte+0x55>
cmpl   $0x1,-0x10(%rbp)
je     115e <i2c_write_byte+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <i2c_write_byte+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_write_byte>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edx
call   1030 <i2c_write@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @i2c_write_byte(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @i2c_write(i32 %0, i32* %3, i32 1)
%5 = icmp ne i32 %4, 1
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
unsigned int pow(int x) {
  unsigned int i, j;
  i = 0;
  j = 1;
  for (i = 0; i < x; i++)
    j *= 2;
  return j;
}


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    113f <pow+0x3f>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111c <pow+0x1c>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
test   %edi,%edi
je     1118 <pow+0x18>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    111e <pow+0x1e>
mov    $0x1,%eax
jmp    1138 <pow+0x38>
mov    $0x1,%eax
ret
and    $0xfffffff8,%edi
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
shl    $0x8,%eax
add    $0xfffffff8,%edi
jne    1130 <pow+0x30>
test   %ecx,%ecx
je     1147 <pow+0x47>
nopl   0x0(%rax)
add    %eax,%eax
add    $0xffffffff,%ecx
jne    1140 <pow+0x40>
ret

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

LLVM IR (-O2):
define i32 @pow(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %25, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 1, %7 ], [ %12, %9 ]
%11 = phi i32 [ 0, %7 ], [ %13, %9 ]
%12 = shl i32 %10, 8
%13 = add i32 %11, 8
%14 = icmp eq i32 %13, %8
br i1 %14, label %15, label %9
15: ; preds = %9, %3
%16 = phi i32 [ undef, %3 ], [ %12, %9 ]
%17 = phi i32 [ 1, %3 ], [ %12, %9 ]
%18 = icmp eq i32 %5, 0
br i1 %18, label %25, label %19
19: ; preds = %15, %19
%20 = phi i32 [ %22, %19 ], [ %17, %15 ]
%21 = phi i32 [ %23, %19 ], [ 0, %15 ]
%22 = shl i32 %20, 1
%23 = add i32 %21, 1
%24 = icmp eq i32 %23, %5
br i1 %24, label %25, label %19
25: ; preds = %15, %19, %1
%26 = phi i32 [ 1, %1 ], [ %16, %15 ], [ %22, %19 ]
ret i32 %26
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_xfsz(int sig) { printf("XFSZ\n"); }


x86 assembly (clang, -O0):
<catch_xfsz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catch_xfsz>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"XFSZ\0A\00"
define void @catch_xfsz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"XFSZ\00"
define void @catch_xfsz(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}