xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *);
void __format_param(char *output, char *param) {
  char buffer[400];
  memset(buffer, '\0', 400);
  snprintf(buffer, (100 - 2), "::. Param is %50s", param);
  buffer[100 - 1] = '\0';
  sprintf(output, buffer);
}


x86 assembly (clang, -O0):
<__format_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
lea    -0x1a0(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x62,%esi
lea    0xe93(%rip),%rdx
call   1030 <snprintf@plt>
movb   $0x0,-0x13d(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x1a0(%rbp),%rsi
call   1050 <sprintf@plt>
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__format_param>:
push   %r15
push   %r14
push   %rbx
sub    $0x190,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsp,%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
lea    0xea5(%rip),%rdx
mov    %r15,%rdi
mov    $0x62,%esi
mov    %rbx,%rcx
call   1030 <snprintf@plt>
movb   $0x0,0x63(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <sprintf@plt>
add    $0x190,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"::. Param is %50s\00"
define void @__format_param(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [400 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [400 x i8], [400 x i8]* %5, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i8 signext 0, i32 400)
%8 = getelementptr inbounds [400 x i8], [400 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %4
%10 = call i32 @snprintf(i8* %8, i32 98, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [400 x i8], [400 x i8]* %5, i64 0, i64 99
store i8 0, i8* %11
%12 = load i8*, i8** %3
%13 = getelementptr inbounds [400 x i8], [400 x i8]* %5, i64 0, i64 0
%14 = call i32 @sprintf(i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"::. Param is %50s\00"
define void @__format_param(i8* nocapture writeonly %0, i8* %1) {
%3 = alloca [400 x i8]
%4 = getelementptr inbounds [400 x i8], [400 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i8 signext 0, i32 400)
%6 = call i32 @snprintf(i8* %4, i32 98, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = getelementptr inbounds [400 x i8], [400 x i8]* %3, i64 0, i64 99
store i8 0, i8* %7
%8 = call i32 @sprintf(i8* dereferenceable(1) %0, i8* %4)
ret void
}
int getvalue(int op, int operand1, int operand2) {
  switch ((char)op) {
  case '*':
    return (operand1 * operand2);
  case '/':
    return (operand1 / operand2);
  case '+':
    return (operand1 + operand2);
  case '-':
    return (operand1 - operand2);
  }
}


x86 assembly (clang, -O0):
<getvalue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movsbl -0x8(%rbp),%eax
add    $0xffffffd6,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x5,%eax
ja     116c <getvalue+0x6c>
mov    -0x18(%rbp),%rax
lea    0xed2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116c <getvalue+0x6c>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x4(%rbp)
jmp    116c <getvalue+0x6c>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116c <getvalue+0x6c>
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getvalue>:
mov    %edx,%ecx
movsbl %dil,%eax
add    $0xffffffd6,%eax
cmp    $0x5,%eax
ja     112d <getvalue+0x2d>
lea    0xeeb(%rip),%rdx
movslq (%rdx,%rax,4),%rax
add    %rdx,%rax
jmp    *%rax
imul   %esi,%ecx
mov    %ecx,%eax
ret
add    %esi,%ecx
mov    %ecx,%eax
ret
sub    %ecx,%esi
mov    %esi,%ecx
mov    %ecx,%eax
ret
mov    %esi,%eax
cltd
idiv   %ecx
ret

LLVM IR (-O0):
define i32 @getvalue(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* %5
%9 = trunc i32 %8 to i8
%10 = sext i8 %9 to i32
switch i32 %10, label %27 [
i32 42, label %11
i32 47, label %15
i32 43, label %19
i32 45, label %23
]
11: ; preds = %3
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = mul nsw i32 %12, %13
store i32 %14, i32* %4
br label %27
15: ; preds = %3
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = sdiv i32 %16, %17
store i32 %18, i32* %4
br label %27
19: ; preds = %3
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = add nsw i32 %20, %21
store i32 %22, i32* %4
br label %27
23: ; preds = %3
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = sub nsw i32 %24, %25
store i32 %26, i32* %4
br label %27
27: ; preds = %11, %15, %19, %23, %3
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @getvalue(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 24
%5 = ashr exact i32 %4, 24
switch i32 %5, label %14 [
i32 42, label %6
i32 47, label %8
i32 43, label %10
i32 45, label %12
]
6: ; preds = %3
%7 = mul nsw i32 %2, %1
br label %14
8: ; preds = %3
%9 = sdiv i32 %1, %2
br label %14
10: ; preds = %3
%11 = add nsw i32 %2, %1
br label %14
12: ; preds = %3
%13 = sub nsw i32 %1, %2
br label %14
14: ; preds = %6, %8, %10, %12, %3
%15 = phi i32 [ undef, %3 ], [ %13, %12 ], [ %11, %10 ], [ %9, %8 ], [ %7, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reverse(char *);
void main() {
  reverse("12345");
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <reverse@plt>
lea    0xecf(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <reverse@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <putchar@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
define void @main() {
%1 = tail call i32 @reverse(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
char *malloc(size_t);
scalar_t__ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *str_dup(const char *str) {
  size_t len = strlen(str) + 1;
  char *s = malloc(len);
  if (s == NULL)
    return NULL;
  return (char *)memcpy(s, str, len);
}


x86 assembly (clang, -O0):
<str_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1173 <str_dup+0x43>
movq   $0x0,-0x8(%rbp)
jmp    1188 <str_dup+0x58>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_dup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115f <str_dup+0x2f>
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
jmp    1161 <str_dup+0x31>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @str_dup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %15
14: ; preds = %1
store i8* null, i8** %2
br label %21
15: ; preds = %1
%16 = load i8*, i8** %5
%17 = load i8*, i8** %3
%18 = load i64, i64* %4
%19 = call i64 @memcpy(i8* %16, i8* %17, i64 %18)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %2
br label %21
21: ; preds = %15, %14
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define i8* @str_dup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = tail call i64 @memcpy(i8* %5, i8* %0, i64 %4)
%9 = inttoptr i64 %8 to i8*
br label %10
10: ; preds = %1, %7
%11 = phi i8* [ %9, %7 ], [ null, %1 ]
ret i8* %11
}
int main() { int x = 4; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char *hash_plugin_detailed(void) {
  return ("sha512unix - SHA512(Unix) plugin\n"
          "------------------------\n"
          "Use this module to crack shadow passwords\n"
          "Input should be in form: \'user:hash\' or just \'hash\'. shadow "
          "files are acceptable\n"
          "Known software that uses this password hashing method:\n"
          "All linux distributions, most Unix-like operating systems\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [340 x i8] c"sha512unix - SHA512(Unix) plugin\0A------------------------\0AUse this module to crack shadow passwords\0AInput should be in form: 'user:hash' or just 'hash'. shadow files are acceptable\0AKnown software that uses this password hashing method:\0AAll linux distributions, most Unix-like operating systems\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([340 x i8], [340 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [340 x i8] c"sha512unix - SHA512(Unix) plugin\0A------------------------\0AUse this module to crack shadow passwords\0AInput should be in form: 'user:hash' or just 'hash'. shadow files are acceptable\0AKnown software that uses this password hashing method:\0AAll linux distributions, most Unix-like operating systems\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([340 x i8], [340 x i8]* @.str, i64 0, i64 0)
}
void RTRandAdvS32(void) {}


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

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

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

LLVM IR (-O2):
define void @RTRandAdvS32() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ login_error(char *);
int /*<<< orphan*/ *strstr(char *, char *);
int cookie_check(char *cookie, char *str) {
  if (strstr(cookie, str) == NULL) {
    login_error("login.htm");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cookie_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    115f <cookie_check+0x3f>
lea    0xeb2(%rip),%rdi
call   1030 <login_error@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <cookie_check+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cookie_check>:
push   %rax
call   1040 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1132 <cookie_check+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1030 <login_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"login.htm\00"
define i32 @cookie_check(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @login_error(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %8
}
int StartsWith(const char *s, const char *prefix) {
  while (*prefix) {
    if (*s++ != *prefix++) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<StartsWith>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <StartsWith+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1151 <StartsWith+0x51>
movl   $0x0,-0x4(%rbp)
jmp    115d <StartsWith+0x5d>
jmp    110c <StartsWith+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StartsWith>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
test   %cl,%cl
je     1127 <StartsWith+0x27>
lea    0x1(%rax),%rdx
cmp    %cl,(%rdi,%rax,1)
mov    %rdx,%rax
je     1110 <StartsWith+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

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


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

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

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

LLVM IR (-O2):
define void @con_start() {
ret void
}
/* Variables and functions */
int AF_INET;
int /*<<< orphan*/ EAFNOSUPPORT;
int /*<<< orphan*/ errno;
int inet_aton(char const *, void *);
int inet_pton(int af, const char *src, void *dst) {
  if (af != AF_INET) {
    errno = EAFNOSUPPORT;
    return -1;
  }
  return inet_aton(src, dst);
}


x86 assembly (clang, -O0):
<inet_pton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
je     1153 <inet_pton+0x43>
mov    0x2e94(%rip),%rax
mov    (%rax),%ecx
mov    0x2e93(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <inet_pton+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <inet_aton@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_pton>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1126 <inet_pton+0x16>
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <inet_aton@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
mov    0x2ea2(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@EAFNOSUPPORT = global i32 0
@errno = global i32 0
define i32 @inet_pton(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
%9 = load i32, i32* @AF_INET
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load i32, i32* @EAFNOSUPPORT
store i32 %12, i32* @errno
store i32 -1, i32* %4
br label %17
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = call i32 @inet_aton(i8* %14, i8* %15)
store i32 %16, i32* %4
br label %17
17: ; preds = %13, %11
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@AF_INET = global i32 0
@EAFNOSUPPORT = global i32 0
@errno = global i32 0
define i32 @inet_pton(i32 %0, i8* %1, i8* %2) {
%4 = load i32, i32* @AF_INET
%5 = icmp eq i32 %4, %0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = load i32, i32* @EAFNOSUPPORT
store i32 %7, i32* @errno
br label %10
8: ; preds = %3
%9 = tail call i32 @inet_aton(i8* %1, i8* %2)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ -1, %6 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
char *android_profile_bufprint_file_path(char *, char *, char const *,
                                         int /*<<< orphan*/ *);
char *android_profile_bufprint_path(char *p, char *end,
                                    const char *profile_name) {
  return android_profile_bufprint_file_path(p, end, profile_name, NULL);
}


x86 assembly (clang, -O0):
<android_profile_bufprint_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <android_profile_bufprint_file_path@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_profile_bufprint_path>:
xor    %ecx,%ecx
jmp    1030 <android_profile_bufprint_file_path@plt>

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

LLVM IR (-O2):
define i8* @android_profile_bufprint_path(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @android_profile_bufprint_file_path(i8* %0, i8* %1, i8* %2, i32* null)
ret i8* %4
}
void glGetIntegerv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetIntegerv() {
ret void
}
int test_imm_E1uint16_reg(unsigned short val) {
  return ((val) & (0xE1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E1uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xe1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E1uint16_reg>:
test   $0xe1,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E1uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 225
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_E1uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 225
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct lwan_key_value_array {
  int dummy;
};
struct coro {
  int dummy;
};

/* Variables and functions */
scalar_t__ coro_lwan_array_new(struct coro *, int);
__attribute__((unused)) struct lwan_key_value_array *
coro_lwan_key_value_array_new(struct coro *coro) {
  return (struct lwan_key_value_array *)coro_lwan_array_new(coro, false);
}


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

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

LLVM IR (-O0):
%struct.lwan_key_value_array = type { i32 }
%struct.coro = type { i32 }
define %struct.lwan_key_value_array* @coro_lwan_key_value_array_new(%struct.coro* %0) {
%2 = alloca %struct.coro*
store %struct.coro* %0, %struct.coro** %2
%3 = load %struct.coro*, %struct.coro** %2
%4 = call i64 @coro_lwan_array_new(%struct.coro* %3, i32 0)
%5 = inttoptr i64 %4 to %struct.lwan_key_value_array*
ret %struct.lwan_key_value_array* %5
}

LLVM IR (-O2):
%struct.lwan_key_value_array = type { i32 }
%struct.coro = type { i32 }
define %struct.lwan_key_value_array* @coro_lwan_key_value_array_new(%struct.coro* %0) {
%2 = tail call i64 @coro_lwan_array_new(%struct.coro* %0, i32 0)
%3 = inttoptr i64 %2 to %struct.lwan_key_value_array*
ret %struct.lwan_key_value_array* %3
}
int wpas_wps_reenable_networks_pending(struct wpa_supplicant *wpa_s) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define i32 @wpas_wps_reenable_networks_pending(%struct.wpa_supplicant* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ parse_file(int /*<<< orphan*/ *, char const *);
int process_file(FILE *f, const char *filename) {
  if (parse_file(f, filename)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<process_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <parse_file@plt>
cmp    $0x0,%rax
je     1143 <process_file+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <process_file+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_file>:
push   %rax
call   1030 <parse_file@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @process_file(i32* %0, i8* %1) {
%3 = tail call i64 @parse_file(i32* %0, i8* %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct in_addr {
  int /*<<< orphan*/ s_addr;
};

/* Variables and functions */
int /*<<< orphan*/ inet_aton(char *, struct in_addr *);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
uint32_t str_to_bin_addr(char *str) {
  struct in_addr inp;
  inet_aton(str, &inp);
  return ntohl(inp.s_addr);
}


x86 assembly (clang, -O0):
<str_to_bin_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <inet_aton@plt>
mov    -0x10(%rbp),%edi
call   1040 <ntohl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_to_bin_addr>:
push   %rax
mov    %rsp,%rsi
call   1030 <inet_aton@plt>
mov    (%rsp),%edi
call   1040 <ntohl@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i32 @str_to_bin_addr(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.in_addr
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @inet_aton(i8* %4, %struct.in_addr* %3)
%6 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @ntohl(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i32 @str_to_bin_addr(i8* %0) {
%2 = alloca %struct.in_addr
%3 = bitcast %struct.in_addr* %2 to i8*
%4 = call i32 @inet_aton(i8* %0, %struct.in_addr* %2)
%5 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @ntohl(i32 %6)
ret i32 %7
}
int is_delim(int ch) { return ((ch == ':') || (ch == '.') || (ch == ',')); }


x86 assembly (clang, -O0):
<is_delim>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x3a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <is_delim+0x2f>
mov    $0x1,%al
cmpl   $0x2e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <is_delim+0x2f>
cmpl   $0x2c,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_delim>:
mov    $0x1,%eax
cmp    $0x2e,%edi
je     110f <is_delim+0xf>
cmp    $0x3a,%edi
jne    1110 <is_delim+0x10>
ret
xor    %eax,%eax
cmp    $0x2c,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_delim(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 58
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 46
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 44
br label %11
11: ; preds = %8, %5, %1
%12 = phi i1 [ true, %5 ], [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_delim(i32 %0) {
switch i32 %0, label %2 [
i32 58, label %5
i32 46, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 44
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
void *malloc(int const);
int /*<<< orphan*/ memerror();
void *mymalloc(const int number, const int size) {
  void *mem;
  if ((mem = malloc(number * size)) == NULL)
    memerror();
  return mem;
}


x86 assembly (clang, -O0):
<mymalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
imul   -0x8(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114f <mymalloc+0x2f>
mov    $0x0,%al
call   1030 <memerror@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymalloc>:
push   %rbx
imul   %esi,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1138 <mymalloc+0x18>
xor    %eax,%eax
call   1030 <memerror@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mymalloc(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 = mul nsw i32 %6, %7
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @memerror()
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @mymalloc(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @memerror()
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ acc_device_t;

/* Variables and functions */
int /*<<< orphan*/ acc_device_host;
int /*<<< orphan*/ acc_init(int /*<<< orphan*/);
int /*<<< orphan*/ acc_shutdown(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  acc_device_t devtype = acc_device_host;
  acc_init(devtype);
  acc_shutdown(devtype);
  fprintf(stderr, "CheCKpOInT\n");
  acc_shutdown(devtype);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <acc_init@plt>
mov    -0x14(%rbp),%edi
call   1030 <acc_shutdown@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
lea    0xe8e(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1050 <acc_init@plt>
mov    %ebx,%edi
call   1030 <acc_shutdown@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    %ebx,%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@acc_device_host = global i32 0
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\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
%7 = load i32, i32* @acc_device_host
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @acc_init(i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @acc_shutdown(i32 %10)
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* %6
%15 = call i32 @acc_shutdown(i32 %14)
ret i32 0
}

LLVM IR (-O2):
@acc_device_host = global i32 0
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @acc_device_host
%4 = tail call i32 @acc_init(i32 %3)
%5 = tail call i32 @acc_shutdown(i32 %3)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @acc_shutdown(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_something_during_suite_setup() {
  printf("I was called during suite setup\n");
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"I was called during suite setup\0A\00"
define void @print_something_during_suite_setup() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"I was called during suite setup\00"
define void @print_something_during_suite_setup() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kvm_hypercall(int /*<<< orphan*/, unsigned long);
void virtio_notify(unsigned long vq_addr) { kvm_hypercall(0, vq_addr); }


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

x86 assembly (clang, -O2):
<virtio_notify>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <kvm_hypercall@plt>

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

LLVM IR (-O2):
define void @virtio_notify(i64 %0) {
%2 = tail call i32 @kvm_hypercall(i32 0, i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OLED_Backlight_Brightness(unsigned int);
void _oled_backlight_brightness(unsigned brightness) {
  OLED_Backlight_Brightness(brightness);
}


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

x86 assembly (clang, -O2):
<_oled_backlight_brightness>:
jmp    1030 <OLED_Backlight_Brightness@plt>

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

LLVM IR (-O2):
define void @_oled_backlight_brightness(i32 %0) {
%2 = tail call i32 @OLED_Backlight_Brightness(i32 %0)
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int nanosleep(struct timespec const *, struct timespec *);
int octave_nanosleep_wrapper(const struct timespec *requested,
                             struct timespec *remaining) {
  return nanosleep(requested, remaining);
}


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

x86 assembly (clang, -O2):
<octave_nanosleep_wrapper>:
jmp    1030 <nanosleep@plt>

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

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @octave_nanosleep_wrapper(%struct.timespec* %0, %struct.timespec* %1) {
%3 = tail call i32 @nanosleep(%struct.timespec* %0, %struct.timespec* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *argv0) {
  printf("Usage: %s ... <path>\n\n"
         "Options:\n"
         "  -threads [num]\n",
         argv0);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"Usage: %s ... <path>\0A\0AOptions:\0A -threads [num]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"Usage: %s ... <path>\0A\0AOptions:\0A -threads [num]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fftw_ifree(void *);
void fftw_ifree0(void *p) {
  if (p)
    fftw_ifree(p);
}


x86 assembly (clang, -O0):
<fftw_ifree0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <fftw_ifree0+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <fftw_ifree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftw_ifree0>:
test   %rdi,%rdi
je     111a <fftw_ifree0+0xa>
jmp    1030 <fftw_ifree@plt>
ret

LLVM IR (-O0):
define void @fftw_ifree0(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 %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @fftw_ifree(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @fftw_ifree0(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fftw_ifree(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ is_perfect(size_t);
int /*<<< orphan*/ printf(char *, size_t);
int main() {
  size_t max = 1000000000;
  for (size_t i = 0; i < max; i++) {
    if (is_perfect(i)) {
      printf("Liczba %ld jest doskonala\n", i);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x3b9aca00,-0x10(%rbp)
3b
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1186 <main+0x66>
mov    -0x18(%rbp),%rdi
call   1030 <is_perfect@plt>
cmp    $0x0,%rax
je     1170 <main+0x50>
mov    -0x18(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
jmp    1175 <main+0x55>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113f <main+0x1f>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
jmp    113d <main+0x1d>
nop
add    $0x1,%rbx
cmp    $0x3b9aca00,%rbx
je     1157 <main+0x37>
mov    %rbx,%rdi
call   1030 <is_perfect@plt>
test   %rax,%rax
je     1130 <main+0x10>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Liczba %ld jest doskonala\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 1000000000, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %16, %0
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %19
8: ; preds = %4
%9 = load i64, i64* %3
%10 = call i64 @is_perfect(i64 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i64, i64* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %13)
br label %15
15: ; preds = %12, %8
br label %16
16: ; preds = %15
%17 = load i64, i64* %3
%18 = add i64 %17, 1
store i64 %18, i64* %3
br label %4
19: ; preds = %4
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
@.str = [27 x i8] c"Liczba %ld jest doskonala\0A\00"
define i32 @main() {
br label %2
1: ; preds = %8
ret i32 0
2: ; preds = %0, %8
%3 = phi i64 [ 0, %0 ], [ %9, %8 ]
%4 = tail call i64 @is_perfect(i64 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %3)
br label %8
8: ; preds = %2, %6
%9 = add nuw nsw i64 %3, 1
%10 = icmp eq i64 %9, 1000000000
br i1 %10, label %1, label %2
}
void security_sb_free(struct super_block *sb) {}


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

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

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

LLVM IR (-O2):
%struct.super_block = type opaque
define void @security_sb_free(%struct.super_block* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t cpu_to_be32(uint32_t native) { return native; }


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

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

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

LLVM IR (-O2):
define i32 @cpu_to_be32(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
scalar_t__ calloc(int, int);
char **alloc_array(int columns) {
  char **a = (char **)calloc(columns, sizeof(char *));
  int i;
  for (i = 0; i < columns; i++) {
    a[i] = (char *)calloc(1, sizeof(char));
  }
  return a;
}


x86 assembly (clang, -O0):
<alloc_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1168 <alloc_array+0x58>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <calloc@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <alloc_array+0x23>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_array>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,%r14
test   %ebp,%ebp
jle    114c <alloc_array+0x3c>
mov    %ebp,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <alloc_array+0x20>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8** @alloc_array(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 8)
%3 = inttoptr i64 %2 to i8**
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = tail call i64 @calloc(i32 1, i32 1)
%10 = inttoptr i64 %9 to i8*
%11 = getelementptr inbounds i8*, i8** %3, i64 %8
store i8* %10, i8** %11
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %1
ret i8** %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x25() {
  Assert_real((iscntrl(37) == 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",
              190, ("iscntrl should be 0 for %"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x25>:
push   %rax
mov    $0x25,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xbe,%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 = [26 x i8] c"iscntrl should be 0 for %\00"
define void @t_iscntrl_0x25() {
%1 = call i64 @iscntrl(i32 37)
%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 190, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"iscntrl should be 0 for %\00"
define void @t_iscntrl_0x25() {
%1 = tail call i64 @iscntrl(i32 37)
%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 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main(int argc) { return argc; }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
double getsum_double(int, double *);
double getsum(int n, double *data) { return getsum_double(n, data); }


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

x86 assembly (clang, -O2):
<getsum>:
jmp    1030 <getsum_double@plt>

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

LLVM IR (-O2):
define double @getsum(i32 %0, double* %1) {
%3 = tail call double @getsum_double(i32 %0, double* %1)
ret double %3
}
void foo58() {}


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

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

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

LLVM IR (-O2):
define void @foo58() {
ret void
}
int intdata() {
  static int x;
  x += 1;
  return x;
}


x86 assembly (clang, -O0):
<intdata>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f11(%rip)
mov    0x2f0b(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intdata>:
mov    0x2f1e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f15(%rip)
ret

LLVM IR (-O0):
@intdata.x = internal global i32 0
define i32 @intdata() {
%1 = load i32, i32* @intdata.x
%2 = add nsw i32 %1, 1
store i32 %2, i32* @intdata.x
%3 = load i32, i32* @intdata.x
ret i32 %3
}

LLVM IR (-O2):
@intdata.x = internal unnamed_addr global i32 0
define i32 @intdata() {
%1 = load i32, i32* @intdata.x
%2 = add nsw i32 %1, 1
store i32 %2, i32* @intdata.x
ret i32 %2
}