xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, double, double,
                           double, double, double, int, double, int);
int /*<<< orphan*/ stderr;
void progress_pcg_v3(char *form, int in0, double in1, double in2, double in3,
                     double in4, double in5, int in6, double in7, int in8) {
  fprintf(stderr, form, in0, in1, in2, in3, in4, in5, in6, in7, in8);
}


x86 assembly (clang, -O0):
<progress_pcg_v3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
mov    %edx,-0x3c(%rbp)
movsd  %xmm5,-0x48(%rbp)
mov    %ecx,-0x4c(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
mov    -0x3c(%rbp),%ecx
movsd  -0x48(%rbp),%xmm5
mov    -0x4c(%rbp),%r8d
call   1030 <fprintf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<progress_pcg_v3>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @progress_pcg_v3(i8* %0, i32 %1, double %2, double %3, double %4, double %5, double %6, i32 %7, double %8, i32 %9) {
%11 = alloca i8*
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca i32
%19 = alloca double
%20 = alloca i32
store i8* %0, i8** %11
store i32 %1, i32* %12
store double %2, double* %13
store double %3, double* %14
store double %4, double* %15
store double %5, double* %16
store double %6, double* %17
store i32 %7, i32* %18
store double %8, double* %19
store i32 %9, i32* %20
%21 = load i32, i32* @stderr
%22 = load i8*, i8** %11
%23 = load i32, i32* %12
%24 = load double, double* %13
%25 = load double, double* %14
%26 = load double, double* %15
%27 = load double, double* %16
%28 = load double, double* %17
%29 = load i32, i32* %18
%30 = load double, double* %19
%31 = load i32, i32* %20
%32 = call i32 @fprintf(i32 %21, i8* %22, i32 %23, double %24, double %25, double %26, double %27, double %28, i32 %29, double %30, i32 %31)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @progress_pcg_v3(i8* %0, i32 %1, double %2, double %3, double %4, double %5, double %6, i32 %7, double %8, i32 %9) {
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* %0, i32 %1, double %2, double %3, double %4, double %5, double %6, i32 %7, double %8, i32 %9)
ret void
}
/* Variables and functions */
int euler86(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Result: %d", euler86(1000000));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Result: %d\00"
define i32 @main() {
%1 = tail call i32 @euler86(i32 1000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int async_read() {
  printf("Your system does not support async I/O\n");
  exit(169);
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"Your system does not support async I/O\0A\00"
define i32 @async_read() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 169)
unreachable
}

LLVM IR (-O2):
@str = [39 x i8] c"Your system does not support async I/O\00"
define i32 @async_read() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 169)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ INT8_MAX;
int /*<<< orphan*/ INT8_MIN;
int /*<<< orphan*/ xsd_integer_value(char const *, int /*<<< orphan*/,
                                     int /*<<< orphan*/);
int8_t xsd_int8_value(const char *literal) {
  return (int8_t)xsd_integer_value(literal, INT8_MIN, INT8_MAX);
}


x86 assembly (clang, -O0):
<xsd_int8_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
call   1030 <xsd_integer_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsd_int8_value>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
jmp    1030 <xsd_integer_value@plt>

LLVM IR (-O0):
@INT8_MIN = global i32 0
@INT8_MAX = global i32 0
define i32 @xsd_int8_value(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @INT8_MIN
%5 = load i32, i32* @INT8_MAX
%6 = call i32 @xsd_integer_value(i8* %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@INT8_MIN = global i32 0
@INT8_MAX = global i32 0
define i32 @xsd_int8_value(i8* %0) {
%2 = load i32, i32* @INT8_MIN
%3 = load i32, i32* @INT8_MAX
%4 = tail call i32 @xsd_integer_value(i8* %0, i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(char **);
int andysh_exit(char **args) {
  free(args);
  exit(0);
}


x86 assembly (clang, -O0):
<andysh_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define i32 @andysh_exit(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @free(i8** %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @andysh_exit(i8** nocapture %0) {
%2 = tail call i32 @free(i8** %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
int maximoR(int n, int v[]) {
  if (n == 1)
    return v[0];
  else {
    int x;
    x = maximoR(n - 1, v);
    if (x > v[n - 1])
      return x;
    else
      return v[n - 1];
  }
}


x86 assembly (clang, -O0):
<maximoR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1137 <maximoR+0x27>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <maximoR+0x70>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <maximoR@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jle    116d <maximoR+0x5d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <maximoR+0x70>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximoR>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
cmp    $0x1,%edi
jne    1121 <maximoR+0x11>
mov    (%r14),%eax
jmp    113d <maximoR+0x2d>
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
mov    %r14,%rsi
call   1030 <maximoR@plt>
mov    %eax,%ecx
movslq %ebx,%rax
mov    -0x4(%r14,%rax,4),%eax
cmp    %eax,%ecx
cmovg  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @maximoR(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 = icmp eq i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
store i32 %12, i32* %3
br label %35
13: ; preds = %2
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = load i32*, i32** %5
%17 = call i32 @maximoR(i32 %15, i32* %16)
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = load i32*, i32** %5
%20 = load i32, i32* %4
%21 = sub nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %19, i64 %22
%24 = load i32, i32* %23
%25 = icmp sgt i32 %18, %24
br i1 %25, label %26, label %28
26: ; preds = %13
%27 = load i32, i32* %6
store i32 %27, i32* %3
br label %35
28: ; preds = %13
%29 = load i32*, i32** %5
%30 = load i32, i32* %4
%31 = sub nsw i32 %30, 1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %29, i64 %32
%34 = load i32, i32* %33
store i32 %34, i32* %3
br label %35
35: ; preds = %28, %26, %9
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
define i32 @maximoR(i32 %0, i32* nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* %1
br label %6
6: ; preds = %4, %8
%7 = phi i32 [ %15, %8 ], [ %5, %4 ]
ret i32 %7
8: ; preds = %2
%9 = add nsw i32 %0, -1
%10 = tail call i32 @maximoR(i32 %9, i32* %1)
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i32, i32* %1, i64 %11
%13 = load i32, i32* %12
%14 = icmp sgt i32 %10, %13
%15 = select i1 %14, i32 %10, i32 %13
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ bgRed(char *);
int /*<<< orphan*/ printColor(int /*<<< orphan*/);
void cmBgRed(char *str) { printColor(bgRed(str)); }


x86 assembly (clang, -O0):
<cmBgRed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <bgRed@plt>
mov    %eax,%edi
call   1030 <printColor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmBgRed>:
push   %rax
call   1040 <bgRed@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <printColor@plt>

LLVM IR (-O0):
define void @cmBgRed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @bgRed(i8* %3)
%5 = call i32 @printColor(i32 %4)
ret void
}

LLVM IR (-O2):
define void @cmBgRed(i8* %0) {
%2 = tail call i32 @bgRed(i8* %0)
%3 = tail call i32 @printColor(i32 %2)
ret void
}
void TSM_Install(int rate) {}


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

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

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

LLVM IR (-O2):
define void @TSM_Install(i32 %0) {
ret void
}
/* Variables and functions */
unsigned long get_error_values(int /*<<< orphan*/, int, char const **, int *,
                               int /*<<< orphan*/ *, int /*<<< orphan*/ *);
unsigned long ERR_peek_last_error_line(const char **file, int *line) {
  return (get_error_values(0, 1, file, line, NULL, NULL));
}


x86 assembly (clang, -O0):
<ERR_peek_last_error_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %edi,%edi
mov    $0x1,%esi
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%r8
call   1030 <get_error_values@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ERR_peek_last_error_line>:
mov    %rsi,%rcx
mov    %rdi,%rdx
xor    %edi,%edi
mov    $0x1,%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <get_error_values@plt>

LLVM IR (-O0):
define i64 @ERR_peek_last_error_line(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 i64 @get_error_values(i32 0, i32 1, i8** %5, i32* %6, i32* null, i32* null)
ret i64 %7
}

LLVM IR (-O2):
define i64 @ERR_peek_last_error_line(i8** %0, i32* %1) {
%3 = tail call i64 @get_error_values(i32 0, i32 1, i8** %0, i32* %1, i32* null, i32* null)
ret i64 %3
}
/* Variables and functions */
int string_hash(char const *);
int block_hash_from_key(const void *data) {
  return string_hash((const char *)data);
}


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

x86 assembly (clang, -O2):
<block_hash_from_key>:
jmp    1030 <string_hash@plt>

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

LLVM IR (-O2):
define i32 @block_hash_from_key(i8* %0) {
%2 = tail call i32 @string_hash(i8* %0)
ret i32 %2
}
/* Variables and functions */
int __infer_nondet_int();
int /*<<< orphan*/ __require_allocated_array(char const *);
int puts(const char *str) {
  __require_allocated_array(str);
  return __infer_nondet_int();
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__require_allocated_array@plt>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rax
call   1040 <__require_allocated_array@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__infer_nondet_int@plt>

LLVM IR (-O0):
define i32 @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @__require_allocated_array(i8* %3)
%5 = call i32 (...) @__infer_nondet_int()
ret i32 %5
}

LLVM IR (-O2):
define i32 @puts(i8* %0) {
%2 = tail call i32 @__require_allocated_array(i8* %0)
%3 = tail call i32 (...) @__infer_nondet_int()
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int uint32_t_cmp(const void *a, const void *b) {
  const uint32_t *cp_a = (const int *)a;
  const uint32_t *cp_b = (const int *)b;
  return *cp_a - *cp_b;
}


x86 assembly (clang, -O0):
<uint32_t_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @uint32_t_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @uint32_t_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
void destroy() {
  getch();
  endwin();
}


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

x86 assembly (clang, -O2):
<destroy>:
push   %rax
xor    %eax,%eax
call   1030 <getch@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <endwin@plt>

LLVM IR (-O0):
define void @destroy() {
%1 = call i32 (...) @getch()
%2 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @destroy() {
%1 = tail call i32 (...) @getch()
%2 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
unsigned long ERR_get_error();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, unsigned long);
void handleErrors(void) {
  unsigned long err = ERR_get_error();
  printf("Error: %li\n", err);
  exit(1);
}


x86 assembly (clang, -O0):
<handleErrors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <ERR_get_error@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<handleErrors>:
push   %rax
xor    %eax,%eax
call   1040 <ERR_get_error@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Error: %li\0A\00"
define void @handleErrors() {
%1 = alloca i64
%2 = call i64 (...) @ERR_get_error()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"Error: %li\0A\00"
define void @handleErrors() {
%1 = tail call i64 (...) @ERR_get_error()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
char *strcpy(char *dest, const char *src) {
  char *p = dest;
  while (*src)
    *p++ = *src++;
  *p = 0;
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1148 <strcpy+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
int lcp_this_layer_started(struct lcp_context *context) {
  context = context;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.lcp_context = type opaque
define i32 @lcp_this_layer_started(%struct.lcp_context* nocapture readnone %0) {
ret i32 0
}
int is_restricted(name)
char *name;
{
  char *p;
  if ((p = strrchr(name, '/')))
    name = p;
  return (p = strchr(name, 'r')) && strstr(p, "sh");
}


x86 assembly (clang, -O0):
<is_restricted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1160 <is_restricted+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x72,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     119e <is_restricted+0x6e>
mov    -0x10(%rbp),%rdi
lea    0xe71(%rip),%rsi
call   1050 <strstr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_restricted>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
cmovne %rax,%rbx
mov    %rbx,%rdi
mov    $0x72,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1173 <is_restricted+0x43>
lea    0xea2(%rip),%rsi
mov    %rax,%rdi
call   1050 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"sh\00"
define i32 @is_restricted(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i32 47)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %3
store i8* %8, i8** %2
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %2
%11 = call i8* @strchr(i8* %10, i32 114)
store i8* %11, i8** %3
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i8*, i8** %3
%15 = call i8* @strstr(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = icmp ne i8* %15, null
br label %17
17: ; preds = %13, %9
%18 = phi i1 [ false, %9 ], [ %16, %13 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
@.str = [3 x i8] c"sh\00"
define i32 @is_restricted(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 47)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* %0, i8* %2
%5 = tail call i8* @strchr(i8* dereferenceable(1) %4, i32 114)
%6 = icmp eq i8* %5, null
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = tail call i8* @strstr(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i8* %8, null
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %1
%12 = phi i32 [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
int g(unsigned a) {
  unsigned b = 32;
  unsigned c = a + b;
  return c < a;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
xor    %eax,%eax
cmp    $0xffffffe0,%edi
setae  %al
ret

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 32, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %2
%10 = icmp ult i32 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = icmp ugt i32 %0, -33
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
unsigned int *aui1d(unsigned int X) {
  unsigned int *A = (unsigned int *)malloc(X * sizeof(unsigned int *));
  return A;
}


x86 assembly (clang, -O0):
<aui1d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aui1d>:
shl    $0x3,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @aui1d(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = mul i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
ret i32* %10
}

LLVM IR (-O2):
define i32* @aui1d(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
/* Type definitions */
struct packet_parser {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct packet_parser *);
void packet_parser_free(struct packet_parser *pp) { free(pp); }


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

x86 assembly (clang, -O2):
<packet_parser_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.packet_parser = type { i32 }
define void @packet_parser_free(%struct.packet_parser* nocapture %0) {
%2 = tail call i32 @free(%struct.packet_parser* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kvst_reduce_put(void *, void *);
void mr_reduce_emit(void *key, void *val) { kvst_reduce_put(key, val); }


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

x86 assembly (clang, -O2):
<mr_reduce_emit>:
jmp    1030 <kvst_reduce_put@plt>

LLVM IR (-O0):
define void @mr_reduce_emit(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 @kvst_reduce_put(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @mr_reduce_emit(i8* %0, i8* %1) {
%3 = tail call i32 @kvst_reduce_put(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_14180() {
  Assert_real((isqrt(14180) == 119),
              "/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",
              1580, ("Integer square root of 14180 should be 119"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_14180>:
push   %rax
mov    $0x3764,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x77,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x62c,%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 = [43 x i8] c"Integer square root of 14180 should be 119\00"
define void @t_sqrt_14180() {
%1 = call i32 @isqrt(i32 14180)
%2 = icmp eq i32 %1, 119
%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 1580, i8* getelementptr inbounds ([43 x i8], [43 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 = [43 x i8] c"Integer square root of 14180 should be 119\00"
define void @t_sqrt_14180() {
%1 = tail call i32 @isqrt(i32 14180)
%2 = icmp eq i32 %1, 119
%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 1580, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool is_odd_digits(int n) {
  while (n > 0) {
    if ((n % 10) % 2 == 0)
      return false;
    n = n / 10;
  }
  return true;
}


x86 assembly (clang, -O0):
<is_odd_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114e <is_odd_digits+0x4e>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113b <is_odd_digits+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1155 <is_odd_digits+0x55>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1107 <is_odd_digits+0x7>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_odd_digits>:
mov    $0x1,%eax
test   %edi,%edi
jle    1127 <is_odd_digits+0x27>
mov    $0xcccccccd,%ecx
xchg   %ax,%ax
test   $0x1,%dil
je     1128 <is_odd_digits+0x28>
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <is_odd_digits+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_odd_digits(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %9
%4 = phi i32 [ %6, %9 ], [ %0, %1 ]
%5 = urem i32 %4, 10
%6 = udiv i32 %4, 10
%7 = and i32 %5, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = icmp ult i32 %4, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %9, %1
%12 = phi i32 [ 1, %1 ], [ 1, %9 ], [ 0, %3 ]
ret i32 %12
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ write(int, void const *, size_t);
ssize_t xwritex(int fd, const void *buf, size_t count) {
  ssize_t status = write(fd, buf, count);
  if (status < 0)
    exit(-1);
  return status;
}


x86 assembly (clang, -O0):
<xwritex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jge    115c <xwritex+0x3c>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @xwritex(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @write(i32 %0, i8* %1, i64 %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ exynos_5410_gpio_write_mask(unsigned int, unsigned int,
                                               unsigned int);
void odroid_xu_gpio_write_15(unsigned int data) {
  unsigned int bank_offset = 0x0C20;
  unsigned int bit_index = 2;
  exynos_5410_gpio_write_mask(bank_offset, ((data & 1U) << bit_index),
                              (1U << bit_index));
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_write_15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xc20,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
and    $0x1,%esi
mov    -0xc(%rbp),%ecx
shl    %cl,%esi
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
call   1030 <exynos_5410_gpio_write_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_write_15>:
lea    0x0(,%rdi,4),%esi
and    $0x4,%esi
mov    $0xc20,%edi
mov    $0x4,%edx
jmp    1030 <exynos_5410_gpio_write_mask@plt>

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

LLVM IR (-O2):
define void @odroid_xu_gpio_write_15(i32 %0) {
%2 = shl i32 %0, 2
%3 = and i32 %2, 4
%4 = tail call i32 @exynos_5410_gpio_write_mask(i32 3104, i32 %3, i32 4)
ret void
}
main() { return or (1); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <or@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @or to i32 (i32, ...)*)(i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char);
int main() {
  char b = 0;
  int a = 0;
  short y = 32767;
  a = b = y + 1;
  printf("a = %d, b = %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0x7fff,-0xe(%rbp)
movswl -0xe(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x5(%rbp)
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb6(%rip),%rdi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i16
store i32 0, i32* %1
store i8 0, i8* %2
store i32 0, i32* %3
store i16 32767, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = add nsw i32 %6, 1
%8 = trunc i32 %7 to i8
store i8 %8, i8* %2
%9 = sext i8 %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i8, i8* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %10, i8 signext %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0, i8 signext 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dump_registers();
int /*<<< orphan*/ kprint(char *, char *);
void panic(char *msg) {
  kprint("\nThe kernel panicked because '%s'.\n", msg);
  dump_registers();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <kprint@plt>
mov    $0x0,%al
call   1030 <dump_registers@plt>
jmp    1143 <panic+0x23>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <kprint@plt>
xor    %eax,%eax
call   1030 <dump_registers@plt>
nopw   0x0(%rax,%rax,1)
jmp    1140 <panic+0x20>

LLVM IR (-O0):
@.str = [36 x i8] c"\0AThe kernel panicked because '%s'.\0A\00"
define void @panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @kprint(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @dump_registers()
br label %6
6: ; preds = %1, %6
br label %6
}

LLVM IR (-O2):
@.str = [36 x i8] c"\0AThe kernel panicked because '%s'.\0A\00"
define void @panic(i8* %0) {
%2 = tail call i32 @kprint(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @dump_registers()
br label %4
4: ; preds = %1, %4
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ errno;
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ printf(char *, char const *);
void pabort(const char *s) {
  if (errno != 0)
    perror(s);
  else
    printf("%s\n", s);
  abort();
}


x86 assembly (clang, -O0):
<pabort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
cmpq   $0x0,(%rax)
je     115b <pabort+0x2b>
mov    -0x8(%rbp),%rdi
call   1050 <perror@plt>
jmp    116b <pabort+0x3b>
mov    -0x8(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<pabort>:
push   %rax
mov    %rdi,%rsi
mov    0x2ea5(%rip),%rax
cmpq   $0x0,(%rax)
je     1150 <pabort+0x20>
mov    %rsi,%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@errno = global i64 0
@.str = [4 x i8] c"%s\0A\00"
define void @pabort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @errno
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @perror(i8* %6)
br label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %5
%12 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@.str = [4 x i8] c"%s\0A\00"
define void @pabort(i8* %0) {
%2 = load i64, i64* @errno
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 (...) @abort()
unreachable
}
double to_first_period(double x) {
  return (x - (int)(x)) * 2 * 3.1415926535897932;
}


x86 assembly (clang, -O0):
<to_first_period>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
cvttsd2si -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
movsd  0xee5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed1(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_first_period>:
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
mulsd  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @to_first_period(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
%7 = fsub double %3, %6
%8 = fmul double %7, 2.000000e+00
%9 = fmul double %8, 0x400921FB54442D18
ret double %9
}

LLVM IR (-O2):
define double @to_first_period(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fsub double %0, %3
%5 = fmul double %4, 2.000000e+00
%6 = fmul double %5, 0x400921FB54442D18
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ make_filename(long, char *, char *);
long umfpack_zi_load_symbolic(void **, char *);
void umf4zlsym_(void **Symbolic, long *filenum, long *status) {
  char filename[200];
  make_filename(*filenum, "s", filename);
  *status = umfpack_zi_load_symbolic(Symbolic, filename);
}


x86 assembly (clang, -O0):
<umf4zlsym_>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rdx
lea    0xeb4(%rip),%rsi
call   1040 <make_filename@plt>
mov    -0x8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <umfpack_zi_load_symbolic@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4zlsym_>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdx
call   1040 <make_filename@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <umfpack_zi_load_symbolic@plt>
mov    %rax,(%r14)
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"s\00"
define void @umf4zlsym_(i8** %0, i64* %1, i64* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca [200 x i8]
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%11 = call i32 @make_filename(i64 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%14 = call i64 @umfpack_zi_load_symbolic(i8** %12, i8* %13)
%15 = load i64*, i64** %6
store i64 %14, i64* %15
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
define void @umf4zlsym_(i8** %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i64, i64* %1
%7 = call i32 @make_filename(i64 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = call i64 @umfpack_zi_load_symbolic(i8** %0, i8* %5)
store i64 %8, i64* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void StackPrintInfo(FILE *f) {}


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

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

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

LLVM IR (-O2):
define void @StackPrintInfo(i32* nocapture %0) {
ret void
}
void sys_statvfs_release(struct statvfs *src) {}


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

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

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

LLVM IR (-O2):
%struct.statvfs = type opaque
define void @sys_statvfs_release(%struct.statvfs* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ subdir1_func();
int /*<<< orphan*/ subdir2_func();
int main(void) {
  printf("Hello from prog3.c\n");
  func();
  subdir1_func();
  subdir2_func();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <func@plt>
mov    $0x0,%al
call   1030 <subdir1_func@plt>
mov    $0x0,%al
call   1050 <subdir2_func@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <func@plt>
xor    %eax,%eax
call   1040 <subdir1_func@plt>
xor    %eax,%eax
call   1050 <subdir2_func@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Hello from prog3.c\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @func()
%4 = call i32 (...) @subdir1_func()
%5 = call i32 (...) @subdir2_func()
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Hello from prog3.c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @func()
%3 = tail call i32 (...) @subdir1_func()
%4 = tail call i32 (...) @subdir2_func()
ret i32 0
}
float fahr_to_celsius(float fahr) { return (fahr - 32) * 5.0 / 9.0; }


x86 assembly (clang, -O0):
<fahr_to_celsius>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xefa(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahr_to_celsius>:
addss  0xef8(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @fahr_to_celsius(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 3.200000e+01
%5 = fpext float %4 to double
%6 = fmul double %5, 5.000000e+00
%7 = fdiv double %6, 9.000000e+00
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
define float @fahr_to_celsius(float %0) {
%2 = fadd float %0, -3.200000e+01
%3 = fpext float %2 to double
%4 = fmul double %3, 5.000000e+00
%5 = fdiv double %4, 9.000000e+00
%6 = fptrunc double %5 to float
ret float %6
}
int avahi_nss_support(void) {
  int b = 0;
  return b;
}


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

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

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

LLVM IR (-O2):
define i32 @avahi_nss_support() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
__attribute__((__unused__, __always___)) __attribute__((__artificial__)) void
rdtsc(uint32_t *low, uint32_t *high) {
  *low = *high = 0;
}


x86 assembly (clang, -O0):
<rdtsc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdtsc>:
movq   $0x0,(%rsi)
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @rdtsc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
store i64 0, i64* %5
%6 = load i64*, i64** %3
store i64 0, i64* %6
ret void
}

LLVM IR (-O2):
define void @rdtsc(i64* nocapture writeonly %0, i64* nocapture writeonly %1) {
store i64 0, i64* %1
store i64 0, i64* %0
ret void
}