xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ MaxHeapify(int *, int, int);
int Root(int);
int MaxBuildHeap(int *Arr, int Size) {
  int i = Root(Size);
  while (i >= 0) {
    MaxHeapify(Arr, i, Size);
    i--;
  }
}


x86 assembly (clang, -O0):
<MaxBuildHeap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <Root@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1161 <MaxBuildHeap+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <MaxHeapify@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <MaxBuildHeap+0x1a>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MaxBuildHeap>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <Root@plt>
test   %eax,%eax
js     1151 <MaxBuildHeap+0x31>
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1040 <MaxHeapify@plt>
add    $0xffffffff,%ebp
jb     1140 <MaxBuildHeap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @MaxBuildHeap(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = call i32 @Root(i32 %7)
store i32 %8, i32* %6
br label %9
9: ; preds = %12, %2
%10 = load i32, i32* %6
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = call i32 @MaxHeapify(i32* %13, i32 %14, i32 %15)
%17 = load i32, i32* %6
%18 = add nsw i32 %17, -1
store i32 %18, i32* %6
br label %9
19: ; preds = %9
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @MaxBuildHeap(i32* %0, i32 %1) {
%3 = tail call i32 @Root(i32 %1)
%4 = icmp sgt i32 %3, -1
br i1 %4, label %5, label %10
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ %3, %2 ]
%7 = tail call i32 @MaxHeapify(i32* %0, i32 %6, i32 %1)
%8 = add nsw i32 %6, -1
%9 = icmp eq i32 %6, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret i32 undef
}
/* Variables and functions */
int aaip_set_acl_text(char *, char *, int);
int iso_local_set_acl_text(char *disk_path, char *text, int flag) {
  int ret;
  ret = aaip_set_acl_text(disk_path, text, flag & (1 | 32));
  if (ret < 0)
    return 0xE830FEAA;
  return ret;
}


