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

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main() {
  int c;
  FILE *f = fopen("Makefile", "r");
  while ((c = fgetc(f)) != EOF)
    fputc(c, stderr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e7f(%rip),%rcx
cmp    (%rcx),%eax
je     1187 <main+0x57>
mov    -0x8(%rbp),%edi
mov    0x2e5d(%rip),%rax
mov    (%rax),%esi
call   1040 <fputc@plt>
jmp    1156 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xec4(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <fgetc@plt>
mov    0x2e8e(%rip),%r14
cmp    (%r14),%eax
je     1187 <main+0x57>
mov    0x2e72(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
mov    (%r15),%esi
mov    %eax,%edi
call   1040 <fputc@plt>
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    (%r14),%eax
jne    1170 <main+0x40>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Makefile\00"
@.str.1 = [2 x i8] c"r\00"
@EOF = global i32 0
@stderr = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
br label %5
5: ; preds = %10, %0
%6 = load i32*, i32** %3
%7 = call i32 @fgetc(i32* %6)
store i32 %7, i32* %2
%8 = load i32, i32* @EOF
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = load i32, i32* %2
%12 = load i32, i32* @stderr
%13 = call i32 @fputc(i32 %11, i32 %12)
br label %5
14: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Makefile\00"
@.str.1 = [2 x i8] c"r\00"
@EOF = global i32 0
@stderr = global i32 0
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @fgetc(i32* %1)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %12, label %5
5: ; preds = %0, %5
%6 = phi i32 [ %9, %5 ], [ %2, %0 ]
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputc(i32 %6, i32 %7)
%9 = tail call i32 @fgetc(i32* %1)
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %5
12: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
char *g_strstrip(char *);
char *nm_strstrip(char *str) { return str ? g_strstrip(str) : NULL; }


x86 assembly (clang, -O0):
<nm_strstrip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <nm_strstrip+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <g_strstrip@plt>
mov    %rax,-0x10(%rbp)
jmp    1144 <nm_strstrip+0x34>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1144 <nm_strstrip+0x34>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nm_strstrip>:
test   %rdi,%rdi
je     111a <nm_strstrip+0xa>
jmp    1030 <g_strstrip@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @nm_strstrip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i8* @g_strstrip(i8* %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i8* [ %7, %5 ], [ null, %8 ]
ret i8* %10
}

LLVM IR (-O2):
define i8* @nm_strstrip(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @g_strstrip(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
int pred(int p1, int by) { return p1 - by; }


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

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

LLVM IR (-O0):
define i32 @pred(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @pred(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
double dl_times(double value, int index, double x) { return value * x; }


x86 assembly (clang, -O0):
<dl_times>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dl_times>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @dl_times(double %0, i32 %1, double %2) {
%4 = fmul double %0, %2
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(char *, char *, int);
int is_class_info(char *line) { return !memcmp(line, "# C class", 9); }


x86 assembly (clang, -O0):
<is_class_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x9,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_class_info>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x9,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"# C class\00"
define i32 @is_class_info(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memcmp(i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"# C class\00"
define i32 @is_class_info(i8* %0) {
%2 = tail call i32 @memcmp(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void write_err(const char *str) { write(2, str, strlen(str)); }


x86 assembly (clang, -O0):
<write_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_err>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @write_err(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
ret void
}
void proc_tty_register_driver(struct tty_driver *driver) {}


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

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

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

LLVM IR (-O2):
%struct.tty_driver = type opaque
define void @proc_tty_register_driver(%struct.tty_driver* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned short logical_truth_counter(int, unsigned int, int *, unsigned short);
bool logical_strict_xor(unsigned short array_size, bool *boolean_list) {
  bool result = false;
  unsigned short num_of_truths =
      logical_truth_counter(true, 1u, boolean_list, array_size);
  if (num_of_truths == 1u) {
    result = true;
  }
  return result;
}


x86 assembly (clang, -O0):
<logical_strict_xor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdx
mov    $0x1,%esi
mov    %esi,%edi
movzwl -0x2(%rbp),%ecx
call   1030 <logical_truth_counter@plt>
mov    %ax,-0x16(%rbp)
movzwl -0x16(%rbp),%eax
cmp    $0x1,%eax
jne    1156 <logical_strict_xor+0x46>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logical_strict_xor>:
push   %rax
mov    %rsi,%rdx
mov    %edi,%ecx
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <logical_truth_counter@plt>
xor    %ecx,%ecx
cmp    $0x1,%ax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @logical_strict_xor(i16 zeroext %0, i32* %1) {
%3 = tail call zeroext i16 @logical_truth_counter(i32 1, i32 1, i32* %1, i16 zeroext %0)
%4 = icmp eq i16 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long name;
};
typedef TYPE_1__ XFontProp;

/* Variables and functions */
void set_XFontProp_name(void *_p, unsigned long _v) {
  ((XFontProp *)_p)->name = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XFontProp_name(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XFontProp_name(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ z;

/* Variables and functions */
int /*<<< orphan*/ stb__arr_setlen_(void **, int, int);
int stb_wordwrap(int *, int, int, char *);
int *stb_wordwrapalloc(int count, char *str) {
  int n = stb_wordwrap(NULL, 0, count, str);
  int *z = NULL;
  (stb__arr_setlen_((void **)&(z), sizeof(z[0]), (n * 2)));
  stb_wordwrap(z, n, count, str);
  return z;
}


x86 assembly (clang, -O0):
<stb_wordwrapalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <stb_wordwrap@plt>
mov    %eax,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
mov    $0x4,%esi
call   1040 <stb__arr_setlen_@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
call   1030 <stb_wordwrap@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_wordwrapalloc>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %r14,%rcx
call   1030 <stb_wordwrap@plt>
mov    %eax,%ebx
movq   $0x0,0x8(%rsp)
lea    (%rbx,%rbx,1),%edx
lea    0x8(%rsp),%rdi
mov    $0x4,%esi
call   1040 <stb__arr_setlen_@plt>
mov    0x8(%rsp),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14,%rcx
call   1030 <stb_wordwrap@plt>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32* @stb_wordwrapalloc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i32 @stb_wordwrap(i32* null, i32 0, i32 %7, i8* %8)
store i32 %9, i32* %5
store i32* null, i32** %6
%10 = bitcast i32** %6 to i8**
%11 = load i32, i32* %5
%12 = mul nsw i32 %11, 2
%13 = call i32 @stb__arr_setlen_(i8** %10, i32 4, i32 %12)
%14 = load i32*, i32** %6
%15 = load i32, i32* %5
%16 = load i32, i32* %3
%17 = load i8*, i8** %4
%18 = call i32 @stb_wordwrap(i32* %14, i32 %15, i32 %16, i8* %17)
%19 = load i32*, i32** %6
ret i32* %19
}

LLVM IR (-O2):
define i32* @stb_wordwrapalloc(i32 %0, i8* %1) {
%3 = alloca i32*
%4 = tail call i32 @stb_wordwrap(i32* null, i32 0, i32 %0, i8* %1)
%5 = bitcast i32** %3 to i8*
store i32* null, i32** %3
%6 = bitcast i32** %3 to i8**
%7 = shl nsw i32 %4, 1
%8 = call i32 @stb__arr_setlen_(i8** %6, i32 4, i32 %7)
%9 = load i32*, i32** %3
%10 = call i32 @stb_wordwrap(i32* %9, i32 %4, i32 %0, i8* %1)
%11 = load i32*, i32** %3
ret i32* %11
}
/* Variables and functions */
int /*<<< orphan*/ bt_init();
int /*<<< orphan*/ initfirstSerial();
int /*<<< orphan*/ initsecondSerial();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Connect BT\n");
  bt_init();
  initfirstSerial();
  initsecondSerial();
  while (1) {
  }
  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   1030 <bt_init@plt>
mov    $0x0,%al
call   1050 <initfirstSerial@plt>
mov    $0x0,%al
call   1060 <initsecondSerial@plt>
jmp    1170 <main+0x30>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <bt_init@plt>
xor    %eax,%eax
call   1050 <initfirstSerial@plt>
xor    %eax,%eax
call   1060 <initsecondSerial@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1170 <main+0x30>

LLVM IR (-O0):
@.str = [12 x i8] c"Connect BT\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @bt_init()
%4 = call i32 (...) @initfirstSerial()
%5 = call i32 (...) @initsecondSerial()
br label %6
6: ; preds = %0, %6
br label %6
}

LLVM IR (-O2):
@str = [11 x i8] c"Connect BT\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @bt_init()
%3 = tail call i32 (...) @initfirstSerial()
%4 = tail call i32 (...) @initsecondSerial()
br label %5
5: ; preds = %0, %5
br label %5
}
/* Variables and functions */
scalar_t__ numeric(unsigned char const *, int const, int /*<<< orphan*/, int,
                   int, int *, int *, char *);
int n1__4(const unsigned char *data, const int data_len, int *p_err_no,
          int *p_err_posn, char err_msg[50]) {
  return data_len >= 1 && data_len <= 4 &&
         numeric(data, data_len, 0, 1, 4, p_err_no, p_err_posn, err_msg);
}


x86 assembly (clang, -O0):
<n1__4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0xc(%rbp)
mov    %al,-0x29(%rbp)
jl     1181 <n1__4+0x71>
xor    %eax,%eax
cmpl   $0x4,-0xc(%rbp)
mov    %al,-0x29(%rbp)
jg     1181 <n1__4+0x71>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x28(%rbp),%rax
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x4,%r8d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <numeric@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n1__4>:
mov    %rcx,%r10
lea    -0x1(%rsi),%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
ja     114d <n1__4+0x3d>
push   %rax
mov    %r8,%r11
mov    %rdx,%r9
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x4,%r8d
push   %r11
push   %r10
call   1030 <numeric@plt>
add    $0x10,%rsp
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @n1__4(i8* %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i8* %4, i8** %10
%11 = load i32, i32* %7
%12 = icmp sge i32 %11, 1
br i1 %12, label %13, label %24
13: ; preds = %5
%14 = load i32, i32* %7
%15 = icmp sle i32 %14, 4
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = load i32*, i32** %8
%20 = load i32*, i32** %9
%21 = load i8*, i8** %10
%22 = call i64 @numeric(i8* %17, i32 %18, i32 0, i32 1, i32 4, i32* %19, i32* %20, i8* %21)
%23 = icmp ne i64 %22, 0
br label %24
24: ; preds = %16, %13, %5
%25 = phi i1 [ false, %13 ], [ false, %5 ], [ %23, %16 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @n1__4(i8* %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = add i32 %1, -1
%7 = icmp ult i32 %6, 4
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = tail call i64 @numeric(i8* %0, i32 %1, i32 0, i32 1, i32 4, i32* %2, i32* %3, i8* %4)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *);
void file_header(FILE *file) { fscanf(file, "%*s"); }


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

x86 assembly (clang, -O2):
<file_header>:
lea    0xee9(%rip),%rsi
jmp    1030 <fscanf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%*s\00"
define void @file_header(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*s\00"
define void @file_header(i32* nocapture %0) {
%2 = tail call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void kernel_memory_init() {}


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

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

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

LLVM IR (-O2):
define void @kernel_memory_init() {
ret void
}
void X509_issuer_name_hash(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_issuer_name_hash() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aes256_decrypt_ecb(unsigned char *, unsigned long);
int /*<<< orphan*/ printf(char *);
void decrypt(unsigned char key[32], unsigned char *buf,
             unsigned long numbytes) {
  printf("\nBeginning decryption\n");
  unsigned long offset;
  for (offset = 0; offset < numbytes; offset += 16)
    aes256_decrypt_ecb(buf, offset);
}


x86 assembly (clang, -O0):
<decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1174 <decrypt+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <aes256_decrypt_ecb@plt>
mov    -0x20(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x20(%rbp)
jmp    1148 <decrypt+0x28>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decrypt>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
test   %r15,%r15
je     1154 <decrypt+0x34>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <aes256_decrypt_ecb@plt>
add    $0x10,%rbx
cmp    %r15,%rbx
jb     1140 <decrypt+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@str = [22 x i8] c"\0ABeginning decryption\00"
define void @decrypt(i8* nocapture readnone %0, i8* %1, i64 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%5 = icmp eq i64 %2, 0
br i1 %5, label %11, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %9, %6 ], [ 0, %3 ]
%8 = tail call i32 @aes256_decrypt_ecb(i8* %1, i64 %7)
%9 = add i64 %7, 16
%10 = icmp ult i64 %9, %2
br i1 %10, label %6, label %11
11: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ myuserlever();
int main(int argc, char **argv) {
  int i;
  myuserlever();
  return 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   1030 <myuserlever@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @myuserlever()
ret i32 0
}
/* Variables and functions */
int close(int);
int txc_libc_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<txc_libc_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @txc_libc_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void setDataFloat(unsigned char *data, float f) {
  int i = *(int *)&f;
  data[7] = (i >> 24);
  data[6] = ((i << 8) >> 24);
  data[5] = ((i << 16) >> 24);
  data[4] = ((i << 24) >> 24);
  data[3] |= 1 << 7;
}


x86 assembly (clang, -O0):
<setDataFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x18,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x7(%rax)
mov    -0x10(%rbp),%eax
shl    $0x8,%eax
sar    $0x18,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x6(%rax)
mov    -0x10(%rbp),%eax
shl    $0x10,%eax
sar    $0x18,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x5(%rax)
mov    -0x10(%rbp),%eax
shl    $0x18,%eax
sar    $0x18,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x4(%rax)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%ecx
or     $0x80,%ecx
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDataFloat>:
movss  %xmm0,0x4(%rdi)
orb    $0x80,0x3(%rdi)
ret

LLVM IR (-O0):
define void @setDataFloat(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
%5 = alloca i32
store i8* %0, i8** %3
store float %1, float* %4
%6 = bitcast float* %4 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = ashr i32 %8, 24
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 7
store i8 %10, i8* %12
%13 = load i32, i32* %5
%14 = shl i32 %13, 8
%15 = ashr i32 %14, 24
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 6
store i8 %16, i8* %18
%19 = load i32, i32* %5
%20 = shl i32 %19, 16
%21 = ashr i32 %20, 24
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i64 5
store i8 %22, i8* %24
%25 = load i32, i32* %5
%26 = shl i32 %25, 24
%27 = ashr i32 %26, 24
%28 = trunc i32 %27 to i8
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i64 4
store i8 %28, i8* %30
%31 = load i8*, i8** %3
%32 = getelementptr inbounds i8, i8* %31, i64 3
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = or i32 %34, 128
%36 = trunc i32 %35 to i8
store i8 %36, i8* %32
ret void
}

LLVM IR (-O2):
define void @setDataFloat(i8* nocapture %0, float %1) {
%3 = bitcast float %1 to i32
%4 = lshr i32 %3, 24
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 7
store i8 %5, i8* %6
%7 = lshr i32 %3, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 6
store i8 %8, i8* %9
%10 = lshr i32 %3, 8
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 5
store i8 %11, i8* %12
%13 = trunc i32 %3 to i8
%14 = getelementptr inbounds i8, i8* %0, i64 4
store i8 %13, i8* %14
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = or i8 %16, -128
store i8 %17, i8* %15
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t write_FP_BE(int /*<<< orphan*/ *, float const *, int);
size_t float32WriteToFP(FILE *fp, const float *data) {
  return write_FP_BE(fp, data, sizeof(float));
}


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

x86 assembly (clang, -O2):
<float32WriteToFP>:
mov    $0x4,%edx
jmp    1030 <write_FP_BE@plt>

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

LLVM IR (-O2):
define i64 @float32WriteToFP(i32* %0, float* %1) {
%3 = tail call i64 @write_FP_BE(i32* %0, float* %1, i32 4)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ putc(unsigned char, int /*<<< orphan*/ *);
int WRITEBYTE(FILE *fp, unsigned char c) { return putc(c, fp) != EOF; }


x86 assembly (clang, -O0):
<WRITEBYTE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <putc@plt>
mov    0x2eb0(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WRITEBYTE>:
push   %rax
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
call   1030 <putc@plt>
mov    0x2ec3(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i64 0
define i32 @WRITEBYTE(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i32*, i32** %3
%7 = call i64 @putc(i8 zeroext %5, i32* %6)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@EOF = global i64 0
define i32 @WRITEBYTE(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i64 @putc(i8 zeroext %1, i32* %0)
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(unsigned char, int /*<<< orphan*/ *);
void write_float(FILE *file, double f) {
  unsigned char *p_first = (char *)&f;
  unsigned char *p_current;
  for (p_current = p_first + 7; p_current >= p_first; p_current--) {
    fputc(*p_current, file);
  }
}


x86 assembly (clang, -O0):
<write_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jb     1166 <write_float+0x56>
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    1135 <write_float+0x25>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_float>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
movq   %xmm0,0x8(%rsp)
movq   %xmm0,%rdi
shr    $0x38,%rdi
mov    %r14,%rsi
call   1030 <fputc@plt>
lea    0xe(%rsp),%rbx
lea    0x8(%rsp),%r15
nopl   (%rax)
movzbl (%rbx),%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
add    $0xffffffffffffffff,%rbx
cmp    %r15,%rbx
jae    1140 <write_float+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @write_float(i32* nocapture %0, double %1) {
%3 = alloca double
store double %1, double* %3
%4 = bitcast double* %3 to i8*
%5 = bitcast double %1 to i64
%6 = lshr i64 %5, 56
%7 = trunc i64 %6 to i8
%8 = call i32 @fputc(i8 zeroext %7, i32* %0)
%9 = getelementptr inbounds i8, i8* %4, i64 6
br label %10
10: ; preds = %2, %10
%11 = phi i8* [ %9, %2 ], [ %14, %10 ]
%12 = load i8, i8* %11
%13 = call i32 @fputc(i8 zeroext %12, i32* %0)
%14 = getelementptr inbounds i8, i8* %11, i64 -1
%15 = icmp ult i8* %14, %4
br i1 %15, label %16, label %10
16: ; preds = %10
ret void
}
/* Variables and functions */
double fmod(double, int);
double sawtooth(double x) { return fmod(x, 2 * 3.14159265358979323846); }


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

x86 assembly (clang, -O2):
<sawtooth>:
mov    $0x6,%edi
jmp    1030 <fmod@plt>

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

LLVM IR (-O2):
define double @sawtooth(double %0) {
%2 = tail call double @fmod(double %0, i32 6)
ret double %2
}
/* Variables and functions */
double rand_gauss_normalized();
double rand_gauss(double x, double s) {
  double z = rand_gauss_normalized();
  return x + z * s;
}


x86 assembly (clang, -O0):
<rand_gauss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand_gauss_normalized@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_gauss>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <rand_gauss_normalized@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @rand_gauss(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = call double (...) @rand_gauss_normalized()
store double %6, double* %5
%7 = load double, double* %3
%8 = load double, double* %5
%9 = load double, double* %4
%10 = call double @llvm.fmuladd.f64(double %8, double %9, double %7)
ret double %10
}

LLVM IR (-O2):
define double @rand_gauss(double %0, double %1) {
%3 = tail call double (...) @rand_gauss_normalized()
%4 = tail call double @llvm.fmuladd.f64(double %3, double %1, double %0)
ret double %4
}
unsigned int I2CStop(void) {
  (*(volatile unsigned long *)(0xE001C000 + 0x00)) = 0x00000010;
  (*(volatile unsigned long *)(0xE001C000 + 0x18)) = 0x00000008;
  while ((*(volatile unsigned long *)(0xE001C000 + 0x00)) & 0x00000010)
    ;
  return (1);
}


x86 assembly (clang, -O0):
<I2CStop>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe001c000,%eax
movq   $0x10,(%rax)
mov    $0xe001c018,%eax
movq   $0x8,(%rax)
mov    $0xe001c000,%eax
mov    (%rax),%rax
and    $0x10,%rax
cmp    $0x0,%rax
je     1137 <I2CStop+0x37>
jmp    111c <I2CStop+0x1c>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CStop>:
mov    $0xe001c000,%eax
movq   $0x10,(%rax)
movq   $0x8,0x18(%rax)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
testq  $0x10,(%rax)
jne    1120 <I2CStop+0x20>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @I2CStop() {
store volatile i64 16, i64* inttoptr (i64 3758211072 to i64*)
store volatile i64 8, i64* inttoptr (i64 3758211096 to i64*)
br label %1
1: ; preds = %5, %0
%2 = load volatile i64, i64* inttoptr (i64 3758211072 to i64*)
%3 = and i64 %2, 16
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret i32 1
}

LLVM IR (-O2):
define i32 @I2CStop() {
store volatile i64 16, i64* inttoptr (i64 3758211072 to i64*)
store volatile i64 8, i64* inttoptr (i64 3758211096 to i64*)
br label %1
1: ; preds = %1, %0
%2 = load volatile i64, i64* inttoptr (i64 3758211072 to i64*)
%3 = and i64 %2, 16
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
ret i32 1
}
void foo_1_2_2_1_2_1_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_2_1_2_2_1() {
ret void
}
void gtk_tree_model_get_flags() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_get_flags() {
ret void
}
int handlemsg_master(int from, char *msg, int len, void **result) { return 0; }


x86 assembly (clang, -O0):
<handlemsg_master>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @handlemsg_master(i32 %0, i8* %1, i32 %2, i8** %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
ret i32 0
}

LLVM IR (-O2):
define i32 @handlemsg_master(i32 %0, i8* nocapture readnone %1, i32 %2, i8** nocapture readnone %3) {
ret i32 0
}
/* Type definitions */
struct ansiseq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ screen_go(int, int /*<<< orphan*/);
void termop_curleft(struct ansiseq *s) { screen_go(-1, 0); }


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

x86 assembly (clang, -O2):
<termop_curleft>:
mov    $0xffffffff,%edi
xor    %esi,%esi
jmp    1030 <screen_go@plt>

LLVM IR (-O0):
%struct.ansiseq = type { i32 }
define void @termop_curleft(%struct.ansiseq* %0) {
%2 = alloca %struct.ansiseq*
store %struct.ansiseq* %0, %struct.ansiseq** %2
%3 = call i32 @screen_go(i32 -1, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ansiseq = type { i32 }
define void @termop_curleft(%struct.ansiseq* nocapture readnone %0) {
%2 = tail call i32 @screen_go(i32 -1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void add_data(char keys[8][3], int i, int a) { snprintf(keys[i], 3, "%c", a); }


x86 assembly (clang, -O0):
<add_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
imul   $0x3,%rax,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%ecx
mov    $0x3,%esi
lea    0xec0(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_data>:
mov    %edx,%ecx
movslq %esi,%rax
lea    (%rax,%rax,2),%rax
add    %rax,%rdi
lea    0xedd(%rip),%rdx
mov    $0x3,%esi
jmp    1030 <snprintf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @add_data([3 x i8]* %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 %4, i64 0
%6 = tail call i32 @snprintf(i8* %5, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
void outb_local(unsigned long port, unsigned char value) {
  __asm__ __volatile__("out"
                       "b"
                       " %"
                       "b"
                       "0, %w1"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb_local>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%rdx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb_local>:
mov    %esi,%eax
mov    %rdi,%rdx
out    %al,(%dx)
ret

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

LLVM IR (-O2):
define void @outb_local(i64 %0, i8 zeroext %1) {
tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i64 %0)
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ panic(char *);
char *strcpy(char *, char *);
scalar_t__ strlen(char *);
char *sdup(char *p) {
  char *s;
  s = malloc(strlen(p) + 1);
  if (s == 0)
    panic("malloc failed.");
  return strcpy(s, p);
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"malloc failed.\00"
define i8* @sdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @panic(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ h265hvcc_nalu_get_length(scalar_t__ const *);
uint8_t *h265hvcc_array_get_nalu(const uint8_t *p, uint8_t n) {
  p += 3;
  while (n) {
    uint16_t length = h265hvcc_nalu_get_length(p);
    p += 2 + length;
    n--;
  }
  return (uint8_t *)p;
}


x86 assembly (clang, -O0):
<h265hvcc_array_get_nalu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1169 <h265hvcc_array_get_nalu+0x59>
mov    -0x8(%rbp),%rdi
call   1030 <h265hvcc_nalu_get_length@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
shl    $0x3,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    112c <h265hvcc_array_get_nalu+0x1c>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265hvcc_array_get_nalu>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x18,%rbx
test   %rsi,%rsi
je     1146 <h265hvcc_array_get_nalu+0x36>
mov    %rsi,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <h265hvcc_nalu_get_length@plt>
lea    (%rbx,%rax,8),%rbx
add    $0x10,%rbx
add    $0xffffffffffffffff,%r14
jne    1130 <h265hvcc_array_get_nalu+0x20>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64* @h265hvcc_array_get_nalu(i64* %0, i64 %1) {
%3 = getelementptr inbounds i64, i64* %0, i64 3
%4 = icmp eq i64 %1, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64* [ %10, %5 ], [ %3, %2 ]
%7 = phi i64 [ %11, %5 ], [ %1, %2 ]
%8 = tail call i64 @h265hvcc_nalu_get_length(i64* %6)
%9 = add nsw i64 %8, 2
%10 = getelementptr inbounds i64, i64* %6, i64 %9
%11 = add nsw i64 %7, -1
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i64* [ %3, %2 ], [ %10, %5 ]
ret i64* %14
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xc3() {
  Assert_real((isodigit(195) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              980, ("isodigit should be 0 for 0xc3"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xc3>:
push   %rax
mov    $0xc3,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3d4,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xc3\00"
define void @t_isodigit_0xc3() {
%1 = call i64 @isodigit(i32 195)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 980, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xc3\00"
define void @t_isodigit_0xc3() {
%1 = tail call i64 @isodigit(i32 195)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 980, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}