xunge/DecIR huggingface dataset:
int _compare_data(char *ptr1, char *ptr2, int len) {
  int i;
  for (i = 0; i < len; i++) {
    if (ptr1[i] != ptr2[2])
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_compare_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    115d <_compare_data+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
cmp    %ecx,%eax
je     114a <_compare_data+0x4a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1164 <_compare_data+0x64>
jmp    114f <_compare_data+0x4f>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <_compare_data+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_compare_data>:
test   %edx,%edx
jle    111e <_compare_data+0x1e>
mov    0x2(%rsi),%al
mov    %edx,%ecx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
cmp    %al,(%rdi,%rdx,1)
jne    1121 <_compare_data+0x21>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <_compare_data+0x10>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @_compare_data(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = getelementptr inbounds i8, i8* %1, i64 2
%7 = load i8, i8* %6
%8 = zext i32 %2 to i64
br label %11
9: ; preds = %11
%10 = icmp eq i64 %16, %8
br i1 %10, label %17, label %11
11: ; preds = %5, %9
%12 = phi i64 [ 0, %5 ], [ %16, %9 ]
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, %7
%16 = add nuw nsw i64 %12, 1
br i1 %15, label %9, label %17
17: ; preds = %11, %9, %3
%18 = phi i32 [ 0, %3 ], [ 0, %9 ], [ -1, %11 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ fail(char *, char const *, int, char const *);
void atf_sanity_pre(const char *file, int line, const char *cond) {
  fail("Precondition check failed at %s:%d: %s", file, line, cond);
}


x86 assembly (clang, -O0):
<atf_sanity_pre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdi
call   1030 <fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atf_sanity_pre>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee1(%rip),%rdi
jmp    1030 <fail@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Precondition check failed at %s:%d: %s\00"
define void @atf_sanity_pre(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @fail(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Precondition check failed at %s:%d: %s\00"
define void @atf_sanity_pre(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @fail(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
ret void
}
int foo(void) { return 6; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 6
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 6
}
/* Variables and functions */
int f484(int *);
int f485(int *p) { return f484(p); }


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

x86 assembly (clang, -O2):
<f485>:
jmp    1030 <f484@plt>

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

LLVM IR (-O2):
define i32 @f485(i32* %0) {
%2 = tail call i32 @f484(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void printIntFile(unsigned int *integer, unsigned int len) {
  for (int i = 0; i < len; ++i) {
    printf("%d\n", integer[i]);
  }
}


x86 assembly (clang, -O0):
<printIntFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1157 <printIntFile+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printIntFile+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printIntFile>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1145 <printIntFile+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printIntFile+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printIntFile(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int uint16_t;

/* Variables and functions */
void *realtec_write_b(int /*<<< orphan*/, void *, int);
void *realtec_write_w(uint32_t address, void *context, uint16_t value) {
  return realtec_write_b(address, context, value >> 8);
}


x86 assembly (clang, -O0):
<realtec_write_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
sar    $0x8,%edx
call   1030 <realtec_write_b@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realtec_write_w>:
sar    $0x8,%edx
jmp    1030 <realtec_write_b@plt>

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

LLVM IR (-O2):
define i8* @realtec_write_w(i32 %0, i8* %1, i32 %2) {
%4 = ashr i32 %2, 8
%5 = tail call i8* @realtec_write_b(i32 %0, i8* %1, i32 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help_s() {
  printf("snat options:\n"
         " --to-src address       : MAC address to map source to\n"
         " --snat-target target   : ACCEPT, DROP, RETURN or CONTINUE\n"
         " --snat-arp             : also change src address in arp msg\n");
}


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

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

LLVM IR (-O0):
@.str = [190 x i8] c"snat options:\0A --to-src address : MAC address to map source to\0A --snat-target target : ACCEPT, DROP, RETURN or CONTINUE\0A --snat-arp : also change src address in arp msg\0A\00"
define void @print_help_s() {
%1 = call i32 @printf(i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [189 x i8] c"snat options:\0A --to-src address : MAC address to map source to\0A --snat-target target : ACCEPT, DROP, RETURN or CONTINUE\0A --snat-arp : also change src address in arp msg\00"
define void @print_help_s() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([189 x i8], [189 x i8]* @str, i64 0, i64 0))
ret void
}
void OBJ_NAME_get(void) {}


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

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

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

LLVM IR (-O2):
define void @OBJ_NAME_get() {
ret void
}
int statoutput(int statblock, int *state, int increment) {
  *state += increment;
  if (*state > statblock) {
    *state = 0;
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<statoutput>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jle    113e <statoutput+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1145 <statoutput+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<statoutput>:
add    (%rsi),%edx
xor    %ecx,%ecx
xor    %eax,%eax
cmp    %edi,%edx
setg   %al
cmovle %edx,%ecx
mov    %ecx,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @statoutput(i32 %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %2
%6 = icmp sgt i32 %5, %0
%7 = select i1 %6, i32 0, i32 %5
store i32 %7, i32* %1
%8 = zext i1 %6 to i32
ret i32 %8
}
void kirstu_notification_list_init(void) {}


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

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

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

LLVM IR (-O2):
define void @kirstu_notification_list_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
int write(int, char *, int);
int tty_write(int fd, char byte) {
  if (write(fd, &byte, 1) != 1) {
    do {
    } while (0);
    do {
    } while (0);
    return (-1);
  }
  usleep(100 * 1000);
  return (1);
}


x86 assembly (clang, -O0):
<tty_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
je     116b <tty_write+0x4b>
jmp    1150 <tty_write+0x30>
jmp    1155 <tty_write+0x35>
jmp    115a <tty_write+0x3a>
jmp    115f <tty_write+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    117c <tty_write+0x5c>
mov    $0x186a0,%edi
call   1040 <usleep@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_write>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x1,%ecx
jne    1150 <tty_write+0x30>
mov    $0x186a0,%edi
call   1040 <usleep@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @tty_write(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @write(i32 %0, i8* %3, i32 1)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @usleep(i32 100000)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 1, %6 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness15(int a) {
  unsigned min = (-((~0U) & ((~0U) >> 1)) - 1);
  clang_analyzer_eval(a < min);
  clang_analyzer_eval((a + 2) < min);
  clang_analyzer_eval((a + 2U) < min);
}


x86 assembly (clang, -O0):
<mixedSignedness15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness15>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1030 <clang_analyzer_eval@plt>
xor    %ebp,%ebp
cmp    $0xfffffffe,%ebx
setge  %bpl
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness15(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ult i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 2
%11 = load i32, i32* %3
%12 = icmp ult i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
%15 = load i32, i32* %2
%16 = add i32 %15, 2
%17 = load i32, i32* %3
%18 = icmp ult i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mixedSignedness15(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
%5 = icmp sgt i32 %0, -3
%6 = zext i1 %5 to i32
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
%8 = tail call i32 @clang_analyzer_eval(i32 %6)
ret void
}
/* Variables and functions */
scalar_t__ islower(char const);
int isupperstr(const char *s) {
  while (*s != '\0') {
    if (islower(*s))
      return 0;
    ++s;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isupperstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115f <isupperstr+0x4f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     114e <isupperstr+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1166 <isupperstr+0x56>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <isupperstr+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupperstr>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114c <isupperstr+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
jne    114a <isupperstr+0x3a>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <isupperstr+0x20>
jmp    114c <isupperstr+0x3c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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


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

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

LLVM IR (-O0):
define i32 @d() {
ret i32 100
}

LLVM IR (-O2):
define i32 @d() {
ret i32 100
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printhex(int e) { printf("%x", e); }


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

x86 assembly (clang, -O2):
<printhex>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define void @printhex(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msg_exit(char *);
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *cpy = strdup(s);
  if (!cpy)
    msg_exit("out of memory");
  return cpy;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xstrdup+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <msg_exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xstrdup+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <msg_exit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\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 ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @msg_exit(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\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 %6
4: ; preds = %1
%5 = tail call i32 @msg_exit(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void voidFuncIntVarArgs(int i, ...) {}


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

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

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

LLVM IR (-O2):
define void @voidFuncIntVarArgs(i32 %0, ...) {
ret void
}
int mIsUsaState(int ccode) { return (ccode >= 342 && ccode <= 392); }


x86 assembly (clang, -O0):
<mIsUsaState>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x156,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <mIsUsaState+0x26>
cmpl   $0x188,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mIsUsaState>:
add    $0xfffffeaa,%edi
xor    %eax,%eax
cmp    $0x33,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @mIsUsaState(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 342
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 392
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mIsUsaState(i32 %0) {
%2 = add i32 %0, -342
%3 = icmp ult i32 %2, 51
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ __libc_fork();
pid_t __fork(void) { return __libc_fork(); }


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

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

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

LLVM IR (-O2):
define i32 @__fork() {
%1 = tail call i32 (...) @__libc_fork()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strrchr(char const *, char);
void make_init_fn(const char *name, char *init_fn) {
  const char *p = strrchr(name, '/');
  if (p == 0) {
    p = name;
  } else {
    p++;
  }
  strcpy(init_fn, "init_");
  strcat(init_fn, p);
}


x86 assembly (clang, -O0):
<make_init_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116a <make_init_fn+0x3a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1176 <make_init_fn+0x46>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_init_fn>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x2f,%esi
call   1040 <strrchr@plt>
lea    0x1(%rax),%rbx
test   %rax,%rax
cmove  %r15,%rbx
lea    0xea9(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <strcat@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"init_\00"
define void @make_init_fn(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @strrchr(i8* %6, i8 signext 47)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i8*, i8** %3
store i8* %11, i8** %5
br label %15
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %5
br label %15
15: ; preds = %12, %10
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = call i32 @strcat(i8* %18, i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"init_\00"
define void @make_init_fn(i8* %0, i8* %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%4 = icmp eq i8* %3, null
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = select i1 %4, i8* %0, i8* %5
%7 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @strcat(i8* %1, i8* %6)
ret void
}
/* Type definitions */
typedef long int32_t;

/* Variables and functions */
int /*<<< orphan*/ CAS(long, long, long volatile *);
long DEC_ATOMIC(volatile int32_t *val) {
  int32_t actual;
  do {
    actual = *val;
  } while (!CAS(actual, actual - 1, val));
  return actual;
}


x86 assembly (clang, -O0):
<DEC_ATOMIC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
mov    -0x8(%rbp),%rdx
call   1030 <CAS@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    111c <DEC_ATOMIC+0xc>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DEC_ATOMIC>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
mov    (%r14),%rbx
lea    -0x1(%rbx),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <CAS@plt>
test   %eax,%eax
je     1120 <DEC_ATOMIC+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @DEC_ATOMIC(i64* %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i64, i64* %0
%4 = add nsw i64 %3, -1
%5 = tail call i32 @CAS(i64 %3, i64 %4, i64* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %2, label %7
7: ; preds = %2
ret i64 %3
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t get_tod_usecs(void) {
  struct timeval tv;
  uint64_t time;
  gettimeofday(&tv, NULL);
  time = tv.tv_usec + tv.tv_sec * 1000 * 1000;
  return time;
}


x86 assembly (clang, -O0):
<get_tod_usecs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0x3e8,-0x10(%rbp),%ecx
imul   $0x3e8,%ecx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tod_usecs>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x8(%rsp),%eax
cltq
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @get_tod_usecs() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = mul nsw i32 %8, 1000
%10 = sext i32 %9 to i64
%11 = add nsw i64 %5, %10
store i64 %11, i64* %2
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @get_tod_usecs() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = mul i32 %7, 1000000
%9 = sext i32 %8 to i64
%10 = add nsw i64 %5, %9
ret i64 %10
}
int f(x)
float x;
{}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(double %0) {
%2 = alloca i32
%3 = alloca float
%4 = fptrunc double %0 to float
store float %4, float* %3
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(double %0) {
ret i32 undef
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_get_point_in_cell(int n, int i, int j, int k, double *point) {
  int b[2], fail;
  b[0] = j;
  b[1] = k;
  fail = _ada_use_c2phc(89, &i, b, point);
  return fail;
}


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

x86 assembly (clang, -O2):
<celcon_get_point_in_cell>:
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
mov    %edx,0x10(%rsp)
mov    %ecx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x59,%edi
mov    %r8,%rcx
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @celcon_get_point_in_cell(i32 %0, i32 %1, i32 %2, i32 %3, double* %4) {
%6 = alloca i32
%7 = alloca [2 x i32]
store i32 %1, i32* %6
%8 = bitcast [2 x i32]* %7 to i8*
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %2, i32* %9
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %3, i32* %10
%11 = call i32 @_ada_use_c2phc(i32 89, i32* %6, i32* %9, double* %4)
ret i32 %11
}
double distrTarget(double *t) { return 0.0; }


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

x86 assembly (clang, -O2):
<distrTarget>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @distrTarget(double* %0) {
%2 = alloca double*
store double* %0, double** %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @distrTarget(double* nocapture readnone %0) {
ret double 0.000000e+00
}
void empty(struct pkt_buff *pkt) {}


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

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

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

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

/* Variables and functions */
char *DisplayString(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
int _default_exterror(Display *dpy, char *ext_name, char *reason) {
  fprintf(stderr, "Xlib:  extension \"%s\" %s on display \"%s\".\n", ext_name,
          reason, DisplayString(dpy));
  return 0;
}


x86 assembly (clang, -O0):
<_default_exterror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <DisplayString@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    %rax,%r8
lea    0xe92(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_default_exterror>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%ebp
call   1040 <DisplayString@plt>
lea    0xec1(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %rax,%r8
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Xlib: extension \22%s\22 %s on display \22%s\22.\0A\00"
define i32 @_default_exterror(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
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = load i32*, i32** %4
%11 = call i8* @DisplayString(i32* %10)
%12 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i8* %11)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Xlib: extension \22%s\22 %s on display \22%s\22.\0A\00"
define i32 @_default_exterror(i32* %0, i8* %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i8* @DisplayString(i32* %0)
%6 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %5)
ret i32 0
}
int isDigit(char c) {
  if (c >= '1' && c <= '9')
    return 1;
  if (c == '0')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x31,%eax
jl     1130 <isDigit+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <isDigit+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1150 <isDigit+0x50>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jne    1149 <isDigit+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1150 <isDigit+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isDigit(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, 49
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 %18
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 48
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %2
br label %18
17: ; preds = %12
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %11
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @isDigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(long long *);
void C_Utils_free_longlong_ptr(long long *item) { free(item); }


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

x86 assembly (clang, -O2):
<C_Utils_free_longlong_ptr>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @C_Utils_free_longlong_ptr(i64* nocapture %0) {
%2 = tail call i32 @free(i64* %0)
ret void
}
void lock(unsigned int *barrier) {
  if (barrier) {
    while (__sync_fetch_and_or(barrier, 1))
      ;
  }
}


x86 assembly (clang, -O0):
<lock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1162 <lock+0x62>
jmp    1118 <lock+0x18>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    %eax,%edx
or     $0x1,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x1c(%rbp)
test   $0x1,%cl
mov    %eax,-0xc(%rbp)
jne    114c <lock+0x4c>
jmp    1125 <lock+0x25>
mov    -0x1c(%rbp),%eax
cmp    $0x0,%eax
je     115d <lock+0x5d>
jmp    1118 <lock+0x18>
jmp    1162 <lock+0x62>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock>:
test   %rdi,%rdi
je     112f <lock+0x2f>
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
or     $0x1,%ecx
lock cmpxchg %ecx,(%rdi)
jne    1120 <lock+0x20>
test   %eax,%eax
jne    1110 <lock+0x10>
ret

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

LLVM IR (-O2):
define void @lock(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1, %3
%4 = atomicrmw or i32* %0, i32 1 seq_cst
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hoic_load(int, char *);
int hdoip_cli_load(int fd, int fdr, char **argv, int argc) {
  hoic_load(fd, argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<hdoip_cli_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <hoic_load@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdoip_cli_load>:
push   %rax
mov    (%rdx),%rsi
call   1030 <hoic_load@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @hdoip_cli_load(i32 %0, i32 %1, i8** nocapture %2, i32 %3) {
%5 = load i8*, i8** %2
%6 = tail call i32 @hoic_load(i32 %0, i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ null_pruning_symbols(int /*<<< orphan*/, int /*<<< orphan*/);
void call_null_pruning_symbols_2_Good() { null_pruning_symbols(0, 0); }


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

x86 assembly (clang, -O2):
<call_null_pruning_symbols_2_Good>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <null_pruning_symbols@plt>

LLVM IR (-O0):
define void @call_null_pruning_symbols_2_Good() {
%1 = call i32 @null_pruning_symbols(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @call_null_pruning_symbols_2_Good() {
%1 = tail call i32 @null_pruning_symbols(i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ clock();
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ mix(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ mt_srand(int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void mt_init() {
  srand(mix(clock(), time(NULL), getpid()));
  mt_srand((((uint64_t)rand()) << 33) | (((uint64_t)rand()) << 2) |
           (rand() & 3));
}


x86 assembly (clang, -O0):
<mt_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <clock@plt>
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
call   1060 <mix@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    $0x0,%al
call   1090 <rand@plt>
mov    $0x21,%ecx
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1090 <rand@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1090 <rand@plt>
mov    -0x4(%rbp),%edi
and    $0x3,%eax
or     %eax,%edi
call   1050 <mt_srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_init>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <clock@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1060 <mix@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xor    %eax,%eax
call   1090 <rand@plt>
xor    %eax,%eax
call   1090 <rand@plt>
xor    %eax,%eax
call   1090 <rand@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <mt_srand@plt>

LLVM IR (-O0):
define void @mt_init() {
%1 = call i32 (...) @clock()
%2 = call i32 @time(i32* null)
%3 = call i32 (...) @getpid()
%4 = call i32 @mix(i32 %1, i32 %2, i32 %3)
%5 = call i32 @srand(i32 %4)
%6 = call i32 (...) @rand()
%7 = shl i32 %6, 33
%8 = call i32 (...) @rand()
%9 = shl i32 %8, 2
%10 = or i32 %7, %9
%11 = call i32 (...) @rand()
%12 = and i32 %11, 3
%13 = or i32 %10, %12
%14 = call i32 @mt_srand(i32 %13)
ret void
}

LLVM IR (-O2):
define void @mt_init() {
%1 = tail call i32 (...) @clock()
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 @mix(i32 %1, i32 %2, i32 %3)
%5 = tail call i32 @srand(i32 %4)
%6 = tail call i32 (...) @rand()
%7 = tail call i32 (...) @rand()
%8 = tail call i32 (...) @rand()
%9 = tail call i32 @mt_srand(i32 poison)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long fwrite(char *, int, long, int /*<<< orphan*/ *);
long file___NativeFile_io_write___impl(FILE *self, char *buf, long from,
                                       long len) {
  return fwrite(buf + from, 1, len, self);
}


x86 assembly (clang, -O0):
<file___NativeFile_io_write___impl>:
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    -0x10(%rbp),%rdi
add    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file___NativeFile_io_write___impl>:
mov    %rdi,%rax
lea    (%rsi,%rdx,1),%rdi
mov    $0x1,%esi
mov    %rcx,%rdx
mov    %rax,%rcx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define i64 @file___NativeFile_io_write___impl(i32* nocapture %0, i8* nocapture %1, i64 %2, i64 %3) {
%5 = getelementptr inbounds i8, i8* %1, i64 %2
%6 = tail call i64 @fwrite(i8* %5, i32 1, i64 %3, i32* %0)
ret i64 %6
}
/* Variables and functions */
scalar_t__ floor(double);
double par(double phase) {
  phase -= floor(phase + 0.5);
  return 0.5 - 6 * phase * phase;
}


x86 assembly (clang, -O0):
<par>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
cvtsi2sd %rax,%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xebe(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe89(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<par>:
push   %rax
movsd  %xmm0,(%rsp)
addsd  0xee2(%rip),%xmm0
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0xecc(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xeb4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @par(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = call i64 @floor(double %4)
%6 = sitofp i64 %5 to double
%7 = load double, double* %2
%8 = fsub double %7, %6
store double %8, double* %2
%9 = load double, double* %2
%10 = fmul double 6.000000e+00, %9
%11 = load double, double* %2
%12 = fneg double %10
%13 = call double @llvm.fmuladd.f64(double %12, double %11, double 5.000000e-01)
ret double %13
}

LLVM IR (-O2):
define double @par(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call i64 @floor(double %2)
%4 = sitofp i64 %3 to double
%5 = fsub double %0, %4
%6 = fmul double %5, -6.000000e+00
%7 = tail call double @llvm.fmuladd.f64(double %6, double %5, double 5.000000e-01)
ret double %7
}