xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ errnoAbort(char *, char *, char *);
int symlink(char *, char *);
void makeSymLink(char *oldName, char *newName) {
  int err = symlink(oldName, newName);
  if (err < 0)
    errnoAbort("Couldn't make symbolic link from %s to %s\n", oldName, newName);
}


x86 assembly (clang, -O0):
<makeSymLink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <symlink@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    115e <makeSymLink+0x3e>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xea7(%rip),%rdi
call   1030 <errnoAbort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeSymLink>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <symlink@plt>
test   %eax,%eax
js     113b <makeSymLink+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <errnoAbort@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Couldn't make symbolic link from %s to %s\0A\00"
define void @makeSymLink(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @symlink(i8* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = call i32 @errnoAbort(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
br label %15
15: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"Couldn't make symbolic link from %s to %s\0A\00"
define void @makeSymLink(i8* %0, i8* %1) {
%3 = tail call i32 @symlink(i8* %0, i8* %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @errnoAbort(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
int isLowerCase(char c) { return c >= 'a' && c <= 'z'; }


x86 assembly (clang, -O0):
<isLowerCase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <isLowerCase+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLowerCase>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isLowerCase(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned short assign_bit_MODE9(unsigned reg_value, int set) {
  return (reg_value & ~0x100) | (set ? 0x100 : 0);
}


x86 assembly (clang, -O0):
<assign_bit_MODE9>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffeff,%eax
mov    -0x8(%rbp),%esi
xor    %ecx,%ecx
mov    $0x100,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_bit_MODE9>:
xor    %eax,%eax
test   %esi,%esi
setne  %al
and    $0xfeff,%edi
shl    $0x8,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @assign_bit_MODE9(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = and i32 %5, -257
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 256, i32 0
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @assign_bit_MODE9(i32 %0, i32 %1) {
%3 = and i32 %0, 65279
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i32 0, i32 256
%6 = or i32 %5, %3
%7 = trunc i32 %6 to i16
ret i16 %7
}
/* Variables and functions */
int __gen_ocl_get_local_id0();
int __gen_ocl_get_local_id1();
int __gen_ocl_get_local_id2();
__attribute__((always_)) unsigned get_local_id(unsigned int dim) {
  if (dim == 0)
    return __gen_ocl_get_local_id0();
  else if (dim == 1)
    return __gen_ocl_get_local_id1();
  else if (dim == 2)
    return __gen_ocl_get_local_id2();
  else
    return 0;
}


x86 assembly (clang, -O0):
<get_local_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1154 <get_local_id+0x24>
mov    $0x0,%al
call   1030 <__gen_ocl_get_local_id0@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_local_id+0x5d>
cmpl   $0x1,-0x8(%rbp)
jne    116d <get_local_id+0x3d>
mov    $0x0,%al
call   1050 <__gen_ocl_get_local_id1@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_local_id+0x5d>
cmpl   $0x2,-0x8(%rbp)
jne    1186 <get_local_id+0x56>
mov    $0x0,%al
call   1040 <__gen_ocl_get_local_id2@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_local_id+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_local_id>:
cmp    $0x2,%edi
je     1145 <get_local_id+0x15>
cmp    $0x1,%edi
je     114c <get_local_id+0x1c>
test   %edi,%edi
jne    1153 <get_local_id+0x23>
xor    %eax,%eax
jmp    1030 <__gen_ocl_get_local_id0@plt>
xor    %eax,%eax
jmp    1040 <__gen_ocl_get_local_id2@plt>
xor    %eax,%eax
jmp    1050 <__gen_ocl_get_local_id1@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @get_local_id(i32 %0) {
switch i32 %0, label %8 [
i32 0, label %2
i32 1, label %4
i32 2, label %6
]
2: ; preds = %1
%3 = tail call i32 (...) @__gen_ocl_get_local_id0()
br label %8
4: ; preds = %1
%5 = tail call i32 (...) @__gen_ocl_get_local_id1()
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @__gen_ocl_get_local_id2()
br label %8
8: ; preds = %1, %6, %4, %2
%9 = phi i32 [ %3, %2 ], [ %5, %4 ], [ %7, %6 ], [ 0, %1 ]
ret i32 %9
}
int kobject_set_name(struct kobject *x, char *y, ...) {
  int a;
  return a;
}


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
define i32 @kobject_set_name(%struct.kobject* %0, i8* %1, ...) {
%3 = alloca %struct.kobject*
%4 = alloca i8*
%5 = alloca i32
store %struct.kobject* %0, %struct.kobject** %3
store i8* %1, i8** %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.kobject = type opaque
define i32 @kobject_set_name(%struct.kobject* nocapture readnone %0, i8* nocapture readnone %1, ...) {
ret i32 undef
}
void convert_int(char *bytes, int i) {
  bytes[0] = (i >> 24) & 0xFF;
  bytes[1] = (i >> 16) & 0xFF;
  bytes[2] = (i >> 8) & 0xFF;
  bytes[3] = i & 0xFF;
}


x86 assembly (clang, -O0):
<convert_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_int>:
bswap  %esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @convert_int(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
int coproc_read(volatile unsigned int *_adr) { return *(_adr); }


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

x86 assembly (clang, -O2):
<coproc_read>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @coproc_read(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int stats_init(void *a, uint8_t b, uint8_t c, void *d, uint8_t e) { return 0; }


x86 assembly (clang, -O0):
<stats_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @stats_init(i8* nocapture readnone %0, i32 %1, i32 %2, i8* nocapture readnone %3, i32 %4) {
ret i32 0
}
void I_NoAppServicesLobbyInviteFriends(void) {}


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

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

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

LLVM IR (-O2):
define void @I_NoAppServicesLobbyInviteFriends() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int /*<<< orphan*/ getchar();
int getpid();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
void *thread_function2(void *p2) {
  getchar();
  printf("In thread function - 2\n");
  printf("PID --> %d\t TID --> %ld\n", getpid(), syscall(SYS_gettid));
  return NULL;
}


x86 assembly (clang, -O0):
<thread_function2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1060 <syscall@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_function2>:
push   %rbx
xor    %eax,%eax
call   1060 <getchar@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %eax,%ebx
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1070 <syscall@plt>
lea    0xe7e(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"In thread function - 2\0A\00"
@.str.1 = [25 x i8] c"PID --> %d\09 TID --> %ld\0A\00"
@SYS_gettid = global i32 0
define i8* @thread_function2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @getchar()
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @getpid()
%6 = load i32, i32* @SYS_gettid
%7 = call i32 @syscall(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %7)
ret i8* null
}

LLVM IR (-O2):
@.str.1 = [25 x i8] c"PID --> %d\09 TID --> %ld\0A\00"
@SYS_gettid = global i32 0
@str = [23 x i8] c"In thread function - 2\00"
define noalias i8* @thread_function2(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @getpid()
%5 = load i32, i32* @SYS_gettid
%6 = tail call i32 @syscall(i32 %5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %6)
ret i8* null
}
void XDisableAccessControl() {}


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

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

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

LLVM IR (-O2):
define void @XDisableAccessControl() {
ret void
}
void format_skeleton_rd_init(const char *fname) {}


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

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

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

LLVM IR (-O2):
define void @format_skeleton_rd_init(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, char *);
char *strpbrk(char *, char *);
char *m_strquote(char *buffer, size_t buf_len, char *str) {
  char *p;
  if (!(p = strpbrk(str, " \t\"'")))
    return str;
  snprintf(buffer, buf_len, "\"%s\"", str);
  return buffer;
}


x86 assembly (clang, -O0):
<m_strquote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    115f <m_strquote+0x3f>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117f <m_strquote+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xe93(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_strquote>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0xecb(%rip),%rsi
mov    %rdx,%rdi
call   1040 <strpbrk@plt>
test   %rax,%rax
je     1159 <m_strquote+0x39>
lea    0xebc(%rip),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rcx
call   1030 <snprintf@plt>
jmp    115c <m_strquote+0x3c>
mov    %rbx,%r14
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c" \09\22'\00"
@.str.1 = [5 x i8] c"\22%s\22\00"
define i8* @m_strquote(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
%9 = load i8*, i8** %7
%10 = call i8* @strpbrk(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %10, i8** %8
%11 = icmp ne i8* %10, null
br i1 %11, label %14, label %12
12: ; preds = %3
%13 = load i8*, i8** %7
store i8* %13, i8** %4
br label %20
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load i64, i64* %6
%17 = load i8*, i8** %7
%18 = call i32 @snprintf(i8* %15, i64 %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = load i8*, i8** %5
store i8* %19, i8** %4
br label %20
20: ; preds = %14, %12
%21 = load i8*, i8** %4
ret i8* %21
}

LLVM IR (-O2):
@.str = [5 x i8] c" \09\22'\00"
@.str.1 = [5 x i8] c"\22%s\22\00"
define i8* @m_strquote(i8* %0, i64 %1, i8* %2) {
%4 = tail call i8* @strpbrk(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i8* [ %0, %6 ], [ %2, %3 ]
ret i8* %9
}
/* Type definitions */
typedef void uint8_t;
typedef int uint64_t;

/* Variables and functions */
int sg_get_unaligned_be32(void const *);
uint64_t sg_get_unaligned_be64(const void *p) {
  return (uint64_t)sg_get_unaligned_be32(p) << 32 |
         sg_get_unaligned_be32((const uint8_t *)p + 4);
}


x86 assembly (clang, -O0):
<sg_get_unaligned_be64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sg_get_unaligned_be32@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
call   1030 <sg_get_unaligned_be32@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sg_get_unaligned_be64>:
push   %rbx
mov    %rdi,%rbx
call   1030 <sg_get_unaligned_be32@plt>
add    $0x4,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <sg_get_unaligned_be32@plt>

LLVM IR (-O0):
define i32 @sg_get_unaligned_be64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sg_get_unaligned_be32(i8* %3)
%5 = shl i32 %4, 32
%6 = load i8*, i8** %2
%7 = getelementptr i8, i8* %6, i64 4
%8 = call i32 @sg_get_unaligned_be32(i8* %7)
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @sg_get_unaligned_be64(i8* %0) {
%2 = tail call i32 @sg_get_unaligned_be32(i8* %0)
%3 = getelementptr i8, i8* %0, i64 4
%4 = tail call i32 @sg_get_unaligned_be32(i8* %3)
ret i32 poison
}
/* Variables and functions */
scalar_t__ EINTR;
int close(int);
scalar_t__ errno;
int zclose(int fd) {
  int ret;
  do {
    ret = close(fd);
  } while ((ret < 0) && (errno == EINTR));
  return ret;
  ;
}


x86 assembly (clang, -O0):
<zclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    114f <zclose+0x3f>
mov    0x2ea4(%rip),%rax
mov    (%rax),%rax
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    111b <zclose+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zclose>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%r14
mov    0x2eb3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <close@plt>
test   %eax,%eax
jns    1143 <zclose+0x33>
mov    (%r15),%rcx
cmp    %rcx,(%r14)
je     1130 <zclose+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zclose(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %2
%6 = call i32 @close(i32 %5)
store i32 %6, i32* %3
br label %7
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i64, i64* @errno
%12 = load i64, i64* @EINTR
%13 = icmp eq i64 %11, %12
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ false, %7 ], [ %13, %10 ]
br i1 %15, label %4, label %16
16: ; preds = %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zclose(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @close(i32 %0)
%4 = icmp slt i32 %3, 0
%5 = load i64, i64* @errno
%6 = load i64, i64* @EINTR
%7 = icmp eq i64 %5, %6
%8 = select i1 %4, i1 %7, i1 false
br i1 %8, label %2, label %9
9: ; preds = %2
ret i32 %3
}
void SysCtlLSIConfig(unsigned long ulLSIConfig) {

  ;
  (*((volatile unsigned long *)(0x40021024))) &= ~(0x00000001 | 0x01000000);
  (*((volatile unsigned long *)(0x40021024))) |= ulLSIConfig;
  while (!((*((volatile unsigned long *)(0x40021024))) & 0x00000002))
    ;
}


x86 assembly (clang, -O0):
<SysCtlLSIConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x40021024,%eax
mov    (%rax),%rcx
and    $0xfffffffffefffffe,%rcx
mov    $0x40021024,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    $0x40021024,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x40021024,%eax
mov    %rcx,(%rax)
mov    $0x40021024,%eax
mov    (%rax),%rax
and    $0x2,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1158 <SysCtlLSIConfig+0x58>
jmp    115d <SysCtlLSIConfig+0x5d>
jmp    1136 <SysCtlLSIConfig+0x36>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlLSIConfig>:
andq   $0xfffffffffefffffe,0x40021024
40 fe ff ff fe
or     %rdi,0x40021024
40
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
testq  $0x2,0x40021024
je     1120 <SysCtlLSIConfig+0x20>
ret

LLVM IR (-O0):
define void @SysCtlLSIConfig(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073877028 to i64*)
%4 = and i64 %3, -16777218
store volatile i64 %4, i64* inttoptr (i64 1073877028 to i64*)
%5 = load i64, i64* %2
%6 = load volatile i64, i64* inttoptr (i64 1073877028 to i64*)
%7 = or i64 %6, %5
store volatile i64 %7, i64* inttoptr (i64 1073877028 to i64*)
br label %8
8: ; preds = %13, %1
%9 = load volatile i64, i64* inttoptr (i64 1073877028 to i64*)
%10 = and i64 %9, 2
%11 = icmp ne i64 %10, 0
%12 = xor i1 %11, true
br i1 %12, label %13, label %14
13: ; preds = %8
br label %8
14: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @SysCtlLSIConfig(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1073877028 to i64*)
%3 = and i64 %2, -16777218
store volatile i64 %3, i64* inttoptr (i64 1073877028 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 1073877028 to i64*)
%5 = or i64 %4, %0
store volatile i64 %5, i64* inttoptr (i64 1073877028 to i64*)
br label %6
6: ; preds = %6, %1
%7 = load volatile i64, i64* inttoptr (i64 1073877028 to i64*)
%8 = and i64 %7, 2
%9 = icmp eq i64 %8, 0
br i1 %9, label %6, label %10
10: ; preds = %6
ret void
}
int visibility() { return 2; }


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

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

LLVM IR (-O0):
define i32 @visibility() {
ret i32 2
}

LLVM IR (-O2):
define i32 @visibility() {
ret i32 2
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int decode_utimes(struct tcb *, int /*<<< orphan*/);
int sys_utimes(struct tcb *tcp) { return decode_utimes(tcp, 0); }


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

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

LLVM IR (-O0):
%struct.tcb = type { i32 }
define i32 @sys_utimes(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 @decode_utimes(%struct.tcb* %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_utimes(%struct.tcb* %0) {
%2 = tail call i32 @decode_utimes(%struct.tcb* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i, v1 = 0, n = 100;
#pragma acc parallel loop reduction(+ : v1)
  for (i = 0; i < n; i++)
    v1++;
  assert(v1 == n);
#pragma acc kernels loop reduction(+ : v1)
  for (i = 0; i < n; i++)
    v1++;
  assert(v1 == n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x64,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1157 <main+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1194 <main+0x84>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <main+0x61>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 100, i32* %4
store i32 0, i32* %2
br label %5
5: ; preds = %12, %0
%6 = load i32, i32* %2
%7 = load i32, i32* %4
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %5
15: ; preds = %5
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = icmp eq i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
store i32 0, i32* %2
br label %21
21: ; preds = %28, %15
%22 = load i32, i32* %2
%23 = load i32, i32* %4
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %31
25: ; preds = %21
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %28
28: ; preds = %25
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %21
31: ; preds = %21
%32 = load i32, i32* %3
%33 = load i32, i32* %4
%34 = icmp eq i32 %32, %33
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
void nfs_freeaddrinfo(struct addrinfo *ai) {
  if (ai) {
    freeaddrinfo(ai);
  }
}


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

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

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
define void @nfs_freeaddrinfo(%struct.addrinfo* %0) {
%2 = alloca %struct.addrinfo*
store %struct.addrinfo* %0, %struct.addrinfo** %2
%3 = load %struct.addrinfo*, %struct.addrinfo** %2
%4 = icmp ne %struct.addrinfo* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.addrinfo*, %struct.addrinfo** %2
%7 = call i32 @freeaddrinfo(%struct.addrinfo* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
define void @nfs_freeaddrinfo(%struct.addrinfo* %0) {
%2 = icmp eq %struct.addrinfo* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @freeaddrinfo(%struct.addrinfo* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
void print(FILE *file, int size) {
  char buf[size];
  fgets(buf, size, file);
  printf("%s\n", buf);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
call   1040 <fgets@plt>
mov    -0x28(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %rdi,%rdx
mov    %esi,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   1040 <fgets@plt>
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @print(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %5
%10 = alloca i8, i64 %8
store i64 %8, i64* %6
%11 = load i32, i32* %4
%12 = load i32*, i32** %3
%13 = call i32 @fgets(i8* %10, i32 %11, i32* %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%15 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @print(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = alloca i8, i64 %3
%5 = call i32 @fgets(i8* %4, i32 %1, i32* %0)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
void d_delete(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<d_delete>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_delete>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.d_delete = [9 x i8] c"d_delete\00"
define void @d_delete() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.d_delete, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.d_delete = [9 x i8] c"d_delete\00"
define void @d_delete() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.d_delete, i64 0, i64 0))
ret void
}
/* Variables and functions */
int nc__create_mp(char const *, int, size_t, int /*<<< orphan*/, size_t *,
                  int *);
int nc__create(const char *path, int ioflags, size_t initialsz,
               size_t *chunksizehintp, int *ncid_ptr) {
  return nc__create_mp(path, ioflags, initialsz, 0, chunksizehintp, ncid_ptr);
}


x86 assembly (clang, -O0):
<nc__create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
xor    %ecx,%ecx
call   1030 <nc__create_mp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nc__create>:
mov    %r8,%r9
mov    %rcx,%r8
xor    %ecx,%ecx
jmp    1030 <nc__create_mp@plt>

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

LLVM IR (-O2):
define i32 @nc__create(i8* %0, i32 %1, i64 %2, i64* %3, i32* %4) {
%6 = tail call i32 @nc__create_mp(i8* %0, i32 %1, i64 %2, i32 0, i64* %3, i32* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ test_dylan_comment_entities();
int /*<<< orphan*/ test_dylan_comments();
void all_dylan_tests() {
  test_dylan_comments();
  test_dylan_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_dylan_tests() {
%1 = call i32 (...) @test_dylan_comments()
%2 = call i32 (...) @test_dylan_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_dylan_tests() {
%1 = tail call i32 (...) @test_dylan_comments()
%2 = tail call i32 (...) @test_dylan_comment_entities()
ret void
}
int iReturn(int i, int j, int n, int m) { return i * m + j; }


x86 assembly (clang, -O0):
<iReturn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iReturn>:
imul   %ecx,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @iReturn(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %8
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %6
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @iReturn(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %3, %0
%6 = add nsw i32 %5, %1
ret i32 %6
}
unsigned SEQ_FIRST_GTE_SECOND(unsigned seqno1, unsigned seqno2) {
  unsigned compare;
  compare = seqno1 - seqno2;
  if (compare < 0x7FFFFFFF)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<SEQ_FIRST_GTE_SECOND>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x7fffffff,-0x10(%rbp)
jae    112c <SEQ_FIRST_GTE_SECOND+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1133 <SEQ_FIRST_GTE_SECOND+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SEQ_FIRST_GTE_SECOND>:
sub    %esi,%edi
xor    %eax,%eax
cmp    $0x7fffffff,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @SEQ_FIRST_GTE_SECOND(i32 %0, i32 %1) {
%3 = sub i32 %0, %1
%4 = icmp ult i32 %3, 2147483647
%5 = zext i1 %4 to i32
ret i32 %5
}
int ack(int m, int n) {
  int ans;
  if (m == 0)
    ans = n + 1;
  else if (n == 0)
    ans = ack(m - 1, 1);
  else
    ans = ack(m - 1, ack(m, n - 1));
  return ans;
}


x86 assembly (clang, -O0):
<ack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1136 <ack+0x26>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1181 <ack+0x71>
cmpl   $0x0,-0x8(%rbp)
jne    1158 <ack+0x48>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    $0x1,%esi
call   1030 <ack@plt>
mov    %eax,-0xc(%rbp)
jmp    117c <ack+0x6c>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
call   1030 <ack@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <ack@plt>
mov    %eax,-0xc(%rbp)
jmp    1181 <ack+0x71>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ack>:
push   %rbx
mov    %esi,%eax
test   %edi,%edi
je     113f <ack+0x2f>
mov    %edi,%ebx
jmp    112a <ack+0x1a>
nopl   0x0(%rax,%rax,1)
mov    $0x1,%eax
add    $0xffffffff,%ebx
je     113f <ack+0x2f>
test   %eax,%eax
je     1120 <ack+0x10>
add    $0xffffffff,%eax
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <ack@plt>
add    $0xffffffff,%ebx
jne    112a <ack+0x1a>
add    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ack(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 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
store i32 %10, i32* %5
br label %27
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 1
%17 = call i32 @ack(i32 %16, i32 1)
store i32 %17, i32* %5
br label %26
18: ; preds = %11
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 1
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
%24 = call i32 @ack(i32 %21, i32 %23)
%25 = call i32 @ack(i32 %20, i32 %24)
store i32 %25, i32* %5
br label %26
26: ; preds = %18, %14
br label %27
27: ; preds = %26, %8
%28 = load i32, i32* %5
ret i32 %28
}

LLVM IR (-O2):
define i32 @ack(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %11, %2
%5 = phi i32 [ %1, %2 ], [ %12, %11 ]
%6 = add nsw i32 %5, 1
ret i32 %6
7: ; preds = %2, %11
%8 = phi i32 [ %12, %11 ], [ %1, %2 ]
%9 = phi i32 [ %13, %11 ], [ %0, %2 ]
%10 = icmp eq i32 %8, 0
br i1 %10, label %11, label %15
11: ; preds = %7, %15
%12 = phi i32 [ %17, %15 ], [ 1, %7 ]
%13 = add nsw i32 %9, -1
%14 = icmp eq i32 %13, 0
br i1 %14, label %4, label %7
15: ; preds = %7
%16 = add nsw i32 %8, -1
%17 = tail call i32 @ack(i32 %9, i32 %16)
br label %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  int x[4] = {1};
  if (x[0] != 1 || x[1] || x[2] || x[3]) {
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x20(%rbp)
jne    115d <main+0x4d>
cmpl   $0x0,-0x1c(%rbp)
jne    115d <main+0x4d>
cmpl   $0x0,-0x18(%rbp)
jne    115d <main+0x4d>
cmpl   $0x0,-0x14(%rbp)
je     1164 <main+0x54>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.x = [4 x i32] [i32 1, i32 0, i32 0, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
store i32 0, i32* %1
%3 = bitcast [4 x i32]* %2 to i8*
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 1
br i1 %6, label %19, label %7
7: ; preds = %0
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 1
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 2
%13 = load i32, i32* %12
%14 = icmp ne i32 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 3
%17 = load i32, i32* %16
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %15, %11, %7, %0
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
unsigned char msg_send(int, unsigned char *, int);
unsigned char ANT_Cmd55(unsigned char chan) { return msg_send(0x55, &chan, 1); }


x86 assembly (clang, -O0):
<ANT_Cmd55>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x55,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <msg_send@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANT_Cmd55>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x55,%edi
mov    $0x1,%edx
call   1030 <msg_send@plt>
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @ANT_Cmd55(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call zeroext i8 @msg_send(i32 85, i8* %2, i32 1)
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @ANT_Cmd55(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call zeroext i8 @msg_send(i32 85, i8* %2, i32 1)
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void canonicalEqual(int a, int b) {
  clang_analyzer_eval(a == b);
  if (a == b) {
    clang_analyzer_eval(b == a);
    return;
  }
  clang_analyzer_eval(a == b);
  clang_analyzer_eval(b == a);
}


x86 assembly (clang, -O0):
<canonicalEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1155 <canonicalEqual+0x45>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
jmp    117b <canonicalEqual+0x6b>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canonicalEqual>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
cmp    %esi,%ebx
sete   %dil
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%r14d
cmp    %ebp,%ebx
je     1139 <canonicalEqual+0x29>
xor    %r14d,%r14d
xor    %edi,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

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

LLVM IR (-O2):
define void @canonicalEqual(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @clang_analyzer_eval(i32 %4)
br i1 %3, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @clang_analyzer_eval(i32 0)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 0, %6 ], [ 1, %2 ]
%10 = tail call i32 @clang_analyzer_eval(i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(size_t *);
int /*<<< orphan*/ xcount_freed(size_t);
void oml_free(void *ptr) {
  if (ptr) {
    size_t *sptr = (size_t *)ptr - 1, size = *sptr;
    free(sptr);
    xcount_freed(size);
  }
}


x86 assembly (clang, -O0):
<oml_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1160 <oml_free+0x40>
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1040 <xcount_freed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oml_free>:
test   %rdi,%rdi
je     113c <oml_free+0x1c>
push   %rbx
mov    -0x8(%rdi),%rbx
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <xcount_freed@plt>
ret

LLVM IR (-O0):
define void @oml_free(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i64*
%10 = getelementptr inbounds i64, i64* %9, i64 -1
store i64* %10, i64** %3
%11 = load i64*, i64** %3
%12 = load i64, i64* %11
store i64 %12, i64* %4
%13 = load i64*, i64** %3
%14 = call i32 @free(i64* %13)
%15 = load i64, i64* %4
%16 = call i32 @xcount_freed(i64 %15)
br label %17
17: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @oml_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
%7 = tail call i32 @free(i64* %5)
%8 = tail call i32 @xcount_freed(i64 %6)
br label %9
9: ; preds = %3, %1
ret void
}
/* Variables and functions */
int kmem_generic(int, unsigned long, void *, unsigned int);
int kmem_read(unsigned long offset, void *buf, unsigned int count) {
  return kmem_generic(1, offset, buf, count);
}


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

x86 assembly (clang, -O2):
<kmem_read>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <kmem_generic@plt>

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

LLVM IR (-O2):
define i32 @kmem_read(i64 %0, i8* %1, i32 %2) {
%4 = tail call i32 @kmem_generic(i32 1, i64 %0, i8* %1, i32 %2)
ret i32 %4
}