x86 assembly (clang, -O0):
<iso_local_set_acl_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
and    $0x21,%edx
call   1030 <aaip_set_acl_text@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    114f <iso_local_set_acl_text+0x3f>
movl   $0xe830feaa,-0x4(%rbp)
jmp    1155 <iso_local_set_acl_text+0x45>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iso_local_set_acl_text>:
push   %rax
and    $0x21,%edx
call   1030 <aaip_set_acl_text@plt>
test   %eax,%eax
mov    $0xe830feaa,%ecx
cmovs  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @iso_local_set_acl_text(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = and i32 %11, 33
%13 = call i32 @aaip_set_acl_text(i8* %9, i8* %10, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %3
store i32 -399442262, i32* %4
br label %19
17: ; preds = %3
%18 = load i32, i32* %8
store i32 %18, i32* %4
br label %19
19: ; preds = %17, %16
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @iso_local_set_acl_text(i8* %0, i8* %1, i32 %2) {
%4 = and i32 %2, 33
%5 = tail call i32 @aaip_set_acl_text(i8* %0, i8* %1, i32 %4)
%6 = icmp slt i32 %5, 0
%7 = select i1 %6, i32 -399442262, i32 %5
ret i32 %7
}
char *jedico(n) {
  if (n < 100000) {
    return ("Padawan");
  } else if (n >= 100000 && n < 1000000) {
    return ("Cavaleiro Jedi");
  } else {
    return ("Mestre Jedi");
  }
}


x86 assembly (clang, -O0):
<jedico>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x186a0,-0xc(%rbp)
jge    1124 <jedico+0x24>
lea    0xee5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <jedico+0x59>
cmpl   $0x186a0,-0xc(%rbp)
jl     114e <jedico+0x4e>
cmpl   $0xf4240,-0xc(%rbp)
jge    114e <jedico+0x4e>
lea    0xec3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <jedico+0x59>
lea    0xec2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jedico>:
cmp    $0xf4240,%edi
lea    0xefb(%rip),%rax
lea    0xf03(%rip),%rcx
cmovl  %rax,%rcx
cmp    $0x186a0,%edi
lea    0xedb(%rip),%rax
cmovge %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Padawan\00"
@.str.1 = [15 x i8] c"Cavaleiro Jedi\00"
@.str.2 = [12 x i8] c"Mestre Jedi\00"
define i8* @jedico(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 100000
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 100000
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 1000000
br i1 %12, label %13, label %14
13: ; preds = %10
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %15
14: ; preds = %10, %7
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %15
15: ; preds = %14, %13, %6
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"Padawan\00"
@.str.1 = [15 x i8] c"Cavaleiro Jedi\00"
@.str.2 = [12 x i8] c"Mestre Jedi\00"
define i8* @jedico(i32 %0) {
%2 = icmp slt i32 %0, 100000
%3 = icmp slt i32 %0, 1000000
%4 = select i1 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0)
%5 = select i1 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4
ret i8* %5
}
char *test2(int cf) { return cf ? 0 : "abc"; }


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xeef(%rip),%rax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
xor    %eax,%eax
test   %edi,%edi
lea    0xef5(%rip),%rcx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
define i8* @test2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
define i8* @test2(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* null
ret i8* %3
}
int return_chars_until_chr_cd(const unsigned char *src,
                              const unsigned char breakpoint) {
  const unsigned char *rpos = src;
  int charslen = 0;
  while (*rpos != '\0') {
    charslen++;
    if (*(rpos++) == breakpoint)
      return (charslen);
  }
  return (charslen);
}


x86 assembly (clang, -O0):
<return_chars_until_chr_cd>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     1164 <return_chars_until_chr_cd+0x64>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movzbl (%rax),%eax
movzbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    115f <return_chars_until_chr_cd+0x5f>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116a <return_chars_until_chr_cd+0x6a>
jmp    111d <return_chars_until_chr_cd+0x1d>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_chars_until_chr_cd>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1121 <return_chars_until_chr_cd+0x21>
add    $0x1,%rax
cmp    %sil,%cl
jne    1110 <return_chars_until_chr_cd+0x10>
ret

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

LLVM IR (-O2):
define i32 @return_chars_until_chr_cd(i8* nocapture %0, i8 zeroext %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %10, %8 ]
%5 = phi i32 [ 0, %2 ], [ %9, %8 ]
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %3
%9 = add nuw nsw i32 %5, 1
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = icmp eq i8 %6, %1
br i1 %11, label %12, label %3
12: ; preds = %3, %8
%13 = phi i32 [ %9, %8 ], [ %5, %3 ]
ret i32 %13
}
int my_fabs(int n) {
  int f;
  if (n >= 0)
    f = n;
  else
    f = -n;
  return f;
}


x86 assembly (clang, -O0):
<my_fabs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111c <my_fabs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <my_fabs+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @my_fabs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 0; i < 5; i++) {
    if (i == 3)
      break;
    printf("%d ", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    115c <main+0x4c>
cmpl   $0x3,-0x8(%rbp)
jne    113f <main+0x2f>
jmp    115c <main+0x4c>
mov    -0x8(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __attribute__((no, noclone)) baz(int f, int j) {
  if (f != 4 || j != 2)
    abort();
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x4,-0x4(%rbp)
jne    1132 <baz+0x22>
cmpl   $0x2,-0x8(%rbp)
je     1139 <baz+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
cmp    $0x4,%edi
jne    111b <baz+0xb>
cmp    $0x2,%esi
jne    111b <baz+0xb>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @baz(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 4
%4 = icmp ne i32 %1, 2
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret void
}
void faultISR(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<faultISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <faultISR+0x9>
jmp    1109 <faultISR+0x9>

x86 assembly (clang, -O2):
<faultISR>:
jmp    1100 <faultISR>

LLVM IR (-O0):
define void @faultISR() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @faultISR() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ ESPIPE;
int /*<<< orphan*/ errno;
off_t _lseek(int fd, off_t offset, int whence) {
  (void)fd;
  (void)offset;
  (void)whence;
  errno = ESPIPE;
  return ((off_t)-1);
}


x86 assembly (clang, -O0):
<_lseek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ed4(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebb(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_lseek>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load i32, i32* @ESPIPE
store i32 %10, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ESPIPE
store i32 %4, i32* @errno
ret i32 -1
}
int tsk_obj_cmp(const void *obj1, const void *obj2) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tsk_obj_cmp(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *mem = strdup(s);
  if (mem == NULL) {
    perror("strdup");
    exit(1);
  }
  return mem;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <xstrdup+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <xstrdup+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"strdup\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
int main(int argc, char **argv, char **env) {}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
ret i32 0
}
int main(void) {
  func_haha();
  printf("%s\n", __func__);
  printf("%s\n", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/ZhangIIIr/one/refs/heads/"
                 "master/Practice/CLanguage/print_func_name.c");
  printf("%d\n", 16);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <func_haha@plt>
lea    0xec3(%rip),%rdi
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeae(%rip),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf41(%rip),%rdi
mov    $0x10,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <func_haha@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4d(%rip),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [159 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ZhangIIIr/one/refs/heads/master/Practice/CLanguage/print_func_name.c\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func_haha()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 16)
ret i32 0
}

LLVM IR (-O2):
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [159 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ZhangIIIr/one/refs/heads/master/Practice/CLanguage/print_func_name.c\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @func_haha()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([159 x i8], [159 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 16)
ret i32 0
}
/* Type definitions */
typedef size_t int_least32_t;

/* Variables and functions */
long labs(long);
int main() {
  long *a = (long *)"empty";
  int_least32_t i = 1441516387;
  a[i] = labs(a[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
movq   $0x55ebcb63,-0x18(%rbp)
55
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <labs@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"empty\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64*
%3 = alloca i64
store i32 0, i32* %1
store i64* bitcast ([6 x i8]* @.str to i64*), i64** %2
store i64 1441516387, i64* %3
%4 = load i64*, i64** %2
%5 = load i64, i64* %3
%6 = getelementptr inbounds i64, i64* %4, i64 %5
%7 = load i64, i64* %6
%8 = call i64 @labs(i64 %7)
%9 = load i64*, i64** %2
%10 = load i64, i64* %3
%11 = getelementptr inbounds i64, i64* %9, i64 %10
store i64 %8, i64* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int apply_sign64(const int v, const int64_t s) { return s < 0 ? -v : v; }


x86 assembly (clang, -O0):
<apply_sign64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1123 <apply_sign64+0x23>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <apply_sign64+0x29>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply_sign64>:
mov    %edi,%eax
neg    %eax
test   %rsi,%rsi
cmovns %edi,%eax
ret

LLVM IR (-O0):
define i32 @apply_sign64(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = sub nsw i32 0, %8
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %7
%13 = phi i32 [ %9, %7 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @apply_sign64(i32 %0, i64 %1) {
%3 = icmp slt i64 %1, 0
%4 = sub nsw i32 0, %0
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pv_term(int /*<<< orphan*/);
void pv_clear(void) { pv_term(0); }


x86 assembly (clang, -O0):
<pv_clear>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <pv_term@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pv_clear>:
xor    %edi,%edi
jmp    1030 <pv_term@plt>

LLVM IR (-O0):
define void @pv_clear() {
%1 = call i32 @pv_term(i32 0)
ret void
}

LLVM IR (-O2):
define void @pv_clear() {
%1 = tail call i32 @pv_term(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fscanf(int /*<<< orphan*/ *, char *, unsigned int *, unsigned int *);
void ReadPort(FILE *fp, unsigned int *Pt) {
  int ret;
  ret = fscanf(fp, "%d : %d", &Pt[0], &Pt[1]);
  if (ret != 2)
    return;
}


x86 assembly (clang, -O0):
<ReadPort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
add    $0x4,%rcx
lea    0xec9(%rip),%rsi
call   1030 <fscanf@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
je     114e <ReadPort+0x3e>
jmp    114e <ReadPort+0x3e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadPort>:
mov    %rsi,%rdx
lea    0x4(%rsi),%rcx
lea    0xee2(%rip),%rsi
jmp    1030 <fscanf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d : %d\00"
define void @ReadPort(i32* nocapture %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 1
%4 = tail call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main(void) {
  test(5);
  test(2);
  test(0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <test@plt>
mov    $0x2,%edi
call   1030 <test@plt>
xor    %edi,%edi
call   1030 <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 @test(i32 5)
%3 = call i32 @test(i32 2)
%4 = call i32 @test(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 5)
%2 = tail call i32 @test(i32 2)
%3 = tail call i32 @test(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ send_http_error(int, char *, char const *);
void send_400_bad_request(int clientsock, const char *msg) {
  send_http_error(clientsock, "400 Bad Request", msg);
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"400 Bad Request\00"
define void @send_400_bad_request(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @send_http_error(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"400 Bad Request\00"
define void @send_400_bad_request(i32 %0, i8* %1) {
%3 = tail call i32 @send_http_error(i32 %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int exp(double);
double sigmoid(double num) { return 1.0 / (1 + exp(-num)); }


x86 assembly (clang, -O0):
<sigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xeb3(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoid>:
push   %rax
xorps  0xee8(%rip),%xmm0
call   1030 <exp@plt>
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xee4(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sigmoid(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call i32 @exp(double %4)
%6 = add nsw i32 1, %5
%7 = sitofp i32 %6 to double
%8 = fdiv double 1.000000e+00, %7
ret double %8
}

LLVM IR (-O2):
define double @sigmoid(double %0) {
%2 = fneg double %0
%3 = tail call i32 @exp(double %2)
%4 = add nsw i32 %3, 1
%5 = sitofp i32 %4 to double
%6 = fdiv double 1.000000e+00, %5
ret double %6
}
/* Variables and functions */
int f(int);
main() {
  int added = 5;
  added = f(2);
  return added;
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%edi
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2)
ret i32 %1
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_read_next_witness_point(int k, int n, int *m, double *sol) {
  int fail, a[2];
  a[0] = k;
  a[1] = n;
  fail = _ada_use_c2phc(145, a, m, sol);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_read_next_witness_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x91,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_read_next_witness_point>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x91,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @solcon_read_next_witness_point(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = call i32 @_ada_use_c2phc(i32 145, i32* %7, i32* %2, double* %3)
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by_ptr_mm(int /*<<< orphan*/);
void and_by_ptr_mm(uint32_t x) {
  by_ptr_mm(x);
  and();
}


x86 assembly (clang, -O0):
<and_by_ptr_mm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <by_ptr_mm@plt>
mov    $0x0,%al
call   1030 <and@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @and_by_ptr_mm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by_ptr_mm(i32 %3)
%5 = call i32 (...) @and()
ret void
}

LLVM IR (-O2):
define void @and_by_ptr_mm(i32 %0) {
%2 = tail call i32 @by_ptr_mm(i32 %0)
%3 = tail call i32 (...) @and()
ret void
}
/* Variables and functions */
char const *cache_lookup_icon(char const *, int);
const char *_xdg_mime_cache_get_icon(const char *mime) {
  return cache_lookup_icon(mime, 32);
}


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

x86 assembly (clang, -O2):
<_xdg_mime_cache_get_icon>:
mov    $0x20,%esi
jmp    1030 <cache_lookup_icon@plt>

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

LLVM IR (-O2):
define i8* @_xdg_mime_cache_get_icon(i8* %0) {
%2 = tail call i8* @cache_lookup_icon(i8* %0, i32 32)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
unsigned int __VERIFIER_nondet_uint();
int main(void) {
  unsigned int x = __VERIFIER_nondet_uint();
  unsigned int y = x + 1;
  while (x < 1024) {
    x++;
    y++;
  }
  __VERIFIER_assert(x == y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x400,-0x8(%rbp)
jae    1166 <main+0x46>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1142 <main+0x22>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_uint()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = add i32 %5, 1
store i32 %6, i32* %3
br label %7
7: ; preds = %10, %0
%8 = load i32, i32* %2
%9 = icmp ult i32 %8, 1024
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add i32 %11, 1
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = add i32 %13, 1
store i32 %14, i32* %3
br label %7
15: ; preds = %7
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = icmp eq i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @__VERIFIER_assert(i32 %19)
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_uint()
%2 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
void gdk_window_hide() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_hide() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ mced_debug(int, char *);
int /*<<< orphan*/ signals_handled();
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/ *);
void lock_rules(void) {
  mced_debug(4, "DBG: blocking signals for rule lock\n");
  sigprocmask(SIG_BLOCK, signals_handled(), NULL);
}


x86 assembly (clang, -O0):
<lock_rules>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
lea    0xebc(%rip),%rsi
call   1050 <mced_debug@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <signals_handled@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_rules>:
push   %rbx
lea    0xec8(%rip),%rsi
mov    $0x4,%edi
call   1050 <mced_debug@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <signals_handled@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
pop    %rbx
jmp    1030 <sigprocmask@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"DBG: blocking signals for rule lock\0A\00"
@SIG_BLOCK = global i32 0
define void @lock_rules() {
%1 = call i32 @mced_debug(i32 4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @SIG_BLOCK
%3 = call i32 (...) @signals_handled()
%4 = call i32 @sigprocmask(i32 %2, i32 %3, i32* null)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"DBG: blocking signals for rule lock\0A\00"
@SIG_BLOCK = global i32 0
define void @lock_rules() {
%1 = tail call i32 @mced_debug(i32 4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @SIG_BLOCK
%3 = tail call i32 (...) @signals_handled()
%4 = tail call i32 @sigprocmask(i32 %2, i32 %3, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ qsort(void *, unsigned int, unsigned int,
                         int (*)(void const *, void const *));
void my_qsort(void *base, unsigned nel, unsigned width,
              int (*compar)(void const *, void const *)) {
  qsort(base, nel, width, compar);
}


x86 assembly (clang, -O0):
<my_qsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <qsort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_qsort>:
jmp    1030 <qsort@plt>

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

LLVM IR (-O2):
define void @my_qsort(i8* %0, i32 %1, i32 %2, i32 (i8*, i8*)* nocapture %3) {
%5 = tail call i32 @qsort(i8* %0, i32 %1, i32 %2, i32 (i8*, i8*)* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("USAGE:\nledtest [OPTIONS]\n");
  printf("OPTIONS:\n");
  printf("-h\tShow this help and exit\n");
  printf("-r\tRemove log file and exit\n");
  printf("-s\tSilent mode (e.g. if running as daemon, logging to file)\n");
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xf11(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"USAGE:\0Aledtest [OPTIONS]\0A\00"
@.str.1 = [10 x i8] c"OPTIONS:\0A\00"
@.str.2 = [28 x i8] c"-h\09Show this help and exit\0A\00"
@.str.3 = [29 x i8] c"-r\09Remove log file and exit\0A\00"
@.str.4 = [61 x i8] c"-s\09Silent mode (e.g. if running as daemon, logging to file)\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"USAGE:\0Aledtest [OPTIONS]\00"
@str.5 = [9 x i8] c"OPTIONS:\00"
@str.6 = [27 x i8] c"-h\09Show this help and exit\00"
@str.7 = [28 x i8] c"-r\09Remove log file and exit\00"
@str.8 = [60 x i8] c"-s\09Silent mode (e.g. if running as daemon, logging to file)\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.8, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("No FIPS HMAC support\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"No FIPS HMAC support\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"No FIPS HMAC support\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void put_trace_clock(void) {}


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

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

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

LLVM IR (-O2):
define void @put_trace_clock() {
ret void
}
void swap(int *arr, int i, int j) {
  int temp;
  temp = arr[i];
  arr[i] = arr[j];
  arr[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_temperature();
int /*<<< orphan*/ print_temperature(int /*<<< orphan*/);
int main() {
  print_temperature(get_temperature());
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @get_temperature()
%2 = tail call i32 @print_temperature(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int);
void merge_sort(int *A, int size) {
  int midpoint;
  if (size < 2) {
    return;
  }
  midpoint = size / 2;
  merge_sort(A, midpoint);
  merge_sort(A + midpoint, size - midpoint);
  merge(A, size, midpoint);
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    113e <merge_sort+0x1e>
jmp    1181 <merge_sort+0x61>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <merge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
cmp    $0x1,%esi
jg     1126 <merge_sort+0x6>
ret
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
shr    %ebx
mov    %ebx,%esi
call   1040 <merge_sort@plt>
lea    (%r14,%rbx,4),%rdi
mov    %ebp,%esi
sub    %ebx,%esi
call   1040 <merge_sort@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <merge@plt>

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

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1) {
%3 = icmp slt i32 %1, 2
br i1 %3, label %4, label %5
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = lshr i32 %1, 1
tail call void @merge_sort(i32* %0, i32 %6)
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = sub nsw i32 %1, %6
tail call void @merge_sort(i32* %8, i32 %9)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %6)
br label %4
}