xunge/DecIR huggingface dataset:
int tf_i(int c) { return c / 3; }


x86 assembly (clang, -O0):
<tf_i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<tf_i>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @tf_i(i32 %0) {
%2 = sdiv i32 %0, 3
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ myDtChkpntMsgSend(char *, char *);
int _DtPerfChkpntEnd() {
  myDtChkpntMsgSend("End checkpoint delivery", "End");
  return (1);
}


x86 assembly (clang, -O0):
<_DtPerfChkpntEnd>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef6(%rip),%rsi
call   1030 <myDtChkpntMsgSend@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DtPerfChkpntEnd>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef9(%rip),%rsi
call   1030 <myDtChkpntMsgSend@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"End checkpoint delivery\00"
@.str.1 = [4 x i8] c"End\00"
define i32 @_DtPerfChkpntEnd() {
%1 = call i32 @myDtChkpntMsgSend(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [24 x i8] c"End checkpoint delivery\00"
@.str.1 = [4 x i8] c"End\00"
define i32 @_DtPerfChkpntEnd() {
%1 = tail call i32 @myDtChkpntMsgSend(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dealloc(void *f) { free(f); }


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

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

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

LLVM IR (-O2):
define void @dealloc(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int foo_aligned(int *b) { return *b + 1; }


x86 assembly (clang, -O0):
<foo_aligned>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo_aligned(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rotr(int, int);
uint32_t sigma0(uint32_t x) { return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); }


x86 assembly (clang, -O0):
<sigma0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <rotr@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xd,%esi
call   1030 <rotr@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x16,%esi
call   1030 <rotr@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma0>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x2,%esi
call   1030 <rotr@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0xd,%esi
call   1030 <rotr@plt>
mov    %eax,%ebp
xor    %r14d,%ebp
mov    %ebx,%edi
mov    $0x16,%esi
call   1030 <rotr@plt>
xor    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sigma0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotr(i32 %3, i32 2)
%5 = load i32, i32* %2
%6 = call i32 @rotr(i32 %5, i32 13)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = call i32 @rotr(i32 %8, i32 22)
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @sigma0(i32 %0) {
%2 = tail call i32 @rotr(i32 %0, i32 2)
%3 = tail call i32 @rotr(i32 %0, i32 13)
%4 = xor i32 %3, %2
%5 = tail call i32 @rotr(i32 %0, i32 22)
%6 = xor i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, void const *, int);
int strcmp(char *, char *);
int record_cmp(const void *rec1, const void *rec2) {
  char rec1_title[255 + 1];
  char rec2_title[255 + 1];
  memcpy(rec1_title, rec1, 255);
  rec1_title[255] = '\0';
  memcpy(rec2_title, rec2, 255);
  rec2_title[255] = '\0';
  return strcmp(rec1_title, rec2_title);
}


x86 assembly (clang, -O0):
<record_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0xff,%edx
call   1040 <memcpy@plt>
movb   $0x0,-0x11(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xff,%edx
call   1040 <memcpy@plt>
movb   $0x0,-0x111(%rbp)
lea    -0x110(%rbp),%rdi
lea    -0x210(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<record_cmp>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0x100(%rsp),%r14
mov    %r14,%rdi
mov    $0xff,%edx
call   1040 <memcpy@plt>
movb   $0x0,0x1ff(%rsp)
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0xff,%edx
call   1040 <memcpy@plt>
movb   $0x0,0xff(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @record_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [256 x i8]
%6 = alloca [256 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = call i32 @memcpy(i8* %7, i8* %8, i32 255)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 255
store i8 0, i8* %10
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%12 = load i8*, i8** %4
%13 = call i32 @memcpy(i8* %11, i8* %12, i32 255)
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 255
store i8 0, i8* %14
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%17 = call i32 @strcmp(i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @record_cmp(i8* %0, i8* %1) {
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = call i32 @memcpy(i8* %5, i8* %0, i32 255)
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 255
store i8 0, i8* %8
%9 = call i32 @memcpy(i8* %6, i8* %1, i32 255)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 255
store i8 0, i8* %10
%11 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %11
}
char *x2() {
  static char *str2[] = {"string1", "str2", "str3"};
  return str2[0];
}


x86 assembly (clang, -O0):
<x2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f25(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x2>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@x2.str2 = internal global [3 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0)]
@.str = [8 x i8] c"string1\00"
@.str.1 = [5 x i8] c"str2\00"
@.str.2 = [5 x i8] c"str3\00"
define i8* @x2() {
%1 = load i8*, i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @x2.str2, i64 0, i64 0)
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"string1\00"
define i8* @x2() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
void gf8mul_00100001(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm4\n"
                       "\tpxor    %xmm7, %xmm2\n"
                       "\tpxor    %xmm7, %xmm1\n"
                       "\tpxor    %xmm7, %xmm0\n"
                       "\tpxor    %xmm6, %xmm7\n"
                       "\tpxor    %xmm6, %xmm4\n"
                       "\tpxor    %xmm6, %xmm1\n"
                       "\tpxor    %xmm5, %xmm6\n"
                       "\tpxor    %xmm5, %xmm3\n"
                       "\tpxor    %xmm5, %xmm0\n"
                       "\tpxor    %xmm4, %xmm7\n"
                       "\tpxor    %xmm4, %xmm6\n"
                       "\tpxor    %xmm4, %xmm3\n"
                       "\tpxor    %xmm4, %xmm2\n"
                       "\tpxor    %xmm4, %xmm1\n"
                       "\tpxor    %xmm4, %xmm0\n"
                       "\tpxor    %xmm3, %xmm7\n"
                       "\tpxor    %xmm3, %xmm5\n"
                       "\tpxor    %xmm3, %xmm4\n"
                       "\tpxor    %xmm3, %xmm2\n"
                       "\tpxor    %xmm3, %xmm0\n"
                       "\tpxor    %xmm4, %xmm3\n"
                       "\tpxor    %xmm2, %xmm7\n"
                       "\tpxor    %xmm1, %xmm6\n"
                       "\tpxor    %xmm0, %xmm5\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm4
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm7,%xmm0
pxor   %xmm6,%xmm7
pxor   %xmm6,%xmm4
pxor   %xmm6,%xmm1
pxor   %xmm5,%xmm6
pxor   %xmm5,%xmm3
pxor   %xmm5,%xmm0
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm6
pxor   %xmm4,%xmm3
pxor   %xmm4,%xmm2
pxor   %xmm4,%xmm1
pxor   %xmm4,%xmm0
pxor   %xmm3,%xmm7
pxor   %xmm3,%xmm5
pxor   %xmm3,%xmm4
pxor   %xmm3,%xmm2
pxor   %xmm3,%xmm0
pxor   %xmm4,%xmm3
pxor   %xmm2,%xmm7
pxor   %xmm1,%xmm6
pxor   %xmm0,%xmm5
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm4
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm7,%xmm0
pxor   %xmm6,%xmm7
pxor   %xmm6,%xmm4
pxor   %xmm6,%xmm1
pxor   %xmm5,%xmm6
pxor   %xmm5,%xmm3
pxor   %xmm5,%xmm0
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm6
pxor   %xmm4,%xmm3
pxor   %xmm4,%xmm2
pxor   %xmm4,%xmm1
pxor   %xmm4,%xmm0
pxor   %xmm3,%xmm7
pxor   %xmm3,%xmm5
pxor   %xmm3,%xmm4
pxor   %xmm3,%xmm2
pxor   %xmm3,%xmm0
pxor   %xmm4,%xmm3
pxor   %xmm2,%xmm7
pxor   %xmm1,%xmm6
pxor   %xmm0,%xmm5
ret

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

LLVM IR (-O2):
define void @gf8mul_00100001() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm4\0A\09pxor %xmm7, %xmm2\0A\09pxor %xmm7, %xmm1\0A\09pxor %xmm7, %xmm0\0A\09pxor %xmm6, %xmm7\0A\09pxor %xmm6, %xmm4\0A\09pxor %xmm6, %xmm1\0A\09pxor %xmm5, %xmm6\0A\09pxor %xmm5, %xmm3\0A\09pxor %xmm5, %xmm0\0A\09pxor %xmm4, %xmm7\0A\09pxor %xmm4, %xmm6\0A\09pxor %xmm4, %xmm3\0A\09pxor %xmm4, %xmm2\0A\09pxor %xmm4, %xmm1\0A\09pxor %xmm4, %xmm0\0A\09pxor %xmm3, %xmm7\0A\09pxor %xmm3, %xmm5\0A\09pxor %xmm3, %xmm4\0A\09pxor %xmm3, %xmm2\0A\09pxor %xmm3, %xmm0\0A\09pxor %xmm4, %xmm3\0A\09pxor %xmm2, %xmm7\0A\09pxor %xmm1, %xmm6\0A\09pxor %xmm0, %xmm5\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("./server\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"./server\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"./server\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct timeval {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ const tv_sec;
};

/* Variables and functions */
int settimeofday(struct timeval *, void *);
int stime(const time_t *t) {
  struct timeval tv = {.tv_sec = *t, .tv_usec = 0};
  return settimeofday(&tv, (void *)0);
}


x86 assembly (clang, -O0):
<stime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <settimeofday@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stime>:
push   %rax
movl   $0x0,(%rsp)
mov    (%rdi),%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <settimeofday@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @stime(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.timeval
store i32* %0, i32** %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i32 0, i32* %4
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = call i32 @settimeofday(%struct.timeval* %3, i8* null)
ret i32 %8
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @stime(i32* nocapture %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
store i32 0, i32* %4
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
%6 = load i32, i32* %0
store i32 %6, i32* %5
%7 = call i32 @settimeofday(%struct.timeval* %2, i8* null)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ _SMALL_PRINTF_puts(char const *, int, int /*<<< orphan*/);
int /*<<< orphan*/ __io_putchar(char);
int strlen(char const *);
int puts(const char *str) {
  int len = strlen(str);
  _SMALL_PRINTF_puts(str, len, 0);
  __io_putchar('\n');
  return len;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <_SMALL_PRINTF_puts@plt>
mov    $0xa,%edi
call   1040 <__io_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
xor    %edx,%edx
call   1030 <_SMALL_PRINTF_puts@plt>
mov    $0xa,%edi
call   1040 <__io_putchar@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = call i32 @_SMALL_PRINTF_puts(i8* %6, i32 %7, i32 0)
%9 = call i32 @__io_putchar(i8 signext 10)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @puts(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @_SMALL_PRINTF_puts(i8* %0, i32 %2, i32 0)
%4 = tail call i32 @__io_putchar(i8 signext 10)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  write(1, "Hello world\n", 12);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
mov    $0xc,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0xc,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12)
%2 = tail call i32 @exit(i32 0)
unreachable
}
void foo25() {}


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

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

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

LLVM IR (-O2):
define void @foo25() {
ret void
}
int GCD(int x, int y) {
  if (x % y == 0)
    return y;
  return GCD(y, x % y);
}


x86 assembly (clang, -O0):
<GCD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1139 <GCD+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <GCD+0x3d>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <GCD@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCD>:
mov    %esi,%edx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <GCD+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @GCD(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %5, %3 ]
%5 = phi i32 [ %1, %2 ], [ %6, %3 ]
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %5
}
void RTHeapSimpleFree(void) {}


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

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

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

LLVM IR (-O2):
define void @RTHeapSimpleFree() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmx_potential(int, char **);
int main(int argc, char *argv[]) {
  gmx_potential(argc, argv);
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_potential@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_potential(i32 %0, i8** %1)
ret i32 0
}
int data_valid(int *data, int size, int value) {
  int i;
  for (i = 0; i < size; i++) {
    if (data[i] != value) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<data_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <data_valid+0x54>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
je     1141 <data_valid+0x41>
movl   $0x0,-0x4(%rbp)
jmp    115b <data_valid+0x5b>
jmp    1146 <data_valid+0x46>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <data_valid+0x15>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_valid>:
mov    $0x1,%eax
test   %esi,%esi
jle    111e <data_valid+0x1e>
mov    %esi,%ecx
xor    %esi,%esi
nopl   (%rax)
cmp    %edx,(%rdi,%rsi,4)
jne    111f <data_valid+0x1f>
add    $0x1,%rsi
cmp    %rsi,%rcx
jne    1110 <data_valid+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @data_valid(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %2
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %7, label %15
15: ; preds = %9, %7, %3
%16 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %16
}
double norm(double value, double min, double max, double scale) {
  return value / (max - min) * scale;
}


x86 assembly (clang, -O0):
<norm>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm>:
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @norm(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %7
%11 = load double, double* %6
%12 = fsub double %10, %11
%13 = fdiv double %9, %12
%14 = load double, double* %8
%15 = fmul double %13, %14
ret double %15
}

LLVM IR (-O2):
define double @norm(double %0, double %1, double %2, double %3) {
%5 = fsub double %2, %1
%6 = fdiv double %0, %5
%7 = fmul double %6, %3
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int f5_handler(char **save) {
  write_instr(0x00);
  write_imm(0x3E);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<f5_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x3e,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x3e,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f5_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 62)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @f5_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 62)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
                                      const void *ns,
                                      const unsigned char *name) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.sysfs_dirent = type opaque
define %struct.sysfs_dirent* @sysfs_get_dirent(%struct.sysfs_dirent* %0, i8* %1, i8* %2) {
%4 = alloca %struct.sysfs_dirent*
%5 = alloca i8*
%6 = alloca i8*
store %struct.sysfs_dirent* %0, %struct.sysfs_dirent** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret %struct.sysfs_dirent* null
}

LLVM IR (-O2):
%struct.sysfs_dirent = type opaque
define noalias %struct.sysfs_dirent* @sysfs_get_dirent(%struct.sysfs_dirent* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret %struct.sysfs_dirent* null
}
/* Variables and functions */
int /*<<< orphan*/ get_host_addr(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("USAGE: %s host_or_domain\n", argv[0]);
    return 0;
  }
  get_host_addr(argv[1]);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    115f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1173 <main+0x53>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <get_host_addr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1137 <main+0x17>
mov    (%rsi),%rsi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
jmp    1140 <main+0x20>
mov    0x8(%rsi),%rdi
call   1040 <get_host_addr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"USAGE: %s host_or_domain\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 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %11)
store i32 0, i32* %3
br label %18
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @get_host_addr(i8* %16)
store i32 0, i32* %3
br label %18
18: ; preds = %13, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [26 x i8] c"USAGE: %s host_or_domain\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @get_host_addr(i8* %9)
br label %11
11: ; preds = %7, %4
ret i32 0
}
/* Variables and functions */
int invgammp(double const, double);
double qchisq(const double p, const int df) {
  return 2. * invgammp(p, 0.5 * df);
}


x86 assembly (clang, -O0):
<qchisq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm2
movsd  0xed6(%rip),%xmm1
mulsd  %xmm2,%xmm1
call   1030 <invgammp@plt>
cvtsi2sd %eax,%xmm1
movsd  0xeb9(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qchisq>:
push   %rax
cvtsi2sd %edi,%xmm1
mulsd  0xee3(%rip),%xmm1
call   1030 <invgammp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @qchisq(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = load i32, i32* %4
%7 = sitofp i32 %6 to double
%8 = fmul double 5.000000e-01, %7
%9 = call i32 @invgammp(double %5, double %8)
%10 = sitofp i32 %9 to double
%11 = fmul double 2.000000e+00, %10
ret double %11
}

LLVM IR (-O2):
define double @qchisq(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fmul double %3, 5.000000e-01
%5 = tail call i32 @invgammp(double %0, double %4)
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 2.000000e+00
ret double %7
}
void handler1(int signo __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @handler1(i32 %0) {
ret void
}
void *new_thread_2(void *new_buf) {
  int i;
  sprintf((char *)new_buf, "New thread %%d stack at %x\n", &i);
  return (new_buf);
  PANIC();
}


x86 assembly (clang, -O0):
<new_thread_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_thread_2>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xee1(%rip),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"New thread %%d stack at %x\0A\00"
define i8* @new_thread_2(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i8*, i8** %2
ret i8* %6
}

LLVM IR (-O2):
@.str = [28 x i8] c"New thread %%d stack at %x\0A\00"
define i8* @new_thread_2(i8* returned writeonly %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32* %2)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(void) {
  int ret = 0;
  char source[] = "Pouvez vous me dire quelle e la correct pronontiation?",
       dest[] = {};
  strcpy(dest, source);
  printf("\n%s\n", dest);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x37,%edx
call   1050 <memcpy@plt>
lea    -0x41(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x41(%rbp),%rsi
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
movaps 0xef4(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x3f6e6f69746169,%rax
mov    %rax,0x3f(%rsp)
lea    0xf(%rsp),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.source = [55 x i8] c"Pouvez vous me dire quelle e la correct pronontiation?\00"
@.str = [5 x i8] c"\0A%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [55 x i8]
%4 = alloca [0 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
%5 = bitcast [55 x i8]* %3 to i8*
%6 = bitcast [0 x i8]* %4 to i8*
%7 = getelementptr inbounds [0 x i8], [0 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [55 x i8], [55 x i8]* %3, i64 0, i64 0
%9 = call i32 @strcpy(i8* %7, i8* %8)
%10 = getelementptr inbounds [0 x i8], [0 x i8]* %4, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@__const.main.source = [55 x i8] c"Pouvez vous me dire quelle e la correct pronontiation?\00"
@.str = [5 x i8] c"\0A%s\0A\00"
define i32 @main() {
%1 = alloca [0 x i8]
%2 = alloca [55 x i8]
%3 = getelementptr inbounds [55 x i8], [55 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds [0 x i8], [0 x i8]* %1, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
OP(fd, f8) { op_f8(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_f8@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_f8()
ret i32 undef
}
int __cvmx_helper_loop_enumerate(int interface) { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @__cvmx_helper_loop_enumerate(i32 %0) {
ret i32 4
}
unsigned int random(unsigned int *seed) {
  return (*seed = (*seed * 214013 + 2531011));
}


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x343fd,(%rax),%eax
add    $0x269ec3,%eax
mov    -0x8(%rbp),%rcx
mov    %eax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
imul   $0x343fd,(%rdi),%eax
add    $0x269ec3,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @random(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = mul i32 %4, 214013
%6 = add i32 %5, 2531011
%7 = load i32*, i32** %2
store i32 %6, i32* %7
ret i32 %6
}

LLVM IR (-O2):
define i32 @random(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul i32 %2, 214013
%4 = add i32 %3, 2531011
store i32 %4, i32* %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strncmp(char *, char *, int);
int is_elf(unsigned char *data) {
  return !strncmp((char *)data, "\x7F\x45\x4C\x46", 4);
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\7FELF\00"
define i32 @is_elf(i8* %0) {
%2 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int main(int argc, char **argv) {
  asm volatile("int $14");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
int    $0xe
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void asm sideeffect "int $$14", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
int test() {
  1 + 2;
  3 * 4;
  2 & 1;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @test() {
ret i32 0
}
void gtk_editable_get_selection_bounds() {}


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

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

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

LLVM IR (-O2):
define void @gtk_editable_get_selection_bounds() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ F_RDLCK;
int /*<<< orphan*/ test_file_lock(int, int /*<<< orphan*/);
pid_t is_read_lock_blocked(int fd) { return (test_file_lock(fd, F_RDLCK)); }


x86 assembly (clang, -O0):
<is_read_lock_blocked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
call   1030 <test_file_lock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_read_lock_blocked>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <test_file_lock@plt>

LLVM IR (-O0):
@F_RDLCK = global i32 0
define i32 @is_read_lock_blocked(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_RDLCK
%5 = call i32 @test_file_lock(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@F_RDLCK = global i32 0
define i32 @is_read_lock_blocked(i32 %0) {
%2 = load i32, i32* @F_RDLCK
%3 = tail call i32 @test_file_lock(i32 %0, i32 %2)
ret i32 %3
}
int rl_downcase_word(count, key)
int count, key __attribute__((unused));
{ return (rl_change_case(count, 2)); }


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

x86 assembly (clang, -O2):
<rl_downcase_word>:
mov    $0x2,%esi
xor    %eax,%eax
jmp    1030 <rl_change_case@plt>

LLVM IR (-O0):
define i32 @rl_downcase_word(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 (i32, i32, ...) bitcast (i32 (...)* @rl_change_case to i32 (i32, i32, ...)*)(i32 %5, i32 2)
ret i32 %6
}

LLVM IR (-O2):
define i32 @rl_downcase_word(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_change_case to i32 (i32, i32, ...)*)(i32 %0, i32 2)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ fts_name;
};
typedef TYPE_1__ FTSENT;

/* Variables and functions */
int strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int namecmp(const FTSENT *a, const FTSENT *b) {
  return (strcmp(a->fts_name, b->fts_name));
}


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

x86 assembly (clang, -O2):
<namecmp>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32 }
define i32 @namecmp(%struct.TYPE_4__* %0, %struct.TYPE_4__* %1) {
%3 = alloca %struct.TYPE_4__*
%4 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @strcmp(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32 }
define i32 @namecmp(%struct.TYPE_4__* nocapture %0, %struct.TYPE_4__* nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @strcmp(i32 %4, i32 %6)
ret i32 %7
}
int reset_source_get_instance(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @reset_source_get_instance() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @reset_source_get_instance() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
int main() {
  char *a = "b";
  printf("%d\n", strlen(a));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"b\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
double polyEval(int, double const *, int const);
double limitKe_upper(const double x, const double P[], const int Porder) {
  return (polyEval(1. / x, P, Porder));
}


x86 assembly (clang, -O0):
<limitKe_upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  0xed4(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <polyEval@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<limitKe_upper>:
mov    %esi,%edx
mov    %rdi,%rsi
movsd  0xee3(%rip),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
jmp    1030 <polyEval@plt>

LLVM IR (-O0):
define double @limitKe_upper(double %0, double* %1, i32 %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca i32
store double %0, double* %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = fdiv double 1.000000e+00, %7
%9 = fptosi double %8 to i32
%10 = load double*, double** %5
%11 = load i32, i32* %6
%12 = call double @polyEval(i32 %9, double* %10, i32 %11)
ret double %12
}

LLVM IR (-O2):
define double @limitKe_upper(double %0, double* %1, i32 %2) {
%4 = fdiv double 1.000000e+00, %0
%5 = fptosi double %4 to i32
%6 = tail call double @polyEval(i32 %5, double* %1, i32 %2)
ret double %6
}
long double test_coshl(long double x) { return __builtin_coshl(x); }


x86 assembly (clang, -O0):
<test_coshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <coshl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_coshl>:
jmp    1030 <coshl@plt>

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

LLVM IR (-O2):
define x86_fp80 @test_coshl(x86_fp80 %0) {
%2 = tail call x86_fp80 @coshl(x86_fp80 %0)
ret x86_fp80 %2
}
int isOperator(char c) {
  if (c == '+' || c == '*' || c == '-' || c == '/')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     113e <isOperator+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     113e <isOperator+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     113e <isOperator+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    114a <isOperator+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <isOperator+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOperator>:
add    $0xd6,%dil
xor    %eax,%eax
cmp    $0x5,%dil
ja     111a <isOperator+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @isOperator(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 43
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 42
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 45
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 47
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 1, i32* %2
br label %21
20: ; preds = %15
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@switch.table.isOperator = [6 x i32] [i32 1, i32 1, i32 0, i32 1, i32 0, i32 1]
define i32 @isOperator(i8 signext %0) {
%2 = add i8 %0, -42
%3 = icmp ult i8 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.isOperator, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int invert(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%x\n", invert(0xaa, 4, 3));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xaa,%edi
mov    $0x4,%esi
mov    $0x3,%edx
call   1030 <invert@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%x\0A\00"
define i32 @main() {
%1 = tail call i32 @invert(i32 170, i32 4, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}