xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, void *,
                           unsigned long);
int munmap(void *, unsigned long);
int /*<<< orphan*/ stderr;
void kermit_free(void *vaddr, unsigned long size) {
  fprintf(stderr, "kermit_free:munmap return %d vaddr = %p, size = %ld\n",
          munmap(vaddr, size), vaddr, size);
}


x86 assembly (clang, -O0):
<kermit_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <munmap@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%edx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xea3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kermit_free>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%ebp
call   1040 <munmap@plt>
lea    0xec1(%rip),%rsi
mov    %ebp,%edi
mov    %eax,%edx
mov    %rbx,%rcx
mov    %r14,%r8
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"kermit_free:munmap return %d vaddr = %p, size = %ld\0A\00"
define void @kermit_free(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @munmap(i8* %6, i64 %7)
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9, i64 %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"kermit_free:munmap return %d vaddr = %p, size = %ld\0A\00"
define void @kermit_free(i8* %0, i64 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @munmap(i8* %0, i64 %1)
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Atm128GpioInterruptC__3__Interrupt__default__fired();
void Atm128GpioInterruptC__3__Interrupt__fired(void) {
  Atm128GpioInterruptC__3__Interrupt__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @Atm128GpioInterruptC__3__Interrupt__fired() {
%1 = tail call i32 (...) @Atm128GpioInterruptC__3__Interrupt__default__fired()
ret void
}
void setBoneLocation(void) {}


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

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

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

LLVM IR (-O2):
define void @setBoneLocation() {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main() {
  int ch;
  while ((ch = getchar()) != EOF)
    putchar(ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1155 <main+0x35>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret i32 0
}
void autonomous15() {}


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

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

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

LLVM IR (-O2):
define void @autonomous15() {
ret void
}
/* Variables and functions */
int minscanf(char *, int *);
int /*<<< orphan*/ printf(char *, int);
main() {
  int i;
  if (minscanf("i: %d", &i) == 1)
    printf("found: %d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <minscanf@plt>
cmp    $0x1,%eax
jne    1157 <main+0x37>
mov    -0x8(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <minscanf@plt>
cmp    $0x1,%eax
jne    1147 <main+0x27>
mov    0x4(%rsp),%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"i: %d\00"
@.str.1 = [11 x i8] c"found: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @minscanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"i: %d\00"
@.str.1 = [11 x i8] c"found: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @minscanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %0
ret i32 0
}
int _strcpy(char s1[], char s2[]) {
  char i;
  i = 0;
  do {
    s1[i] = (char)s2[i];
    i++;
  } while ((char)s2[i] != '\0');
  return 0;
}


x86 assembly (clang, -O0):
<_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movsbq -0x11(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movsbq -0x11(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movsbq -0x11(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1110 <_strcpy+0x10>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strcpy>:
mov    (%rsi),%cl
mov    $0x1,%al
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x1(%rax),%edx
movsbq %dl,%rdx
mov    %cl,(%rdi,%rdx,1)
movsbq %al,%rax
movzbl (%rsi,%rax,1),%ecx
add    $0x1,%al
test   %cl,%cl
jne    1110 <_strcpy+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_strcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
br label %4
4: ; preds = %4, %2
%5 = phi i8 [ %3, %2 ], [ %12, %4 ]
%6 = phi i8 [ 0, %2 ], [ %9, %4 ]
%7 = sext i8 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %5, i8* %8
%9 = add i8 %6, 1
%10 = sext i8 %9 to i64
%11 = getelementptr inbounds i8, i8* %1, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ s_log(int, char *, char const *, int /*<<< orphan*/, int);
int /*<<< orphan*/ s_strerror(int);
void log_error(int level, int error, const char *txt) {
  s_log(level, "%s: %s (%d)", txt, s_strerror(error), error);
}


x86 assembly (clang, -O0):
<log_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <s_strerror@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    %eax,%ecx
mov    -0x8(%rbp),%r8d
lea    0xea4(%rip),%rsi
call   1030 <s_log@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_error>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <s_strerror@plt>
lea    0xec7(%rip),%rsi
mov    %ebx,%edi
mov    %r14,%rdx
mov    %eax,%ecx
mov    %ebp,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <s_log@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s: %s (%d)\00"
define void @log_error(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %6
%9 = load i32, i32* %5
%10 = call i32 @s_strerror(i32 %9)
%11 = load i32, i32* %5
%12 = call i32 @s_log(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s: %s (%d)\00"
define void @log_error(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @s_strerror(i32 %1)
%5 = tail call i32 @s_log(i32 %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %4, i32 %1)
ret void
}
int zkanjz() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @zkanjz() {
ret i32 0
}
/* Variables and functions */
void *default_mpgdecoder_alloc(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @default_mpgdecoder_alloc() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @default_mpgdecoder_alloc() {
ret i8* null
}
/* Variables and functions */
size_t string_array_len(const char *array[]) {
  size_t i = 0;
  if (array) {
    while (array[i])
      ++i;
  }
  return i;
}


x86 assembly (clang, -O0):
<string_array_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <string_array_len+0x49>
jmp    1120 <string_array_len+0x20>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1144 <string_array_len+0x44>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <string_array_len+0x20>
jmp    1149 <string_array_len+0x49>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_array_len>:
test   %rdi,%rdi
je     1120 <string_array_len+0x20>
mov    $0xffffffffffffffff,%rcx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpq   $0x0,0x8(%rdi,%rcx,8)
mov    %rax,%rcx
jne    1110 <string_array_len+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @string_array_len(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
%8 = add i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %4, %3 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ seedRandomizer();
void init(void) {
  seedRandomizer();
  puts("L O T T O   P I C K E R\n");
  puts("Press Enter to pick this week's numbers:");
  getchar();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <seedRandomizer@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1040 <seedRandomizer@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <getchar@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"L O T T O P I C K E R\0A\00"
@.str.1 = [41 x i8] c"Press Enter to pick this week's numbers:\00"
define void @init() {
%1 = call i32 (...) @seedRandomizer()
%2 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"L O T T O P I C K E R\0A\00"
@.str.1 = [41 x i8] c"Press Enter to pick this week's numbers:\00"
define void @init() {
%1 = tail call i32 (...) @seedRandomizer()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int pioneer_sonar(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int carmen_base_direct_sonar_off(void) {
  fprintf(stderr, "Switching sonars off\n");
  return pioneer_sonar(0);
}


x86 assembly (clang, -O0):
<carmen_base_direct_sonar_off>:
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 <pioneer_sonar@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Switching sonars off\0A\00"
define i32 @carmen_base_direct_sonar_off() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @pioneer_sonar(i32 0)
ret i32 %3
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Switching sonars off\0A\00"
define i32 @carmen_base_direct_sonar_off() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @pioneer_sonar(i32 0)
ret i32 %3
}
int execute_sendfile64() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sendfile64() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_proplist_clear() {
  printf("NOT IMPLEMENTED:"
         "pa_proplist_clear"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"NOT IMPLEMENTED:pa_proplist_clear\0A\00"
define i32 @pa_proplist_clear() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_proplist_clear\00"
define i32 @pa_proplist_clear() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_loop(char c, int len) {
  while (len > 0) {
    printf(" ");
    len--;
  }
}


x86 assembly (clang, -O0):
<print_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1145 <print_loop+0x35>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1121 <print_loop+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_loop>:
push   %rbx
test   %esi,%esi
jle    1132 <print_loop+0x22>
mov    %esi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <print_loop+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_loop(i8 signext %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = tail call i32 @putchar(i32 32)
%7 = add nsw i32 %5, -1
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
ret void
}
int tocentimetros(int m) {
  int cm;
  cm = m * 100;
  return cm;
}


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

x86 assembly (clang, -O2):
<tocentimetros>:
imul   $0x64,%edi,%eax
ret

LLVM IR (-O0):
define i32 @tocentimetros(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 100
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @tocentimetros(i32 %0) {
%2 = mul nsw i32 %0, 100
ret i32 %2
}
void xpc_atfork_parent(void) {}


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

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

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

LLVM IR (-O2):
define void @xpc_atfork_parent() {
ret void
}
unsigned char bitops_unset(unsigned char val, int bit) {
  return (val & ~(1 << bit));
}


x86 assembly (clang, -O0):
<bitops_unset>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitops_unset>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
not    %al
and    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @bitops_unset(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 1, %7
%9 = xor i32 %8, -1
%10 = and i32 %6, %9
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @bitops_unset(i8 zeroext %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = trunc i32 %3 to i8
%5 = xor i8 %4, -1
%6 = and i8 %5, %0
ret i8 %6
}
int incr(num) {
  printf("incr addr: %lu\n", &num);
  return num++;
}


x86 assembly (clang, -O0):
<incr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<incr>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"incr addr: %lu\0A\00"
define i32 @incr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int standard_Newton_power_series(int idx, int maxdeg, int nbr, int verbose) {
  int fail = 0;
  int idxnbr[3];
  double *c;
  idxnbr[0] = idx;
  idxnbr[1] = maxdeg;
  idxnbr[2] = nbr;
  fail = _ada_use_c2phc4c(694, idxnbr, &verbose, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<standard_Newton_power_series>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rcx
mov    $0x2b6,%edi
lea    -0x10(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_Newton_power_series>:
sub    $0x18,%rsp
mov    %ecx,0x8(%rsp)
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x2b6,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @standard_Newton_power_series(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [3 x i32]
%11 = alloca double*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
%12 = load i32, i32* %5
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i32, i32* %6
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 2
store i32 %16, i32* %17
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
%19 = load double*, double** %11
%20 = call i32 @_ada_use_c2phc4c(i32 694, i32* %18, i32* %8, double* %19, i32 0)
store i32 %20, i32* %9
%21 = load i32, i32* %9
ret i32 %21
}

LLVM IR (-O2):
define i32 @standard_Newton_power_series(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca [3 x i32]
store i32 %3, i32* %5
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %1, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %2, i32* %10
%11 = call i32 @_ada_use_c2phc4c(i32 694, i32* %8, i32* %5, double* undef, i32 0)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fn00001390();
void fn00001394() {
  fn00001390();
  fn00001390();
  fn00001390();
  fn00001390();
  fn00001390();
  fn00001390();
  fn00001390();
  fn00001390();
  fn00001390();
  fn00001390();
  return;
}


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

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

LLVM IR (-O0):
define void @fn00001394() {
%1 = call i32 (...) @fn00001390()
%2 = call i32 (...) @fn00001390()
%3 = call i32 (...) @fn00001390()
%4 = call i32 (...) @fn00001390()
%5 = call i32 (...) @fn00001390()
%6 = call i32 (...) @fn00001390()
%7 = call i32 (...) @fn00001390()
%8 = call i32 (...) @fn00001390()
%9 = call i32 (...) @fn00001390()
%10 = call i32 (...) @fn00001390()
ret void
}

LLVM IR (-O2):
define void @fn00001394() {
%1 = tail call i32 (...) @fn00001390()
%2 = tail call i32 (...) @fn00001390()
%3 = tail call i32 (...) @fn00001390()
%4 = tail call i32 (...) @fn00001390()
%5 = tail call i32 (...) @fn00001390()
%6 = tail call i32 (...) @fn00001390()
%7 = tail call i32 (...) @fn00001390()
%8 = tail call i32 (...) @fn00001390()
%9 = tail call i32 (...) @fn00001390()
%10 = tail call i32 (...) @fn00001390()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ h(char *);
int main(void) {
  h("world");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"world\00"
define i32 @main() {
%1 = tail call i32 @h(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool h264naltype_is_vcl(uint8_t type) {
  switch (type) {
  case 5:
  case 1:
  case 2:
  case 3:
  case 4:
  case 6:
    return true;
  default:
    return false;
  }
}


x86 assembly (clang, -O0):
<h264naltype_is_vcl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
sub    $0x5,%eax
ja     1127 <h264naltype_is_vcl+0x27>
jmp    111b <h264naltype_is_vcl+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <h264naltype_is_vcl+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264naltype_is_vcl>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x6,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @h264naltype_is_vcl(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 5, label %5
i32 1, label %5
i32 2, label %5
i32 3, label %5
i32 4, label %5
i32 6, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @h264naltype_is_vcl(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 6
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int fn_glutCreateWindow(char *);
int glutCreateWindow(char *title) { return fn_glutCreateWindow(title); }


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

x86 assembly (clang, -O2):
<glutCreateWindow>:
jmp    1030 <fn_glutCreateWindow@plt>

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

LLVM IR (-O2):
define i32 @glutCreateWindow(i8* %0) {
%2 = tail call i32 @fn_glutCreateWindow(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ decl_array();
int /*<<< orphan*/ t1();
int /*<<< orphan*/ t2();
int /*<<< orphan*/ t3();
int /*<<< orphan*/ t4();
int /*<<< orphan*/ t5();
int /*<<< orphan*/ t6();
int /*<<< orphan*/ test_signed();
int /*<<< orphan*/ test_signed_llong();
int /*<<< orphan*/ test_signed_long();
int main() {
  t1();
  t2();
  t3();
  t4();
  t5();
  t6();
  decl_array();
  test_signed();
  test_signed_long();
  test_signed_llong();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <t1@plt>
mov    $0x0,%al
call   1090 <t2@plt>
mov    $0x0,%al
call   1040 <t3@plt>
mov    $0x0,%al
call   10a0 <t4@plt>
mov    $0x0,%al
call   1050 <t5@plt>
mov    $0x0,%al
call   10b0 <t6@plt>
mov    $0x0,%al
call   10c0 <decl_array@plt>
mov    $0x0,%al
call   1080 <test_signed@plt>
mov    $0x0,%al
call   1070 <test_signed_long@plt>
mov    $0x0,%al
call   1060 <test_signed_llong@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <t1@plt>
xor    %eax,%eax
call   1090 <t2@plt>
xor    %eax,%eax
call   1040 <t3@plt>
xor    %eax,%eax
call   10a0 <t4@plt>
xor    %eax,%eax
call   1050 <t5@plt>
xor    %eax,%eax
call   10b0 <t6@plt>
xor    %eax,%eax
call   10c0 <decl_array@plt>
xor    %eax,%eax
call   1080 <test_signed@plt>
xor    %eax,%eax
call   1070 <test_signed_long@plt>
xor    %eax,%eax
call   1060 <test_signed_llong@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @t1()
%3 = call i32 (...) @t2()
%4 = call i32 (...) @t3()
%5 = call i32 (...) @t4()
%6 = call i32 (...) @t5()
%7 = call i32 (...) @t6()
%8 = call i32 (...) @decl_array()
%9 = call i32 (...) @test_signed()
%10 = call i32 (...) @test_signed_long()
%11 = call i32 (...) @test_signed_llong()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @t1()
%2 = tail call i32 (...) @t2()
%3 = tail call i32 (...) @t3()
%4 = tail call i32 (...) @t4()
%5 = tail call i32 (...) @t5()
%6 = tail call i32 (...) @t6()
%7 = tail call i32 (...) @decl_array()
%8 = tail call i32 (...) @test_signed()
%9 = tail call i32 (...) @test_signed_long()
%10 = tail call i32 (...) @test_signed_llong()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ mail_if_output(char *, char **);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 3) {
    fprintf(stderr, "Usage: %s subject address_1 [... address_n]\n", argv[0]);
    exit(1);
  }
  mail_if_output(argv[1], &argv[2]);
  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   $0x3,-0x8(%rbp)
jge    1176 <main+0x46>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
call   1030 <mail_if_output@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jle    1147 <main+0x17>
mov    0x8(%rsi),%rdi
add    $0x10,%rsi
call   1030 <mail_if_output@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xea6(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"Usage: %s subject address_1 [... address_n]\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, 3
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = call i32 @mail_if_output(i8* %18, i8** %20)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"Usage: %s subject address_1 [... address_n]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = tail call i32 @mail_if_output(i8* %11, i8** %12)
ret i32 0
}
void gpio2_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @gpio2_iomux_config() {
ret void
}
__attribute__((weak)) void midi_clock_ext_sync_changed(int synced) {}


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

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

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

LLVM IR (-O2):
define weak void @midi_clock_ext_sync_changed(i32 %0) {
ret void
}
/* Variables and functions */
double cos(double);
double sin(double);
double tan(double radians) { return (sin(radians) / cos(radians)); }


x86 assembly (clang, -O0):
<tan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tan>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @tan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sin(double %3)
%5 = load double, double* %2
%6 = call double @cos(double %5)
%7 = fdiv double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @tan(double %0) {
%2 = tail call double @sin(double %0)
%3 = tail call double @cos(double %0)
%4 = fdiv double %2, %3
ret double %4
}
int mul2(int i) { return 2 * i; }


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

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

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

LLVM IR (-O2):
define i32 @mul2(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
void dbg(char *format, ...) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @__mtrace_off() {
%1 = tail call i32 (...) @muntrace()
ret void
}
int do_538() { return 538; }


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

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

LLVM IR (-O0):
define i32 @do_538() {
ret i32 538
}

LLVM IR (-O2):
define i32 @do_538() {
ret i32 538
}
/* Variables and functions */
int func();
int fund();
int main(void) { return func() + fund(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <func@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <fund@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func()
%3 = call i32 (...) @fund()
%4 = add nsw i32 %2, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func()
%2 = tail call i32 (...) @fund()
%3 = add nsw i32 %2, %1
ret i32 %3
}
void modif_rear_ext2modif_rear_unit_modif_rear_ext() {}


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

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

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

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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_is_valid_documentation_url@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 = call i32 (...) @test_is_valid_documentation_url()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_is_valid_documentation_url()
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_length_dobldobl_solution_string(int k, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(370, &k, n, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_dobldobl_solution_string>:
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    $0x172,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_dobldobl_solution_string>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x172,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_length_dobldobl_solution_string(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_c2phc4c(i32 370, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_length_dobldobl_solution_string(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 370, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
int f(int x) { return sizeof(int[x]); }


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

x86 assembly (clang, -O2):
<f>:
lea    0x0(,%rdi,4),%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = mul nuw i64 4, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = shl i32 %0, 2
ret i32 %2
}
int main(void) {
  int a = 10;
  int b = 0;
  if (a > 1 && b)
    a = 0;
  else
    a = 1;
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1139 <main+0x39>
cmpl   $0x0,-0xc(%rbp)
je     1139 <main+0x39>
movl   $0x0,-0x8(%rbp)
jmp    1140 <main+0x40>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdout;
void *child_fn(void *arg) {
  int idx = (int)arg;
  printf("I'm thread %d\n", idx);
  fflush(stdout);
  return NULL;
}


x86 assembly (clang, -O0):
<child_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_fn>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"I'm thread %d\0A\00"
@stdout = global i32 0
define i8* @child_fn(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret i8* null
}

LLVM IR (-O2):
@.str = [15 x i8] c"I'm thread %d\0A\00"
@stdout = global i32 0
define noalias i8* @child_fn(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret i8* null
}
int function(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @function(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @function(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int foo();
int /*<<< orphan*/ printf(char *, int);
main() { printf("%d\n", foo()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <foo@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

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