xunge/DecIR huggingface dataset:
int ab_ok(double ab, int ab_missing) {
  if (ab_missing) {
    return 1;
  }
  return ab >= 0.2 && ab <= 0.8;
}


x86 assembly (clang, -O0):
<ab_ok>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1122 <ab_ok+0x22>
movl   $0x1,-0x4(%rbp)
jmp    115c <ab_ok+0x5c>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xecf(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x15(%rbp)
jb     1151 <ab_ok+0x51>
movsd  0xec2(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ab_ok>:
test   %edi,%edi
setne  %al
ucomisd 0xef3(%rip),%xmm0
setae  %cl
movsd  0xef0(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %dl
and    %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @ab_ok(double %0, i32 %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %18
9: ; preds = %2
%10 = load double, double* %4
%11 = fcmp oge double %10, 2.000000e-01
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load double, double* %4
%14 = fcmp ole double %13, 8.000000e-01
br label %15
15: ; preds = %12, %9
%16 = phi i1 [ false, %9 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @ab_ok(double %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = fcmp oge double %0, 2.000000e-01
%5 = fcmp ole double %0, 8.000000e-01
%6 = and i1 %4, %5
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
int ishex(char c) {
  if (c >= '0' && c <= '9')
    return 1;
  else if (c >= 'A' && c <= 'F')
    return 1;
  else if (c >= 'a' && c <= 'f')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<ishex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <ishex+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <ishex+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1183 <ishex+0x83>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1156 <ishex+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     1156 <ishex+0x56>
movl   $0x1,-0x4(%rbp)
jmp    1183 <ishex+0x83>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     117c <ishex+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     117c <ishex+0x7c>
movl   $0x1,-0x4(%rbp)
jmp    1183 <ishex+0x83>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ishex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ishex(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %31
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 70
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %31
21: ; preds = %16, %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 97
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 102
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 1, i32* %2
br label %31
30: ; preds = %25, %21
store i32 0, i32* %2
br label %31
31: ; preds = %30, %29, %20, %11
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @ishex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int PAPI_register_thread();
void papif_register_thread_(int *check) { *check = PAPI_register_thread(); }


x86 assembly (clang, -O0):
<papif_register_thread_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <PAPI_register_thread@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_register_thread_>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_register_thread@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_register_thread_(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @PAPI_register_thread()
store i32 %2, i32* %0
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
double get_InstantDEX_rate(char *base, char *rel) {
  if (strcmp(base, rel) != 0)
    return (0.);
  else
    return (1.);
}


x86 assembly (clang, -O0):
<get_InstantDEX_rate>:
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 <strcmp@plt>
cmp    $0x0,%rax
je     1144 <get_InstantDEX_rate+0x34>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1151 <get_InstantDEX_rate+0x41>
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_InstantDEX_rate>:
push   %rax
call   1030 <strcmp@plt>
test   %rax,%rax
je     1120 <get_InstantDEX_rate+0x10>
xorps  %xmm0,%xmm0
pop    %rax
ret
movsd  0xed8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @get_InstantDEX_rate(i8* %0, i8* %1) {
%3 = alloca double
%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 i64 @strcmp(i8* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store double 0.000000e+00, double* %3
br label %12
11: ; preds = %2
store double 1.000000e+00, double* %3
br label %12
12: ; preds = %11, %10
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @get_InstantDEX_rate(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, double 1.000000e+00, double 0.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
void test_reverse() {
  char str[] = "Hello C";
  printf("Original: %s\n", str);
  reverse(str);
  printf("Reversed: %s\n", str);
}


x86 assembly (clang, -O0):
<test_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x8(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reverse>:
push   %rbx
sub    $0x10,%rsp
movabs $0x43206f6c6c6548,%rax
mov    %rax,0x8(%rsp)
lea    0xec5(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_reverse.str = [8 x i8] c"Hello C\00"
@.str = [14 x i8] c"Original: %s\0A\00"
@.str.1 = [14 x i8] c"Reversed: %s\0A\00"
define void @test_reverse() {
%1 = alloca [8 x i8]
%2 = bitcast [8 x i8]* %1 to i8*
%3 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%6 = call i32 @reverse(i8* %5)
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Original: %s\0A\00"
@.str.1 = [14 x i8] c"Reversed: %s\0A\00"
define void @test_reverse() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 18894486372115784, i64* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @reverse(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gdb_write(char *);
int term_child();
int wait_for_child_gone();
int cleanup() {
  gdb_write("quit\n");
  int rc = wait_for_child_gone();
  if (!rc)
    rc = term_child();
  return rc;
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <gdb_write@plt>
mov    $0x0,%al
call   1040 <wait_for_child_gone@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1162 <cleanup+0x32>
mov    $0x0,%al
call   1050 <term_child@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <gdb_write@plt>
xor    %eax,%eax
call   1040 <wait_for_child_gone@plt>
test   %eax,%eax
je     114a <cleanup+0x1a>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1050 <term_child@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"quit\0A\00"
define i32 @cleanup() {
%1 = alloca i32
%2 = call i32 @gdb_write(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @wait_for_child_gone()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @term_child()
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"quit\0A\00"
define i32 @cleanup() {
%1 = tail call i32 @gdb_write(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @wait_for_child_gone()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @term_child()
br label %6
6: ; preds = %4, %0
%7 = phi i32 [ %2, %0 ], [ %5, %4 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cmdBindNcHelp() {
  printf("listens for a connection & spawns shell via netcat\n");
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"listens for a connection & spawns shell via netcat\0A\00"
define void @cmdBindNcHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [51 x i8] c"listens for a connection & spawns shell via netcat\00"
define void @cmdBindNcHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret void
}
const char *rte_version(void) {
  static char version[32];
  if (version[0] != 0)
    return version;
  if (strlen("") == 0)
    snprintf(version, sizeof(version), "%s %d.%d.%d", "RTE", 2, 1, 0);
  else
    snprintf(version, sizeof(version), "%s %d.%d.%d%s%d", "RTE", 2, 1, 0, "",
             16 < 16 ? 16 : 16 - 16);
  return version;
}


x86 assembly (clang, -O0):
<rte_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsbl 0x2f21(%rip),%eax
cmp    $0x0,%eax
je     1138 <rte_version+0x28>
lea    0x2f11(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1179 <rte_version+0x69>
lea    0x2f01(%rip),%rdi
mov    $0x20,%esi
lea    0xeb5(%rip),%rdx
lea    0xeba(%rip),%rcx
mov    $0x2,%r8d
mov    $0x1,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
lea    0x2ecb(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_version>:
push   %rax
cmpb   $0x0,0x2f28(%rip)
jne    114e <rte_version+0x3e>
movl   $0x0,(%rsp)
lea    0x2f18(%rip),%rdi
lea    0xed1(%rip),%rdx
lea    0xed6(%rip),%rcx
mov    $0x20,%esi
mov    $0x2,%r8d
mov    $0x1,%r9d
xor    %eax,%eax
call   1030 <snprintf@plt>
lea    0x2eeb(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@rte_version.version = internal global [32 x i8] zeroinitializer
@.str = [12 x i8] c"%s %d.%d.%d\00"
@.str.1 = [4 x i8] c"RTE\00"
define i8* @rte_version() {
%1 = alloca i8*
%2 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @rte_version.version, i64 0, i64 0)
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @rte_version.version, i64 0, i64 0), i8** %1
br label %8
6: ; preds = %0
%7 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @rte_version.version, i64 0, i64 0), i64 32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1, i32 0)
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @rte_version.version, i64 0, i64 0), i8** %1
br label %8
8: ; preds = %6, %5
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@rte_version.version = internal global [32 x i8] zeroinitializer
@.str = [12 x i8] c"%s %d.%d.%d\00"
@.str.1 = [4 x i8] c"RTE\00"
define i8* @rte_version() {
%1 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @rte_version.version, i64 0, i64 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @rte_version.version, i64 0, i64 0), i64 32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1, i32 0)
br label %5
5: ; preds = %0, %3
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @rte_version.version, i64 0, i64 0)
}
void RSA_blinding_on(void) {}


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

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

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

LLVM IR (-O2):
define void @RSA_blinding_on() {
ret void
}
int fun574() { return 574; }


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

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

LLVM IR (-O0):
define i32 @fun574() {
ret i32 574
}

LLVM IR (-O2):
define i32 @fun574() {
ret i32 574
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  extern int a;
  a = 10;
  printf("%d\n", a);
  return 0;
}


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

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

LLVM IR (-O0):
@a = external global i32
@.str = [4 x i8] c"%d\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
store i32 10, i32* @a
%6 = load i32, i32* @a
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@a = external global i32
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
store i32 10, i32* @a
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
void sum_vals(int key, void *valp0, void *sump0) {
  int *sump = sump0;
  int *valp = valp0;
  *sump += *valp;
}


x86 assembly (clang, -O0):
<sum_vals>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_vals>:
mov    (%rsi),%eax
add    %eax,(%rdx)
ret

LLVM IR (-O0):
define void @sum_vals(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %7
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %8
%13 = load i32*, i32** %8
%14 = load i32, i32* %13
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = add nsw i32 %16, %14
store i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @sum_vals(i32 %0, i8* nocapture %1, i8* nocapture %2) {
%4 = bitcast i8* %2 to i32*
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = add nsw i32 %7, %6
store i32 %8, i32* %4
ret void
}
void fa118(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
a:
  ({
    P02A:
      goto P02A;
      ({
        p024A:
          goto p024A;
          goto a;
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa118>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa118+0x4>

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

LLVM IR (-O0):
define void @fa118() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; No predecessors!
br label %17
17: ; preds = %17, %16
br label %17
18: ; No predecessors!
br label %19
19: ; preds = %19, %18
br label %19
20: ; preds = %20
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa118() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ opti_(int *, double *, int *, int *);
void main() {
  double x[2];
  int n, m, method;
  method = 1;
  n = 3;
  m = 3;
  x[0] = 1.0;
  x[1] = 1.0;
  x[2] = 1.0;
  opti_(&method, x, &n, &m);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x1c(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x3,-0x18(%rbp)
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeae(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xea1(%rip),%xmm0
movsd  %xmm0,0x0(%rbp)
lea    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <opti_@plt>
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movl   $0x1,0x4(%rsp)
movl   $0x3,0xc(%rsp)
movl   $0x3,0x8(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x20(%rsp)
lea    0x4(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1040 <opti_@plt>
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca [2 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 1, i32* %4
store i32 3, i32* %2
store i32 3, i32* %3
%5 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
store double 1.000000e+00, double* %5
%6 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
store double 1.000000e+00, double* %6
%7 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 2
store double 1.000000e+00, double* %7
%8 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%9 = call i32 @opti_(i32* %4, double* %8, i32* %2, i32* %3)
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @main() {
%1 = alloca <2 x double>
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast <2 x double>* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
store i32 1, i32* %4
store i32 3, i32* %2
store i32 3, i32* %3
%9 = getelementptr inbounds <2 x double>, <2 x double>* %1, i64 0, i64 0
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %1
%10 = getelementptr inbounds <2 x double>, <2 x double>* %1, i64 0, i64 2
store double 1.000000e+00, double* %10
%11 = call i32 @opti_(i32* %4, double* %9, i32* %2, i32* %3)
%12 = call i32 @exit(i32 0)
unreachable
}
void avio_wb24() {}


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

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

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

LLVM IR (-O2):
define void @avio_wb24() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void parse_icmp(uint8_t *packet, int len) {
  uint8_t type = packet[0];
  uint8_t code = packet[1];
  if (len < 4) {
    printf("icmp packet too small\n");
    return;
  }
  printf("icmp type %u code %u\n", type, code);
}


x86 assembly (clang, -O0):
<parse_icmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    114f <parse_icmp+0x3f>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1163 <parse_icmp+0x53>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_icmp>:
cmp    $0x3,%esi
jg     1131 <parse_icmp+0x11>
lea    0xeea(%rip),%rdi
jmp    1030 <puts@plt>
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
lea    0xec3(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"icmp packet too small\0A\00"
@.str.1 = [22 x i8] c"icmp type %u code %u\0A\00"
define void @parse_icmp(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 4
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %21
17: ; preds = %2
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %19)
br label %21
21: ; preds = %17, %15
ret void
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"icmp type %u code %u\0A\00"
@str = [22 x i8] c"icmp packet too small\00"
define void @parse_icmp(i32* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 4
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %11
6: ; preds = %2
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = load i32, i32* %0
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %8)
br label %11
11: ; preds = %6, %4
ret void
}
/* Variables and functions */
const char *fileno2name(int fileno) {
  switch (fileno) {
  case 0:
    return "stdin";
  case 1:
    return "stdout";
  case 2:
    return "stderr";
  default:
    return NULL;
  }
}


x86 assembly (clang, -O0):
<fileno2name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <fileno2name+0x3c>
jmp    111a <fileno2name+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <fileno2name+0x4c>
jmp    112b <fileno2name+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <fileno2name+0x5c>
jmp    116c <fileno2name+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <fileno2name+0x74>
lea    0xeb3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <fileno2name+0x74>
lea    0xeaa(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <fileno2name+0x74>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileno2name>:
cmp    $0x2,%edi
ja     1117 <fileno2name+0x17>
movslq %edi,%rax
lea    0xf05(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"stdin\00"
@.str.1 = [7 x i8] c"stdout\00"
@.str.2 = [7 x i8] c"stderr\00"
define i8* @fileno2name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* null, i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [6 x i8] c"stdin\00"
@.str.1 = [7 x i8] c"stdout\00"
@.str.2 = [7 x i8] c"stderr\00"
@reltable.fileno2name = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.fileno2name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.fileno2name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.fileno2name to i64)) to i32)]
define i8* @fileno2name(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.fileno2name to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
int test_imm_5Buint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x5B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Buint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x5b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Buint64_midword_reg>:
test   $0x5b0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Buint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 91
%6 = icmp ne i64 %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_5Buint64_midword_reg(i64 %0) {
%2 = and i64 %0, 5963776
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
unsigned long lrint(double);
unsigned long C_to_mkelvin(double c) { return lrint(c * 1000 + 273150); }


x86 assembly (clang, -O0):
<C_to_mkelvin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <lrint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_to_mkelvin>:
mulsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm0
jmp    1030 <lrint@plt>

LLVM IR (-O0):
define i64 @C_to_mkelvin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fmuladd.f64(double %3, double 1.000000e+03, double 2.731500e+05)
%5 = call i64 @lrint(double %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @C_to_mkelvin(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.000000e+03, double 2.731500e+05)
%3 = tail call i64 @lrint(double %2)
ret i64 %3
}
int fun(void) { return 20; }


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

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

LLVM IR (-O0):
define i32 @fun() {
ret i32 20
}

LLVM IR (-O2):
define i32 @fun() {
ret i32 20
}
/* Variables and functions */
int dup2(int, int);
int /*<<< orphan*/ unix_error(char *);
int Dup2(int fd1, int fd2) {
  int rc;
  if ((rc = dup2(fd1, fd2)) < 0) {
    unix_error("Dup2 error");
  }
  return rc;
}


x86 assembly (clang, -O0):
<Dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1151 <Dup2+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <unix_error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dup2>:
push   %rbx
call   1030 <dup2@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Dup2+0x18>
lea    0xecd(%rip),%rdi
call   1040 <unix_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Dup2 error\00"
define i32 @Dup2(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 = call i32 @dup2(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@.str = [11 x i8] c"Dup2 error\00"
define i32 @Dup2(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
int B256ToB64Bytes(int numB256Bytes) { return (numB256Bytes * 8 + 5) / 6; }


x86 assembly (clang, -O0):
<B256ToB64Bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
add    $0x5,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<B256ToB64Bytes>:
lea    0x5(,%rdi,8),%eax
cltq
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @B256ToB64Bytes(i32 %0) {
%2 = shl nsw i32 %0, 3
%3 = or i32 %2, 5
%4 = sdiv i32 %3, 6
ret i32 %4
}
int Func1() { return 0; }


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

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

LLVM IR (-O0):
define i32 @Func1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @Func1() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(unsigned int *, int, int);
void nn_bitset_one(unsigned numbits, unsigned *bits) {
  memset(bits, 0xff, 4 * ((numbits + 31) / 32));
  {
    const unsigned k = numbits / 32;
    const unsigned n = numbits % 32;
    bits[k] &= ~(~0u >> n);
  }
}


x86 assembly (clang, -O0):
<nn_bitset_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
add    $0x1f,%edx
shr    $0x5,%edx
shl    $0x2,%edx
mov    $0xff,%esi
call   1030 <memset@plt>
mov    -0x4(%rbp),%eax
shr    $0x5,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%edx
shr    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_bitset_one>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
lea    0x1f(%rbx),%edx
shr    $0x3,%edx
and    $0xfffffffc,%edx
mov    %rsi,%rdi
mov    $0xff,%esi
call   1030 <memset@plt>
mov    %ebx,%eax
shr    $0x5,%eax
mov    $0xffffffff,%edx
mov    %ebx,%ecx
shr    %cl,%edx
not    %edx
and    %edx,(%r14,%rax,4)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @nn_bitset_one(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load i32, i32* %3
%9 = add i32 %8, 31
%10 = udiv i32 %9, 32
%11 = mul i32 4, %10
%12 = call i32 @memset(i32* %7, i32 255, i32 %11)
%13 = load i32, i32* %3
%14 = udiv i32 %13, 32
store i32 %14, i32* %5
%15 = load i32, i32* %3
%16 = urem i32 %15, 32
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = lshr i32 -1, %17
%19 = xor i32 %18, -1
%20 = load i32*, i32** %4
%21 = load i32, i32* %5
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = load i32, i32* %23
%25 = and i32 %24, %19
store i32 %25, i32* %23
ret void
}

LLVM IR (-O2):
define void @nn_bitset_one(i32 %0, i32* %1) {
%3 = add i32 %0, 31
%4 = lshr i32 %3, 3
%5 = and i32 %4, 536870908
%6 = tail call i32 @memset(i32* %1, i32 255, i32 %5)
%7 = lshr i32 %0, 5
%8 = and i32 %0, 31
%9 = lshr i32 -1, %8
%10 = xor i32 %9, -1
%11 = zext i32 %7 to i64
%12 = getelementptr inbounds i32, i32* %1, i64 %11
%13 = load i32, i32* %12
%14 = and i32 %13, %10
store i32 %14, i32* %12
ret void
}
/* Type definitions */
struct pure_option {
  int dummy;
};

/* Variables and functions */
int pure_getopt_internal(int, char *const *, char const *,
                         struct pure_option const *, int *, int);
int pure_getopt_long(int nargc, char *const *nargv, const char *options,
                     const struct pure_option *long_options, int *idx) {
  return pure_getopt_internal(nargc, nargv, options, long_options, idx, 0x01);
}


x86 assembly (clang, -O0):
<pure_getopt_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%r9d
call   1030 <pure_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pure_getopt_long>:
mov    $0x1,%r9d
jmp    1030 <pure_getopt_internal@plt>

LLVM IR (-O0):
%struct.pure_option = type { i32 }
define i32 @pure_getopt_long(i32 %0, i8** %1, i8* %2, %struct.pure_option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.pure_option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.pure_option* %3, %struct.pure_option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.pure_option*, %struct.pure_option** %9
%15 = load i32*, i32** %10
%16 = call i32 @pure_getopt_internal(i32 %11, i8** %12, i8* %13, %struct.pure_option* %14, i32* %15, i32 1)
ret i32 %16
}

LLVM IR (-O2):
%struct.pure_option = type { i32 }
define i32 @pure_getopt_long(i32 %0, i8** %1, i8* %2, %struct.pure_option* %3, i32* %4) {
%6 = tail call i32 @pure_getopt_internal(i32 %0, i8** %1, i8* %2, %struct.pure_option* %3, i32* %4, i32 1)
ret i32 %6
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  int answer;
  scanf("%d", &number);
  answer = is_prime(number);
  printf("%d", answer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <is_prime@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @is_prime(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int euclid_mod(int, int);
int euclid_sub(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int check1 = euclid_mod(64 * 67, 64 * 81);
  int check2 = euclid_sub(128 * 12, 128 * 77);
  printf("%d\n", check1);
  printf("%d\n", check2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x10c0,%edi
mov    $0x1440,%esi
call   1050 <euclid_mod@plt>
mov    %eax,-0x8(%rbp)
mov    $0x600,%edi
mov    $0x2680,%esi
call   1030 <euclid_sub@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x10c0,%edi
mov    $0x1440,%esi
call   1050 <euclid_mod@plt>
mov    %eax,%ebx
mov    $0x600,%edi
mov    $0x2680,%esi
call   1030 <euclid_sub@plt>
mov    %eax,%ebp
lea    0xea3(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @euclid_mod(i32 4288, i32 5184)
store i32 %4, i32* %2
%5 = call i32 @euclid_sub(i32 1536, i32 9856)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @euclid_mod(i32 4288, i32 5184)
%2 = tail call i32 @euclid_sub(i32 1536, i32 9856)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void uDMAControlBaseSet(uint32_t ui32Base, void *pControlTable) {
  ;

  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000008))) =
      (uint32_t)pControlTable;
}


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

x86 assembly (clang, -O2):
<uDMAControlBaseSet>:
mov    %rsi,0x8(%rdi)
ret

LLVM IR (-O0):
define void @uDMAControlBaseSet(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = ptrtoint i8* %5 to i64
%7 = load i64, i64* %3
%8 = add i64 %7, 8
%9 = inttoptr i64 %8 to i64*
store volatile i64 %6, i64* %9
ret void
}

LLVM IR (-O2):
define void @uDMAControlBaseSet(i64 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = add i64 %0, 8
%5 = inttoptr i64 %4 to i64*
store volatile i64 %3, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_query_value(char *);
int main() {
  get_query_value(
      "staMac=11:22:33:44:55:66&&timeRange=11&test=1&&test_str=hello");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"staMac=11:22:33:44:55:66&&timeRange=11&test=1&&test_str=hello\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @get_query_value(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [62 x i8] c"staMac=11:22:33:44:55:66&&timeRange=11&test=1&&test_str=hello\00"
define i32 @main() {
%1 = tail call i32 @get_query_value(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _strncasecmp(char const *, char const *, size_t, void *);
int hfuzz_strncasecmp(const char *s1, const char *s2, size_t n, void *addr) {
  return _strncasecmp(s1, s2, n, addr);
}


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

x86 assembly (clang, -O2):
<hfuzz_strncasecmp>:
jmp    1030 <_strncasecmp@plt>

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

LLVM IR (-O2):
define i32 @hfuzz_strncasecmp(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = tail call i32 @_strncasecmp(i8* %0, i8* %1, i64 %2, i8* %3)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ time_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, scalar_t__);
scalar_t__ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  time_t end;
  int64_t count = 0;
  end = time(NULL) + 5;
  while (time(NULL) <= end)
    count++;
  printf("%lld\n", count);
  exit(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)
movq   $0x0,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
add    $0x5,%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
cmp    -0x18(%rbp),%rax
jg     1183 <main+0x53>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    115f <main+0x2f>
mov    -0x20(%rbp),%rsi
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,%r14
add    $0x5,%r14
mov    $0xffffffffffffffff,%rbx
nopl   0x0(%rax)
xor    %edi,%edi
call   1040 <time@plt>
add    $0x1,%rbx
cmp    %r14,%rax
jle    1150 <main+0x20>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @time(i32* null)
%4 = add nsw i64 %3, 5
br label %5
5: ; preds = %5, %2
%6 = phi i64 [ 0, %2 ], [ %9, %5 ]
%7 = tail call i64 @time(i32* null)
%8 = icmp sgt i64 %7, %4
%9 = add nuw nsw i64 %6, 1
br i1 %8, label %10, label %5
10: ; preds = %5
%11 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %6)
%12 = tail call i32 @exit(i32 0)
unreachable
}