xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void bar(int id) { printf("[%d] Completed bar\n", id); }


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

x86 assembly (clang, -O2):
<bar>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"[%d] Completed bar\0A\00"
define void @bar(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
struct ast_tone_zone_sound {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _ao2_ref(struct ast_tone_zone_sound *, int);
struct ast_tone_zone_sound *
ast_tone_zone_sound_ref(struct ast_tone_zone_sound *ts) {
  _ao2_ref((ts), (+1));
  return ts;
}


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

x86 assembly (clang, -O2):
<ast_tone_zone_sound_ref>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <_ao2_ref@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ast_tone_zone_sound = type { i32 }
define %struct.ast_tone_zone_sound* @ast_tone_zone_sound_ref(%struct.ast_tone_zone_sound* %0) {
%2 = alloca %struct.ast_tone_zone_sound*
store %struct.ast_tone_zone_sound* %0, %struct.ast_tone_zone_sound** %2
%3 = load %struct.ast_tone_zone_sound*, %struct.ast_tone_zone_sound** %2
%4 = call i32 @_ao2_ref(%struct.ast_tone_zone_sound* %3, i32 1)
%5 = load %struct.ast_tone_zone_sound*, %struct.ast_tone_zone_sound** %2
ret %struct.ast_tone_zone_sound* %5
}

LLVM IR (-O2):
%struct.ast_tone_zone_sound = type { i32 }
define %struct.ast_tone_zone_sound* @ast_tone_zone_sound_ref(%struct.ast_tone_zone_sound* returned %0) {
%2 = tail call i32 @_ao2_ref(%struct.ast_tone_zone_sound* %0, i32 1)
ret %struct.ast_tone_zone_sound* %0
}
/* Variables and functions */
int /*<<< orphan*/ acpi_shutdown();
void shell_shutdown() { acpi_shutdown(); }


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

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

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

LLVM IR (-O2):
define void @shell_shutdown() {
%1 = tail call i32 (...) @acpi_shutdown()
ret void
}
int main(int argc, char const *argv[]) {
  int i = 0;
  int j;
  int nGroups;
  int bliblablue;
  int inUse16[16];
  nGroups = 2;
  bliblablue = 4;
  i = 0;
  while (i < 16) {
    inUse16[i] = 0;
    j = 0;
    while (j < 16) {
      j++;
    }
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1171 <main+0x71>
movslq -0x14(%rbp),%rax
movl   $0x0,-0x60(%rbp,%rax,4)
movl   $0x0,-0x18(%rbp)
cmpl   $0x10,-0x18(%rbp)
jge    1163 <main+0x63>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114b <main+0x4b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112e <main+0x2e>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void mergeSort(int *array, int start, int end) {
  void merge(int *, int, int, int, int);
  if (end > start) {
    int split = (end + start) / 2;
    mergeSort(array, start, split);
    mergeSort(array, split + 1, end);
    merge(array, (end - start + 1), start, split, end);
  }
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    118c <mergeSort+0x6c>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
sub    -0xc(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8d
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%ebp
sub    %esi,%ebp
jle    1176 <mergeSort+0x56>
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <mergeSort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <mergeSort@plt>
add    $0x1,%ebp
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %ebx,%ecx
mov    %r14d,%r8d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <merge@plt>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @mergeSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @mergeSort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @mergeSort(i32* %0, i32 %9, i32 %2)
%10 = sub i32 1, %1
%11 = add i32 %10, %2
tail call void @merge(i32* %0, i32 %11, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
float strtold(char const *, char **);
float strtof(const char *s, char **p) { return strtold(s, p); }


x86 assembly (clang, -O0):
<strtof>:
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 <strtold@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtof>:
jmp    1030 <strtold@plt>

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

LLVM IR (-O2):
define float @strtof(i8* %0, i8** nocapture %1) {
%3 = tail call float @strtold(i8* %0, i8** %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ aaa(int);
int main() {
  int i;
  for (i = 0; i < 10; i++)
    aaa(123);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1148 <main+0x38>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
mov    $0x7b,%edi
call   1030 <aaa@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @aaa(i32 123)
%2 = tail call i32 @aaa(i32 123)
%3 = tail call i32 @aaa(i32 123)
%4 = tail call i32 @aaa(i32 123)
%5 = tail call i32 @aaa(i32 123)
%6 = tail call i32 @aaa(i32 123)
%7 = tail call i32 @aaa(i32 123)
%8 = tail call i32 @aaa(i32 123)
%9 = tail call i32 @aaa(i32 123)
%10 = tail call i32 @aaa(i32 123)
ret i32 0
}
int imagesize(left, top, right, bottom)
int left, top, right, bottom;
{ return (unsigned)(2 + (right - left + 1) * (bottom - top + 1)); }


x86 assembly (clang, -O0):
<imagesize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    -0x10(%rbp),%ecx
sub    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imagesize>:
sub    %edi,%edx
add    $0x1,%edx
sub    %esi,%ecx
lea    0x1(%rcx),%eax
imul   %edx,%eax
add    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @imagesize(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
%12 = add nsw i32 %11, 1
%13 = load i32, i32* %8
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
%16 = add nsw i32 %15, 1
%17 = mul nsw i32 %12, %16
%18 = add nsw i32 2, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @imagesize(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 1, %0
%6 = add i32 %5, %2
%7 = sub i32 1, %1
%8 = add i32 %7, %3
%9 = mul nsw i32 %8, %6
%10 = add nsw i32 %9, 2
ret i32 %10
}
/* Variables and functions */
int set_tabsize(int);
int t_set_tabsize(int size) { return set_tabsize(size); }


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

x86 assembly (clang, -O2):
<t_set_tabsize>:
jmp    1030 <set_tabsize@plt>

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

LLVM IR (-O2):
define i32 @t_set_tabsize(i32 %0) {
%2 = tail call i32 @set_tabsize(i32 %0)
ret i32 %2
}
unsigned string_hash(const void *key) {
  const char *string = key;
  unsigned int result = 0;
  while (*string)
    result = result << 1 ^ *string++;
  return result;
}


x86 assembly (clang, -O0):
<string_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <string_hash+0x46>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <string_hash+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1123 <string_hash+0x23>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
add    %eax,%eax
movsbl %cl,%ecx
xor    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <string_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @string_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl i32 %6, 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = xor i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_version(void) {
  puts("mapcat"
       " "
       "0.4.1"
       ", Copyright (C) 2016  Paweł Redman\n"
       "mapcat"
       " comes with ABSOLUTELY NO WARRANTY.\n"
       "This is free software, and you are welcome to redistribute it\n"
       "under certain conditions. See the file COPYING.");
}


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

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

LLVM IR (-O0):
@.str = [200 x i8] c"mapcat 0.4.1, Copyright (C) 2016 Pawe\C5\82 Redman\0Amapcat comes with ABSOLUTELY NO WARRANTY.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions. See the file COPYING.\00"
define void @print_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [200 x i8] c"mapcat 0.4.1, Copyright (C) 2016 Pawe\C5\82 Redman\0Amapcat comes with ABSOLUTELY NO WARRANTY.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions. See the file COPYING.\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SO_SNDBUF;
int set_sockbuf_size(int, int /*<<< orphan*/, size_t const, char *);
int set_sendbuf(int sockfd, const size_t len) {
  return set_sockbuf_size(sockfd, SO_SNDBUF, len, "send");
}


x86 assembly (clang, -O0):
<set_sendbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
lea    0xeca(%rip),%rcx
call   1030 <set_sockbuf_size@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_sendbuf>:
mov    %rsi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
lea    0xedd(%rip),%rcx
jmp    1030 <set_sockbuf_size@plt>

LLVM IR (-O0):
@SO_SNDBUF = global i32 0
@.str = [5 x i8] c"send\00"
define i32 @set_sendbuf(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @SO_SNDBUF
%7 = load i64, i64* %4
%8 = call i32 @set_sockbuf_size(i32 %5, i32 %6, i64 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %8
}

LLVM IR (-O2):
@SO_SNDBUF = global i32 0
@.str = [5 x i8] c"send\00"
define i32 @set_sendbuf(i32 %0, i64 %1) {
%3 = load i32, i32* @SO_SNDBUF
%4 = tail call i32 @set_sockbuf_size(i32 %0, i32 %3, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
long UARTCharGet(unsigned long ulBase) {
  ;
  while ((*((volatile unsigned long *)(ulBase + 0x00000018))) & 0x00000010) {
  }
  return ((*((volatile unsigned long *)(ulBase + 0x00000000))));
}


x86 assembly (clang, -O0):
<UARTCharGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
and    $0x10,%rax
cmp    $0x0,%rax
je     1123 <UARTCharGet+0x23>
jmp    1108 <UARTCharGet+0x8>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTCharGet>:
testq  $0x10,0x18(%rdi)
jne    1100 <UARTCharGet>
mov    (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @UARTCharGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %10, %1
%4 = load i64, i64* %2
%5 = add i64 %4, 24
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 16
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3
br label %3
11: ; preds = %3
%12 = load i64, i64* %2
%13 = add i64 %12, 0
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @UARTCharGet(i64 %0) {
%2 = add i64 %0, 24
%3 = inttoptr i64 %2 to i64*
br label %4
4: ; preds = %4, %1
%5 = load volatile i64, i64* %3
%6 = and i64 %5, 16
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4
%9 = inttoptr i64 %0 to i64*
%10 = load volatile i64, i64* %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void link_error() { abort(); }


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

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

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

LLVM IR (-O2):
define void @link_error() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
char *strchr(const char *str, int ch) {
  while (*str != '\0') {
    if (*str == ch)
      return (char *)str;
    str++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <strchr+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1138 <strchr+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1151 <strchr+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <strchr+0xb>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1123 <strchr+0x23>
mov    %rdi,%rax
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %esi,%ecx
je     1125 <strchr+0x25>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = sext i8 %6 to i32
%9 = icmp eq i32 %8, %1
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %2
%15 = phi i8* [ null, %2 ], [ null, %10 ], [ %7, %5 ]
ret i8* %15
}
void gtk_widget_mnemonic_activate() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_mnemonic_activate() {
ret void
}
void SUBPROC(void *proc, void *p) { ((void (*)(void *))proc)(p); }


x86 assembly (clang, -O0):
<SUBPROC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SUBPROC>:
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax

LLVM IR (-O0):
define void @SUBPROC(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to void (i8*)*
%7 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @SUBPROC(i8* nocapture %0, i8* %1) {
%3 = bitcast i8* %0 to void (i8*)*
tail call void %3(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\u2190");
  printf("\u2191");
  printf("\u2192");
  printf("\u2193");
  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 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"\E2\86\90\00"
@.str.1 = [4 x i8] c"\E2\86\91\00"
@.str.2 = [4 x i8] c"\E2\86\92\00"
@.str.3 = [4 x i8] c"\E2\86\93\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
void foo247(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo247(i32 %0) {
ret void
}
/* Variables and functions */
int NI_USUAL_PFI_SELECT(unsigned int);
unsigned NI_GPCT_PFI_OTHER_SELECT(unsigned n) { return NI_USUAL_PFI_SELECT(n); }


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

x86 assembly (clang, -O2):
<NI_GPCT_PFI_OTHER_SELECT>:
jmp    1030 <NI_USUAL_PFI_SELECT@plt>

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

LLVM IR (-O2):
define i32 @NI_GPCT_PFI_OTHER_SELECT(i32 %0) {
%2 = tail call i32 @NI_USUAL_PFI_SELECT(i32 %0)
ret i32 %2
}
/* Variables and functions */
int syscall(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int exit(int errorlevel) { return syscall(1, errorlevel, 0, 0); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x1,%edi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <syscall@plt>
mov    %eax,-0x4(%rbp)

x86 assembly (clang, -O2):
<exit>:
push   %rax
mov    %edi,%esi
mov    $0x1,%edi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <syscall@plt>

LLVM IR (-O0):
define i32 @exit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @syscall(i32 1, i32 %4, i32 0, i32 0)
store i32 %5, i32* %2
unreachable
}

LLVM IR (-O2):
define i32 @exit(i32 %0) {
%2 = tail call i32 @syscall(i32 1, i32 %0, i32 0, i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ h265nal_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ h265nal_set_type(int /*<<< orphan*/ *, int);
void h265sei_init(uint8_t *p_h265sei, bool b_prefix) {
  h265nal_init(p_h265sei);
  h265nal_set_type(p_h265sei, b_prefix ? 39 : 40);
}


x86 assembly (clang, -O0):
<h265sei_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <h265nal_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x28,%esi
mov    $0x27,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
call   1030 <h265nal_set_type@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265sei_init>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <h265nal_init@plt>
cmp    $0x1,%ebp
mov    $0x27,%esi
adc    $0x0,%esi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <h265nal_set_type@plt>

LLVM IR (-O0):
define void @h265sei_init(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = call i32 @h265nal_init(i32* %5)
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 39, i32 40
%12 = call i32 @h265nal_set_type(i32* %7, i32 %11)
ret void
}

LLVM IR (-O2):
define void @h265sei_init(i32* %0, i32 %1) {
%3 = tail call i32 @h265nal_init(i32* %0)
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i32 40, i32 39
%6 = tail call i32 @h265nal_set_type(i32* %0, i32 %5)
ret void
}
int main(void) {
  int i;
  int i___0;
  int a;
  {
    i = 0;
    i___0 = 5;
    a = 0;
    return (0);
  }
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int ENOSYS;
int posix_fadvise(int fd, off_t offset, off_t len, int advice) {
  return ENOSYS;
}


x86 assembly (clang, -O0):
<posix_fadvise>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_fadvise>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @posix_fadvise(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* @ENOSYS
ret i32 %9
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @posix_fadvise(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = load i32, i32* @ENOSYS
ret i32 %5
}
int IIR32GetResamplerFeed(int blockSizeOut) {
  int size;
  ;
  ;
  size = blockSizeOut * 3;
  ;
  size /= 2;
  ;
  return size;
}


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

x86 assembly (clang, -O2):
<IIR32GetResamplerFeed>:
lea    (%rdi,%rdi,2),%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @IIR32GetResamplerFeed(i32 %0) {
%2 = mul nsw i32 %0, 3
%3 = sdiv i32 %2, 2
ret i32 %3
}
/* Variables and functions */
int getchar();
int wait_for_input() { return getchar(); }


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

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

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

LLVM IR (-O2):
define i32 @wait_for_input() {
%1 = tail call i32 (...) @getchar()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int greater(float a, float b) {
  if (a > b) {
    printf("True");
    return 0;
  } else {
    printf("False");
    return 1;
  }
}


x86 assembly (clang, -O0):
<greater>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1149 <greater+0x39>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    115c <greater+0x4c>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greater>:
push   %rbx
xor    %ebx,%ebx
ucomiss %xmm1,%xmm0
setbe  %bl
lea    0xee0(%rip),%rax
lea    0xede(%rip),%rdi
cmova  %rax,%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"True\00"
@.str.1 = [6 x i8] c"False\00"
define i32 @greater(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp ogt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [5 x i8] c"True\00"
@.str.1 = [6 x i8] c"False\00"
define i32 @greater(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%5 = xor i1 %3, true
%6 = zext i1 %5 to i32
%7 = tail call i32 @printf(i8* dereferenceable(1) %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("Usage: integrate method name -d num -t num -x num [-x num]... "
         "-n num [-e num] [-v] [-y] [-w]\n");
}


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

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

LLVM IR (-O0):
@.str = [94 x i8] c"Usage: integrate method name -d num -t num -x num [-x num]... -n num [-e num] [-v] [-y] [-w]\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [93 x i8] c"Usage: integrate method name -d num -t num -x num [-x num]... -n num [-e num] [-v] [-y] [-w]\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ wait(int *);
int pclose(FILE *fd) {
  int waitstat;
  if (fclose(fd) != 0) {
    return EOF;
  }
  wait(&waitstat);
  return waitstat;
}


x86 assembly (clang, -O0):
<pclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
cmp    $0x0,%rax
je     1150 <pclose+0x30>
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <pclose+0x3f>
lea    -0x14(%rbp),%rdi
call   1040 <wait@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pclose>:
push   %rbx
sub    $0x10,%rsp
call   1030 <fclose@plt>
test   %rax,%rax
je     1138 <pclose+0x18>
mov    0x2eb2(%rip),%rbx
jmp    1145 <pclose+0x25>
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <wait@plt>
mov    (%rbx),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @pclose(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i64 @fclose(i32* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @wait(i32* %2)
br label %8
8: ; preds = %1, %6
%9 = phi i32* [ %2, %6 ], [ @EOF, %1 ]
%10 = load i32, i32* %9
ret i32 %10
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
void xxtea_decode_byte(unsigned char *v, int *k, off_t p) {
  unsigned char y[] = "XtEaNpK";
  *v = *v ^ (unsigned char)(k[p % 4] % 0xFF) ^ y[p];
}


x86 assembly (clang, -O0):
<xxtea_decode_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0xeea(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,4),%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%eax
mov    %dl,%cl
movzbl %cl,%ecx
xor    %ecx,%eax
movslq -0x14(%rbp),%rcx
movzbl -0x1c(%rbp,%rcx,1),%ecx
xor    %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xxtea_decode_byte>:
lea    0x3(%rdx),%eax
test   %edx,%edx
cmovns %edx,%eax
and    $0xfffffffc,%eax
movslq %edx,%rcx
sub    %eax,%edx
movslq %edx,%rax
movslq (%rsi,%rax,4),%rax
imul   $0xffffffff80808081,%rax,%rdx
shr    $0x20,%rdx
add    %eax,%edx
mov    %edx,%esi
shr    $0x1f,%esi
shr    $0x7,%edx
add    %esi,%edx
add    %eax,%edx
lea    0xec9(%rip),%rax
mov    (%rcx,%rax,1),%al
xor    (%rdi),%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
@__const.xxtea_decode_byte.y = [8 x i8] c"XtEaNpK\00"
define void @xxtea_decode_byte(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca [8 x i8]
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = bitcast [8 x i8]* %7 to i8*
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i32*, i32** %5
%13 = load i32, i32* %6
%14 = srem i32 %13, 4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %12, i64 %15
%17 = load i32, i32* %16
%18 = srem i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = zext i8 %19 to i32
%21 = xor i32 %11, %20
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = xor i32 %21, %26
%28 = trunc i32 %27 to i8
%29 = load i8*, i8** %4
store i8 %28, i8* %29
ret void
}

LLVM IR (-O2):
@__const.xxtea_decode_byte.y = [8 x i8] c"XtEaNpK\00"
define void @xxtea_decode_byte(i8* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = load i8, i8* %0
%5 = srem i32 %2, 4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
%8 = load i32, i32* %7
%9 = srem i32 %8, 255
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds [8 x i8], [8 x i8]* @__const.xxtea_decode_byte.y, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = trunc i32 %9 to i8
%14 = xor i8 %12, %4
%15 = xor i8 %14, %13
store i8 %15, i8* %0
ret void
}
void f7(unsigned short x) {}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f7(i16 zeroext %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void srec_write(FILE *pFile, unsigned char *buf, unsigned int start,
                unsigned int end) {
  do {
    fprintf(stderr, "%s\n", ("srec_write is not implemented!"));
    exit(-1);
  } while (0);
}


x86 assembly (clang, -O0):
<srec_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
lea    0xeb7(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<srec_write>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecc(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [31 x i8] c"srec_write is not implemented!\00"
define void @srec_write(i32* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
br label %9
9: ; preds = %4
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @exit(i32 -1)
unreachable
13: ; No predecessors!
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [31 x i8] c"srec_write is not implemented!\00"
define void @srec_write(i32* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xd5() {
  Assert_real((isbdigit(213) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              1070, ("isbdigit should be 0 for 0xd5"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0xd5>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd5,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x42e,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0xd5>:
push   %rax
mov    $0xd5,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x42e,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd5\00"
define void @t_isbdigit_0xd5() {
%1 = call i64 @isbdigit(i32 213)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1070, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd5\00"
define void @t_isbdigit_0xd5() {
%1 = tail call i64 @isbdigit(i32 213)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1070, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trap_SendClientCommand(char *);
void CG_ForceTapOut_f(void) { trap_SendClientCommand("forcetapout"); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"forcetapout\00"
define void @CG_ForceTapOut_f() {
%1 = tail call i32 @trap_SendClientCommand(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fyl2xp1() {
  db(0xD9);
  db(0xF9);
}


x86 assembly (clang, -O0):
<fyl2xp1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xf9,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fyl2xp1>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xf9,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fyl2xp1() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 249)
ret void
}

LLVM IR (-O2):
define void @fyl2xp1() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 249)
ret void
}
/* Variables and functions */
void YabThreadRemoteSleep(unsigned int id) {}


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

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

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

LLVM IR (-O2):
define void @YabThreadRemoteSleep(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int soma(int, int);
int main() {
  int a, b;
  printf("Digite dois numeros:");
  scanf("%d %d", &a, &b);
  printf("\nSoma = %d", soma(a, b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <soma@plt>
mov    %eax,%esi
lea    0xead(%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    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <soma@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Digite dois numeros:\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [11 x i8] c"\0ASoma = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @soma(i32 %5, i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Digite dois numeros:\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [11 x i8] c"\0ASoma = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @soma(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}