xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Bar(int);
int /*<<< orphan*/ printf(char *, ...);
void Foo(int a, int b, int c, int d) {
  printf("Foo: calling Bar...\n");
  Bar(a);
  printf("Foo: %d, %d, %d, %d\n", a, b, c, d);
}


x86 assembly (clang, -O0):
<Foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <Bar@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Foo>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
call   1030 <Bar@plt>
lea    0xea5(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Foo: calling Bar...\0A\00"
@.str.1 = [21 x i8] c"Foo: %d, %d, %d, %d\0A\00"
define void @Foo(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %5
%11 = call i32 @Bar(i32 %10)
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"Foo: %d, %d, %d, %d\0A\00"
@str = [20 x i8] c"Foo: calling Bar...\00"
define void @Foo(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @Bar(i32 %0)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void alert(int n) {
  int i = 0;
  for (i = 0; i < n; i++) {
    printf("\a");
  }
}


x86 assembly (clang, -O0):
<alert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114f <alert+0x3f>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <alert+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alert>:
push   %rbx
test   %edi,%edi
jle    112f <alert+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x7,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <alert+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\07\00"
define void @alert(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @alert(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 7)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
float test_exp2f(float x) { return __builtin_exp2f(x); }


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

x86 assembly (clang, -O2):
<test_exp2f>:
jmp    1030 <exp2f@plt>

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

LLVM IR (-O2):
define float @test_exp2f(float %0) {
%2 = tail call float @exp2f(float %0)
ret float %2
}
/* Variables and functions */
int CL_ServerStatus(char *, char *, int);
int LAN_GetServerStatus(char *serverAddress, char *serverStatus, int maxLen) {
  return CL_ServerStatus(serverAddress, serverStatus, maxLen);
}


x86 assembly (clang, -O0):
<LAN_GetServerStatus>:
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
call   1030 <CL_ServerStatus@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LAN_GetServerStatus>:
jmp    1030 <CL_ServerStatus@plt>

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

LLVM IR (-O2):
define i32 @LAN_GetServerStatus(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @CL_ServerStatus(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
int task_allocate_tid() {
  static int tid = 0;
  return tid++;
}


x86 assembly (clang, -O0):
<task_allocate_tid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0f(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<task_allocate_tid>:
mov    0x2f1e(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f15(%rip)
ret

LLVM IR (-O0):
@task_allocate_tid.tid = internal global i32 0
define i32 @task_allocate_tid() {
%1 = load i32, i32* @task_allocate_tid.tid
%2 = add nsw i32 %1, 1
store i32 %2, i32* @task_allocate_tid.tid
ret i32 %1
}

LLVM IR (-O2):
@task_allocate_tid.tid = internal unnamed_addr global i32 0
define i32 @task_allocate_tid() {
%1 = load i32, i32* @task_allocate_tid.tid
%2 = add nsw i32 %1, 1
store i32 %2, i32* @task_allocate_tid.tid
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ioctl_create_fill_list_of_prp(int);
int /*<<< orphan*/ ioctl_create_list_of_prp(int);
int /*<<< orphan*/ ioctl_create_prp_less_than_one_page(int);
int /*<<< orphan*/ ioctl_create_prp_more_than_two_page(int);
int /*<<< orphan*/ ioctl_create_prp_one_page(int);
int test_prp(int file_desc) {
  ioctl_create_prp_one_page(file_desc);
  ioctl_create_prp_less_than_one_page(file_desc);
  ioctl_create_prp_more_than_two_page(file_desc);
  ioctl_create_list_of_prp(file_desc);
  ioctl_create_fill_list_of_prp(file_desc);
  return 0;
}


x86 assembly (clang, -O0):
<test_prp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ioctl_create_prp_one_page@plt>
mov    -0x4(%rbp),%edi
call   1050 <ioctl_create_prp_less_than_one_page@plt>
mov    -0x4(%rbp),%edi
call   1040 <ioctl_create_prp_more_than_two_page@plt>
mov    -0x4(%rbp),%edi
call   1070 <ioctl_create_list_of_prp@plt>
mov    -0x4(%rbp),%edi
call   1060 <ioctl_create_fill_list_of_prp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_prp>:
push   %rbx
mov    %edi,%ebx
call   1030 <ioctl_create_prp_one_page@plt>
mov    %ebx,%edi
call   1050 <ioctl_create_prp_less_than_one_page@plt>
mov    %ebx,%edi
call   1040 <ioctl_create_prp_more_than_two_page@plt>
mov    %ebx,%edi
call   1070 <ioctl_create_list_of_prp@plt>
mov    %ebx,%edi
call   1060 <ioctl_create_fill_list_of_prp@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_prp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ioctl_create_prp_one_page(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @ioctl_create_prp_less_than_one_page(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @ioctl_create_prp_more_than_two_page(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @ioctl_create_list_of_prp(i32 %9)
%11 = load i32, i32* %2
%12 = call i32 @ioctl_create_fill_list_of_prp(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @test_prp(i32 %0) {
%2 = tail call i32 @ioctl_create_prp_one_page(i32 %0)
%3 = tail call i32 @ioctl_create_prp_less_than_one_page(i32 %0)
%4 = tail call i32 @ioctl_create_prp_more_than_two_page(i32 %0)
%5 = tail call i32 @ioctl_create_list_of_prp(i32 %0)
%6 = tail call i32 @ioctl_create_fill_list_of_prp(i32 %0)
ret i32 0
}
/* Variables and functions */
long atoi(char *);
int /*<<< orphan*/ wo_repeated_conditionals();
int main(int argc, char *argv[]) {
  long i, n;
  n = atoi(argv[1]);
  for (i = 0; i < n; i++)
    wo_repeated_conditionals();
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1175 <main+0x55>
mov    $0x0,%al
call   1030 <wo_repeated_conditionals@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    114f <main+0x2f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
test   %rax,%rax
jle    114d <main+0x2d>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <wo_repeated_conditionals@plt>
add    $0xffffffffffffffff,%rbx
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @atoi(i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = phi i64 [ %10, %7 ], [ 0, %2 ]
%9 = tail call i32 (...) @wo_repeated_conditionals()
%10 = add nuw nsw i64 %8, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ FadeExt(int /*<<< orphan*/, int, int);
void FadeSkipNextFadeOut() { FadeExt(0, ((1 << 5) | (1 << 1)), (1 << 5)); }


x86 assembly (clang, -O0):
<FadeSkipNextFadeOut>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x22,%esi
mov    $0x20,%edx
call   1030 <FadeExt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FadeSkipNextFadeOut>:
xor    %edi,%edi
mov    $0x22,%esi
mov    $0x20,%edx
jmp    1030 <FadeExt@plt>

LLVM IR (-O0):
define void @FadeSkipNextFadeOut() {
%1 = call i32 @FadeExt(i32 0, i32 34, i32 32)
ret void
}

LLVM IR (-O2):
define void @FadeSkipNextFadeOut() {
%1 = tail call i32 @FadeExt(i32 0, i32 34, i32 32)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpackhi_pi8(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test78(__m64 a, __m64 b) { return _mm_unpackhi_pi8(a, b); }


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

x86 assembly (clang, -O2):
<test78>:
jmp    1030 <_mm_unpackhi_pi8@plt>

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

LLVM IR (-O2):
define i32 @test78(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpackhi_pi8(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
void *memchr(void const *, int, int);
void *__rawmemchr(const void *s, int c) { return memchr(s, c, 1 << 30); }


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

x86 assembly (clang, -O2):
<__rawmemchr>:
mov    $0x40000000,%edx
jmp    1030 <memchr@plt>

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

LLVM IR (-O2):
define i8* @__rawmemchr(i8* %0, i32 %1) {
%3 = tail call i8* @memchr(i8* %0, i32 %1, i32 1073741824)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ mtx_t;
typedef int /*<<< orphan*/ cnd_t;

/* Variables and functions */
int cond_wait(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int cnd_wait(cnd_t *cond, mtx_t *mtx) { return cond_wait(cond, mtx); }


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

x86 assembly (clang, -O2):
<cnd_wait>:
jmp    1030 <cond_wait@plt>

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

LLVM IR (-O2):
define i32 @cnd_wait(i32* %0, i32* %1) {
%3 = tail call i32 @cond_wait(i32* %0, i32* %1)
ret i32 %3
}
void gumbo_debug(const char *unused__format __attribute__((__unused__)), ...) {}


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

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

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

LLVM IR (-O2):
define void @gumbo_debug(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ funTemF2C();
int main() {
  funTemF2C();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @funTemF2C()
ret i32 0
}
__attribute((always_, no)) int f() { return 3; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
ret i32 3
}

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void finalize_standard_gen_files(FILE *h_fptr, FILE *cv_h_fptr, FILE *cv_c_fptr,
                                 char *message_name) {
  fprintf(h_fptr,
          "\n#ifdef  __cplusplus\n}\n#endif\n\n#endif /* _%s_set_h_ */\n",
          message_name);
  fprintf(cv_h_fptr,
          "\n#ifdef  __cplusplus\n}\n#endif\n\n#endif /* _%s_set_c_h_ */\n",
          message_name);
}


x86 assembly (clang, -O0):
<finalize_standard_gen_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xeed(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalize_standard_gen_files>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rsi,%r14
lea    0xedf(%rip),%rsi
mov    %rcx,%rdx
call   1030 <fprintf@plt>
lea    0xf08(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"\0A#ifdef __cplusplus\0A}\0A#endif\0A\0A#endif /* _%s_set_h_ */\0A\00"
@.str.1 = [58 x i8] c"\0A#ifdef __cplusplus\0A}\0A#endif\0A\0A#endif /* _%s_set_c_h_ */\0A\00"
define void @finalize_standard_gen_files(i32* %0, i32* %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = load i8*, i8** %8
%11 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32*, i32** %6
%13 = load i8*, i8** %8
%14 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"\0A#ifdef __cplusplus\0A}\0A#endif\0A\0A#endif /* _%s_set_h_ */\0A\00"
@.str.1 = [58 x i8] c"\0A#ifdef __cplusplus\0A}\0A#endif\0A\0A#endif /* _%s_set_c_h_ */\0A\00"
define void @finalize_standard_gen_files(i32* nocapture %0, i32* nocapture %1, i32* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned char *, unsigned int, int,
                          int /*<<< orphan*/ *);
void lzw_writebuf(void *stream, unsigned char *buf, unsigned size) {
  fwrite(buf, size, 1, (FILE *)stream);
}


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

x86 assembly (clang, -O2):
<lzw_writebuf>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    %edx,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define void @lzw_writebuf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 @fwrite(i8* %1, i32 %2, i32 1, i32* %4)
ret void
}
void XCreateIC() {}


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

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

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

LLVM IR (-O2):
define void @XCreateIC() {
ret void
}
/* Variables and functions */
scalar_t__ strchr(char const *, char const);
int utl_peg_oneof(const char *pat, const char *str) {
  if (!(str && *str))
    return -1;
  return (strchr(pat, *str) ? 1 : -1);
}


x86 assembly (clang, -O0):
<utl_peg_oneof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     113b <utl_peg_oneof+0x2b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1147 <utl_peg_oneof+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <utl_peg_oneof+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
mov    %rax,%rdx
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utl_peg_oneof>:
push   %rax
mov    $0xffffffff,%eax
test   %rsi,%rsi
je     1132 <utl_peg_oneof+0x22>
mov    (%rsi),%cl
test   %cl,%cl
je     1132 <utl_peg_oneof+0x22>
movsbl %cl,%esi
call   1030 <strchr@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @utl_peg_oneof(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %8, %2
store i32 -1, i32* %3
br label %22
14: ; preds = %8
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = load i8, i8* %16
%18 = call i64 @strchr(i8* %15, i8 signext %17)
%19 = icmp ne i64 %18, 0
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 1, i32 -1
store i32 %21, i32* %3
br label %22
22: ; preds = %14, %13
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @utl_peg_oneof(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i64 @strchr(i8* %0, i8 signext %5)
%9 = icmp eq i64 %8, 0
%10 = select i1 %9, i32 -1, i32 1
br label %11
11: ; preds = %2, %4, %7
%12 = phi i32 [ %10, %7 ], [ -1, %4 ], [ -1, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, " malloc_test need at least 3 arguments setting values for "
                  "-r, -m and -l\n");
  fprintf(stderr, " -r indicates what core to use when running the triad\n");
  fprintf(stderr, " [-m] value increases the number of calls to triad by a "
                  "multiplier = value\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1a(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf43(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [73 x i8] c" malloc_test need at least 3 arguments setting values for -r, -m and -l\0A\00"
@.str.1 = [55 x i8] c" -r indicates what core to use when running the triad\0A\00"
@.str.2 = [76 x i8] c" [-m] value increases the number of calls to triad by a multiplier = value\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [73 x i8] c" malloc_test need at least 3 arguments setting values for -r, -m and -l\0A\00"
@.str.1 = [55 x i8] c" -r indicates what core to use when running the triad\0A\00"
@.str.2 = [76 x i8] c" [-m] value increases the number of calls to triad by a multiplier = value\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f_memcpy_impl(void *, void *, int *);
void f_memcpy__(void *restrict new, void *restrict old, int *length) {
  f_memcpy_impl(new, old, length);
  return;
}


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

x86 assembly (clang, -O2):
<f_memcpy__>:
jmp    1030 <f_memcpy_impl@plt>

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

LLVM IR (-O2):
define void @f_memcpy__(i8* noalias %0, i8* noalias %1, i32* %2) {
%4 = tail call i32 @f_memcpy_impl(i8* %0, i8* %1, i32* %2)
ret void
}
void foo() {
  int i;
  float j;
  for (i = 0; i < 1000; i++)
    j = 123 * 456;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jge    1133 <foo+0x33>
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <foo+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 1000
br i1 %5, label %6, label %10
6: ; preds = %3
store float 5.608800e+04, float* %2
br label %7
7: ; preds = %6
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
int put_zeroes_in_m_map_f(int x) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @put_zeroes_in_m_map_f(i32 %0) {
ret i32 0
}
void print_disk_util(struct disk_util_stat *du, struct disk_util_agg *agg,
                     int terse, struct buf_output *out) {}


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

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

LLVM IR (-O0):
%struct.disk_util_stat = type opaque
%struct.disk_util_agg = type opaque
%struct.buf_output = type opaque
define void @print_disk_util(%struct.disk_util_stat* %0, %struct.disk_util_agg* %1, i32 %2, %struct.buf_output* %3) {
%5 = alloca %struct.disk_util_stat*
%6 = alloca %struct.disk_util_agg*
%7 = alloca i32
%8 = alloca %struct.buf_output*
store %struct.disk_util_stat* %0, %struct.disk_util_stat** %5
store %struct.disk_util_agg* %1, %struct.disk_util_agg** %6
store i32 %2, i32* %7
store %struct.buf_output* %3, %struct.buf_output** %8
ret void
}

LLVM IR (-O2):
%struct.disk_util_stat = type opaque
%struct.disk_util_agg = type opaque
%struct.buf_output = type opaque
define void @print_disk_util(%struct.disk_util_stat* nocapture %0, %struct.disk_util_agg* nocapture %1, i32 %2, %struct.buf_output* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ new_line();
int /*<<< orphan*/ print_char(char);
void print_string(const char *s) {
  char c;
  while ((c = *s++) != 0)
    if (c == '\n')
      new_line();
    else
      print_char(c);
}


x86 assembly (clang, -O0):
<print_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1173 <print_string+0x53>
movsbl -0x9(%rbp),%eax
cmp    $0xa,%eax
jne    1165 <print_string+0x45>
mov    $0x0,%al
call   1030 <new_line@plt>
jmp    116e <print_string+0x4e>
movsbl -0x9(%rbp),%edi
call   1040 <print_char@plt>
jmp    112c <print_string+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_string>:
push   %rbx
mov    %rdi,%rbx
jmp    1137 <print_string+0x17>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <new_line@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
cmp    $0xa,%al
je     1130 <print_string+0x10>
test   %al,%al
je     1150 <print_string+0x30>
movsbl %al,%edi
call   1040 <print_char@plt>
jmp    1137 <print_string+0x17>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_string(i8* nocapture %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i8* [ %0, %1 ], [ %4, %10 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 10, label %6
]
6: ; preds = %2
%7 = tail call i32 (...) @new_line()
br label %10
8: ; preds = %2
%9 = tail call i32 @print_char(i8 signext %5)
br label %10
10: ; preds = %8, %6
br label %2
11: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("#---\nHello world.\nHola mundo\nPrueba con tilde íó y eñes\n---#");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [64 x i8] c"#---\0AHello world.\0AHola mundo\0APrueba con tilde \C3\AD\C3\B3 y e\C3\B1es\0A---#\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [64 x i8] c"#---\0AHello world.\0AHola mundo\0APrueba con tilde \C3\AD\C3\B3 y e\C3\B1es\0A---#\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_ENCRYPT;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_ENCRYPT_it;
PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, const unsigned char **in,
                                 long len) {
  return (PKCS7_ENCRYPT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                        &PKCS7_ENCRYPT_it);
}


x86 assembly (clang, -O0):
<d2i_PKCS7_ENCRYPT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2eb1(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_PKCS7_ENCRYPT>:
mov    0x2ed1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@PKCS7_ENCRYPT_it = global i32 0
define i32* @d2i_PKCS7_ENCRYPT(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @PKCS7_ENCRYPT_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@PKCS7_ENCRYPT_it = global i32 0
define i32* @d2i_PKCS7_ENCRYPT(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @PKCS7_ENCRYPT_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
char *alloc_tracebuffer(int size) {
  char *bp = (char *)malloc(size * sizeof(char));
  if (bp == NULL) {
    printf("Failed to zalloc buffer in ttrace\r\n");
  }
  return bp;
}


x86 assembly (clang, -O0):
<alloc_tracebuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <alloc_tracebuffer+0x35>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_tracebuffer>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <alloc_tracebuffer+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Failed to zalloc buffer in ttrace\0D\0A\00"
define i8* @alloc_tracebuffer(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 1
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@str = [35 x i8] c"Failed to zalloc buffer in ttrace\0D\00"
define i8* @alloc_tracebuffer(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
int harmony_supports_ipv6() { return 0; }


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

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

LLVM IR (-O0):
define i32 @harmony_supports_ipv6() {
ret i32 0
}

LLVM IR (-O2):
define i32 @harmony_supports_ipv6() {
ret i32 0
}
unsigned int char2int(char value) {
  unsigned int new_value = value;
  return (new_value << 24) >> 24;
}


x86 assembly (clang, -O0):
<char2int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x18,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char2int>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @char2int(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 24
%8 = lshr i32 %7, 24
ret i32 %8
}

LLVM IR (-O2):
define i32 @char2int(i8 signext %0) {
%2 = zext i8 %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mode() { printf("big-endian"); }


x86 assembly (clang, -O0):
<mode>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"big-endian\00"
define void @mode() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"big-endian\00"
define void @mode() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int syscall(int, int);
int dup(int fd) { return syscall(41, fd); }


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

x86 assembly (clang, -O2):
<dup>:
mov    %edi,%esi
mov    $0x29,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @dup(i32 %0) {
%2 = tail call i32 @syscall(i32 41, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ems1Stok(char const *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int, double);
void emsSetd(const char *token, double dvalue) {
  char str[200 + 1];
  ;
  sprintf(str, "%.*g", 15, dvalue);
  ems1Stok(token, str);
  return;
}


x86 assembly (clang, -O0):
<emsSetd>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
lea    -0xe0(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
lea    0xeb9(%rip),%rsi
mov    $0xf,%edx
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <ems1Stok@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emsSetd>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
mov    %rdi,%rbx
lea    0xecc(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0xf,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ems1Stok@plt>
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.*g\00"
define void @emsSetd(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca [201 x i8]
store i8* %0, i8** %3
store double %1, double* %4
%6 = getelementptr inbounds [201 x i8], [201 x i8]* %5, i64 0, i64 0
%7 = load double, double* %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 15, double %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [201 x i8], [201 x i8]* %5, i64 0, i64 0
%11 = call i32 @ems1Stok(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.*g\00"
define void @emsSetd(i8* %0, double %1) {
%3 = alloca [201 x i8]
%4 = getelementptr inbounds [201 x i8], [201 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 15, double %1)
%6 = call i32 @ems1Stok(i8* %0, i8* %4)
ret void
}
void DPMSEnable() {}


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

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

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

LLVM IR (-O2):
define void @DPMSEnable() {
ret void
}
float check3(float x) { return -__builtin_copysignf(x, 1.0); }


x86 assembly (clang, -O0):
<check3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<check3>:
orps   0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @check3(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.copysign.f32(float %3, float 1.000000e+00)
%5 = fneg float %4
ret float %5
}

LLVM IR (-O2):
define float @check3(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
%3 = fneg float %2
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ konnect_log(char *, int, char const *);
int konnect_error(int error, const char *message) {
  konnect_log("Error:%d Message:%s", error, message);
  return error;
}


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

x86 assembly (clang, -O2):
<konnect_error>:
push   %rbx
mov    %rsi,%rdx
mov    %edi,%ebx
lea    0xee3(%rip),%rdi
mov    %ebx,%esi
call   1030 <konnect_log@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Error:%d Message:%s\00"
define i32 @konnect_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @konnect_log(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@.str = [20 x i8] c"Error:%d Message:%s\00"
define i32 @konnect_error(i32 returned %0, i8* %1) {
%3 = tail call i32 @konnect_log(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ val;
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void put_u16(uint8_t *ptr, uint16_t val) { memcpy(ptr, &val, sizeof(val)); }


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

x86 assembly (clang, -O2):
<put_u16>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @put_u16(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 = call i32 @memcpy(i32* %5, i32* %4, i32 4)
ret void
}

LLVM IR (-O2):
define void @put_u16(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i32* %0, i32* %3, i32 4)
ret void
}
/* Variables and functions */
int vlist_inq_att(int, int, int, char const *, size_t, int *);
int vlistInqAttInt(int vlistID, int varID, const char *name, int mlen,
                   int *ip) {
  return vlist_inq_att(251, vlistID, varID, name, (size_t)mlen * sizeof(int),
                       ip);
}


x86 assembly (clang, -O0):
<vlistInqAttInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%r8
shl    $0x2,%r8
mov    -0x20(%rbp),%r9
mov    $0xfb,%edi
call   1030 <vlist_inq_att@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vlistInqAttInt>:
mov    %r8,%r9
mov    %rdx,%rax
mov    %esi,%edx
mov    %edi,%esi
movslq %ecx,%r8
shl    $0x2,%r8
mov    $0xfb,%edi
mov    %rax,%rcx
jmp    1030 <vlist_inq_att@plt>

LLVM IR (-O0):
define i32 @vlistInqAttInt(i32 %0, i32 %1, i8* %2, i32 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = sext i32 %14 to i64
%16 = mul i64 %15, 4
%17 = load i32*, i32** %10
%18 = call i32 @vlist_inq_att(i32 251, i32 %11, i32 %12, i8* %13, i64 %16, i32* %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @vlistInqAttInt(i32 %0, i32 %1, i8* %2, i32 %3, i32* %4) {
%6 = sext i32 %3 to i64
%7 = shl nsw i64 %6, 2
%8 = tail call i32 @vlist_inq_att(i32 251, i32 %0, i32 %1, i8* %2, i64 %7, i32* %4)
ret i32 %8
}
void default_mutex_lock(volatile void *param) {
  volatile int *mutex = param;
  do {
    while (*mutex)
      ;
    (*mutex)++;
    if (*mutex == 1)
      break;
    (*mutex)--;
  } while (1);
}


x86 assembly (clang, -O0):
<default_mutex_lock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1115 <default_mutex_lock+0x15>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    $0x0,%eax
je     1129 <default_mutex_lock+0x29>
jmp    1115 <default_mutex_lock+0x15>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    $0x1,%eax
jne    1148 <default_mutex_lock+0x48>
jmp    1162 <default_mutex_lock+0x62>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    $0x1,%al
test   $0x1,%al
jne    1110 <default_mutex_lock+0x10>
jmp    1162 <default_mutex_lock+0x62>
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_mutex_lock>:
cmpl   $0x0,(%rdi)
jne    1100 <default_mutex_lock>
addl   $0x1,(%rdi)
mov    (%rdi),%eax
cmp    $0x1,%eax
je     1114 <default_mutex_lock+0x14>
addl   $0xffffffff,(%rdi)
jmp    1100 <default_mutex_lock>
ret

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

LLVM IR (-O2):
define void @default_mutex_lock(i8* %0) {
%2 = bitcast i8* %0 to i32*
br label %3
3: ; preds = %6, %1
%4 = load volatile i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %3, %12
br label %3
7: ; preds = %3
%8 = load volatile i32, i32* %2
%9 = add nsw i32 %8, 1
store volatile i32 %9, i32* %2
%10 = load volatile i32, i32* %2
%11 = icmp eq i32 %10, 1
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = load volatile i32, i32* %2
%14 = add nsw i32 %13, -1
store volatile i32 %14, i32* %2
br label %6
15: ; preds = %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callFB(int /*<<< orphan*/);
int /*<<< orphan*/ lua_pushstring(char *);
void lua_message(char *s) {
  lua_pushstring(s);
  callFB(0);
}


x86 assembly (clang, -O0):
<lua_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <lua_pushstring@plt>
xor    %edi,%edi
call   1030 <callFB@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lua_message>:
push   %rax
call   1040 <lua_pushstring@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <callFB@plt>

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

LLVM IR (-O2):
define void @lua_message(i8* %0) {
%2 = tail call i32 @lua_pushstring(i8* %0)
%3 = tail call i32 @callFB(i32 0)
ret void
}
void foo015() {}


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

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

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

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