xunge/DecIR huggingface dataset:
/* Variables and functions */
int square(int);
int main(void) { return square(4); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x4,%edi
jmp    1030 <square@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @square(i32 4)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double get_initial_velocity(void) {
  double initial_velocity = 0.0;
  printf("Enter the initial velocity (mi/s): ");
  scanf("%lf", &initial_velocity);
  return initial_velocity;
}


x86 assembly (clang, -O0):
<get_initial_velocity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_initial_velocity>:
push   %rax
movq   $0x0,(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Enter the initial velocity (mi/s): \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_initial_velocity() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%4 = load double, double* %1
ret double %4
}

LLVM IR (-O2):
@.str = [36 x i8] c"Enter the initial velocity (mi/s): \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_initial_velocity() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ glutMainLoop();
void s2winMainLoop(void) { glutMainLoop(); }


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

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

LLVM IR (-O0):
define void @s2winMainLoop() {
%1 = call i32 (...) @glutMainLoop()
ret void
}

LLVM IR (-O2):
define void @s2winMainLoop() {
%1 = tail call i32 (...) @glutMainLoop()
ret void
}
void test69_Test_12_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test69_Test_12_targetInit__I() {
ret void
}
/* Variables and functions */
scalar_t__ test_and_set(int *, int);
int try_acquire_spinlock(int *lock) { return test_and_set(lock, 1) == 0; }


x86 assembly (clang, -O0):
<try_acquire_spinlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <test_and_set@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_acquire_spinlock>:
push   %rax
mov    $0x1,%esi
call   1030 <test_and_set@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @try_acquire_spinlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @test_and_set(i32* %3, i32 1)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @try_acquire_spinlock(i32* %0) {
%2 = tail call i64 @test_and_set(i32* %0, i32 1)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ displayTwoLineMessage(char *, char *);
int /*<<< orphan*/ getch();
void displayMessageAndWaitForKey(char *msg) {
  displayTwoLineMessage(msg, "(press any key)");
  getch();
}


x86 assembly (clang, -O0):
<displayMessageAndWaitForKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <displayTwoLineMessage@plt>
mov    $0x0,%al
call   1040 <getch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayMessageAndWaitForKey>:
push   %rax
lea    0xed8(%rip),%rsi
call   1030 <displayTwoLineMessage@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getch@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"(press any key)\00"
define void @displayMessageAndWaitForKey(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @displayTwoLineMessage(i8* %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"(press any key)\00"
define void @displayMessageAndWaitForKey(i8* %0) {
%2 = tail call i32 @displayTwoLineMessage(i8* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @getch()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int benchmark(void) {
  foo(400);
  return 0;
}


x86 assembly (clang, -O0):
<benchmark>:
push   %rbp
mov    %rsp,%rbp
mov    $0x190,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<benchmark>:
push   %rax
mov    $0x190,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @benchmark() {
%1 = call i32 @foo(i32 400)
ret i32 0
}

LLVM IR (-O2):
define i32 @benchmark() {
%1 = tail call i32 @foo(i32 400)
ret i32 0
}
void ionice_benice(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void fprint_push(FILE *stream, uint8_t direct) {
  fprintf(stream,
          "PUSH  "
          "0x%02X"
          "                      ",
          direct);
}


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

x86 assembly (clang, -O2):
<fprint_push>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"PUSH 0x%02X \00"
define void @fprint_push(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"PUSH 0x%02X \00"
define void @fprint_push(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int *__bnd_narrow_ptr_bounds(int *, int *, int);
int test(int *p) {
  int *p1 = __bnd_narrow_ptr_bounds(p - 10, p, sizeof(int) * 20);
  return p1[10];
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0xffffffffffffffd8,%rdi
mov    -0x8(%rbp),%rsi
mov    $0x50,%edx
call   1030 <__bnd_narrow_ptr_bounds@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    %rdi,%rsi
add    $0xffffffffffffffd8,%rdi
mov    $0x50,%edx
call   1030 <__bnd_narrow_ptr_bounds@plt>
mov    0x28(%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 -10
%6 = load i32*, i32** %2
%7 = call i32* @__bnd_narrow_ptr_bounds(i32* %5, i32* %6, i32 80)
store i32* %7, i32** %3
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 10
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @test(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 -10
%3 = tail call i32* @__bnd_narrow_ptr_bounds(i32* %2, i32* %0, i32 80)
%4 = getelementptr inbounds i32, i32* %3, i64 10
%5 = load i32, i32* %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int read_config_lines(int /*<<< orphan*/ *, unsigned short *);
int read_config(const char *pFile_parse, unsigned short *ptr) {
  FILE *cfp;
  int ret;
  if (!(cfp = fopen(pFile_parse, "r"))) {
    return (-1);
  }
  ret = read_config_lines(cfp, ptr);
  fclose(cfp);
  return (ret);
}


x86 assembly (clang, -O0):
<read_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    116a <read_config+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1189 <read_config+0x59>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <read_config_lines@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_config>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
lea    0xec2(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1164 <read_config+0x34>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <read_config_lines@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
jmp    1169 <read_config+0x39>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @read_config(i8* nocapture %0, i16* %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @read_config_lines(i32* %3, i16* %1)
%7 = tail call i32 @fclose(i32* %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int i, j, k;
  if (k == 42) {
    if (i == 10) {
      printf("1\n");
    }
    if (j == 12 && i != j) {
      printf("2\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2a,-0x10(%rbp)
jne    1166 <main+0x56>
cmpl   $0xa,-0x8(%rbp)
jne    113f <main+0x2f>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xc,-0xc(%rbp)
jne    1161 <main+0x51>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1161 <main+0x51>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
jmp    1166 <main+0x56>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int mkdir(char *, int);
int fb_lfs_mkdir(char *path, int perm) { return (mkdir(path, perm)); }


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

x86 assembly (clang, -O2):
<fb_lfs_mkdir>:
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @fb_lfs_mkdir(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @mkdir(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int write(int, void const *, size_t);
int hal_write(int fd, const void *buf, size_t nbytes) {
  return write(1, buf, nbytes);
}


x86 assembly (clang, -O0):
<hal_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hal_write>:
mov    $0x1,%edi
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @hal_write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 1, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ NotifyRadio1Second();
void Handle1SecInterrupt() { NotifyRadio1Second(); }


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

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

LLVM IR (-O0):
define void @Handle1SecInterrupt() {
%1 = call i32 (...) @NotifyRadio1Second()
ret void
}

LLVM IR (-O2):
define void @Handle1SecInterrupt() {
%1 = tail call i32 (...) @NotifyRadio1Second()
ret void
}
int main() {
  int int_var = 1;
  unsigned char *char_array = (unsigned char *)&int_var;
  if (char_array[0] == 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
jne    1136 <main+0x36>
movl   $0x0,-0x4(%rbp)
jmp    113d <main+0x3d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int _func_xpath_funcs(char *, void *, int, char *);
int _func_xpath_last(char *chunk, void *data) {
  return _func_xpath_funcs(chunk, data, 5, "last()");
}


x86 assembly (clang, -O0):
<_func_xpath_last>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
lea    0xecc(%rip),%rcx
call   1030 <_func_xpath_funcs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_func_xpath_last>:
lea    0xee9(%rip),%rcx
mov    $0x5,%edx
jmp    1030 <_func_xpath_funcs@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"last()\00"
define i32 @_func_xpath_last(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @_func_xpath_funcs(i8* %5, i8* %6, i32 5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@.str = [7 x i8] c"last()\00"
define i32 @_func_xpath_last(i8* %0, i8* %1) {
%3 = tail call i32 @_func_xpath_funcs(i8* %0, i8* %1, i32 5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
int get_line(void *line) { return (int)(*((char *)line + 1)) - 48; }


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

x86 assembly (clang, -O2):
<get_line>:
movsbl 0x1(%rdi),%eax
add    $0xffffffd0,%eax
ret

LLVM IR (-O0):
define i32 @get_line(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 48
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_line(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, -48
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ log_entry(char *, char *);
int system(char *);
int /*<<< orphan*/ web_s_restart();
void *web_c_restart_app(void) {
  if (system("touch /tmp/restart_app") == -1) {
    log_entry("/var/log/web_interface/web_interface.log",
              "Error creating restart file");
  }
  web_s_restart();
  return NULL;
}


x86 assembly (clang, -O0):
<web_c_restart_app>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <system@plt>
cmp    $0xffffffff,%eax
jne    115c <web_c_restart_app+0x2c>
lea    0xec7(%rip),%rdi
lea    0xee9(%rip),%rsi
call   1050 <log_entry@plt>
mov    $0x0,%al
call   1040 <web_s_restart@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<web_c_restart_app>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <system@plt>
cmp    $0xffffffff,%eax
jne    1155 <web_c_restart_app+0x25>
lea    0xece(%rip),%rdi
lea    0xef0(%rip),%rsi
call   1050 <log_entry@plt>
xor    %eax,%eax
call   1040 <web_s_restart@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"touch /tmp/restart_app\00"
@.str.1 = [41 x i8] c"/var/log/web_interface/web_interface.log\00"
@.str.2 = [28 x i8] c"Error creating restart file\00"
define i8* @web_c_restart_app() {
%1 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @log_entry(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = call i32 (...) @web_s_restart()
ret i8* null
}

LLVM IR (-O2):
@.str = [23 x i8] c"touch /tmp/restart_app\00"
@.str.1 = [41 x i8] c"/var/log/web_interface/web_interface.log\00"
@.str.2 = [28 x i8] c"Error creating restart file\00"
define noalias i8* @web_c_restart_app() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @log_entry(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 (...) @web_s_restart()
ret i8* null
}
void zcfree(void) {}


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

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

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

LLVM IR (-O2):
define void @zcfree() {
ret void
}
/* Type definitions */
struct mtp2 {
  int dummy;
};

/* Variables and functions */
int mtp2_setstate(struct mtp2 *, int /*<<< orphan*/);
int mtp2_stop(struct mtp2 *link) { return mtp2_setstate(link, 0); }


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

x86 assembly (clang, -O2):
<mtp2_stop>:
xor    %esi,%esi
jmp    1030 <mtp2_setstate@plt>

LLVM IR (-O0):
%struct.mtp2 = type { i32 }
define i32 @mtp2_stop(%struct.mtp2* %0) {
%2 = alloca %struct.mtp2*
store %struct.mtp2* %0, %struct.mtp2** %2
%3 = load %struct.mtp2*, %struct.mtp2** %2
%4 = call i32 @mtp2_setstate(%struct.mtp2* %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.mtp2 = type { i32 }
define i32 @mtp2_stop(%struct.mtp2* %0) {
%2 = tail call i32 @mtp2_setstate(%struct.mtp2* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  (void)argv;
  printf("%d\n", argc - 1);
  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    -0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void *memset(void *s, int c, size_t n) {
  while (n--)
    *(uint8_t *)s = (uint8_t)c;
  return s;
}


x86 assembly (clang, -O0):
<memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1138 <memset+0x38>
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    110f <memset+0xf>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset>:
mov    %rdi,%rax
test   %rdx,%rdx
je     110e <memset+0xe>
movslq %esi,%rcx
mov    %rcx,(%rax)
ret

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

LLVM IR (-O2):
define i8* @memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = bitcast i8* %0 to i64*
store i64 %6, i64* %7
br label %8
8: ; preds = %5, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x38() {
  Assert_real((isgraph(56)),
              "/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_isgraph.c",
              285, ("isgraph should be 1 for 8"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x38>:
push   %rax
mov    $0x38,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x11d,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for 8\00"
define void @t_isgraph_0x38() {
%1 = call i32 @isgraph(i32 56)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 285, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for 8\00"
define void @t_isgraph_0x38() {
%1 = tail call i32 @isgraph(i32 56)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 285, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int SPVcomp_desc(const void *spvE1, const void *spvE2) {
  int E1 = *((int *)spvE1);
  int E2 = *((int *)spvE2);
  if (E1 > E2)
    return -1;
  if (E1 < E2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<SPVcomp_desc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1136 <SPVcomp_desc+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <SPVcomp_desc+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <SPVcomp_desc+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <SPVcomp_desc+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPVcomp_desc>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @SPVcomp_desc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int print_help(char *exe) {
  printf("Usage:\n"
         "\t%1$s [<options>] [<file> ...]\n"
         "\n"
         "Options:\n"
         "\t-h: show this help and exit\n"
         "\t-v: print the version and exit\n"
         "\t-c: count the number of bytes\n"
         "\t-l: count the number of lines\n"
         "\t-w: count the number of words\n"
         "\t-m: same as -c\n"
         "\n",
         exe);
  return 0;
}


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

x86 assembly (clang, -O2):
<print_help>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [220 x i8] c"Usage:\0A\09%1$s [<options>] [<file> ...]\0A\0AOptions:\0A\09-h: show this help and exit\0A\09-v: print the version and exit\0A\09-c: count the number of bytes\0A\09-l: count the number of lines\0A\09-w: count the number of words\0A\09-m: same as -c\0A\0A\00"
define i32 @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([220 x i8], [220 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [220 x i8] c"Usage:\0A\09%1$s [<options>] [<file> ...]\0A\0AOptions:\0A\09-h: show this help and exit\0A\09-v: print the version and exit\0A\09-c: count the number of bytes\0A\09-l: count the number of lines\0A\09-w: count the number of words\0A\09-m: same as -c\0A\0A\00"
define i32 @print_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([220 x i8], [220 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void exithal(void) { exit(0); }


x86 assembly (clang, -O0):
<exithal>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<exithal>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @exithal() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @exithal() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ matNf_mult_vecNf_new(float *, float const *, float const *,
                                        int);
void mat3f_mult_vec3f_new(float result[3], const float m[9], const float v[3]) {
  matNf_mult_vecNf_new(result, m, v, 3);
}


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

x86 assembly (clang, -O2):
<mat3f_mult_vec3f_new>:
mov    $0x3,%ecx
jmp    1030 <matNf_mult_vecNf_new@plt>

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

LLVM IR (-O2):
define void @mat3f_mult_vec3f_new(float* %0, float* %1, float* %2) {
%4 = tail call i32 @matNf_mult_vecNf_new(float* %0, float* %1, float* %2, i32 3)
ret void
}
void add_extension(const char *extension) { (void)extension; }


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

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

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

LLVM IR (-O2):
define void @add_extension(i8* nocapture %0) {
ret void
}
int map_cell_offset(int value) {
  if (value > 100)
    return 100 / 10;
  if (value < 0)
    return 0;
  if (value < 10)
    return 0;
  int cell = ((float)value / 100) * (100 / 10);
  return cell;
}


x86 assembly (clang, -O0):
<map_cell_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jle    111d <map_cell_offset+0x1d>
movl   $0xa,-0x4(%rbp)
jmp    1173 <map_cell_offset+0x73>
cmpl   $0x0,-0x8(%rbp)
jge    1133 <map_cell_offset+0x33>
movl   $0x0,-0x4(%rbp)
jmp    1173 <map_cell_offset+0x73>
cmpl   $0xa,-0x8(%rbp)
jge    1149 <map_cell_offset+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1173 <map_cell_offset+0x73>
cvtsi2ssl -0x8(%rbp),%xmm0
movss  0xeae(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe9e(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_cell_offset>:
mov    $0xa,%eax
cmp    $0x64,%edi
jg     1129 <map_cell_offset+0x29>
xor    %eax,%eax
cmp    $0xa,%edi
jl     1129 <map_cell_offset+0x29>
cvtsi2ss %edi,%xmm0
divss  0xee3(%rip),%xmm0
mulss  0xedf(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @map_cell_offset(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 100
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 10, i32* %2
br label %23
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 0, i32* %2
br label %23
12: ; preds = %8
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 10
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 0, i32* %2
br label %23
16: ; preds = %12
%17 = load i32, i32* %3
%18 = sitofp i32 %17 to float
%19 = fdiv float %18, 1.000000e+02
%20 = fmul float %19, 1.000000e+01
%21 = fptosi float %20 to i32
store i32 %21, i32* %4
%22 = load i32, i32* %4
store i32 %22, i32* %2
br label %23
23: ; preds = %16, %15, %11, %7
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @map_cell_offset(i32 %0) {
%2 = icmp sgt i32 %0, 100
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 10
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = sitofp i32 %0 to float
%7 = fdiv float %6, 1.000000e+02
%8 = fmul float %7, 1.000000e+01
%9 = fptosi float %8 to i32
br label %10
10: ; preds = %3, %1, %5
%11 = phi i32 [ %9, %5 ], [ 10, %1 ], [ 0, %3 ]
ret i32 %11
}
/* Variables and functions */
double sqrt(double);
double libm_sqrt(double x) { return sqrt(x); }


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

x86 assembly (clang, -O2):
<libm_sqrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <libm_sqrt+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @libm_sqrt(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int module_dummy_init(Display *display) {
  (void)display;
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @module_dummy_init(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rush(int, int);
int main(void) {
  rush(5, 5);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%esi
mov    %esi,%edi
call   1030 <rush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x5,%esi
call   1030 <rush@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @rush(i32 5, i32 5)
ret i32 0
}
/* Variables and functions */
int f378(int *);
int f379(int *p) { return f378(p); }


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

x86 assembly (clang, -O2):
<f379>:
jmp    1030 <f378@plt>

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

LLVM IR (-O2):
define i32 @f379(i32* %0) {
%2 = tail call i32 @f378(i32* %0)
ret i32 %2
}
void scale_2d(double *out, double *a, double b) {
  *(out++) = *(a++) * b;
  *(out) = *(a++) * b;
}


x86 assembly (clang, -O0):
<scale_2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scale_2d>:
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
mulsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @scale_2d(double* nocapture writeonly %0, double* nocapture %1, double %2) {
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %1
%6 = fmul double %5, %2
%7 = getelementptr inbounds double, double* %0, i64 1
store double %6, double* %0
%8 = load double, double* %4
%9 = fmul double %8, %2
store double %9, double* %7
ret void
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int pause();
int /*<<< orphan*/ setup_signal_handler();
int main(int argc, char **argv) {
  setup_signal_handler();
  while (pause() == -1 && errno == EINTR)
    ;
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <setup_signal_handler@plt>
mov    $0x0,%al
call   1030 <pause@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x11(%rbp)
jne    117e <main+0x4e>
mov    0x2e75(%rip),%rax
mov    (%rax),%rax
mov    0x2e63(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    118e <main+0x5e>
jmp    1193 <main+0x63>
jmp    114d <main+0x1d>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <setup_signal_handler@plt>
mov    0x2e9e(%rip),%r14
mov    0x2e8f(%rip),%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <pause@plt>
cmp    $0xffffffff,%eax
jne    1164 <main+0x34>
mov    (%rbx),%rax
cmp    %rax,(%r14)
je     1150 <main+0x20>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
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 = call i32 (...) @setup_signal_handler()
br label %7
7: ; preds = %16, %2
%8 = call i32 (...) @pause()
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i64, i64* @errno
%12 = load i64, i64* @EINTR
%13 = icmp eq i64 %11, %12
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ false, %7 ], [ %13, %10 ]
br i1 %15, label %16, label %17
16: ; preds = %14
br label %7
17: ; preds = %14
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @setup_signal_handler()
br label %4
4: ; preds = %4, %2
%5 = tail call i32 (...) @pause()
%6 = icmp eq i32 %5, -1
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %4, label %11
11: ; preds = %4
%12 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int Q_strcasecmp(char const *, char const *);
int SortStricmp(const void *p1, const void *p2) {
  return Q_strcasecmp(*(const char **)p1, *(const char **)p2);
}


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

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

LLVM IR (-O0):
define i32 @SortStricmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @Q_strcasecmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @SortStricmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @Q_strcasecmp(i8* %4, i8* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void describe_timeout() {
  fprintf(stderr,
          "Timed out waiting for process start.\n"
          "Either bossd can't start process or process is already running\n"
          "In the latter case just stop process before running show command\n");
}


x86 assembly (clang, -O0):
<describe_timeout>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [166 x i8] c"Timed out waiting for process start.\0AEither bossd can't start process or process is already running\0AIn the latter case just stop process before running show command\0A\00"
define void @describe_timeout() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [166 x i8] c"Timed out waiting for process start.\0AEither bossd can't start process or process is already running\0AIn the latter case just stop process before running show command\0A\00"
define void @describe_timeout() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0))
ret void
}
float angleToRad(int angle) { return ((angle * 3.141593f) / 180.0f); }


x86 assembly (clang, -O0):
<angleToRad>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  0xef0(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xee0(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<angleToRad>:
cvtsi2ss %edi,%xmm0
mulss  0xef4(%rip),%xmm0
divss  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define float @angleToRad(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to float
%5 = fmul float %4, 0x400921FB80000000
%6 = fdiv float %5, 1.800000e+02
ret float %6
}

LLVM IR (-O2):
define float @angleToRad(i32 %0) {
%2 = sitofp i32 %0 to float
%3 = fmul float %2, 0x400921FB80000000
%4 = fdiv float %3, 1.800000e+02
ret float %4
}
int SGN(int x) { return (((x) >= 0) ? 1 : -1); }


x86 assembly (clang, -O0):
<SGN>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovge %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SGN>:
mov    %edi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @SGN(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 -1
ret i32 %6
}

LLVM IR (-O2):
define i32 @SGN(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 1, i32 -1
ret i32 %3
}
/* Variables and functions */
int inline_read(int volatile *);
__attribute__((no)) int foo_read(volatile int *mem) { return inline_read(mem); }


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

x86 assembly (clang, -O2):
<foo_read>:
jmp    1030 <inline_read@plt>

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

LLVM IR (-O2):
define i32 @foo_read(i32* %0) {
%2 = tail call i32 @inline_read(i32* %0)
ret i32 %2
}
/* Variables and functions */
int syscall(int, char const *, char const *);
int pivot_root(const char *new, const char *old) {
  return syscall(218, new, old);
}


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

x86 assembly (clang, -O2):
<pivot_root>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xda,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @pivot_root(i8* %0, i8* %1) {
%3 = tail call i32 @syscall(i32 218, i8* %0, i8* %1)
ret i32 %3
}