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

/* Variables and functions */
int /*<<< orphan*/ *memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
uint8_t *mac_copy(uint8_t dst[6], uint8_t src[6]) {
  return memcpy(dst, src, 6);
}


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

x86 assembly (clang, -O2):
<mac_copy>:
mov    $0x6,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i32* @mac_copy(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* @memcpy(i32* %5, i32* %6, i32 6)
ret i32* %7
}

LLVM IR (-O2):
define i32* @mac_copy(i32* %0, i32* %1) {
%3 = tail call i32* @memcpy(i32* %0, i32* %1, i32 6)
ret i32* %3
}
/* Variables and functions */
long rand();
long random(void) { return rand(); }


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

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

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

LLVM IR (-O2):
define i64 @random() {
%1 = tail call i64 (...) @rand()
ret i64 %1
}
regx0reg1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if ((p0[x0]) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0reg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
movzbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     1142 <regx0reg1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <regx0reg1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0reg1>:
movslq %edx,%rax
movzbl (%r8,%rax,1),%ecx
movzbl %sil,%edx
xor    %eax,%eax
cmp    %ecx,%edx
setae  %al
ret

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

LLVM IR (-O2):
define i32 @regx0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = and i32 %1, 255
%12 = icmp uge i32 %11, %10
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void strcpy_literal_string_Good() {
  char dst[10];
  strcpy(dst, "test");
}


x86 assembly (clang, -O0):
<strcpy_literal_string_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xa(%rbp),%rdi
lea    0xedd(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_literal_string_Good>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rsi
lea    0xe(%rsp),%rdi
call   1030 <strcpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
define void @strcpy_literal_string_Good() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
define void @strcpy_literal_string_Good() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char Name[20];
  printf("What is your last name?\n");
  scanf("%s", Name);
  getchar();
  printf("Hello Mr./Mrs. %s", Name);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xed0(%rip),%rdi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    -0x20(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb7(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xe8f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"What is your last name?\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [18 x i8] c"Hello Mr./Mrs. %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @getchar()
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [18 x i8] c"Hello Mr./Mrs. %s\00"
@str = [24 x i8] c"What is your last name?\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (...) @getchar()
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%7 = call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ Window;

/* Variables and functions */
void LUI_UnlinkWidgetFromWindow(Window window, void *widget) {}


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

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

LLVM IR (-O0):
define void @LUI_UnlinkWidgetFromWindow(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @LUI_UnlinkWidgetFromWindow(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __halt();
__attribute__((__noreturn__)) void abort(void) { __halt(); }


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

x86 assembly (clang, -O2):
<abort>:
push   %rax
xor    %eax,%eax
call   1030 <__halt@plt>

LLVM IR (-O0):
define void @abort() {
%1 = call i32 (...) @__halt()
unreachable
}

LLVM IR (-O2):
define void @abort() {
%1 = tail call i32 (...) @__halt()
unreachable
}
int monlist_get_monster_count(int idx) {
  (void)idx;
  return (1);
}


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

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

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

LLVM IR (-O2):
define i32 @monlist_get_monster_count(i32 %0) {
ret i32 1
}
int exynos_gpufreq_unlock(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @exynos_gpufreq_unlock() {
ret i32 0
}
long NO_FLIP_LONG(long pVar) { return pVar; }


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

x86 assembly (clang, -O2):
<NO_FLIP_LONG>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @NO_FLIP_LONG(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int fibonacci(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number = 0;
  printf("Type a number:\n");
  scanf("%d", &number);
  int result = fibonacci(number);
  printf("The number %d of Fibonacci sequence is %d.\n", number, result);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1040 <fibonacci@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <fibonacci@plt>
mov    0x4(%rsp),%esi
lea    0xe89(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Type a number:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [44 x i8] c"The number %d of Fibonacci sequence is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @fibonacci(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [44 x i8] c"The number %d of Fibonacci sequence is %d.\0A\00"
@str = [15 x i8] c"Type a number:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @fibonacci(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %6)
ret i32 0
}
/* Variables and functions */
int StatutBoutonPlosible(int);
int /*<<< orphan*/ printf(char *);
void testStatutBoutonPlosible() {
  int statutBouton;
  int result = StatutBoutonPlosible(statutBouton);
  if (1) {
    printf("%%TEST_FAILED%% time=0 testname=testStatutBoutonPlosible "
           "(Test_gestioncommandes) message=error message sample\n");
  }
}


x86 assembly (clang, -O0):
<testStatutBoutonPlosible>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%edi
call   1040 <StatutBoutonPlosible@plt>
mov    %eax,-0x8(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testStatutBoutonPlosible>:
push   %rax
call   1040 <StatutBoutonPlosible@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [111 x i8] c"%%TEST_FAILED%% time=0 testname=testStatutBoutonPlosible (Test_gestioncommandes) message=error message sample\0A\00"
define void @testStatutBoutonPlosible() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = call i32 @StatutBoutonPlosible(i32 %3)
store i32 %4, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [111 x i8] c"%%TEST_FAILED%% time=0 testname=testStatutBoutonPlosible (Test_gestioncommandes) message=error message sample\0A\00"
define void @testStatutBoutonPlosible() {
%1 = tail call i32 @StatutBoutonPlosible(i32 undef)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([111 x i8], [111 x i8]* @.str, i64 0, i64 0))
ret void
}
long long int successfulDonation(long long int v, long long int n) {
  int flag = 0;
  long long int val;
  val = (v * (v + 1) * (2 * v + 1)) / 6;
  if (val <= n)
    return v;
  else
    return v - 1;
}


x86 assembly (clang, -O0):
<successfulDonation>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0x1,%rcx
add    $0x1,%rcx
imul   %rcx,%rax
mov    $0x6,%ecx
cqto
idiv   %rcx
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     115c <successfulDonation+0x5c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <successfulDonation+0x68>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<successfulDonation>:
lea    0x1(%rdi),%rcx
imul   %rdi,%rcx
lea    (%rdi,%rdi,1),%rax
add    $0x1,%rax
imul   %rcx,%rax
movabs $0x2aaaaaaaaaaaaaab,%rcx
aa aa 2a
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
add    %rdx,%rax
xor    %ecx,%ecx
cmp    %rsi,%rax
setg   %cl
sub    %rcx,%rdi
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @successfulDonation(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i32 0, i32* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %4
%10 = add nsw i64 %9, 1
%11 = mul nsw i64 %8, %10
%12 = load i64, i64* %4
%13 = mul nsw i64 2, %12
%14 = add nsw i64 %13, 1
%15 = mul nsw i64 %11, %14
%16 = sdiv i64 %15, 6
store i64 %16, i64* %7
%17 = load i64, i64* %7
%18 = load i64, i64* %5
%19 = icmp sle i64 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = load i64, i64* %4
store i64 %21, i64* %3
br label %25
22: ; preds = %2
%23 = load i64, i64* %4
%24 = sub nsw i64 %23, 1
store i64 %24, i64* %3
br label %25
25: ; preds = %22, %20
%26 = load i64, i64* %3
ret i64 %26
}

LLVM IR (-O2):
define i64 @successfulDonation(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 1
%4 = mul nsw i64 %3, %0
%5 = shl nsw i64 %0, 1
%6 = or i64 %5, 1
%7 = mul nsw i64 %4, %6
%8 = sdiv i64 %7, 6
%9 = icmp sgt i64 %8, %1
%10 = sext i1 %9 to i64
%11 = add nsw i64 %10, %0
ret i64 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int uint16_t;
typedef int /*<<< orphan*/ outDelay;

/* Variables and functions */
int /*<<< orphan*/ FifoProtocol_memcpy(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ const *, int);
uint16_t inv_fifo_protocol_helper_encode_delay(uint32_t delay, uint8_t *out) {
  const uint32_t outDelay = delay;
  FifoProtocol_memcpy((out), (&outDelay), (sizeof(outDelay)));
  return 4;
}


x86 assembly (clang, -O0):
<inv_fifo_protocol_helper_encode_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x4,%edx
call   1030 <FifoProtocol_memcpy@plt>
mov    $0x4,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_fifo_protocol_helper_encode_delay>:
push   %rax
mov    %rsi,%rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    %rax,%rdi
mov    $0x4,%edx
call   1030 <FifoProtocol_memcpy@plt>
mov    $0x4,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @inv_fifo_protocol_helper_encode_delay(i32 %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 %0, i32* %3
%5 = call i32 @FifoProtocol_memcpy(i32* %1, i32* %3, i32 4)
ret i32 4
}
/* Variables and functions */
int foo(int *);
int main(void) {
  int x[2];
  x[0] = 1;
  x[1] = 7;
  return !(foo(x) == 7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x7,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <foo@plt>
cmp    $0x7,%eax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x700000001,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <foo@plt>
xor    %ecx,%ecx
cmp    $0x7,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
store i32 1, i32* %3
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
store i32 7, i32* %4
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%6 = call i32 @foo(i32* %5)
%7 = icmp eq i32 %6, 7
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32 1, i32* %3
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
store i32 7, i32* %4
%5 = call i32 @foo(i32* %3)
%6 = icmp ne i32 %5, 7
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void sum(int n) {
  int i;
  int sum = 0;
  for (i = 0; i < n; i++) {
    sum += i + 1;
  }
  printf("Sum of %d natural numbers is %d\n", n, sum);
}


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

x86 assembly (clang, -O2):
<sum>:
mov    %edi,%esi
test   %edi,%edi
jle    1135 <sum+0x25>
lea    -0x1(%rsi),%eax
lea    -0x2(%rsi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rsi,2),%edx
add    $0xffffffff,%edx
lea    0xed0(%rip),%rdi
jmp    1030 <printf@plt>
xor    %edx,%edx
lea    0xec2(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [33 x i8] c"Sum of %d natural numbers is %d\0A\00"
define void @sum(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = shl nuw i32 %0, 1
%5 = add nsw i32 %0, -1
%6 = zext i32 %5 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %4, %11
%13 = add i32 %12, -1
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
%16 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %15)
ret void
}
/* Type definitions */
struct index_packet {
  int dummy;
};

/* Variables and functions */
int pgwrite_big_endian(unsigned char *, struct index_packet *);
int pgwrite_little_endian(unsigned char *, struct index_packet *);
int blockpack__pgwrite(unsigned char *page, struct index_packet *source,
                       int little_endian) {
  if (little_endian)
    return pgwrite_little_endian(page, source);
  else
    return pgwrite_big_endian(page, source);
}


x86 assembly (clang, -O0):
<blockpack__pgwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1152 <blockpack__pgwrite+0x32>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <pgwrite_little_endian@plt>
mov    %eax,-0x4(%rbp)
jmp    1162 <blockpack__pgwrite+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <pgwrite_big_endian@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blockpack__pgwrite>:
test   %edx,%edx
je     1129 <blockpack__pgwrite+0x9>
jmp    1030 <pgwrite_little_endian@plt>
jmp    1040 <pgwrite_big_endian@plt>

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

LLVM IR (-O2):
%struct.index_packet = type { i32 }
define i32 @blockpack__pgwrite(i8* %0, %struct.index_packet* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @pgwrite_little_endian(i8* %0, %struct.index_packet* %1)
br label %9
7: ; preds = %3
%8 = tail call i32 @pgwrite_big_endian(i8* %0, %struct.index_packet* %1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
void anti_dead_code_elimination(int n, ...) {
  {}
}


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

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

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

LLVM IR (-O2):
define void @anti_dead_code_elimination(i32 %0, ...) {
ret void
}
signed long int signedlongint_ignoring_signedshort(signed long int x,
                                                   signed short y) {
  return x;
}


x86 assembly (clang, -O0):
<signedlongint_ignoring_signedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedlongint_ignoring_signedshort>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @signedlongint_ignoring_signedshort(i64 returned %0, i16 signext %1) {
ret i64 %0
}
void ff_hevc_put_hevc_bi_pel_pixels48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels48_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SetScl(int);
int /*<<< orphan*/ SetSda(int);
void MasterNack(void) {
  SetSda(1);
  SetScl(1);
  SetScl(0);
}


x86 assembly (clang, -O0):
<MasterNack>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <SetSda@plt>
mov    $0x1,%edi
call   1040 <SetScl@plt>
xor    %edi,%edi
call   1040 <SetScl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MasterNack>:
push   %rax
mov    $0x1,%edi
call   1030 <SetSda@plt>
mov    $0x1,%edi
call   1040 <SetScl@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <SetScl@plt>

LLVM IR (-O0):
define void @MasterNack() {
%1 = call i32 @SetSda(i32 1)
%2 = call i32 @SetScl(i32 1)
%3 = call i32 @SetScl(i32 0)
ret void
}

LLVM IR (-O2):
define void @MasterNack() {
%1 = tail call i32 @SetSda(i32 1)
%2 = tail call i32 @SetScl(i32 1)
%3 = tail call i32 @SetScl(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ primeFactor(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void print_prime_factors(uint64_t n) {
  printf("%ju :", n);
  primeFactor(n);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_prime_factors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <primeFactor@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_prime_factors>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <primeFactor@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%ju :\00"
define void @print_prime_factors(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @primeFactor(i32 %0)
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PTHREAD_CANCEL_ASYNCHRONOUS;
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ pthread_setcanceltype(int /*<<< orphan*/, int *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void setup_thread() {
  int ot;
  pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &ot);
  signal(SIGPIPE, SIG_IGN);
}


x86 assembly (clang, -O0):
<setup_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
call   1040 <pthread_setcanceltype@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_thread>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
call   1040 <pthread_setcanceltype@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
pop    %rax
ret

LLVM IR (-O0):
@PTHREAD_CANCEL_ASYNCHRONOUS = global i32 0
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @setup_thread() {
%1 = alloca i32
%2 = load i32, i32* @PTHREAD_CANCEL_ASYNCHRONOUS
%3 = call i32 @pthread_setcanceltype(i32 %2, i32* %1)
%4 = load i32, i32* @SIGPIPE
%5 = load i32, i32* @SIG_IGN
%6 = call i32 @signal(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@PTHREAD_CANCEL_ASYNCHRONOUS = global i32 0
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @setup_thread() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @PTHREAD_CANCEL_ASYNCHRONOUS
%4 = call i32 @pthread_setcanceltype(i32 %3, i32* %1)
%5 = load i32, i32* @SIGPIPE
%6 = load i32, i32* @SIG_IGN
%7 = call i32 @signal(i32 %5, i32 %6)
ret void
}
void timer_end() {}


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

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

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

LLVM IR (-O2):
define void @timer_end() {
ret void
}
void confend(struct confstate *c) {}


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

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

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

LLVM IR (-O2):
%struct.confstate = type opaque
define void @confend(%struct.confstate* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
size_t fmt_s64_dec(char *, int /*<<< orphan*/);
int /*<<< orphan*/ print(char *, size_t);
void print_s64_dec(uint64_t val) {
  char buf[20];
  size_t len = fmt_s64_dec(buf, val);
  print(buf, len);
}


x86 assembly (clang, -O0):
<print_s64_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <fmt_s64_dec@plt>
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <print@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_s64_dec>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%esi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <fmt_s64_dec@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <print@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @print_s64_dec(i32 %0) {
%2 = alloca i32
%3 = alloca [20 x i8]
%4 = alloca i64
store i32 %0, i32* %2
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i64 @fmt_s64_dec(i8* %5, i32 %6)
store i64 %7, i64* %4
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = load i64, i64* %4
%10 = call i32 @print(i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @print_s64_dec(i32 %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i64 @fmt_s64_dec(i8* %3, i32 %0)
%5 = call i32 @print(i8* %3, i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int /*<<< orphan*/ EC_KEY_up_ref(int /*<<< orphan*/ *);
int EVP_PKEY_assign_EC_KEY(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) {
  int ret = EVP_PKEY_assign_EC_KEY(pkey, key);
  if (ret)
    EC_KEY_up_ref(key);
  return ret;
}


x86 assembly (clang, -O0):
<EVP_PKEY_set1_EC_KEY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <EVP_PKEY_assign_EC_KEY@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1153 <EVP_PKEY_set1_EC_KEY+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <EC_KEY_up_ref@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_PKEY_set1_EC_KEY>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <EVP_PKEY_assign_EC_KEY@plt>
mov    %eax,%ebp
test   %eax,%eax
je     1139 <EVP_PKEY_set1_EC_KEY+0x19>
mov    %rbx,%rdi
call   1030 <EC_KEY_up_ref@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @EVP_PKEY_set1_EC_KEY(i32* %0, i32* %1) {
%3 = tail call i32 @EVP_PKEY_assign_EC_KEY(i32* %0, i32* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @EC_KEY_up_ref(i32* %1)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
void XtUngrabKey() {}


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

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

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

LLVM IR (-O2):
define void @XtUngrabKey() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_part_result(int *, int *, int *, int *, int *, int *);
void get_part_result__(int *num_graph1, int *igraph1, int *num_graph2,
                       int *igraph2, int *num_separator, int *iseparator) {
  get_part_result(num_graph1, igraph1, num_graph2, igraph2, num_separator,
                  iseparator);
}


x86 assembly (clang, -O0):
<get_part_result__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <get_part_result@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_part_result__>:
jmp    1030 <get_part_result@plt>

LLVM IR (-O0):
define void @get_part_result__(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i32*, i32** %7
%14 = load i32*, i32** %8
%15 = load i32*, i32** %9
%16 = load i32*, i32** %10
%17 = load i32*, i32** %11
%18 = load i32*, i32** %12
%19 = call i32 @get_part_result(i32* %13, i32* %14, i32* %15, i32* %16, i32* %17, i32* %18)
ret void
}

LLVM IR (-O2):
define void @get_part_result__(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = tail call i32 @get_part_result(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ api_end();
int /*<<< orphan*/ api_putstr0(char *);
void HariMain(void) {
  api_putstr0("hello, world.\n");
  api_end();
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <api_putstr0@plt>
mov    $0x0,%al
call   1030 <api_end@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HariMain>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <api_putstr0@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <api_end@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"hello, world.\0A\00"
define void @HariMain() {
%1 = call i32 @api_putstr0(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @api_end()
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"hello, world.\0A\00"
define void @HariMain() {
%1 = tail call i32 @api_putstr0(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @api_end()
ret void
}
/* Variables and functions */
size_t ft_strlen(const char *str) {
  if (*str)
    return (1 + ft_strlen(str + 1));
  return (0);
}


x86 assembly (clang, -O0):
<ft_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1143 <ft_strlen+0x33>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <ft_strlen@plt>
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    114b <ft_strlen+0x3b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strlen>:
cmpb   $0x0,(%rdi)
je     111f <ft_strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <ft_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @ft_strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = phi i64 [ %8, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = add i64 %6, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
char *bs_nl(char *s) {
  if (*s == '\n') {
    return "\\n";
  } else {
    return s;
  }
}


x86 assembly (clang, -O0):
<bs_nl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1128 <bs_nl+0x28>
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <bs_nl+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bs_nl>:
cmpb   $0xa,(%rdi)
lea    0xef6(%rip),%rax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\\n\00"
define i8* @bs_nl(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
9: ; preds = %1
%10 = load i8*, i8** %3
store i8* %10, i8** %2
br label %11
11: ; preds = %9, %8
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"\\n\00"
define i8* @bs_nl(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 10
%4 = select i1 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %4
}
/* Variables and functions */
double geometric_mean(int, double, double, double);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char const *argv[]) {
  printf("%f\n", geometric_mean(3, 1.0, 2.0, 3.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3,%edi
movsd  0xebd(%rip),%xmm0
movsd  0xebd(%rip),%xmm1
movsd  0xebd(%rip),%xmm2
call   1040 <geometric_mean@plt>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
movsd  0xed7(%rip),%xmm2
mov    $0x3,%edi
call   1040 <geometric_mean@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\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 double @geometric_mean(i32 3, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @geometric_mean(i32 3, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int aes_ccms_board_enc(uint8_t *a, uint8_t len_a, uint8_t *m, uint8_t *len_m,
                       uint8_t saddr[8], uint8_t asn[5], uint8_t *key) {
  return -1;
}


x86 assembly (clang, -O0):
<aes_ccms_board_enc>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @aes_ccms_board_enc(i32* %0, i32 %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
store i32* %0, i32** %8
store i32 %1, i32* %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store i32* %6, i32** %14
ret i32 -1
}

LLVM IR (-O2):
define i32 @aes_ccms_board_enc(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32* nocapture readnone %4, i32* nocapture readnone %5, i32* nocapture readnone %6) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ print_string(char *);
void main(void) {
  int x, y, z;
  x = 1;
  y = 2;
  z = 3;
  print_string("should get giraffe\ngot: ");
  if (x == 2)
    print_string("elephant\n");
  else
    print_string("giraffe\n");
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
lea    0xecc(%rip),%rdi
call   1030 <print_string@plt>
cmpl   $0x2,-0x4(%rbp)
jne    1154 <main+0x44>
lea    0xecf(%rip),%rdi
call   1030 <print_string@plt>
jmp    1160 <main+0x50>
lea    0xec8(%rip),%rdi
call   1030 <print_string@plt>
lea    0xec3(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_string@plt>
lea    0xef5(%rip),%rdi
call   1030 <print_string@plt>
lea    0xef0(%rip),%rdi
pop    %rax
jmp    1030 <print_string@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"should get giraffe\0Agot: \00"
@.str.1 = [10 x i8] c"elephant\0A\00"
@.str.2 = [9 x i8] c"giraffe\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%4 = call i32 @print_string(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @print_string(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 @print_string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"should get giraffe\0Agot: \00"
@.str.2 = [9 x i8] c"giraffe\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @print_string(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rte_jhash_3words(int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t rte_jhash_2words(uint32_t a, uint32_t b, uint32_t initval) {
  return rte_jhash_3words(a, b, 0, initval);
}


x86 assembly (clang, -O0):
<rte_jhash_2words>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%ecx
xor    %edx,%edx
call   1030 <rte_jhash_3words@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_jhash_2words>:
mov    %edx,%ecx
xor    %edx,%edx
jmp    1030 <rte_jhash_3words@plt>

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

LLVM IR (-O2):
define i32 @rte_jhash_2words(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @rte_jhash_3words(i32 %0, i32 %1, i32 0, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ read_config();
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void sighandler(int sig) {
  read_config();
  signal(SIGHUP, sighandler);
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <read_config@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    0x2e9e(%rip),%rsi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler>:
push   %rax
xor    %eax,%eax
call   1040 <read_config@plt>
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rsi
pop    %rax
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGHUP = global i32 0
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @read_config()
%4 = load i32, i32* @SIGHUP
%5 = call i32 @signal(i32 %4, void (i32)* @sighandler)
ret void
}

LLVM IR (-O2):
@SIGHUP = global i32 0
define void @sighandler(i32 %0) {
%2 = tail call i32 (...) @read_config()
%3 = load i32, i32* @SIGHUP
%4 = tail call i32 @signal(i32 %3, void (i32)* @sighandler)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __poet_fail();
int main() {
  int x = 10;
  if (x <= 5)
    __poet_fail();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     1137 <main+0x27>
mov    $0x0,%al
call   1030 <__poet_fail@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 5
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @__poet_fail()
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}