xunge/DecIR huggingface dataset:
void AlarmNothing(int dummy) {}


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

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

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

LLVM IR (-O2):
define void @AlarmNothing(i32 %0) {
ret void
}
void exit_with_code(exitcode) int exitcode;
{
  printf("==============================================================\n");
  exit(exitcode);
}


x86 assembly (clang, -O0):
<exit_with_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_with_code>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@str = [63 x i8] c"==============================================================\00"
define void @exit_with_code(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
tail call void @exit(i32 %0)
unreachable
}
int twos_complement(int A) {
  int output;
  output = ~(A) + 1;
  return output;
}


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

x86 assembly (clang, -O2):
<twos_complement>:
mov    %edi,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @twos_complement(i32 %0) {
%2 = sub i32 0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr,
          "Usage:  largefile [-f file_size] [-i IO_size] test_directory\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: largefile [-f file_size] [-i IO_size] test_directory\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: largefile [-f file_size] [-i IO_size] test_directory\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret void
}
void hwfunctions_sti() { asm volatile("sti"); }


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

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

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

LLVM IR (-O2):
define void @hwfunctions_sti() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
scalar_t__ emalloc(int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *newstr(char *s, int len) {
  char *rv = (char *)emalloc(len + 1);
  rv[len] = '\0';
  strncpy(rv, s, len);
  return rv;
}


x86 assembly (clang, -O0):
<newstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <emalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newstr>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <emalloc@plt>
mov    %rax,%rbx
movslq %r15d,%rdx
movb   $0x0,(%rax,%rdx,1)
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @newstr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = call i64 @emalloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
store i8 0, i8* %13
%14 = load i8*, i8** %5
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i32 @strncpy(i8* %14, i8* %15, i32 %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @newstr(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i64 @emalloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %5, i64 %6
store i8 0, i8* %7
%8 = tail call i32 @strncpy(i8* %5, i8* %0, i32 %1)
ret i8* %5
}
/* Variables and functions */
int strlen(char *);
char F_LstC(char *str) {
  int i = strlen(str) - 1;
  while (str[i] <= 32) {
    i--;
    if (i <= 0)
      return 0;
  }
  return str[i];
}


x86 assembly (clang, -O0):
<F_LstC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jg     1161 <F_LstC+0x51>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115c <F_LstC+0x4c>
movb   $0x0,-0x1(%rbp)
jmp    116f <F_LstC+0x5f>
jmp    112b <F_LstC+0x1b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F_LstC>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
add    $0x1,%rcx
movzbl -0x2(%rbx,%rcx,1),%eax
cmp    $0x20,%al
jg     1135 <F_LstC+0x25>
add    $0xffffffffffffffff,%rcx
cmp    $0x2,%rcx
jg     1120 <F_LstC+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @F_LstC(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
br label %4
4: ; preds = %10, %1
%5 = phi i64 [ %6, %10 ], [ %3, %1 ]
%6 = add nsw i64 %5, -1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp slt i8 %8, 33
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = icmp slt i64 %5, 3
br i1 %11, label %12, label %4
12: ; preds = %4, %10
%13 = phi i8 [ 0, %10 ], [ %8, %4 ]
ret i8 %13
}
/* Variables and functions */
int /*<<< orphan*/ FlightModeSettingsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void FlightModeSettingsLogging() { UAVObjLogging(FlightModeSettingsHandle()); }


x86 assembly (clang, -O0):
<FlightModeSettingsLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <FlightModeSettingsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlightModeSettingsLogging>:
push   %rax
xor    %eax,%eax
call   1040 <FlightModeSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @FlightModeSettingsLogging() {
%1 = call i32 (...) @FlightModeSettingsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FlightModeSettingsLogging() {
%1 = tail call i32 (...) @FlightModeSettingsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RotShift_instr(int);
void RR(void) { RotShift_instr(3); }


x86 assembly (clang, -O0):
<RR>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <RotShift_instr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RR>:
mov    $0x3,%edi
jmp    1030 <RotShift_instr@plt>

LLVM IR (-O0):
define void @RR() {
%1 = call i32 @RotShift_instr(i32 3)
ret void
}

LLVM IR (-O2):
define void @RR() {
%1 = tail call i32 @RotShift_instr(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ICCalculateBits(int);
int main(int argc, const char *argv[]) { ICCalculateBits(254); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xfe,%edi
call   1030 <ICCalculateBits@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @ICCalculateBits(i32 254)
ret i32 0
}
int main(int argc, char *argv[]) {
  int x = 0;
a:
  x++;
b:
  printf("Diferencia: %d\n", &&b - &&a);
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Diferencia: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %13, %2
%8 = load i32, i32* %6
%9 = add nsw i32 %8, 1
store i32 %9, i32* %6
br label %10
10: ; preds = %13, %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 sub (i64 ptrtoint (i8* blockaddress(@main, %10) to i64), i64 ptrtoint (i8* blockaddress(@main, %7) to i64)))
%12 = load i32, i32* %3
ret i32 %12
13: ; No predecessors!
indirectbr i8* undef, [label %10, label %7]
}

LLVM IR (-O2):
@.str = [16 x i8] c"Diferencia: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 sub (i64 ptrtoint (i8* blockaddress(@main, %3) to i64), i64 ptrtoint (i8* blockaddress(@main, %3) to i64)))
ret i32 0
}
void swap_val(int *a, int *b) {
  int *c = a;
  *a = *b;
  *b = *c;
}


x86 assembly (clang, -O0):
<swap_val>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @swap_val(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
store i32* %6, i32** %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap_val(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
void *realloc(void *, int);
void *nnresize_if_needed(void *ptr, int current_size) {
  if ((current_size + 1) % 10 == 0) {
    ptr = realloc(ptr, (current_size + 10) * sizeof(void *));
  }
  return ptr;
}


x86 assembly (clang, -O0):
<nnresize_if_needed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1151 <nnresize_if_needed+0x41>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
add    $0xa,%eax
cltq
shl    $0x3,%rax
mov    %eax,%esi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nnresize_if_needed>:
imul   $0xcccccccd,%esi,%eax
add    $0xe6666665,%eax
ror    %eax
cmp    $0x19999998,%eax
jbe    1128 <nnresize_if_needed+0x18>
mov    %rdi,%rax
ret
lea    0x50(,%rsi,8),%esi
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define i8* @nnresize_if_needed(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = srem i32 %3, 10
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = shl i32 %1, 3
%8 = add i32 %7, 80
%9 = tail call i8* @realloc(i8* %0, i32 %8)
br label %10
10: ; preds = %6, %2
%11 = phi i8* [ %9, %6 ], [ %0, %2 ]
ret i8* %11
}
void gtk_tree_model_sort_convert_iter_to_child_iter() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_sort_convert_iter_to_child_iter() {
ret void
}
void alert_server_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @alert_server_exit() {
ret void
}
__attribute__((weak)) void handler_Empty() {}


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

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

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

LLVM IR (-O2):
define weak void @handler_Empty() {
ret void
}
char *langDbgDevKorean90() { return "Korean 90"; }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"Korean 90\00"
define i8* @langDbgDevKorean90() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct _reent {
  int dummy;
};
typedef int /*<<< orphan*/ caddr_t;

/* Variables and functions */
int /*<<< orphan*/ TP(char *, int);
caddr_t _sbrk_r(struct _reent *r, int incr) {
  TP("(%d);", incr);
  return 0;
}


x86 assembly (clang, -O0):
<_sbrk_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <TP@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._reent = type { i32 }
@.str = [6 x i8] c"(%d);\00"
define i32 @_sbrk_r(%struct._reent* %0, i32 %1) {
%3 = alloca %struct._reent*
%4 = alloca i32
store %struct._reent* %0, %struct._reent** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @TP(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
%struct._reent = type { i32 }
@.str = [6 x i8] c"(%d);\00"
define i32 @_sbrk_r(%struct._reent* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @TP(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x98() {
  Assert_real((iscntrl(152) == 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_iscntrl.c",
              765, ("iscntrl should be 0 for 0x98"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x98>:
push   %rax
mov    $0x98,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2fd,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x98\00"
define void @t_iscntrl_0x98() {
%1 = call i64 @iscntrl(i32 152)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 765, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x98\00"
define void @t_iscntrl_0x98() {
%1 = tail call i64 @iscntrl(i32 152)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 765, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int *test1(int *);
int *test() {
  int *a2 = (int *)malloc(sizeof(int));
  *a2 = 10;
  if (*a2 > 5) {
    return test();
  }
  int *b2 = (int *)malloc(sizeof(int));
  return test1(b2);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x5,(%rax)
jle    116b <test+0x3b>
call   1050 <test@plt>
mov    %rax,-0x8(%rbp)
jmp    1186 <test+0x56>
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <test1@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0xa,(%rax)
jmp    1120 <test+0x10>

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

LLVM IR (-O2):
define noalias i32* @test() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 10, i32* %3
br label %1
}
int Mask(int number) { return 1 << (number % sizeof(int)); }


x86 assembly (clang, -O0):
<Mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
and    $0x3,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Mask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = urem i64 %4, 4
%6 = trunc i64 %5 to i32
%7 = shl i32 1, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @Mask(i32 %0) {
%2 = and i32 %0, 3
%3 = shl nuw nsw i32 1, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print(int a) { printf("%d\n", a); }


x86 assembly (clang, -O0):
<print>:
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):
<print>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @print(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ starBar();
int /*<<< orphan*/ test();
int /*<<< orphan*/ test2();
int main(int argc, const char *argv[]) {
  test();
  starBar();
  test2();
  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   1050 <test@plt>
mov    $0x0,%al
call   1030 <starBar@plt>
mov    $0x0,%al
call   1040 <test2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
call   1030 <starBar@plt>
xor    %eax,%eax
call   1040 <test2@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()
%7 = call i32 (...) @starBar()
%8 = call i32 (...) @test2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test()
%4 = tail call i32 (...) @starBar()
%5 = tail call i32 (...) @test2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ jos_port_sleep();
void jos_sleep(void) { jos_port_sleep(); }


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

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

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

LLVM IR (-O2):
define void @jos_sleep() {
%1 = tail call i32 (...) @jos_port_sleep()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct cpack_state {
  int dummy;
};
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int cpack_uint8(struct cpack_state *, int /*<<< orphan*/ *);
int cpack_int8(struct cpack_state *s, int8_t *p) {
  return cpack_uint8(s, (uint8_t *)p);
}


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

x86 assembly (clang, -O2):
<cpack_int8>:
jmp    1030 <cpack_uint8@plt>

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

LLVM IR (-O2):
%struct.cpack_state = type { i32 }
define i32 @cpack_int8(%struct.cpack_state* %0, i32* %1) {
%3 = tail call i32 @cpack_uint8(%struct.cpack_state* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void print_help() { fprintf(stdout, "There is no help so far!\n"); }


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [26 x i8] c"There is no help so far!\0A\00"
define void @print_help() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [26 x i8] c"There is no help so far!\0A\00"
define void @print_help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_uid_get_display(uid_t uid,
                                                              char **session) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_uid_get_display>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_uid_get_display>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_uid_get_display(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_uid_get_display(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ x;

/* Variables and functions */
int /*<<< orphan*/ hash_buffer(char *, int);
void hash_int(int x) { hash_buffer((char *)&x, sizeof(x)); }


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

x86 assembly (clang, -O2):
<hash_int>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <hash_buffer@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @hash_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @hash_buffer(i8* %3, i32 4)
ret void
}

LLVM IR (-O2):
define void @hash_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @hash_buffer(i8* %3, i32 4)
ret void
}
/* Variables and functions */
int WIFSTOPPED(int);
int wifstopped(int status) { return WIFSTOPPED(status); }


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

x86 assembly (clang, -O2):
<wifstopped>:
jmp    1030 <WIFSTOPPED@plt>

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

LLVM IR (-O2):
define i32 @wifstopped(i32 %0) {
%2 = tail call i32 @WIFSTOPPED(i32 %0)
ret i32 %2
}
/* Variables and functions */
int isxdigit(int);
__attribute__((regparm(0))) int(_win_isxdigit)(int c) { return isxdigit(c); }


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

x86 assembly (clang, -O2):
<_win_isxdigit>:
jmp    1030 <isxdigit@plt>

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

LLVM IR (-O2):
define i32 @_win_isxdigit(i32 %0) {
%2 = tail call i32 @isxdigit(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ transmit(int, int, int /*<<< orphan*/);
void send_0(uint32_t pulse_len) {
  transmit(1, 3, pulse_len);
  transmit(1, 3, pulse_len);
}


x86 assembly (clang, -O0):
<send_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%edi
mov    $0x3,%esi
call   1030 <transmit@plt>
mov    -0x4(%rbp),%edx
mov    $0x1,%edi
mov    $0x3,%esi
call   1030 <transmit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_0>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
mov    $0x3,%esi
mov    %ebx,%edx
call   1030 <transmit@plt>
mov    $0x1,%edi
mov    $0x3,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <transmit@plt>

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

LLVM IR (-O2):
define void @send_0(i32 %0) {
%2 = tail call i32 @transmit(i32 1, i32 3, i32 %0)
%3 = tail call i32 @transmit(i32 1, i32 3, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
void draw_back(int frame, char *image) {
  (void)frame;
  memset(image, 'B', 80 * 8);
}


x86 assembly (clang, -O0):
<draw_back>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x42,%esi
mov    $0x280,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_back>:
mov    %rsi,%rdi
mov    $0x42,%esi
mov    $0x280,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @draw_back(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @memset(i8* %6, i8 signext 66, i32 640)
ret void
}

LLVM IR (-O2):
define void @draw_back(i32 %0, i8* %1) {
%3 = tail call i32 @memset(i8* %1, i8 signext 66, i32 640)
ret void
}
/* Variables and functions */
size_t serialize_uint32(unsigned char *out, unsigned int v) {
  if (out != NULL) {
    out[0] = v & 0x000000FF;
    out[1] = (v & 0x0000FF00) >> 8;
    out[2] = (v & 0x00FF0000) >> 16;
    out[3] = (v & 0xFF000000) >> 24;
  }
  return 4;
}


x86 assembly (clang, -O0):
<serialize_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1162 <serialize_uint32+0x62>
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
and    $0xff00,%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
and    $0xff0000,%eax
shr    $0x10,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialize_uint32>:
test   %rdi,%rdi
je     1107 <serialize_uint32+0x7>
mov    %esi,(%rdi)
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i64 @serialize_uint32(i8* %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 = icmp ne i8* %5, null
br i1 %6, label %7, label %31
7: ; preds = %2
%8 = load i32, i32* %4
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i32, i32* %4
%14 = and i32 %13, 65280
%15 = lshr i32 %14, 8
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8 %16, i8* %18
%19 = load i32, i32* %4
%20 = and i32 %19, 16711680
%21 = lshr i32 %20, 16
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i64 2
store i8 %22, i8* %24
%25 = load i32, i32* %4
%26 = and i32 %25, -16777216
%27 = lshr i32 %26, 24
%28 = trunc i32 %27 to i8
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i64 3
store i8 %28, i8* %30
br label %31
31: ; preds = %7, %2
ret i64 4
}

LLVM IR (-O2):
define i64 @serialize_uint32(i8* writeonly %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = trunc i32 %1 to i8
store i8 %5, i8* %0
%6 = lshr i32 %1, 8
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %7, i8* %8
%9 = lshr i32 %1, 16
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %10, i8* %11
%12 = lshr i32 %1, 24
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %13, i8* %14
br label %15
15: ; preds = %4, %2
ret i64 4
}
/* Variables and functions */
int /*<<< orphan*/ tcg_abort();
int tcg_target_get_call_iarg_regs_count(int flags) {
  tcg_abort();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @tcg_target_get_call_iarg_regs_count(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @tcg_abort()
ret i32 0
}

LLVM IR (-O2):
define i32 @tcg_target_get_call_iarg_regs_count(i32 %0) {
%2 = tail call i32 (...) @tcg_abort()
ret i32 0
}
void aeron_idle_strategy_noop_idle(void *state, int work_count) {
  if (work_count > 0) {
    return;
  }
  __asm__ volatile("pause\n" : : : "memory");
}


x86 assembly (clang, -O0):
<aeron_idle_strategy_noop_idle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    111a <aeron_idle_strategy_noop_idle+0x1a>
jmp    111c <aeron_idle_strategy_noop_idle+0x1c>
pause
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_idle_strategy_noop_idle>:
test   %esi,%esi
jle    1105 <aeron_idle_strategy_noop_idle+0x5>
ret
pause
ret

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

LLVM IR (-O2):
define void @aeron_idle_strategy_noop_idle(i8* nocapture readnone %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
tail call void asm sideeffect "pause\0A", "~{memory},~{dirflag},~{fpsr},~{flags}"()
br label %5
5: ; preds = %2, %4
ret void
}
/* Type definitions */
typedef void *uint32_t;

/* Variables and functions */
void *bswap_32(void *);
double bswap_dbl(double x) {
  union {
    uint32_t l[2];
    double d;
  } w, r;
  w.d = x;
  r.l[0] = bswap_32(w.l[1]);
  r.l[1] = bswap_32(w.l[0]);
  return r.d;
}


x86 assembly (clang, -O0):
<bswap_dbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <bswap_32@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <bswap_32@plt>
mov    %rax,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_dbl>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <bswap_32@plt>
mov    %rax,%rbx
movq   0x8(%rsp),%xmm0
movq   %xmm0,%rdi
call   1030 <bswap_32@plt>
movq   %rbx,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%union.anon = type { [2 x i8*] }
define double @bswap_dbl(double %0) {
%2 = alloca double
%3 = alloca %union.anon
%4 = alloca %union.anon
store double %0, double* %2
%5 = load double, double* %2
%6 = bitcast %union.anon* %3 to double*
store double %5, double* %6
%7 = bitcast %union.anon* %3 to [2 x i8*]*
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 1
%9 = load i8*, i8** %8
%10 = call i8* @bswap_32(i8* %9)
%11 = bitcast %union.anon* %4 to [2 x i8*]*
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* %11, i64 0, i64 0
store i8* %10, i8** %12
%13 = bitcast %union.anon* %3 to [2 x i8*]*
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 0
%15 = load i8*, i8** %14
%16 = call i8* @bswap_32(i8* %15)
%17 = bitcast %union.anon* %4 to [2 x i8*]*
%18 = getelementptr inbounds [2 x i8*], [2 x i8*]* %17, i64 0, i64 1
store i8* %16, i8** %18
%19 = bitcast %union.anon* %4 to double*
%20 = load double, double* %19
ret double %20
}

LLVM IR (-O2):
define double @bswap_dbl(double %0) {
%2 = tail call i8* @bswap_32(i8* undef)
%3 = bitcast double %0 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call i8* @bswap_32(i8* %4)
%6 = ptrtoint i8* %2 to i64
%7 = bitcast i64 %6 to double
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_PURPOSE;
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int check_ca(int /*<<< orphan*/ const *);
int ocsp_helper(const X509_PURPOSE *xp, const X509 *x, int ca) {
  if (ca)
    return check_ca(x);
  return 1;
}


x86 assembly (clang, -O0):
<ocsp_helper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     113e <ocsp_helper+0x2e>
mov    -0x18(%rbp),%rdi
call   1030 <check_ca@plt>
mov    %eax,-0x4(%rbp)
jmp    1145 <ocsp_helper+0x35>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ocsp_helper>:
test   %edx,%edx
je     111c <ocsp_helper+0xc>
mov    %rsi,%rdi
jmp    1030 <check_ca@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ocsp_helper(i32* nocapture readnone %0, i32* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @check_ca(i32* %1)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ 1, %3 ]
ret i32 %8
}
/* Variables and functions */
int pl_on_destroy_workers();
int pl_destroy_workers(void) { return pl_on_destroy_workers(); }


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

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

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

LLVM IR (-O2):
define i32 @pl_destroy_workers() {
%1 = tail call i32 (...) @pl_on_destroy_workers()
ret i32 %1
}
/* Type definitions */
struct btf_type {
  int dummy;
};

/* Variables and functions */
scalar_t__ BTF_KIND_UNKN;
scalar_t__ btf_kind(struct btf_type const *);
bool btf_is_void(const struct btf_type *t) {
  return btf_kind(t) == BTF_KIND_UNKN;
}


x86 assembly (clang, -O0):
<btf_is_void>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <btf_kind@plt>
mov    0x2ebc(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btf_is_void>:
push   %rax
call   1030 <btf_kind@plt>
mov    0x2ecb(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.btf_type = type { i32 }
@BTF_KIND_UNKN = global i64 0
define i32 @btf_is_void(%struct.btf_type* %0) {
%2 = alloca %struct.btf_type*
store %struct.btf_type* %0, %struct.btf_type** %2
%3 = load %struct.btf_type*, %struct.btf_type** %2
%4 = call i64 @btf_kind(%struct.btf_type* %3)
%5 = load i64, i64* @BTF_KIND_UNKN
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.btf_type = type { i32 }
@BTF_KIND_UNKN = global i64 0
define i32 @btf_is_void(%struct.btf_type* %0) {
%2 = tail call i64 @btf_kind(%struct.btf_type* %0)
%3 = load i64, i64* @BTF_KIND_UNKN
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int isprime(unsigned int number) {
  unsigned int div = 3;
  while (div * div < number && number % div != 0)
    div += 2;
  return number % div != 0;
}


x86 assembly (clang, -O0):
<isprime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x9(%rbp)
jae    1134 <isprime+0x34>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
cmp    $0x0,%edx
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1144 <isprime+0x44>
jmp    1152 <isprime+0x52>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <isprime+0xe>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
cmp    $0x0,%edx
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprime>:
mov    $0x3,%ecx
cmp    $0xa,%edi
jb     1126 <isprime+0x26>
mov    $0x3,%ecx
nop
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
test   %edx,%edx
je     1126 <isprime+0x26>
add    $0x2,%ecx
mov    %ecx,%eax
imul   %ecx,%eax
cmp    %edi,%eax
jb     1110 <isprime+0x10>
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
xor    %eax,%eax
test   %edx,%edx
setne  %al
ret

LLVM IR (-O0):
define i32 @isprime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 3, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = mul i32 %5, %6
%8 = load i32, i32* %2
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %4
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = urem i32 %11, %12
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %10, %4
%16 = phi i1 [ false, %4 ], [ %14, %10 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32, i32* %3
%19 = add i32 %18, 2
store i32 %19, i32* %3
br label %4
20: ; preds = %15
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = urem i32 %21, %22
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @isprime(i32 %0) {
%2 = icmp ugt i32 %0, 9
br i1 %2, label %3, label %11
3: ; preds = %1, %7
%4 = phi i32 [ %8, %7 ], [ 3, %1 ]
%5 = urem i32 %0, %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = add i32 %4, 2
%9 = mul i32 %8, %8
%10 = icmp ult i32 %9, %0
br i1 %10, label %3, label %11
11: ; preds = %3, %7, %1
%12 = phi i32 [ 3, %1 ], [ %8, %7 ], [ %4, %3 ]
%13 = urem i32 %0, %12
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Variables and functions */
int r1(int, int /*<<< orphan*/);
int rev(int ls) { return r1(ls, 0); }


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

x86 assembly (clang, -O2):
<rev>:
xor    %esi,%esi
jmp    1030 <r1@plt>

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

LLVM IR (-O2):
define i32 @rev(i32 %0) {
%2 = tail call i32 @r1(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ICOutput_int(int const);
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  const int value = 5;
  ICOutput_int(value);
  printf("Hello, World!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 5, i32* %6
%7 = call i32 @ICOutput_int(i32 5)
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @ICOutput_int(i32 5)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void f6(int (*f)(int)) { printf("f6: %d\n", f(6)); }


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x6,%edi
call   *-0x8(%rbp)
mov    %eax,%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
push   %rax
mov    %rdi,%rax
mov    $0x6,%edi
call   *%rax
lea    0xede(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"f6: %d\0A\00"
define void @f6(i32 (i32)* nocapture %0) {
%2 = tail call i32 %0(i32 6)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}