xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void *syn_connect(void *arg) {
  int sfd = *((int *)arg);
  printf("server start to handle the connect\n");
  write(sfd, "response", strlen("response"));
  free(arg);
  close(sfd);
  return (void *)0;
}


x86 assembly (clang, -O0):
<syn_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xe94(%rip),%rdi
call   1060 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xea6(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%edx
lea    0xe95(%rip),%rsi
call   1040 <write@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%edi
call   1070 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syn_connect>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%ebp
lea    0xea9(%rip),%rdi
call   1040 <puts@plt>
lea    0xe94(%rip),%r14
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%edi
call   1070 <close@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"server start to handle the connect\0A\00"
@.str.1 = [9 x i8] c"response\00"
define i8* @syn_connect(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @write(i32 %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %2
%12 = call i32 @free(i8* %11)
%13 = load i32, i32* %3
%14 = call i32 @close(i32 %13)
ret i8* null
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"response\00"
@str = [35 x i8] c"server start to handle the connect\00"
define noalias i8* @syn_connect(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @write(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @free(i8* %0)
%8 = tail call i32 @close(i32 %3)
ret i8* null
}
/* Variables and functions */
int yaffs_llistxattr_reldir(int /*<<< orphan*/, char const *, char *, int);
int yaffs_llistxattr(const char *path, char *data, int size) {
  return yaffs_llistxattr_reldir((0), path, data, size);
}


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

x86 assembly (clang, -O2):
<yaffs_llistxattr>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <yaffs_llistxattr_reldir@plt>

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

LLVM IR (-O2):
define i32 @yaffs_llistxattr(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @yaffs_llistxattr_reldir(i32 0, i8* %0, i8* %1, i32 %2)
ret i32 %4
}
void xjosc_shutdown(void) { ; }


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

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

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

LLVM IR (-O2):
define void @xjosc_shutdown() {
ret void
}
int avg_4(void *context, int pixel1, int pixel2, int pixel3, int pixel4) {
  int avg1 = (pixel1 + pixel2 + 1) >> 1;
  int avg2 = (pixel3 + pixel4 + 1) >> 1;
  if (avg1 > 0) {
    avg1 -= 1;
  }
  return (avg1 + avg2 + 1) >> 1;
}


x86 assembly (clang, -O0):
<avg_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1146 <avg_4+0x46>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<avg_4>:
lea    (%rdx,%rsi,1),%edi
add    %esi,%edx
add    $0x1,%edx
sar    %edx
xor    %eax,%eax
test   %edi,%edi
setle  %al
add    %r8d,%ecx
add    $0x1,%ecx
sar    %ecx
add    %edx,%eax
add    %ecx,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @avg_4(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = add nsw i32 %2, %1
%7 = add nsw i32 %6, 1
%8 = ashr i32 %7, 1
%9 = icmp slt i32 %6, 1
%10 = add i32 %3, 1
%11 = add i32 %10, %4
%12 = ashr i32 %11, 1
%13 = zext i1 %9 to i32
%14 = add nsw i32 %8, %13
%15 = add nsw i32 %14, %12
%16 = ashr i32 %15, 1
ret i32 %16
}
/* Variables and functions */
int hello_world(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x = hello_world(233, 127, 1024);
  printf("Value Returned: %i\b", x);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Value Returned: %i\08\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @hello_world(i32 233, i32 127, i32 1024)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Value Returned: %i\08\00"
define i32 @main() {
%1 = tail call i32 @hello_world(i32 233, i32 127, i32 1024)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int suma(int i, int j) {
  volatile char c;
  return i + j;
}


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

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

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

LLVM IR (-O2):
define i32 @suma(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
void strrev(char *begin, char *end) {
  if (begin == NULL || end == NULL)
    return;
  char x;
  while (end > begin)
    x = *end, *end-- = *begin, *begin++ = x;
}


x86 assembly (clang, -O0):
<strrev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1122 <strrev+0x22>
cmpq   $0x0,-0x10(%rbp)
jne    1127 <strrev+0x27>
jmp    1173 <strrev+0x73>
jmp    112c <strrev+0x2c>
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    1173 <strrev+0x73>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    112c <strrev+0x2c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrev>:
test   %rdi,%rdi
je     112c <strrev+0x2c>
cmp    %rdi,%rsi
jbe    112c <strrev+0x2c>
add    $0xffffffffffffffff,%rsi
xchg   %ax,%ax
movzbl 0x1(%rsi),%eax
movzbl (%rdi),%ecx
mov    %cl,0x1(%rsi)
mov    %al,(%rdi)
add    $0x1,%rdi
lea    -0x1(%rsi),%rax
cmp    %rdi,%rsi
mov    %rax,%rsi
ja     1110 <strrev+0x10>
ret

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

LLVM IR (-O2):
define void @strrev(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ugt i8* %1, %0
%5 = and i1 %3, %4
br i1 %5, label %6, label %14
6: ; preds = %2, %6
%7 = phi i8* [ %12, %6 ], [ %0, %2 ]
%8 = phi i8* [ %11, %6 ], [ %1, %2 ]
%9 = load i8, i8* %8
%10 = load i8, i8* %7
%11 = getelementptr inbounds i8, i8* %8, i64 -1
store i8 %10, i8* %8
%12 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %9, i8* %7
%13 = icmp ugt i8* %11, %12
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret void
}
const char *scs_version(void) { return ("2.1.4"); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ top_bit(int);
int16_t gsm0610_norm(int32_t x) {
  assert(x != 0);
  if (x < 0) {
    if (x <= -1073741824)
      return 0;
    x = ~x;
  }
  return (int16_t)(30 - top_bit(x));
}


x86 assembly (clang, -O0):
<gsm0610_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x8(%rbp)
jge    1168 <gsm0610_norm+0x48>
cmpl   $0xc0000000,-0x8(%rbp)
jg     115f <gsm0610_norm+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    117e <gsm0610_norm+0x5e>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <top_bit@plt>
mov    %rax,%rcx
mov    $0x1e,%eax
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsm0610_norm>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1030 <assert@plt>
test   %ebx,%ebx
jns    1140 <gsm0610_norm+0x20>
xor    %eax,%eax
cmp    $0xc0000001,%ebx
jb     1151 <gsm0610_norm+0x31>
not    %ebx
mov    %ebx,%edi
call   1040 <top_bit@plt>
mov    %rax,%rcx
mov    $0x1e,%eax
sub    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gsm0610_norm(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, -1073741824
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 0, i32* %2
br label %22
14: ; preds = %10
%15 = load i32, i32* %3
%16 = xor i32 %15, -1
store i32 %16, i32* %3
br label %17
17: ; preds = %14, %1
%18 = load i32, i32* %3
%19 = call i64 @top_bit(i32 %18)
%20 = sub nsw i64 30, %19
%21 = trunc i64 %20 to i32
store i32 %21, i32* %2
br label %22
22: ; preds = %17, %13
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @gsm0610_norm(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp slt i32 %0, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = icmp ult i32 %0, -1073741823
br i1 %7, label %15, label %8
8: ; preds = %6
%9 = xor i32 %0, -1
br label %10
10: ; preds = %8, %1
%11 = phi i32 [ %9, %8 ], [ %0, %1 ]
%12 = tail call i64 @top_bit(i32 %11)
%13 = trunc i64 %12 to i32
%14 = sub i32 30, %13
br label %15
15: ; preds = %6, %10
%16 = phi i32 [ %14, %10 ], [ 0, %6 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ slicechrs_easy_test();
int main() {
  slicechrs_easy_test();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @slicechrs_easy_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @slicechrs_easy_test()
ret i32 0
}
/* Variables and functions */
int ft_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void ft_putendl(char const *s) {
  if (s) {
    write(1, s, ft_strlen(s));
    write(1, "\n", 1);
  } else {
    write(1, "null", 4);
  }
}


x86 assembly (clang, -O0):
<ft_putendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1170 <ft_putendl+0x50>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    $0x1,%edx
lea    0xe9c(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
jmp    1186 <ft_putendl+0x66>
mov    $0x1,%edi
lea    0xe86(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl>:
test   %rdi,%rdi
je     1154 <ft_putendl+0x34>
push   %rbx
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xebc(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
pop    %rbx
jmp    1030 <write@plt>
lea    0xea7(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [5 x i8] c"null\00"
define void @ft_putendl(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @ft_strlen(i8* %0)
%5 = tail call i32 @write(i32 1, i8* %0, i32 %4)
%6 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %9
7: ; preds = %1
%8 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
br label %9
9: ; preds = %7, %3
ret void
}
/* Variables and functions */
int *custom_alloc(int);
int /*<<< orphan*/ custom_free(int *);
int /*<<< orphan*/ free(int *);
int *malloc(int);
int main(void) {
  int *a = custom_alloc(400);
  custom_free(a);
  a = custom_alloc(800);
  custom_free(a);
  a = malloc(400);
  free(a);
  a = malloc(800);
  free(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x190,%edi
call   1050 <custom_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <custom_free@plt>
mov    $0x320,%edi
call   1050 <custom_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <custom_free@plt>
mov    $0x190,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    $0x320,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x190,%edi
call   1050 <custom_alloc@plt>
mov    %rax,%rdi
call   1060 <custom_free@plt>
mov    $0x320,%edi
call   1050 <custom_alloc@plt>
mov    %rax,%rdi
call   1060 <custom_free@plt>
mov    $0x190,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
mov    $0x320,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @custom_alloc(i32 400)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @custom_free(i32* %4)
%6 = call i32* @custom_alloc(i32 800)
store i32* %6, i32** %2
%7 = load i32*, i32** %2
%8 = call i32 @custom_free(i32* %7)
%9 = call i32* @malloc(i32 400)
store i32* %9, i32** %2
%10 = load i32*, i32** %2
%11 = call i32 @free(i32* %10)
%12 = call i32* @malloc(i32 800)
store i32* %12, i32** %2
%13 = load i32*, i32** %2
%14 = call i32 @free(i32* %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @custom_alloc(i32 400)
%2 = tail call i32 @custom_free(i32* %1)
%3 = tail call i32* @custom_alloc(i32 800)
%4 = tail call i32 @custom_free(i32* %3)
%5 = tail call i32* @malloc(i32 400)
%6 = tail call i32 @free(i32* %5)
%7 = tail call i32* @malloc(i32 800)
%8 = tail call i32 @free(i32* %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ CopyRemovingComments(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/);
int /*<<< orphan*/ *OpenUserFile(char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
main() {
  FILE *infile;
  printf("This program removes comments from a file.\n");
  infile = OpenUserFile("Input file:  ", "r");
  CopyRemovingComments(infile, stdout);
  fclose(infile);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1060 <OpenUserFile@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
call   1050 <CopyRemovingComments@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1060 <OpenUserFile@plt>
mov    %rax,%rbx
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <CopyRemovingComments@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"This program removes comments from a file.\0A\00"
@.str.1 = [14 x i8] c"Input file: \00"
@.str.2 = [2 x i8] c"r\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32*
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32* @OpenUserFile(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = load i32, i32* @stdout
%6 = call i32 @CopyRemovingComments(i32* %4, i32 %5)
%7 = load i32*, i32** %1
%8 = call i32 @fclose(i32* %7)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Input file: \00"
@.str.2 = [2 x i8] c"r\00"
@stdout = global i32 0
@str = [43 x i8] c"This program removes comments from a file.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%2 = tail call i32* @OpenUserFile(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @CopyRemovingComments(i32* %2, i32 %3)
%5 = tail call i32 @fclose(i32* %2)
ret i32 0
}
int fail_test() { return -44; }


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

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

LLVM IR (-O0):
define i32 @fail_test() {
ret i32 -44
}

LLVM IR (-O2):
define i32 @fail_test() {
ret i32 -44
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
__attribute__((weak)) extern void __aeabi_memclr4(void *dest, size_t n) {
  memset(dest, 0, n);
}


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

x86 assembly (clang, -O2):
<__aeabi_memclr4>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define weak void @__aeabi_memclr4(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
ret void
}
/* Variables and functions */
int ilogb(double);
int c_ilogb(double arg0) { return ilogb(arg0); }


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

x86 assembly (clang, -O2):
<c_ilogb>:
jmp    1030 <ilogb@plt>

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

LLVM IR (-O2):
define i32 @c_ilogb(double %0) {
%2 = tail call i32 @ilogb(double %0)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t EMACVLANTxConfigGet(uint32_t ui32Base, uint16_t *pui16Tag) {
  uint32_t ui32Value;
  ASSERT(ui32Base == 0x400EC000);
  ASSERT(pui16Tag);
  ui32Value = (*((volatile uint32_t *)(ui32Base + 0x00000584)));
  *pui16Tag = (uint16_t)((ui32Value & 0x0000FFFF) >> 0);
  return (ui32Value & ~0x0000FFFF);
}


x86 assembly (clang, -O0):
<EMACVLANTxConfigGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x584,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0xffff,%eax
sar    $0x0,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
and    $0xffff0000,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACVLANTxConfigGet>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400ec000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
mov    %ebx,%edi
call   1030 <ASSERT@plt>
movslq %ebp,%rax
mov    0x584(%rax),%eax
movzwl %ax,%ecx
mov    %rcx,(%rbx)
and    $0xffff0000,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @EMACVLANTxConfigGet(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1074708480
%8 = zext i1 %7 to i32
%9 = call i32 @ASSERT(i32 %8)
%10 = load i64*, i64** %4
%11 = ptrtoint i64* %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1412
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = and i32 %18, 65535
%20 = ashr i32 %19, 0
%21 = sext i32 %20 to i64
%22 = load i64*, i64** %4
store i64 %21, i64* %22
%23 = load i32, i32* %5
%24 = and i32 %23, -65536
ret i32 %24
}

LLVM IR (-O2):
define i32 @EMACVLANTxConfigGet(i32 %0, i64* %1) {
%3 = icmp eq i32 %0, 1074708480
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = ptrtoint i64* %1 to i64
%7 = trunc i64 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = add nsw i32 %0, 1412
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, 65535
%14 = zext i32 %13 to i64
store i64 %14, i64* %1
%15 = and i32 %12, -65536
ret i32 %15
}
void databort_hdlr(void) { asm volatile("nop \n"); }


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

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

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

LLVM IR (-O2):
define void @databort_hdlr() {
tail call void asm sideeffect "nop \0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/string.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/string.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/string.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ init_sysCx();
int /*<<< orphan*/ lose_sysCx();
int /*<<< orphan*/ testfn_Table();
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
  init_sysCx();
  testfn_Table();
  lose_sysCx();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <init_sysCx@plt>
mov    $0x0,%al
call   1050 <testfn_Table@plt>
mov    $0x0,%al
call   1040 <lose_sysCx@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_sysCx()
%4 = tail call i32 (...) @testfn_Table()
%5 = tail call i32 (...) @lose_sysCx()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
void fini(void) { _exit(0); }


x86 assembly (clang, -O0):
<fini>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<fini>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @fini() {
%1 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @fini() {
%1 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ get_draw_area();
void init_x11(void) { get_draw_area(); }


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

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

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

LLVM IR (-O2):
define void @init_x11() {
%1 = tail call i32 (...) @get_draw_area()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(void) {
  char usage[] = "BT downloader\n"
                 "-f Torrent file name\n"
                 "-p Path to save file(s)\n"
                 "-h help\n";
  fprintf(stderr, "%s", usage);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x44,%edx
call   1040 <memcpy@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rdx
lea    0xee3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0xa706c,0x40(%rsp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xed9(%rip),%rsi
mov    %rsp,%rdx
call   1030 <fprintf@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@__const.print_usage.usage = [68 x i8] c"BT downloader\0A-f Torrent file name\0A-p Path to save file(s)\0A-h help\0A\00"
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define void @print_usage() {
%1 = alloca [68 x i8]
%2 = bitcast [68 x i8]* %1 to i8*
%3 = load i32, i32* @stderr
%4 = getelementptr inbounds [68 x i8], [68 x i8]* %1, i64 0, i64 0
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@__const.print_usage.usage = [68 x i8] c"BT downloader\0A-f Torrent file name\0A-p Path to save file(s)\0A-h help\0A\00"
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define void @print_usage() {
%1 = alloca [68 x i8]
%2 = getelementptr inbounds [68 x i8], [68 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void putout(char c, void *context) { putchar(c); }


x86 assembly (clang, -O0):
<putout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putout>:
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @putout(i8 signext %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 = call i32 @putchar(i8 signext %5)
ret void
}

LLVM IR (-O2):
define void @putout(i8 signext %0, i8* nocapture readnone %1) {
%3 = tail call i32 @putchar(i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *realloc(void *, size_t);
void *c_realloc(void *ptr, size_t size) {
  void *result = realloc(ptr, size);
  assert(result != NULL);
  return result;
}


x86 assembly (clang, -O0):
<c_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_realloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @c_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @c_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(
      stderr,
      "Usage: gpmult [-ip d/s] [-op d/s] [-silent] [-v] [-l/-h] groupname.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [69 x i8] c"Usage: gpmult [-ip d/s] [-op d/s] [-silent] [-v] [-l/-h] groupname.\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [69 x i8] c"Usage: gpmult [-ip d/s] [-op d/s] [-silent] [-v] [-l/-h] groupname.\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ adc0804initPorts();
void adc0804Begin(void) { adc0804initPorts(); }


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

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

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

LLVM IR (-O2):
define void @adc0804Begin() {
%1 = tail call i32 (...) @adc0804initPorts()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t hash_sdbm_str(const void *key) {
  const char *str = key;
  uint32_t hash = 0;
  while (*str++)
    hash = *str + (hash << 6) + (hash << 16) - hash;
  return hash;
}


x86 assembly (clang, -O0):
<hash_sdbm_str>:
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
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     1151 <hash_sdbm_str+0x51>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x14(%rbp),%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <hash_sdbm_str+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_sdbm_str>:
cmpb   $0x0,(%rdi)
je     1124 <hash_sdbm_str+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movsbl (%rdi),%ecx
imul   $0x1003f,%eax,%eax
add    %ecx,%eax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <hash_sdbm_str+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_sdbm_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = mul i32 %6, 65599
%11 = add i32 %10, %9
%12 = icmp eq i8 %8, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %14
}
int main() {
  unsigned char arg = 0xAA;
  unsigned char out = 0;
  __asm__("rolb $1, %%al;" : "=a"(out) : "a"(arg));
  return (out == 0x55);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0xaa,-0x5(%rbp)
movb   $0x0,-0x6(%rbp)
mov    -0x5(%rbp),%al
rol    %al
mov    %al,-0x6(%rbp)
movzbl -0x6(%rbp),%eax
cmp    $0x55,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xaa,%al
rol    %al
xor    %ecx,%ecx
cmp    $0x55,%al
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 -86, i8* %2
store i8 0, i8* %3
%4 = load i8, i8* %2
%5 = call i8 asm "rolb $$1, %al;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i8 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = icmp eq i32 %7, 85
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8 asm "rolb $$1, %al;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i8 -86)
%2 = icmp eq i8 %1, 85
%3 = zext i1 %2 to i32
ret i32 %3
}
int fun173() { return 173; }


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

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

LLVM IR (-O0):
define i32 @fun173() {
ret i32 173
}

LLVM IR (-O2):
define i32 @fun173() {
ret i32 173
}
/* Variables and functions */
int /*<<< orphan*/ feclearexcept(int);
void uninitvar_feclearexcept(void) {
  int i;
  (void)feclearexcept(i);
}


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

x86 assembly (clang, -O2):
<uninitvar_feclearexcept>:
jmp    1030 <feclearexcept@plt>

LLVM IR (-O0):
define void @uninitvar_feclearexcept() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @feclearexcept(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_feclearexcept() {
%1 = tail call i32 @feclearexcept(i32 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void head() {
  printf(
      "\n\n\nr4iD-ftw's Columnar Transposition Cipher Encryptor/Decryptor\n");
  printf("Copyright 2014\n");
  printf("All Rights Reserved\n");
  printf("--------------------------------------------------------------\n");
}


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

x86 assembly (clang, -O2):
<head>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf27(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"\0A\0A\0Ar4iD-ftw's Columnar Transposition Cipher Encryptor/Decryptor\0A\00"
@.str.1 = [16 x i8] c"Copyright 2014\0A\00"
@.str.2 = [21 x i8] c"All Rights Reserved\0A\00"
@.str.3 = [64 x i8] c"--------------------------------------------------------------\0A\00"
define void @head() {
%1 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [64 x i8] c"\0A\0A\0Ar4iD-ftw's Columnar Transposition Cipher Encryptor/Decryptor\00"
@str.4 = [15 x i8] c"Copyright 2014\00"
@str.5 = [20 x i8] c"All Rights Reserved\00"
@str.6 = [63 x i8] c"--------------------------------------------------------------\00"
define void @head() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.6, i64 0, i64 0))
ret void
}
int __mulsi3(int a __attribute__((unused)), int b __attribute__((unused))) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @__mulsi3(i32 %0, i32 %1) {
ret i32 0
}
void mat2_identity(float *dst) {
  dst[0] = 1;
  dst[3] = 1;
}


x86 assembly (clang, -O0):
<mat2_identity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0xedc(%rip),%xmm0
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat2_identity>:
movl   $0x3f800000,(%rdi)
movl   $0x3f800000,0xc(%rdi)
ret

LLVM IR (-O0):
define void @mat2_identity(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 1.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 3
store float 1.000000e+00, float* %6
ret void
}

LLVM IR (-O2):
define void @mat2_identity(float* nocapture writeonly %0) {
store float 1.000000e+00, float* %0
%2 = getelementptr inbounds float, float* %0, i64 3
store float 1.000000e+00, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void got_isd(char *cp, int len) { printf("ISD len=%o\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"ISD len=%o\0A\00"
define void @got_isd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"ISD len=%o\0A\00"
define void @got_isd(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}