xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_fdatasync;
int /*<<< orphan*/ SYS_fsync;
int errno;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/);
int usfs_fsync(uint64_t fh, int data_sync) {
  int ret = 0;
  if (data_sync > 0) {
    ret = syscall(SYS_fdatasync, fh);
  } else {
    ret = syscall(SYS_fsync, fh);
  }
  if (-1 == ret) {
    ret = errno;
  }
  return ret;
}


x86 assembly (clang, -O0):
<usfs_fsync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1148 <usfs_fsync+0x38>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>
mov    %eax,-0xc(%rbp)
jmp    115c <usfs_fsync+0x4c>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>
mov    %eax,-0xc(%rbp)
mov    $0xffffffff,%eax
cmp    -0xc(%rbp),%eax
jne    1176 <usfs_fsync+0x66>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usfs_fsync>:
push   %rax
mov    %edi,%eax
test   %esi,%esi
jle    1120 <usfs_fsync+0x10>
mov    0x2eb2(%rip),%rcx
jmp    1127 <usfs_fsync+0x17>
mov    0x2ec1(%rip),%rcx
mov    (%rcx),%edi
mov    %eax,%esi
call   1030 <syscall@plt>
cmp    $0xffffffff,%eax
jne    113e <usfs_fsync+0x2e>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@SYS_fdatasync = global i32 0
@SYS_fsync = global i32 0
@errno = global i32 0
define i32 @usfs_fsync(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
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @SYS_fdatasync
%10 = load i32, i32* %3
%11 = call i32 @syscall(i32 %9, i32 %10)
store i32 %11, i32* %5
br label %16
12: ; preds = %2
%13 = load i32, i32* @SYS_fsync
%14 = load i32, i32* %3
%15 = call i32 @syscall(i32 %13, i32 %14)
store i32 %15, i32* %5
br label %16
16: ; preds = %12, %8
%17 = load i32, i32* %5
%18 = icmp eq i32 -1, %17
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load i32, i32* @errno
store i32 %20, i32* %5
br label %21
21: ; preds = %19, %16
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
@SYS_fdatasync = global i32 0
@SYS_fsync = global i32 0
@errno = global i32 0
define i32 @usfs_fsync(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
%4 = load i32, i32* @SYS_fdatasync
%5 = load i32, i32* @SYS_fsync
%6 = select i1 %3, i32 %4, i32 %5
%7 = tail call i32 @syscall(i32 %6, i32 %0)
%8 = icmp eq i32 %7, -1
%9 = load i32, i32* @errno
%10 = select i1 %8, i32 %9, i32 %7
ret i32 %10
}
/* Variables and functions */
int lvm2_main(int, char **);
int main(int argc, char **argv) { return lvm2_main(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <lvm2_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @lvm2_main(i32 %0, i8** %1)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long root;
};
typedef TYPE_1__ XMotionEvent;

/* Variables and functions */
void set_XMotionEvent_root(void *_p, unsigned long _v) {
  ((XMotionEvent *)_p)->root = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XMotionEvent_root(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XMotionEvent_root(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int test_imm_A6uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xA6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A6uint64_highword_reg>:
movabs $0xa600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A6uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 712964571136
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *ret;
  ret = strdup(s);
  if (!ret) {
    fprintf(stderr, "%s:%d out of memory, ",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/mtsolekas/corgan/refs/heads/master/src/"
            "util.c",
            63);
    abort();
  }
  return ret;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117c <xstrdup+0x4c>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
lea    0xeab(%rip),%rdx
mov    $0x3f,%ecx
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <xstrdup+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
lea    0xec2(%rip),%rdx
mov    $0x3f,%ecx
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"%s:%d out of memory, \00"
@.str.1 = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mtsolekas/corgan/refs/heads/master/src/util.c\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 %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 63)
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"%s:%d out of memory, \00"
@.str.1 = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mtsolekas/corgan/refs/heads/master/src/util.c\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 %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 63)
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ XVisibilityEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XVisibilityEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XVisibilityEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XVisibilityEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XVisibilityEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XVisibilityEvent>:
test   %rdi,%rdi
je     112a <free_XVisibilityEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XVisibilityEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XVisibilityEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
signed char signedchar_ignoring_unsignedint(signed char x, unsigned int y) {
  return x;
}


x86 assembly (clang, -O0):
<signedchar_ignoring_unsignedint>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @signedchar_ignoring_unsignedint(i8 returned signext %0, i32 %1) {
ret i8 %0
}
/* Variables and functions */
int /*<<< orphan*/ ManualControlCommandHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void ManualControlCommandRequestUpdate() {
  UAVObjRequestUpdate(ManualControlCommandHandle());
}


x86 assembly (clang, -O0):
<ManualControlCommandRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ManualControlCommandHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ManualControlCommandRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <ManualControlCommandHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @ManualControlCommandRequestUpdate() {
%1 = call i32 (...) @ManualControlCommandHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ManualControlCommandRequestUpdate() {
%1 = tail call i32 (...) @ManualControlCommandHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
unsigned char is_space(char c) { return (c == ' ') || (c == '\t'); }


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_space+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%dil
sete   %cl
cmp    $0x9,%dil
sete   %al
or     %cl,%al
ret

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

LLVM IR (-O2):
define zeroext i8 @is_space(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i8
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ monitor_put(char);
void monitor_write(char *s) {
  int i = 0;
  while (s[i]) {
    monitor_put(s[i++]);
  }
}


x86 assembly (clang, -O0):
<monitor_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1155 <monitor_write+0x45>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <monitor_put@plt>
jmp    1123 <monitor_write+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<monitor_write>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <monitor_write+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <monitor_put@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <monitor_write+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @monitor_write(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = add nuw i64 %5, 1
%8 = tail call i32 @monitor_put(i8 signext %6)
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
int read(int file, char *ptr, int len) { return -1; }


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @read(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
ret i32 -1
}

LLVM IR (-O2):
define i32 @read(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
bool fileReadable(char *path) {
  if (access(path, R_OK)) {
    fprintf(stderr, "File %s is not readable\n", path);
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<fileReadable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1040 <access@plt>
cmp    $0x0,%rax
je     116d <fileReadable+0x4d>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1174 <fileReadable+0x54>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileReadable>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
call   1040 <access@plt>
test   %rax,%rax
je     1153 <fileReadable+0x33>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@R_OK = global i32 0
@stderr = global i32 0
@.str = [25 x i8] c"File %s is not readable\0A\00"
define i32 @fileReadable(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @R_OK
%6 = call i64 @access(i8* %4, i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %3
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %10)
store i32 0, i32* %2
br label %13
12: ; preds = %1
store i32 1, i32* %2
br label %13
13: ; preds = %12, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@R_OK = global i32 0
@stderr = global i32 0
@.str = [25 x i8] c"File %s is not readable\0A\00"
define i32 @fileReadable(i8* %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ 0, %5 ], [ 1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ test_copy();
int /*<<< orphan*/ test_cut();
int /*<<< orphan*/ test_import();
int /*<<< orphan*/ test_new();
int /*<<< orphan*/ test_replace();
int /*<<< orphan*/ test_search();
int /*<<< orphan*/ test_split();
int /*<<< orphan*/ test_tail_head();
int main(void) {
  test_new();
  test_import();
  test_split();
  test_replace();
  test_copy();
  test_cut();
  test_search();
  test_tail_head();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <test_new@plt>
mov    $0x0,%al
call   1050 <test_import@plt>
mov    $0x0,%al
call   1070 <test_split@plt>
mov    $0x0,%al
call   1040 <test_replace@plt>
mov    $0x0,%al
call   1030 <test_copy@plt>
mov    $0x0,%al
call   10a0 <test_cut@plt>
mov    $0x0,%al
call   1080 <test_search@plt>
mov    $0x0,%al
call   1060 <test_tail_head@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1090 <test_new@plt>
xor    %eax,%eax
call   1050 <test_import@plt>
xor    %eax,%eax
call   1070 <test_split@plt>
xor    %eax,%eax
call   1040 <test_replace@plt>
xor    %eax,%eax
call   1030 <test_copy@plt>
xor    %eax,%eax
call   10a0 <test_cut@plt>
xor    %eax,%eax
call   1080 <test_search@plt>
xor    %eax,%eax
call   1060 <test_tail_head@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_new()
%3 = call i32 (...) @test_import()
%4 = call i32 (...) @test_split()
%5 = call i32 (...) @test_replace()
%6 = call i32 (...) @test_copy()
%7 = call i32 (...) @test_cut()
%8 = call i32 (...) @test_search()
%9 = call i32 (...) @test_tail_head()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_new()
%2 = tail call i32 (...) @test_import()
%3 = tail call i32 (...) @test_split()
%4 = tail call i32 (...) @test_replace()
%5 = tail call i32 (...) @test_copy()
%6 = tail call i32 (...) @test_cut()
%7 = tail call i32 (...) @test_search()
%8 = tail call i32 (...) @test_tail_head()
ret i32 0
}
void f2_enum() {
  enum E1;
  enum E1 *e1;
  enum E1 { A = 4, B };
  enum E1 e2;
  enum E1 e3;
  e1 = &e3;
  *e1 = B;
  e2 = B;
}


x86 assembly (clang, -O0):
<f2_enum>:
push   %rbp
mov    %rsp,%rbp
lea    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x5,(%rax)
movl   $0x5,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f2_enum() {
ret void
}
int cdrom_dirent_close(struct fs_dirent *d) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.fs_dirent = type opaque
define i32 @cdrom_dirent_close(%struct.fs_dirent* nocapture readnone %0) {
ret i32 0
}
int devide(int num, int divider) {
  int result = num / divider;
  int a, b, c, d, i;
  double e, f, g, h;
  for (i = 0; i < 5010; ++i) {
    a = 10;
    b = 5;
    c = a / b;
    d = 5;
    a = d / a;
    e = 20.23;
    f = 10.12;
    g = e / f;
    h = e;
    f = f / h;
  }
  return result;
}


x86 assembly (clang, -O0):
<devide>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x1392,-0x20(%rbp)
jge    11a1 <devide+0xa1>
movl   $0xa,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x18(%rbp)
movl   $0x5,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x10(%rbp)
movsd  0xeaf(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    111b <devide+0x1b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<devide>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @devide(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = sdiv i32 %15, %16
store i32 %17, i32* %5
store i32 0, i32* %10
br label %18
18: ; preds = %35, %2
%19 = load i32, i32* %10
%20 = icmp slt i32 %19, 5010
br i1 %20, label %21, label %38
21: ; preds = %18
store i32 10, i32* %6
store i32 5, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = sdiv i32 %22, %23
store i32 %24, i32* %8
store i32 5, i32* %9
%25 = load i32, i32* %9
%26 = load i32, i32* %6
%27 = sdiv i32 %25, %26
store i32 %27, i32* %6
store double 2.023000e+01, double* %11
store double 1.012000e+01, double* %12
%28 = load double, double* %11
%29 = load double, double* %12
%30 = fdiv double %28, %29
store double %30, double* %13
%31 = load double, double* %11
store double %31, double* %14
%32 = load double, double* %12
%33 = load double, double* %14
%34 = fdiv double %32, %33
store double %34, double* %12
br label %35
35: ; preds = %21
%36 = load i32, i32* %10
%37 = add nsw i32 %36, 1
store i32 %37, i32* %10
br label %18
38: ; preds = %18
%39 = load i32, i32* %5
ret i32 %39
}

LLVM IR (-O2):
define i32 @devide(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
const char *yaml_get_version_string(void) { return "0.1.7"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"0.1.7\00"
define i8* @yaml_get_version_string() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"0.1.7\00"
define i8* @yaml_get_version_string() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ DriveFlagMotor(int /*<<< orphan*/);
void StopFlagMotor() { DriveFlagMotor(0); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ writel(int /*<<< orphan*/, void *);
void write_pxpat0c(unsigned port, uint32_t value) {
  writel(value, (void *)0xb0010000 + (port * 0x100) + (0x48));
}


x86 assembly (clang, -O0):
<write_pxpat0c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,%eax
mov    $0xb0010000,%esi
add    %rax,%rsi
add    $0x48,%rsi
call   1030 <writel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pxpat0c>:
mov    %esi,%eax
shl    $0x8,%edi
mov    $0xb0010048,%esi
add    %rdi,%rsi
mov    %eax,%edi
jmp    1030 <writel@plt>

LLVM IR (-O0):
define void @write_pxpat0c(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul i32 %6, 256
%8 = zext i32 %7 to i64
%9 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %8
%10 = getelementptr i8, i8* %9, i64 72
%11 = call i32 @writel(i32 %5, i8* %10)
ret void
}

LLVM IR (-O2):
define void @write_pxpat0c(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = zext i32 %3 to i64
%5 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %4
%6 = getelementptr i8, i8* %5, i64 72
%7 = tail call i32 @writel(i32 %1, i8* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int _doscan(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int vscanf(const char *fmt, va_list ap) { return _doscan(stdin, fmt, ap); }


x86 assembly (clang, -O0):
<vscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <_doscan@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vscanf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
jmp    1030 <_doscan@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @vscanf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdin
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @_doscan(i32 %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @vscanf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @_doscan(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int vectors_equal(int *, int *, int, int);
int test_integer() {
  int x[] = {1, 2, 3, 4, 5};
  int y[] = {1, 3, 2, 4, 6};
  return vectors_equal(x, y, 6, sizeof(int));
}


x86 assembly (clang, -O0):
<test_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xee2(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xedf(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xedd(%rip),%eax
mov    %eax,-0x30(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x6,%edx
mov    $0x4,%ecx
call   1030 <vectors_equal@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_integer>:
sub    $0x38,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0xf00(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x6,%edx
mov    $0x4,%ecx
call   1030 <vectors_equal@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.test_integer.x = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.test_integer.y = [5 x i32] [i32 1, i32 3, i32 2, i32 4, i32 6]
define i32 @test_integer() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = bitcast [5 x i32]* %1 to i8*
%4 = bitcast [5 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%7 = call i32 @vectors_equal(i32* %5, i32* %6, i32 6, i32 4)
ret i32 %7
}

LLVM IR (-O2):
@__const.test_integer.x = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.test_integer.y = [5 x i32] [i32 1, i32 3, i32 2, i32 4, i32 6]
define i32 @test_integer() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = bitcast [5 x i32]* %1 to i8*
%4 = bitcast [5 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%7 = call i32 @vectors_equal(i32* %5, i32* %6, i32 6, i32 4)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ EC_GROUP;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *, void **,
                                      int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_ECPARAMETERS;
scalar_t__ d2i_ECPKParameters;
EC_GROUP *PEM_read_bio_ECPKParameters(BIO *bp, EC_GROUP **x,
                                      pem_password_cb *cb, void *u) {
  return PEM_ASN1_read_bio((d2i_of_void *)d2i_ECPKParameters,
                           PEM_STRING_ECPARAMETERS, bp, (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_bio_ECPKParameters>:
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    0x2eb1(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read_bio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_bio_ECPKParameters>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebd(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read_bio@plt>

LLVM IR (-O0):
@d2i_ECPKParameters = global i64 0
@PEM_STRING_ECPARAMETERS = global i32 0
define i32* @PEM_read_bio_ECPKParameters(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_ECPKParameters
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_ECPARAMETERS
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read_bio(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_ECPKParameters = global i64 0
@PEM_STRING_ECPARAMETERS = global i32 0
define i32* @PEM_read_bio_ECPKParameters(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_ECPKParameters
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_ECPARAMETERS
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read_bio(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
/* Variables and functions */
int /*<<< orphan*/ spiralPrint(int, int, int **);
int main() {
  int a[3][6] = {
      {1, 2, 3, 4, 5, 6}, {7, 8, 9, 10, 11, 12}, {13, 14, 15, 16, 17, 18}};
  spiralPrint(3, 6, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x48,%edx
call   1030 <memcpy@plt>
lea    -0x50(%rbp),%rdx
mov    $0x3,%edi
mov    $0x6,%esi
call   1040 <spiralPrint@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    0xf25(%rip),%rax
mov    %rax,0x40(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <spiralPrint@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [3 x [6 x i32]] [[6 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6], [6 x i32] [i32 7, i32 8, i32 9, i32 10, i32 11, i32 12], [6 x i32] [i32 13, i32 14, i32 15, i32 16, i32 17, i32 18]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [6 x i32]]
store i32 0, i32* %1
%3 = bitcast [3 x [6 x i32]]* %2 to i8*
%4 = getelementptr inbounds [3 x [6 x i32]], [3 x [6 x i32]]* %2, i64 0, i64 0
%5 = bitcast [6 x i32]* %4 to i32**
%6 = call i32 @spiralPrint(i32 3, i32 6, i32** %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [3 x [6 x i32]] [[6 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6], [6 x i32] [i32 7, i32 8, i32 9, i32 10, i32 11, i32 12], [6 x i32] [i32 13, i32 14, i32 15, i32 16, i32 17, i32 18]]
define i32 @main() {
%1 = alloca [3 x [6 x i32]]
%2 = bitcast [3 x [6 x i32]]* %1 to i8*
%3 = bitcast [3 x [6 x i32]]* %1 to i32**
%4 = call i32 @spiralPrint(i32 3, i32 6, i32** %3)
ret i32 0
}
void *fproxy(struct s1 *arg) { return (void *)arg; }


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

x86 assembly (clang, -O2):
<fproxy>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.s1 = type opaque
define i8* @fproxy(%struct.s1* %0) {
%2 = alloca %struct.s1*
store %struct.s1* %0, %struct.s1** %2
%3 = load %struct.s1*, %struct.s1** %2
%4 = bitcast %struct.s1* %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
%struct.s1 = type opaque
define i8* @fproxy(%struct.s1* readnone %0) {
%2 = bitcast %struct.s1* %0 to i8*
ret i8* %2
}
void glProgramUniform3fv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glProgramUniform3fv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gameplay_bombs_update();
int /*<<< orphan*/ gameplay_fire_update();
int /*<<< orphan*/ gameplay_items_item_update();
int /*<<< orphan*/ gameplay_players_ai_update();
int /*<<< orphan*/ gameplay_players_update();
void gameplay_update(void) {
  gameplay_fire_update();
  gameplay_players_update();
  gameplay_bombs_update();
  gameplay_players_ai_update();
  gameplay_items_item_update();
}


x86 assembly (clang, -O0):
<gameplay_update>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <gameplay_fire_update@plt>
mov    $0x0,%al
call   1060 <gameplay_players_update@plt>
mov    $0x0,%al
call   1040 <gameplay_bombs_update@plt>
mov    $0x0,%al
call   1030 <gameplay_players_ai_update@plt>
mov    $0x0,%al
call   1070 <gameplay_items_item_update@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gameplay_update>:
push   %rax
xor    %eax,%eax
call   1050 <gameplay_fire_update@plt>
xor    %eax,%eax
call   1060 <gameplay_players_update@plt>
xor    %eax,%eax
call   1040 <gameplay_bombs_update@plt>
xor    %eax,%eax
call   1030 <gameplay_players_ai_update@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <gameplay_items_item_update@plt>

LLVM IR (-O0):
define void @gameplay_update() {
%1 = call i32 (...) @gameplay_fire_update()
%2 = call i32 (...) @gameplay_players_update()
%3 = call i32 (...) @gameplay_bombs_update()
%4 = call i32 (...) @gameplay_players_ai_update()
%5 = call i32 (...) @gameplay_items_item_update()
ret void
}

LLVM IR (-O2):
define void @gameplay_update() {
%1 = tail call i32 (...) @gameplay_fire_update()
%2 = tail call i32 (...) @gameplay_players_update()
%3 = tail call i32 (...) @gameplay_bombs_update()
%4 = tail call i32 (...) @gameplay_players_ai_update()
%5 = tail call i32 (...) @gameplay_items_item_update()
ret void
}
void myexit(int s) {
_EXIT:
  goto _EXIT;
}


x86 assembly (clang, -O0):
<myexit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <myexit+0x7>

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

LLVM IR (-O0):
define void @myexit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
}

LLVM IR (-O2):
define void @myexit(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int new_socket() { return socket(AF_INET, SOCK_STREAM, 0); }


x86 assembly (clang, -O0):
<new_socket>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_socket>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @new_socket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @new_socket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ LONG_MAX;
char *dbg_strndup(char const *, int /*<<< orphan*/);
char *dbg_strdup(const char *str) { return dbg_strndup(str, LONG_MAX); }


x86 assembly (clang, -O0):
<dbg_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <dbg_strndup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_strdup>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <dbg_strndup@plt>

LLVM IR (-O0):
@LONG_MAX = global i32 0
define i8* @dbg_strdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @LONG_MAX
%5 = call i8* @dbg_strndup(i8* %3, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
@LONG_MAX = global i32 0
define i8* @dbg_strdup(i8* %0) {
%2 = load i32, i32* @LONG_MAX
%3 = tail call i8* @dbg_strndup(i8* %0, i32 %2)
ret i8* %3
}
int exynos_gpufreq_lock(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @exynos_gpufreq_lock() {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t mem_arm2vc(const uint32_t address) { return address | 0xC0000000; }


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

x86 assembly (clang, -O2):
<mem_arm2vc>:
mov    %edi,%eax
or     $0xc0000000,%eax
ret

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

LLVM IR (-O2):
define i32 @mem_arm2vc(i32 %0) {
%2 = or i32 %0, -1073741824
ret i32 %2
}
extern int link(char *cOld_UNUSED __attribute__((__unused__)),
                char *cNew_UNUSED __attribute__((__unused__))) {
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @link(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
char *RCSid() {
  return RCSid("$Id: show.c,v 1.261.2.4 2012/10/13 18:30:47 sfeam Exp $");
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"$Id: show.c,v 1.261.2.4 2012/10/13 18:30:47 sfeam Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
int fun1042() { return 1042; }


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

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

LLVM IR (-O0):
define i32 @fun1042() {
ret i32 1042
}

LLVM IR (-O2):
define i32 @fun1042() {
ret i32 1042
}
int AND_ASSIGN(int x, int y) { return x &= y; }


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

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

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

LLVM IR (-O2):
define i32 @AND_ASSIGN(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
extern unsigned char inb_p(unsigned short port) {
  unsigned char _v;
  __asm__ __volatile__("in"
                       "b"
                       " %"
                       "w"
                       "1,%"
                       ""
                       "0"
                       "\noutb %%al,$0x80"
                       : "=a"(_v)
                       : "Nd"(port));
  return _v;
}


x86 assembly (clang, -O0):
<inb_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
out    %al,$0x80
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb_p>:
mov    %edi,%edx
in     (%dx),%al
out    %al,$0x80
ret

LLVM IR (-O0):
define zeroext i8 @inb_p(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb ${1:w},$0\0Aoutb %al,$$0x80", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb_p(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb ${1:w},$0\0Aoutb %al,$$0x80", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
/* Variables and functions */
scalar_t__ strerror(int);
const char *le_strerror(int err) { return (const char *)strerror(err); }


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

x86 assembly (clang, -O2):
<le_strerror>:
jmp    1030 <strerror@plt>

LLVM IR (-O0):
define i8* @le_strerror(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @strerror(i32 %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @le_strerror(i32 %0) {
%2 = tail call i64 @strerror(i32 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *tb(void *arg) {
  (void)arg;
  printf("tb: running\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"tb: running\00"
define noalias i8* @tb(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ perror(char const *);
FILE *open_or_exit(const char *fname, const char *mode) {
  FILE *f = fopen(fname, mode);
  if (f == NULL) {
    perror(fname);
    exit(EXIT_FAILURE);
  }
  return f;
}


x86 assembly (clang, -O0):
<open_or_exit>:
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   1030 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1173 <open_or_exit+0x43>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_or_exit>:
push   %rbx
mov    %rdi,%rbx
call   1030 <fopen@plt>
test   %rax,%rax
je     1140 <open_or_exit+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32* @open_or_exit(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* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @perror(i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %2
%17 = load i32*, i32** %5
ret i32* %17
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define noalias i32* @open_or_exit(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret i32* %3
}