xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ smp_test_mag_create();
void smp_test_msg_main() { smp_test_mag_create(); }


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

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

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

LLVM IR (-O2):
define void @smp_test_msg_main() {
%1 = tail call i32 (...) @smp_test_mag_create()
ret void
}
/* Variables and functions */
int EINVAL;
int /*<<< orphan*/ __libc_android_log_print(int, char *, char *);
int pthread_atfork(void (*prepare)(void), void (*parent)(void),
                   void (*child)(void)) {
  __libc_android_log_print(
      6, "libc", "not support pthread_atfork due to possible deadlock issue");
  return EINVAL;
  return 0;
}


x86 assembly (clang, -O0):
<pthread_atfork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x6,%edi
lea    0xed0(%rip),%rsi
lea    0xece(%rip),%rdx
call   1030 <__libc_android_log_print@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_atfork>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee6(%rip),%rdx
mov    $0x6,%edi
call   1030 <__libc_android_log_print@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"libc\00"
@.str.1 = [58 x i8] c"not support pthread_atfork due to possible deadlock issue\00"
@EINVAL = global i32 0
define i32 @pthread_atfork(void ()* %0, void ()* %1, void ()* %2) {
%4 = alloca void ()*
%5 = alloca void ()*
%6 = alloca void ()*
store void ()* %0, void ()** %4
store void ()* %1, void ()** %5
store void ()* %2, void ()** %6
%7 = call i32 @__libc_android_log_print(i32 6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @EINVAL
ret i32 %8
}

LLVM IR (-O2):
@.str = [5 x i8] c"libc\00"
@.str.1 = [58 x i8] c"not support pthread_atfork due to possible deadlock issue\00"
@EINVAL = global i32 0
define i32 @pthread_atfork(void ()* nocapture readnone %0, void ()* nocapture readnone %1, void ()* nocapture readnone %2) {
%4 = tail call i32 @__libc_android_log_print(i32 6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @EINVAL
ret i32 %5
}
f_b() { *(short *)5 = 3; }


x86 assembly (clang, -O0):
<f_b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%eax
movw   $0x3,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_b>:
movw   $0x3,0x5
ret

LLVM IR (-O0):
define i32 @f_b() {
%1 = alloca i32
store i16 3, i16* inttoptr (i64 5 to i16*)
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @f_b() {
store i16 3, i16* inttoptr (i64 5 to i16*)
ret i32 undef
}
void dep2(void) {}


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

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

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

LLVM IR (-O2):
define void @dep2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void __printfps_getter_func(int fps, void *data) {
  fprintf(stdout, "FPS: %d\n", fps);
}


x86 assembly (clang, -O0):
<__printfps_getter_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__printfps_getter_func>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [9 x i8] c"FPS: %d\0A\00"
define void @__printfps_getter_func(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reverse1(char *);
void main() {
  char str[100] = "hi this is string";
  reverse1(str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x64,%edx
call   1030 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1040 <reverse1@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xf35(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rdi
call   1030 <reverse1@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [100 x i8] c"hi this is string\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = bitcast [100 x i8]* %1 to i8*
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = call i32 @reverse1(i8* %3)
ret void
}

LLVM IR (-O2):
@__const.main.str = [100 x i8] c"hi this is string\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @reverse1(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void testTwo(void) { raise(SIGSEGV); }


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

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

LLVM IR (-O0):
@SIGSEGV = global i32 0
define void @testTwo() {
%1 = load i32, i32* @SIGSEGV
%2 = call i32 @raise(i32 %1)
ret void
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
define void @testTwo() {
%1 = load i32, i32* @SIGSEGV
%2 = tail call i32 @raise(i32 %1)
ret void
}
int mulTwo(int n) { return n << 1; }


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

x86 assembly (clang, -O2):
<mulTwo>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @mulTwo(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ convertToPostfix(char *, char *);
int /*<<< orphan*/ getLine(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char infix[50];
  char postfix[50];
  printf("Please enter infix expression: ");
  getLine(infix, 50);
  convertToPostfix(infix, postfix);
  printf("Postfix expression: %s\n", postfix);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x32,%esi
call   1050 <getLine@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1040 <convertToPostfix@plt>
lea    -0x80(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x32,%esi
call   1050 <getLine@plt>
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <convertToPostfix@plt>
lea    0xeb4(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Please enter infix expression: \00"
@.str.1 = [24 x i8] c"Postfix expression: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca [50 x i8]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%6 = call i32 @getLine(i8* %5, i32 50)
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%9 = call i32 @convertToPostfix(i8* %7, i8* %8)
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Please enter infix expression: \00"
@.str.1 = [24 x i8] c"Postfix expression: %s\0A\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @getLine(i8* %3, i32 50)
%7 = call i32 @convertToPostfix(i8* %3, i8* %4)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main() { fprintf(stderr, "ERROR: this shouldn't print\n"); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"ERROR: this shouldn't print\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"ERROR: this shouldn't print\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int toe_enslave(struct ifnet *bond_ifp, struct ifnet *slave_ifp) { return 0; }


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

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

LLVM IR (-O0):
%struct.ifnet = type opaque
define i32 @toe_enslave(%struct.ifnet* %0, %struct.ifnet* %1) {
%3 = alloca %struct.ifnet*
%4 = alloca %struct.ifnet*
store %struct.ifnet* %0, %struct.ifnet** %3
store %struct.ifnet* %1, %struct.ifnet** %4
ret i32 0
}

LLVM IR (-O2):
%struct.ifnet = type opaque
define i32 @toe_enslave(%struct.ifnet* nocapture readnone %0, %struct.ifnet* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int ssize_t;
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
ssize_t pread(int fd, void *buf, size_t count, off_t offset) {
  printf(">>> pread, fd - %d, offset - %d\n", fd, offset);
  return -1;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c">>> pread, fd - %d, offset - %d\0A\00"
define i32 @pread(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %8
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret i32 -1
}

LLVM IR (-O2):
@.str = [33 x i8] c">>> pread, fd - %d, offset - %d\0A\00"
define i32 @pread(i32 %0, i8* nocapture readnone %1, i64 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %3)
ret i32 -1
}
/* Variables and functions */
unsigned long long GET_UAA64LE(unsigned long long *, int /*<<< orphan*/);
unsigned long long LE64(unsigned long long x) { return GET_UAA64LE(&x, 0); }


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

x86 assembly (clang, -O2):
<LE64>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <GET_UAA64LE@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @LE64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 @GET_UAA64LE(i64* %2, i32 0)
ret i64 %3
}

LLVM IR (-O2):
define i64 @LE64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 @GET_UAA64LE(i64* %2, i32 0)
ret i64 %3
}
/* Type definitions */
struct event_base {
  int dummy;
};
typedef scalar_t__ evutil_socket_t;

/* Variables and functions */
scalar_t__ SIGINT;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ event_base_loopexit(struct event_base *,
                                       int /*<<< orphan*/ *);
void handle_sigint_cb(evutil_socket_t signum, short what, void *arg) {
  assert(signum == SIGINT);
  struct event_base *base = arg;
  event_base_loopexit(base, NULL);
}


x86 assembly (clang, -O0):
<handle_sigint_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ea6(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <event_base_loopexit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_sigint_cb>:
push   %rbx
mov    %rdx,%rbx
mov    0x2ebd(%rip),%rcx
xor    %eax,%eax
cmp    %rdi,(%rcx)
sete   %al
mov    %eax,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1030 <event_base_loopexit@plt>

LLVM IR (-O0):
%struct.event_base = type { i32 }
@SIGINT = global i64 0
define void @handle_sigint_cb(i64 %0, i16 signext %1, i8* %2) {
%4 = alloca i64
%5 = alloca i16
%6 = alloca i8*
%7 = alloca %struct.event_base*
store i64 %0, i64* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%8 = load i64, i64* %4
%9 = load i64, i64* @SIGINT
%10 = icmp eq i64 %8, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %6
%14 = bitcast i8* %13 to %struct.event_base*
store %struct.event_base* %14, %struct.event_base** %7
%15 = load %struct.event_base*, %struct.event_base** %7
%16 = call i32 @event_base_loopexit(%struct.event_base* %15, i32* null)
ret void
}

LLVM IR (-O2):
%struct.event_base = type { i32 }
@SIGINT = global i64 0
define void @handle_sigint_cb(i64 %0, i16 signext %1, i8* %2) {
%4 = load i64, i64* @SIGINT
%5 = icmp eq i64 %4, %0
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = bitcast i8* %2 to %struct.event_base*
%9 = tail call i32 @event_base_loopexit(%struct.event_base* %8, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *,
                           int);
char *sqlite3_errstr(int);
int /*<<< orphan*/ stderr;
void err(int rc, const char *op) {
  fprintf(stderr, "Error while %s: error=%s (%d)\n", op, sqlite3_errstr(rc),
          rc);
  abort();
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <sqlite3_errstr@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
mov    -0x4(%rbp),%r8d
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<err>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x2ea0(%rip),%rax
mov    (%rax),%ebx
call   1050 <sqlite3_errstr@plt>
lea    0xeb2(%rip),%rsi
mov    %ebx,%edi
mov    %r14,%rdx
mov    %rax,%rcx
mov    %ebp,%r8d
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Error while %s: error=%s (%d)\0A\00"
define void @err(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = load i32, i32* %3
%8 = call i8* @sqlite3_errstr(i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %8, i32 %9)
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Error while %s: error=%s (%d)\0A\00"
define void @err(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i8* @sqlite3_errstr(i32 %0)
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %4, i32 %0)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
float rand_01();
float rand_m1p1(void) { return 2.f * rand_01() - 1.f; }


x86 assembly (clang, -O0):
<rand_m1p1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand_01@plt>
addss  %xmm0,%xmm0
movss  0xed9(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_m1p1>:
push   %rax
xor    %eax,%eax
call   1030 <rand_01@plt>
addss  %xmm0,%xmm0
addss  0xedc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @rand_m1p1() {
%1 = call float (...) @rand_01()
%2 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %1, float -1.000000e+00)
ret float %2
}

LLVM IR (-O2):
define float @rand_m1p1() {
%1 = tail call float (...) @rand_01()
%2 = tail call float @llvm.fmuladd.f32(float %1, float 2.000000e+00, float -1.000000e+00)
ret float %2
}
/* Variables and functions */
int random();
int rand(void) { return random(); }


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

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

LLVM IR (-O0):
define i32 @rand() {
%1 = call i32 (...) @random()
ret i32 %1
}

LLVM IR (-O2):
define i32 @rand() {
%1 = tail call i32 (...) @random()
ret i32 %1
}
void clear_real(double *array, int n) {
  double *last = array + n;
  while (array < last)
    *array++ = 0.0;
}


x86 assembly (clang, -O0):
<clear_real>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1147 <clear_real+0x47>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    111e <clear_real+0x1e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_real>:
test   %esi,%esi
jle    1143 <clear_real+0x33>
push   %rax
mov    %esi,%eax
lea    (%rdi,%rax,8),%rax
lea    0x8(%rdi),%rcx
cmp    %rcx,%rax
cmova  %rax,%rcx
mov    %rdi,%rax
not    %rax
lea    (%rcx,%rax,1),%rdx
add    $0x8,%rdx
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @clear_real(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca double*
store double* %0, double** %3
store i32 %1, i32* %4
%6 = load double*, double** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds double, double* %6, i64 %8
store double* %9, double** %5
br label %10
10: ; preds = %14, %2
%11 = load double*, double** %3
%12 = load double*, double** %5
%13 = icmp ult double* %11, %12
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load double*, double** %3
%16 = getelementptr inbounds double, double* %15, i32 1
store double* %16, double** %3
store double 0.000000e+00, double* %15
br label %10
17: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @clear_real(double* writeonly %0, i32 %1) {
%3 = ptrtoint double* %0 to i64
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %16
5: ; preds = %2
%6 = zext i32 %1 to i64
%7 = bitcast double* %0 to i8*
%8 = shl nuw nsw i64 %6, 3
%9 = add i64 %8, %3
%10 = add i64 %3, 8
%11 = call i64 @llvm.umax.i64(i64 %9, i64 %10)
%12 = xor i64 %3, -1
%13 = add i64 %11, %12
%14 = add i64 %13, 8
%15 = and i64 %14, -8
br label %16
16: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef unsigned long uint8_t;
typedef unsigned long uint32_t;

/* Variables and functions */
void volatile_clear_bit_u32(uint32_t *mask, uint8_t bit) {
  *((volatile uint32_t *)mask) &= ~(1UL << bit);
}


x86 assembly (clang, -O0):
<volatile_clear_bit_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
shl    %cl,%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
and    %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<volatile_clear_bit_u32>:
mov    %rsi,%rcx
mov    $0xfffffffffffffffe,%rax
rol    %cl,%rax
and    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @volatile_clear_bit_u32(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
%6 = shl i64 1, %5
%7 = xor i64 %6, -1
%8 = load i64*, i64** %3
%9 = load volatile i64, i64* %8
%10 = and i64 %9, %7
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @volatile_clear_bit_u32(i64* %0, i64 %1) {
%3 = shl nuw i64 1, %1
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* %0
%6 = and i64 %5, %4
store volatile i64 %6, i64* %0
ret void
}
void McASPRxIntDisable(unsigned int baseAddr, unsigned int intMask) {
  (*((volatile unsigned int *)(baseAddr + (0x7C)))) &= ~intMask;
}


x86 assembly (clang, -O0):
<McASPRxIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0x7c,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPRxIntDisable>:
not    %esi
add    $0x7c,%edi
and    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @McASPRxIntDisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = xor i32 %5, -1
%7 = load i32, i32* %3
%8 = add i32 %7, 124
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, %6
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @McASPRxIntDisable(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = add i32 %0, 124
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, %3
store volatile i32 %8, i32* %6
ret void
}
/* Variables and functions */
int canonicalise(char *);
int /*<<< orphan*/ unhide_metas(char *);
int canonicalise_opt(char *s) {
  if (!s)
    return 0;
  unhide_metas(s);
  return canonicalise(s);
}


x86 assembly (clang, -O0):
<canonicalise_opt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <canonicalise_opt+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1158 <canonicalise_opt+0x38>
mov    -0x10(%rbp),%rdi
call   1030 <unhide_metas@plt>
mov    -0x10(%rbp),%rdi
call   1040 <canonicalise@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canonicalise_opt>:
test   %rdi,%rdi
je     1137 <canonicalise_opt+0x17>
push   %rbx
mov    %rdi,%rbx
call   1030 <unhide_metas@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <canonicalise@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @canonicalise_opt(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 0, i32* %2
br label %12
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @unhide_metas(i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 @canonicalise(i8* %10)
store i32 %11, i32* %2
br label %12
12: ; preds = %7, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @canonicalise_opt(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @unhide_metas(i8* %0)
%5 = tail call i32 @canonicalise(i8* %0)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
ret i32 %7
}
char *savestring(text)
char *text;
{
  register char *result;
  result = getmem(strlen(text) + 1);
  strcpy(result, text);
  return (result);
}


x86 assembly (clang, -O0):
<savestring>:
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
mov    $0x0,%al
call   1050 <getmem@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<savestring>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
xor    %eax,%eax
call   1050 <getmem@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @savestring(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 i64 %5, 1
%7 = call i32 (i64, ...) bitcast (i32 (...)* @getmem to i32 (i64, ...)*)(i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i8* @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @savestring(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i32 (i64, ...) bitcast (i32 (...)* @getmem to i32 (i64, ...)*)(i64 %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i8* @strcpy(i8* dereferenceable(1) %6, i8* dereferenceable(1) %0)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ byte_reverse_int(int *);
void ibrev_(int *inum) { byte_reverse_int(inum); }


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

x86 assembly (clang, -O2):
<ibrev_>:
jmp    1030 <byte_reverse_int@plt>

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

LLVM IR (-O2):
define void @ibrev_(i32* %0) {
%2 = tail call i32 @byte_reverse_int(i32* %0)
ret void
}
char intToSym(int s) {
  if (s < 10)
    return '1' + s - 1;
  else
    return 'A' + s - 10;
}


x86 assembly (clang, -O0):
<intToSym>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1122 <intToSym+0x22>
mov    -0x8(%rbp),%eax
add    $0x31,%eax
sub    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    112e <intToSym+0x2e>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intToSym>:
cmp    $0xa,%edi
mov    $0x30,%ecx
mov    $0x37,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @intToSym(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 49, %7
%9 = sub nsw i32 %8, 1
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %16
11: ; preds = %1
%12 = load i32, i32* %3
%13 = add nsw i32 65, %12
%14 = sub nsw i32 %13, 10
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %16
16: ; preds = %11, %6
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @intToSym(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 48, i8 55
%5 = add i8 %4, %3
ret i8 %5
}
void free2DDoubleArray(double **X, unsigned long int size) {
  free(X[0]);
  free(X);
}


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

x86 assembly (clang, -O2):
<free2DDoubleArray>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free2DDoubleArray(double** %0, i64 %1) {
%3 = alloca double**
%4 = alloca i64
store double** %0, double*** %3
store i64 %1, i64* %4
%5 = load double**, double*** %3
%6 = getelementptr inbounds double*, double** %5, i64 0
%7 = load double*, double** %6
%8 = bitcast double* %7 to i8*
%9 = load double**, double*** %3
%10 = bitcast double** %9 to i8*
ret void
}

LLVM IR (-O2):
define void @free2DDoubleArray(double** nocapture %0, i64 %1) {
%3 = bitcast double** %0 to i8**
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = bitcast double** %0 to i8*
tail call void @free(i8* %5)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_uid;
};

/* Variables and functions */
#define EACCES 128
int errno;
int stat(char const *, struct stat *);
int is_file_exists(const char *path) {
  struct stat buf;
  int ret = stat(path, &buf);
  (void)buf.st_uid;
  if (ret == 0)
    return 1;
  switch (errno) {
  case EACCES:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1142 <is_file_exists+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116e <is_file_exists+0x5e>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
sub    $0x80,%eax
jne    1167 <is_file_exists+0x57>
jmp    115b <is_file_exists+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    116e <is_file_exists+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %eax,%eax
sete   %al
mov    0x2ebb(%rip),%rcx
cmpl   $0x80,(%rcx)
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @is_file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @stat(i8* %6, %struct.stat* %4)
store i32 %7, i32* %5
%8 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%9 = load i32, i32* %8
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 1, i32* %2
br label %17
13: ; preds = %1
%14 = load i32, i32* @errno
switch i32 %14, label %16 [
i32 128, label %15
]
15: ; preds = %13
store i32 1, i32* %2
br label %17
16: ; preds = %13
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @is_file_exists(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
%6 = load i32, i32* @errno
%7 = icmp eq i32 %6, 128
%8 = select i1 %5, i1 true, i1 %7
%9 = zext i1 %8 to i32
ret i32 %9
}
void lowcase(char *s) {
  char c;
  for ((c = *s); (c = *s); ++s)
    if (((c) >= 'A' && (c) <= 'Z'))
      *s = ((c) - 'A' + 'a');
}


x86 assembly (clang, -O0):
<lowcase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     1164 <lowcase+0x64>
movsbl -0x9(%rbp),%eax
cmp    $0x41,%eax
jl     114e <lowcase+0x4e>
movsbl -0x9(%rbp),%eax
cmp    $0x5a,%eax
jg     114e <lowcase+0x4e>
movsbl -0x9(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    1153 <lowcase+0x53>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1111 <lowcase+0x11>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lowcase>:
mov    (%rdi),%al
test   %al,%al
je     112a <lowcase+0x2a>
add    $0x1,%rdi
jmp    111b <lowcase+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <lowcase+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <lowcase+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <lowcase+0x10>
ret

LLVM IR (-O0):
define void @lowcase(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
store i8 %5, i8* %3
br label %6
6: ; preds = %26, %1
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
store i8 %8, i8* %3
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %29
10: ; preds = %6
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %25
14: ; preds = %10
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br i1 %17, label %18, label %25
18: ; preds = %14
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = sub nsw i32 %20, 65
%22 = add nsw i32 %21, 97
%23 = trunc i32 %22 to i8
%24 = load i8*, i8** %2
store i8 %23, i8* %24
br label %25
25: ; preds = %18, %14, %10
br label %26
26: ; preds = %25
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %2
br label %6
29: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @lowcase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
void gtk_editable_set_position() {}


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

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

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

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

/* Variables and functions */
int _buffer_write_array(struct ac_buffer *, double *, int, int);
int buffer_write_double_array(struct ac_buffer *buffer, double *value,
                              int size) {
  return _buffer_write_array(buffer, value, size, sizeof(double));
}


x86 assembly (clang, -O0):
<buffer_write_double_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x8,%ecx
call   1030 <_buffer_write_array@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_write_double_array>:
mov    $0x8,%ecx
jmp    1030 <_buffer_write_array@plt>

LLVM IR (-O0):
%struct.ac_buffer = type { i32 }
define i32 @buffer_write_double_array(%struct.ac_buffer* %0, double* %1, i32 %2) {
%4 = alloca %struct.ac_buffer*
%5 = alloca double*
%6 = alloca i32
store %struct.ac_buffer* %0, %struct.ac_buffer** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load %struct.ac_buffer*, %struct.ac_buffer** %4
%8 = load double*, double** %5
%9 = load i32, i32* %6
%10 = call i32 @_buffer_write_array(%struct.ac_buffer* %7, double* %8, i32 %9, i32 8)
ret i32 %10
}

LLVM IR (-O2):
%struct.ac_buffer = type { i32 }
define i32 @buffer_write_double_array(%struct.ac_buffer* %0, double* %1, i32 %2) {
%4 = tail call i32 @_buffer_write_array(%struct.ac_buffer* %0, double* %1, i32 %2, i32 8)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *strdup(char const *);
char const *strtok_r(char *, char *, char **);
char *get_domain(const char *vhost) {
  char *tmp = strdup(vhost);
  char *tmp_tok;
  char *ret;
  ret = strtok_r(tmp, ".", &tmp_tok);
  ret = strdup(strtok_r(NULL, ".", &tmp_tok));
  free(tmp);
  return ret;
}


x86 assembly (clang, -O0):
<get_domain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeac(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <strtok_r@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe94(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <strtok_r@plt>
mov    %rax,%rdi
call   1050 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_domain>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
call   1050 <strdup@plt>
mov    %rax,%r12
lea    0xeb9(%rip),%r14
mov    %rsp,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <strtok_r@plt>
xor    %edi,%edi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <strtok_r@plt>
mov    %rax,%rdi
call   1050 <strdup@plt>
mov    %rax,%rbx
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
define i8* @get_domain(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strdup(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i8* @strtok_r(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %4)
store i8* %9, i8** %5
%10 = call i8* @strtok_r(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %4)
%11 = call i8* @strdup(i8* %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define noalias i8* @get_domain(i8* nocapture %0) {
%2 = alloca i8*
%3 = tail call i8* @strdup(i8* %0)
%4 = bitcast i8** %2 to i8*
%5 = call i8* @strtok_r(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2)
%6 = call i8* @strtok_r(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2)
%7 = call i8* @strdup(i8* %6)
%8 = call i32 @free(i8* %3)
ret i8* %7
}
/* Variables and functions */
double fabs(double);
double genrand_real2();
double random(double lo, double hi) {
  double s = fabs(lo - hi);
  double f = genrand_real2();
  return lo + (s * f);
}


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

x86 assembly (clang, -O2):
<random>:
sub    $0x28,%rsp
movsd  %xmm0,0x8(%rsp)
subsd  %xmm1,%xmm0
andpd  0xeda(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <genrand_real2@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @random(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = call double @llvm.fabs.f64(double %9)
store double %10, double* %5
%11 = call double (...) @genrand_real2()
store double %11, double* %6
%12 = load double, double* %3
%13 = load double, double* %5
%14 = load double, double* %6
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double %12)
ret double %15
}

LLVM IR (-O2):
define double @random(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = tail call double (...) @genrand_real2()
%6 = tail call double @llvm.fmuladd.f64(double %4, double %5, double %0)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int dup(int);
int errno;
int main(int argc, char const *argv[]) {
  int oldfd = 1;
  int newfd;
  newfd = dup(oldfd);
  assert(newfd == -1);
  newfd = dup(oldfd);
  assert(newfd == -1);
  return errno;
}


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)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <dup@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x14(%rbp),%edi
call   1030 <dup@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <dup@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x1,%edi
call   1030 <dup@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   1040 <assert@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @dup(i32 %8)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = icmp eq i32 %10, -1
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %6
%15 = call i32 @dup(i32 %14)
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = icmp eq i32 %16, -1
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* @errno
ret i32 %20
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @dup(i32 1)
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @dup(i32 1)
%8 = icmp eq i32 %7, -1
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = load i32, i32* @errno
ret i32 %11
}
void createNewDayScheduleForAllPlayer(void) {}


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

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

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

LLVM IR (-O2):
define void @createNewDayScheduleForAllPlayer() {
ret void
}
void X509v3_get_ext_count(void) {}


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

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

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

LLVM IR (-O2):
define void @X509v3_get_ext_count() {
ret void
}
int get_token_num(const char *norm_str) {
  int tok_num = 1;
  const char *pin = norm_str;
  if (!norm_str)
    return 0;
  while (*pin++) {
    if (*pin == ' ') {
      tok_num++;
    }
  }
  return tok_num;
}


x86 assembly (clang, -O0):
<get_token_num>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    112e <get_token_num+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    116f <get_token_num+0x6f>
jmp    1133 <get_token_num+0x33>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
cmpb   $0x0,(%rax)
je     1169 <get_token_num+0x69>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1164 <get_token_num+0x64>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <get_token_num+0x33>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_token_num>:
test   %rdi,%rdi
je     1136 <get_token_num+0x36>
cmpb   $0x0,(%rdi)
je     1139 <get_token_num+0x39>
add    $0x1,%rdi
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rdi),%ecx
xor    %edx,%edx
cmp    $0x20,%cl
sete   %dl
add    %edx,%eax
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <get_token_num+0x20>
ret
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @get_token_num(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %9, %6 ], [ %0, %3 ]
%8 = phi i32 [ %13, %6 ], [ 1, %3 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 32
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %8, %12
%14 = icmp eq i8 %10, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %3, %1
%16 = phi i32 [ 0, %1 ], [ 1, %3 ], [ %13, %6 ]
ret i32 %16
}
/* Variables and functions */
int dlclose(void *);
int dlwrap_dlclose(void *handle) {
  int ret;
  ret = dlclose(handle);
  return ret;
}


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

x86 assembly (clang, -O2):
<dlwrap_dlclose>:
jmp    1030 <dlclose@plt>

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

LLVM IR (-O2):
define i32 @dlwrap_dlclose(i8* %0) {
%2 = tail call i32 @dlclose(i8* %0)
ret i32 %2
}