xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int main(int argc, char *argv[]) {
  char nome[] = "Fulano";
  printf("%s\n", nome);
  printf("strlen: %d\n", strlen(nome));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec4(%rip),%eax
mov    %eax,-0x17(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xeb6(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x17(%rbp),%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x17(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x6f6e61,0xb(%rsp)
movl   $0x616c7546,0x8(%rsp)
61
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.nome = [7 x i8] c"Fulano\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [12 x i8] c"strlen: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [7 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [7 x i8]* %6 to i8*
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%11 = call i32 @strlen(i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nome = [7 x i8] c"Fulano\00"
@.str.1 = [12 x i8] c"strlen: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [7 x i8]
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%5 = call i32 @puts(i8* %4)
%6 = call i32 @strlen(i8* %4)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ path_add_dir(char *, char const *);
int /*<<< orphan*/ pathcpy(char *, char const *);
void path_init(char *path, char const *dir, char const *def) {
  if (!path[0])
    pathcpy(path, def);
  path_add_dir(path, dir);
}


x86 assembly (clang, -O0):
<path_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    114e <path_init+0x2e>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <pathcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <path_add_dir@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
jne    113a <path_init+0x1a>
mov    %rbx,%rdi
mov    %rdx,%rsi
call   1040 <pathcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <path_add_dir@plt>

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

LLVM IR (-O2):
define void @path_init(i8* %0, i8* %1, i8* %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @pathcpy(i8* %0, i8* %2)
br label %8
8: ; preds = %6, %3
%9 = tail call i32 @path_add_dir(i8* %0, i8* %1)
ret void
}
void gtk_table_new() {}


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

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

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

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

/* Variables and functions */
int set_insert(struct set *, void const *);
int set_push(struct set *s, const void *element) {
  return set_insert(s, element);
}


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

x86 assembly (clang, -O2):
<set_push>:
jmp    1030 <set_insert@plt>

LLVM IR (-O0):
%struct.set = type { i32 }
define i32 @set_push(%struct.set* %0, i8* %1) {
%3 = alloca %struct.set*
%4 = alloca i8*
store %struct.set* %0, %struct.set** %3
store i8* %1, i8** %4
%5 = load %struct.set*, %struct.set** %3
%6 = load i8*, i8** %4
%7 = call i32 @set_insert(%struct.set* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.set = type { i32 }
define i32 @set_push(%struct.set* %0, i8* %1) {
%3 = tail call i32 @set_insert(%struct.set* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ print_i2c_busses(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void help(void) {
  fprintf(stderr, "Syntax: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\n"
                  "        i2cdetect -F I2CBUS\n"
                  "        i2cdetect -l\n"
                  "        i2cdetect -V\n"
                  "  I2CBUS is an integer\n"
                  "  With -a, probe all addresses (NOT RECOMMENDED)\n"
                  "  With -q, uses only quick write commands for probing (NOT "
                  "RECOMMENDED)\n"
                  "  With -r, uses only read byte commands for probing (NOT "
                  "RECOMMENDED)\n"
                  "  If provided, FIRST and LAST limit the probing range.\n"
                  "  With -l, lists installed busses only\n");
  print_i2c_busses(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <print_i2c_busses@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <print_i2c_busses@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [435 x i8] c"Syntax: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\0A i2cdetect -F I2CBUS\0A i2cdetect -l\0A i2cdetect -V\0A I2CBUS is an integer\0A With -a, probe all addresses (NOT RECOMMENDED)\0A With -q, uses only quick write commands for probing (NOT RECOMMENDED)\0A With -r, uses only read byte commands for probing (NOT RECOMMENDED)\0A If provided, FIRST and LAST limit the probing range.\0A With -l, lists installed busses only\0A\00"
define void @help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([435 x i8], [435 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @print_i2c_busses(i32 0)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [435 x i8] c"Syntax: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\0A i2cdetect -F I2CBUS\0A i2cdetect -l\0A i2cdetect -V\0A I2CBUS is an integer\0A With -a, probe all addresses (NOT RECOMMENDED)\0A With -q, uses only quick write commands for probing (NOT RECOMMENDED)\0A With -r, uses only read byte commands for probing (NOT RECOMMENDED)\0A If provided, FIRST and LAST limit the probing range.\0A With -l, lists installed busses only\0A\00"
define void @help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([435 x i8], [435 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print_i2c_busses(i32 0)
ret void
}
const char *zlibVersion() { return "1.2.8"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"1.2.8\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.2.8\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_xmmintrin_provides_emmintrin(__m128d __a, __m128d __b) {
  return _mm_add_sd(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_xmmintrin_provides_emmintrin>:
jmp    1030 <_mm_add_sd@plt>

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

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

/* Variables and functions */
size_t fread(float *, int, int, int /*<<< orphan*/ *);
int fread_float_values(FILE *fp, float *fbuf, int num_of_floats) {
  size_t floats_read;
  floats_read = fread(fbuf, sizeof(float), num_of_floats, fp);
  return ((int)floats_read);
}


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

x86 assembly (clang, -O2):
<fread_float_values>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x4,%esi
jmp    1030 <fread@plt>

LLVM IR (-O0):
define i32 @fread_float_values(i32* %0, float* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca float*
%6 = alloca i32
%7 = alloca i64
store i32* %0, i32** %4
store float* %1, float** %5
store i32 %2, i32* %6
%8 = load float*, float** %5
%9 = load i32, i32* %6
%10 = load i32*, i32** %4
%11 = call i64 @fread(float* %8, i32 4, i32 %9, i32* %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
%13 = trunc i64 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @fread_float_values(i32* nocapture %0, float* nocapture %1, i32 %2) {
%4 = tail call i64 @fread(float* %1, i32 4, i32 %2, i32* %0)
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int /*<<< orphan*/ baz(int *);
void foo(int a, int b) {
  baz(&a);
  bar(b);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <baz@plt>
mov    -0x8(%rbp),%edi
call   1040 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <baz@plt>
mov    %ebx,%edi
call   1040 <bar@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @foo(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @baz(i32* %3)
%5 = call i32 @bar(i32 %1)
ret void
}
unsigned long b_ethernet_rx(void *mem) {
  unsigned long tlong;
  asm volatile("call *0x00100068" : "=c"(tlong) : "D"(mem));
  return tlong;
}


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

x86 assembly (clang, -O2):
<b_ethernet_rx>:
call   *0x100068
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @b_ethernet_rx(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 asm sideeffect "call *0x00100068", "={cx},{di},~{dirflag},~{fpsr},~{flags}"(i8* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @b_ethernet_rx(i8* %0) {
%2 = tail call i64 asm sideeffect "call *0x00100068", "={cx},{di},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i64 %2
}
int canMonitorLeds(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @canMonitorLeds() {
ret i32 0
}
int permOk(char *path) {}


x86 assembly (clang, -O0):
<permOk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @permOk(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ foo(void *);
char icharminus(char x, char y) {
  x -= 24;
  if (!x)
    foo((void *)0);
  return x;
}


x86 assembly (clang, -O0):
<icharminus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x18,%eax
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
jne    1141 <icharminus+0x31>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <foo@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icharminus>:
push   %rbx
mov    %edi,%ebx
add    $0xe8,%bl
jne    111f <icharminus+0xf>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @icharminus(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 24
%8 = trunc i32 %7 to i8
store i8 %8, i8* %3
%9 = load i8, i8* %3
%10 = icmp ne i8 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @foo(i8* null)
br label %13
13: ; preds = %11, %2
%14 = load i8, i8* %3
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @icharminus(i8 signext %0, i8 signext %1) {
%3 = add i8 %0, -24
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i8* null)
br label %7
7: ; preds = %5, %2
ret i8 %3
}
int bit(int n) {
  int res;
  res = 1 << n;
  return (res);
}


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

x86 assembly (clang, -O2):
<bit>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @bit(i32 %0) {
%2 = shl nuw i32 1, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ quatgetconjugate(float *, float const *);
float quatinvsqmagnitude(float const *);
int /*<<< orphan*/ quatscale(float *, float *, float);
void quatgetreciprocal(float *qout, const float *qin) {
  float m = quatinvsqmagnitude(qin);
  quatgetconjugate(qout, qin);
  quatscale(qout, qout, m);
}


x86 assembly (clang, -O0):
<quatgetreciprocal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <quatinvsqmagnitude@plt>
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <quatgetconjugate@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
call   1040 <quatscale@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quatgetreciprocal>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1050 <quatinvsqmagnitude@plt>
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <quatgetconjugate@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
movss  0x4(%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <quatscale@plt>

LLVM IR (-O0):
define void @quatgetreciprocal(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %4
%7 = call float @quatinvsqmagnitude(float* %6)
store float %7, float* %5
%8 = load float*, float** %3
%9 = load float*, float** %4
%10 = call i32 @quatgetconjugate(float* %8, float* %9)
%11 = load float*, float** %3
%12 = load float*, float** %3
%13 = load float, float* %5
%14 = call i32 @quatscale(float* %11, float* %12, float %13)
ret void
}

LLVM IR (-O2):
define void @quatgetreciprocal(float* %0, float* %1) {
%3 = tail call float @quatinvsqmagnitude(float* %1)
%4 = tail call i32 @quatgetconjugate(float* %0, float* %1)
%5 = tail call i32 @quatscale(float* %0, float* %0, float %3)
ret void
}
int SuperFly() { return 42; }


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

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

LLVM IR (-O0):
define i32 @SuperFly() {
ret i32 42
}

LLVM IR (-O2):
define i32 @SuperFly() {
ret i32 42
}
/* Variables and functions */
int first_char(char *);
int test_first_char() { return first_char("hello world"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define i32 @test_first_char() {
%1 = call i32 @first_char(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define i32 @test_first_char() {
%1 = tail call i32 @first_char(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int num1 = 10;
  int num2 = 20;
  printf(num1 < num2 ? "sim\n" : "nao\n");
  int resposta = num1 < num2 ? 10 : -10;
  printf("%i\n", resposta);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%edx
lea    0xed2(%rip),%rdi
lea    0xec6(%rip),%rax
cmp    %edx,%ecx
cmovl  %rax,%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    $0xfffffff6,%eax
mov    $0xa,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea1(%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
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"sim\0A\00"
@.str.1 = [5 x i8] c"nao\0A\00"
@.str.2 = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 10, i32* %1
store i32 20, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = icmp slt i32 %4, %5
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%9 = call i32 (i8*, ...) @printf(i8* %8)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 10, i32 -10
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c"%i\0A\00"
@str = [4 x i8] c"sim\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 10)
ret i32 0
}
/* Variables and functions */
scalar_t__ tui_getk();
int /*<<< orphan*/ usleep(int);
void tui_wait_for_any_key(void) {
  while (tui_getk()) {
  }
  while (!tui_getk()) {
    usleep(10000);
  }
}


x86 assembly (clang, -O0):
<tui_wait_for_any_key>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <tui_wait_for_any_key+0x9>
mov    $0x0,%al
call   1030 <tui_getk@plt>
cmp    $0x0,%rax
je     113f <tui_wait_for_any_key+0x1f>
jmp    1129 <tui_wait_for_any_key+0x9>
jmp    1144 <tui_wait_for_any_key+0x24>
mov    $0x0,%al
call   1030 <tui_getk@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1161 <tui_wait_for_any_key+0x41>
jmp    1170 <tui_wait_for_any_key+0x50>
mov    $0x2710,%edi
call   1040 <usleep@plt>
jmp    1144 <tui_wait_for_any_key+0x24>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tui_wait_for_any_key>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <tui_getk@plt>
test   %rax,%rax
jne    1130 <tui_wait_for_any_key+0x10>
jmp    114a <tui_wait_for_any_key+0x2a>
xchg   %ax,%ax
mov    $0x2710,%edi
call   1040 <usleep@plt>
xor    %eax,%eax
call   1030 <tui_getk@plt>
test   %rax,%rax
je     1140 <tui_wait_for_any_key+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @tui_wait_for_any_key() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @tui_getk()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
br label %6
6: ; preds = %10, %5
%7 = call i64 (...) @tui_getk()
%8 = icmp ne i64 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 @usleep(i32 10000)
br label %6
12: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @tui_wait_for_any_key() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @tui_getk()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
%5 = tail call i64 (...) @tui_getk()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4, %7
%8 = tail call i32 @usleep(i32 10000)
%9 = tail call i64 (...) @tui_getk()
%10 = icmp eq i64 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R_IT_Create_UserInit();
void R_IT_Create(void) { R_IT_Create_UserInit(); }


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

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

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

LLVM IR (-O2):
define void @R_IT_Create() {
%1 = tail call i32 (...) @R_IT_Create_UserInit()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ read(int, char *, int);
int fgetc(FILE *fd) {
  char ch;
  if (!read((int)(long)fd, &ch, 1))
    return EOF;
  return ch;
}


x86 assembly (clang, -O0):
<fgetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x0,%eax
jne    114a <fgetc+0x3a>
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1151 <fgetc+0x41>
movsbl -0x11(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetc>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
test   %eax,%eax
jne    112f <fgetc+0x1f>
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
movsbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @fgetc(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i64
%7 = trunc i64 %6 to i32
%8 = call i32 @read(i32 %7, i8* %4, i32 1)
%9 = icmp ne i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = load i32, i32* @EOF
store i32 %11, i32* %2
br label %15
12: ; preds = %1
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fgetc(i32* %0) {
%2 = alloca i8
%3 = ptrtoint i32* %0 to i64
%4 = trunc i64 %3 to i32
%5 = call i32 @read(i32 %4, i8* %2, i32 1)
%6 = icmp eq i32 %5, 0
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = load i32, i32* @EOF
%10 = select i1 %6, i32 %9, i32 %8
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint64_t;

/* Variables and functions */
uint64_t mmio_read_64(uintptr_t addr) { return *(volatile uint64_t *)addr; }


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

x86 assembly (clang, -O2):
<mmio_read_64>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @mmio_read_64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @mmio_read_64(i64 %0) {
%2 = inttoptr i64 %0 to i32*
%3 = load volatile i32, i32* %2
ret i32 %3
}
int foo1(int i) { return (i != 0); }


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo1(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
void swap(unsigned arr[], size_t i, size_t j) {
  unsigned tmp = arr[i];
  arr[i] = arr[j];
  arr[j] = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi,%rsi,4),%eax
mov    (%rdi,%rdx,4),%ecx
mov    %ecx,(%rdi,%rsi,4)
mov    %eax,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i32*, i32** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds i32, i32* %8, i64 %9
%11 = load i32, i32* %10
store i32 %11, i32* %7
%12 = load i32*, i32** %4
%13 = load i64, i64* %6
%14 = getelementptr inbounds i32, i32* %12, i64 %13
%15 = load i32, i32* %14
%16 = load i32*, i32** %4
%17 = load i64, i64* %5
%18 = getelementptr inbounds i32, i32* %16, i64 %17
store i32 %15, i32* %18
%19 = load i32, i32* %7
%20 = load i32*, i32** %4
%21 = load i64, i64* %6
%22 = getelementptr inbounds i32, i32* %20, i64 %21
store i32 %19, i32* %22
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 %2
%7 = load i32, i32* %6
store i32 %7, i32* %4
store i32 %5, i32* %6
ret void
}
void _L3L4_clock_domain_close(void) { ; }


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

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

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

LLVM IR (-O2):
define void @_L3L4_clock_domain_close() {
ret void
}
__attribute((no)) int a() { return 2; }


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

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

LLVM IR (-O0):
define i32 @a() {
ret i32 2
}

LLVM IR (-O2):
define i32 @a() {
ret i32 2
}
void ble_evt_connection_feature_ind(
    const struct ble_msg_connection_feature_ind_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_connection_feature_ind_evt_t = type opaque
define void @ble_evt_connection_feature_ind(%struct.ble_msg_connection_feature_ind_evt_t* nocapture %0) {
ret void
}
void ClearWindowsSocket() {}


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

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

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

LLVM IR (-O2):
define void @ClearWindowsSocket() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ newDbSystemSaveIntval(char *, int /*<<< orphan*/);
void unlockTopoUpload(void) { newDbSystemSaveIntval("topobusy", 0); }


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

x86 assembly (clang, -O2):
<unlockTopoUpload>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <newDbSystemSaveIntval@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"topobusy\00"
define void @unlockTopoUpload() {
%1 = call i32 @newDbSystemSaveIntval(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"topobusy\00"
define void @unlockTopoUpload() {
%1 = tail call i32 @newDbSystemSaveIntval(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int ENOSYS;
int errno;
int symlinkat(const char *const oldpath, const int newdirfd,
              const char *const newpath) {
  return errno = ENOSYS, -1;
}


x86 assembly (clang, -O0):
<symlinkat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb9(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symlinkat>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @symlinkat(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @symlinkat(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
int test3(int e, int f) { return (e ^ 2) == 6; }


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x2,%eax
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
xor    %eax,%eax
cmp    $0x4,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @test3(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 = xor i32 %5, 2
%7 = icmp eq i32 %6, 6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @test3(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 4
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_length_solution_intro(int k, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(202, &k, n, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_solution_intro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xca,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_solution_intro>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xca,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_length_solution_intro(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 202, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_length_solution_intro(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 202, i32* %3, i32* %1, double* undef)
ret i32 %4
}
void iwl_legacy_free_traffic_mem(struct iwl_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.iwl_priv = type opaque
define void @iwl_legacy_free_traffic_mem(%struct.iwl_priv* nocapture %0) {
ret void
}
int count_nodes(char *path) {
  int i;
  char *tmp;
  if (!path)
    return 0;
  for (i = 0, tmp = path; *tmp != '\0'; tmp++)
    if (*tmp == '/')
      i++;
  return i;
}


x86 assembly (clang, -O0):
<count_nodes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <count_nodes+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1173 <count_nodes+0x73>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116d <count_nodes+0x6d>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1157 <count_nodes+0x57>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115c <count_nodes+0x5c>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112e <count_nodes+0x2e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_nodes>:
xor    %eax,%eax
test   %rdi,%rdi
jne    1117 <count_nodes+0x17>
jmp    1123 <count_nodes+0x23>
nopl   0x0(%rax)
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x2f,%cl
je     1110 <count_nodes+0x10>
test   %cl,%cl
jne    1113 <count_nodes+0x13>
ret

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

LLVM IR (-O2):
define i32 @count_nodes(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1, %9
%4 = phi i32 [ %10, %9 ], [ 0, %1 ]
%5 = phi i8* [ %11, %9 ], [ %0, %1 ]
%6 = load i8, i8* %5
switch i8 %6, label %9 [
i8 0, label %12
i8 47, label %7
]
7: ; preds = %3
%8 = add nsw i32 %4, 1
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ %8, %7 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %5, i64 1
br label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %4, %3 ]
ret i32 %13
}
/* Type definitions */
typedef unsigned char __u32;

/* Variables and functions */
__u32 __be32_to_cpup(unsigned char *p) {
  return (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
}


x86 assembly (clang, -O0):
<__be32_to_cpup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__be32_to_cpup>:
mov    0x3(%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @__be32_to_cpup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 24
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 16
%13 = add nsw i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = add nsw i32 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = add nsw i32 %19, %23
%25 = trunc i32 %24 to i8
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @__be32_to_cpup(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
ret i8 %3
}
/* Variables and functions */
int ex_get_cpu_ws();
int excpws() { return (ex_get_cpu_ws()); }


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

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

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

LLVM IR (-O2):
define i32 @excpws() {
%1 = tail call i32 (...) @ex_get_cpu_ws()
ret i32 %1
}
/* Type definitions */
struct timespec {
  unsigned long long tv_sec;
  unsigned long long tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned long long get_ktime_ns(void) {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<get_ktime_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ktime_ns>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_ktime_ns() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_ktime_ns() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = mul i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %7, %9
ret i64 %10
}
/* Variables and functions */
long long euler94(int);
int /*<<< orphan*/ printf(char *, long long);
int main() {
  long long x = euler94(333333334);
  printf("%lld\n", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = tail call i64 @euler94(i32 333333334)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mqd_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int mq_close(mqd_t mqdes) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<mq_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mq_close>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @mq_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @mq_close(i32 %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ z_stream;

/* Variables and functions */
int deflateSetDictionary(int /*<<< orphan*/ *, char const *, unsigned int);
int streaming_commons_deflate_set_dictionary(z_stream *stream,
                                             const char *dictionary,
                                             unsigned int dictLength) {
  return deflateSetDictionary(stream, dictionary, dictLength);
}


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

x86 assembly (clang, -O2):
<streaming_commons_deflate_set_dictionary>:
jmp    1030 <deflateSetDictionary@plt>

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

LLVM IR (-O2):
define i32 @streaming_commons_deflate_set_dictionary(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @deflateSetDictionary(i32* %0, i8* %1, i32 %2)
ret i32 %4
}
void ARGBMultiply() {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTTimeToString() {
ret void
}
double f1() {
  double x;
  asm("" : "=r,r"(x) : "0,0"(x));
  return x;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
movq   %rax,%xmm0
ret

LLVM IR (-O0):
define double @f1() {
%1 = alloca double
%2 = load double, double* %1
%3 = call double asm "", "=r|r,0|0,~{dirflag},~{fpsr},~{flags}"(double %2)
store double %3, double* %1
%4 = load double, double* %1
ret double %4
}

LLVM IR (-O2):
define double @f1() {
%1 = tail call double asm "", "=r|r,0|0,~{dirflag},~{fpsr},~{flags}"(double undef)
ret double %1
}