xunge/DecIR huggingface dataset:
void byteswap(char *a, char *b) {
  char c = *a;
  *a = *b;
  *b = c;
}


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

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

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

LLVM IR (-O2):
define void @byteswap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ crash_handler(unsigned int *, int /*<<< orphan*/);
void crash_handler_prefetch(unsigned int *context, int unused1, int unused2) {
  crash_handler(context, 0);
}


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

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

LLVM IR (-O0):
define void @crash_handler_prefetch(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = call i32 @crash_handler(i32* %7, i32 0)
ret void
}

LLVM IR (-O2):
define void @crash_handler_prefetch(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @crash_handler(i32* %0, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ getAbsoValue(int);
int absoCompare(int a, int b) {
  if (getAbsoValue(a) > getAbsoValue(b))
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<absoCompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <getAbsoValue@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <getAbsoValue@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jle    114d <absoCompare+0x3d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <absoCompare+0x43>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<absoCompare>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <getAbsoValue@plt>
mov    %rax,%r14
mov    %ebx,%edi
call   1030 <getAbsoValue@plt>
cmp    %rax,%r14
cmovg  %ebp,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @absoCompare(i32 %0, i32 %1) {
%3 = tail call i64 @getAbsoValue(i32 %0)
%4 = tail call i64 @getAbsoValue(i32 %1)
%5 = icmp sgt i64 %3, %4
%6 = select i1 %5, i32 %0, i32 %1
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
void mpu_ll_set_region_x(uint32_t addr) { abort(); }


x86 assembly (clang, -O0):
<mpu_ll_set_region_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<mpu_ll_set_region_x>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @mpu_ll_set_region_x(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @mpu_ll_set_region_x(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ putch(unsigned char);
int strlen(unsigned char *);
void kputs(unsigned char *text) {
  int i;
  for (i = 0; i < strlen(text); i++) {
    putch(text[i]);
  }
}


x86 assembly (clang, -O0):
<kputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116e <kputs+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1040 <putch@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <kputs+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kputs>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    115d <kputs+0x3d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%edi
call   1040 <putch@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <kputs+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @kputs(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @putch(i8 zeroext %7)
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret void
}
void rop3_12_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = ~T;
  stk1 = S & stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_12_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_12_0_0>:
not    %dl
and    %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_12_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = xor i32 %10, -1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %8
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = and i32 %14, %16
%18 = trunc i32 %17 to i8
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = load i8*, i8** %4
store i8 %19, i8* %20
ret void
}

LLVM IR (-O2):
define void @rop3_12_0_0(i8* nocapture writeonly %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, -1
%5 = and i8 %4, %1
store i8 %5, i8* %0
ret void
}
void S_UpdateThread(void) {}


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

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

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

LLVM IR (-O2):
define void @S_UpdateThread() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_isr_handler();
__attribute__((weak)) void udma_error_isr_handler(void) {
  default_isr_handler();
}


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

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

LLVM IR (-O0):
define weak void @udma_error_isr_handler() {
%1 = call i32 (...) @default_isr_handler()
ret void
}

LLVM IR (-O2):
define weak void @udma_error_isr_handler() {
%1 = tail call i32 (...) @default_isr_handler()
ret void
}
void rop3_131_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = ~S;
  stk3 = *D | stk4;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_131_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_131_0_0>:
mov    %esi,%eax
not    %al
or     (%rdi),%al
and    %dl,%al
xor    %sil,%al
not    %al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_131_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %10
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %10
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %9
%22 = load i8, i8* %6
%23 = zext i8 %22 to i32
%24 = load i8, i8* %9
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = load i8, i8* %8
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = trunc i32 %36 to i8
store i8 %37, i8* %7
%38 = load i8, i8* %7
%39 = load i8*, i8** %4
store i8 %38, i8* %39
ret void
}

LLVM IR (-O2):
define void @rop3_131_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = and i8 %6, %2
%8 = xor i8 %7, %1
%9 = xor i8 %8, -1
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initialize();
int /*<<< orphan*/ pre_initialize();
int /*<<< orphan*/ process_args(int, char **);
int send_files();
int main(int argc, char *argv[]) {
  int rval;
  pre_initialize();
  process_args(argc, argv);
  initialize();
  rval = send_files();
  return rval ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <pre_initialize@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <process_args@plt>
mov    $0x0,%al
call   1050 <initialize@plt>
mov    $0x0,%al
call   1030 <send_files@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <pre_initialize@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <process_args@plt>
xor    %eax,%eax
call   1050 <initialize@plt>
xor    %eax,%eax
call   1030 <send_files@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @pre_initialize()
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @process_args(i32 %8, i8** %9)
%11 = call i32 (...) @initialize()
%12 = call i32 (...) @send_files()
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
ret i32 %16
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @pre_initialize()
%4 = tail call i32 @process_args(i32 %0, i8** %1)
%5 = tail call i32 (...) @initialize()
%6 = tail call i32 (...) @send_files()
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ BackupPC();
int /*<<< orphan*/ Exception(int);
void DoPrivilegeViolation(void) {
  BackupPC();
  Exception(8);
}


x86 assembly (clang, -O0):
<DoPrivilegeViolation>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <BackupPC@plt>
mov    $0x8,%edi
call   1030 <Exception@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoPrivilegeViolation>:
push   %rax
xor    %eax,%eax
call   1040 <BackupPC@plt>
mov    $0x8,%edi
pop    %rax
jmp    1030 <Exception@plt>

LLVM IR (-O0):
define void @DoPrivilegeViolation() {
%1 = call i32 (...) @BackupPC()
%2 = call i32 @Exception(i32 8)
ret void
}

LLVM IR (-O2):
define void @DoPrivilegeViolation() {
%1 = tail call i32 (...) @BackupPC()
%2 = tail call i32 @Exception(i32 8)
ret void
}
int test_imm_D9int64_lowword_reg(long long val) {
  return ((val) & (0xD9 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D9int64_lowword_reg>:
test   $0xd9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D9int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 217
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int remove(char *);
void removeEmptyFile(void) {
  char destination[] = "Database/profile/empty";
  int ret = remove(destination);
}


x86 assembly (clang, -O0):
<removeEmptyFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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    0xed6(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xece(%rip),%al
mov    %al,-0xa(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <remove@plt>
mov    %eax,-0x24(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeEmptyFile>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x7974706d652f65,%rax
mov    %rax,0xf(%rsp)
mov    %rsp,%rdi
call   1030 <remove@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.removeEmptyFile.destination = [23 x i8] c"Database/profile/empty\00"
define void @removeEmptyFile() {
%1 = alloca [23 x i8]
%2 = alloca i32
%3 = bitcast [23 x i8]* %1 to i8*
%4 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%5 = call i32 @remove(i8* %4)
store i32 %5, i32* %2
ret void
}

LLVM IR (-O2):
@__const.removeEmptyFile.destination = [23 x i8] c"Database/profile/empty\00"
define void @removeEmptyFile() {
%1 = alloca [23 x i8]
%2 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%3 = call i32 @remove(i8* %2)
ret void
}
void gtk_text_view_get_type() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int saferFork();
int main() {
  pid_t forkVal = saferFork();
  printf("forkVal=%d\n", forkVal);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <saferFork@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"forkVal=%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @saferFork()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void tw1_output_int(void *p1) { printf("%u", *(unsigned int *)p1); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define void @tw1_output_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
void ble_rsp_system_endpoint_set_watermarks(
    const struct ble_msg_system_endpoint_set_watermarks_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_system_endpoint_set_watermarks_rsp_t = type opaque
define void @ble_rsp_system_endpoint_set_watermarks(%struct.ble_msg_system_endpoint_set_watermarks_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_graphic(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  print_graphic(num);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <print_graphic@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @print_graphic(i32 %4)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t a52e_get_fscod2(const uint8_t *p_a52) { return (p_a52[4] & 0x30) >> 4; }


x86 assembly (clang, -O0):
<a52e_get_fscod2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
and    $0x30,%eax
sar    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a52e_get_fscod2>:
mov    0x10(%rdi),%eax
shr    $0x4,%eax
and    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @a52e_get_fscod2(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = and i32 %5, 48
%7 = ashr i32 %6, 4
ret i32 %7
}

LLVM IR (-O2):
define i32 @a52e_get_fscod2(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = lshr i32 %3, 4
%5 = and i32 %4, 3
ret i32 %5
}
/* Variables and functions */
size_t _strlen(const char *s) {
  size_t i;
  for (i = 0; s[i]; ++i)
    ;
  return i;
}


x86 assembly (clang, -O0):
<_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1138 <_strlen+0x38>
jmp    1127 <_strlen+0x27>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <_strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <_strlen+0x10>
ret

LLVM IR (-O0):
define i64 @_strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %4
4: ; preds = %11, %1
%5 = load i8*, i8** %2
%6 = load i64, i64* %3
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %4
br label %11
11: ; preds = %10
%12 = load i64, i64* %3
%13 = add i64 %12, 1
store i64 %13, i64* %3
br label %4
14: ; preds = %4
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
define i64 @_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int random();
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void Generate_list(int a[], int n) {
  int i;
  srandom(time(NULL));
  for (i = 0; i < n; i++)
    a[i] = random() % 100;
}


x86 assembly (clang, -O0):
<Generate_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118a <Generate_list+0x5a>
mov    $0x0,%al
call   1050 <random@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <Generate_list+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Generate_list>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
test   %ebp,%ebp
jle    117f <Generate_list+0x4f>
mov    %ebp,%ebp
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1050 <random@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <Generate_list+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @Generate_list(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = call i32 @time(i32* null)
%7 = call i32 @srandom(i32 %6)
store i32 0, i32* %5
br label %8
8: ; preds = %19, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = call i32 (...) @random()
%14 = srem i32 %13, 100
%15 = load i32*, i32** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
store i32 %14, i32* %18
br label %19
19: ; preds = %12
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %8
22: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @Generate_list(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srandom(i32 %3)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %15
6: ; preds = %2
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = tail call i32 (...) @random()
%11 = srem i32 %10, 100
%12 = getelementptr inbounds i32, i32* %0, i64 %9
store i32 %11, i32* %12
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ehrpwm_write(int /*<<< orphan*/, int, int);
int ehrpwm_tz_clr_int_status(uint8_t module) {
  ehrpwm_write(module, 0x2E, 0x1);
  return 0;
}


x86 assembly (clang, -O0):
<ehrpwm_tz_clr_int_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2e,%esi
mov    $0x1,%edx
call   1030 <ehrpwm_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_tz_clr_int_status>:
push   %rax
mov    $0x2e,%esi
mov    $0x1,%edx
call   1030 <ehrpwm_write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ehrpwm_tz_clr_int_status(i32 %0) {
%2 = tail call i32 @ehrpwm_write(i32 %0, i32 46, i32 1)
ret i32 0
}
void LedsP$Led1$clr(void) { NoPinC$0$GeneralIO$clr(); }


x86 assembly (clang, -O0):
<LedsP$Led1$clr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <NoPinC$0$GeneralIO$clr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedsP$Led1$clr>:
xor    %eax,%eax
jmp    1030 <NoPinC$0$GeneralIO$clr@plt>

LLVM IR (-O0):
define void @"LedsP$Led1$clr"() {
%1 = call i32 (...) @"NoPinC$0$GeneralIO$clr"()
ret void
}

LLVM IR (-O2):
define void @"LedsP$Led1$clr"() {
%1 = tail call i32 (...) @"NoPinC$0$GeneralIO$clr"()
ret void
}
/* Variables and functions */
unsigned int getNthUglyNo(int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, unsigned int);
int main() {
  unsigned no = getNthUglyNo(150);
  printf("150th ugly no. is %d ", no);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x96,%edi
call   1050 <getNthUglyNo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x96,%edi
call   1050 <getNthUglyNo@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"150th ugly no. is %d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @getNthUglyNo(i32 150)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"150th ugly no. is %d \00"
define i32 @main() {
%1 = tail call i32 @getNthUglyNo(i32 150)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ func_13(int, char *, unsigned long);
void func_12(int a, char *b, unsigned long c) { func_13(a, b, c); }


x86 assembly (clang, -O0):
<func_12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <func_13@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_12>:
jmp    1030 <func_13@plt>

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

LLVM IR (-O2):
define void @func_12(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @func_13(i32 %0, i8* %1, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS)
    stream = stdout;
  fprintf(stream, "Usage: %s <declaration>\n", ("cdecl"));
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%eax
jne    1159 <helpAndLeave+0x39>
mov    0x2e86(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe9c(%rip),%rsi
lea    0xeae(%rip),%rdx
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
cmp    %edi,(%rax)
jne    1137 <helpAndLeave+0x17>
mov    0x2ea3(%rip),%rax
jmp    113e <helpAndLeave+0x1e>
mov    0x2ea2(%rip),%rax
mov    (%rax),%rdi
lea    0xeb8(%rip),%rsi
lea    0xeca(%rip),%rdx
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [25 x i8] c"Usage: %s <declaration>\0A\00"
@.str.1 = [6 x i8] c"cdecl\00"
define void @helpAndLeave(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32*, i32** @stderr
store i32* %4, i32** %3
%5 = load i32, i32* %2
%6 = load i32, i32* @EXIT_SUCCESS
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32*, i32** @stdout
store i32* %9, i32** %3
br label %10
10: ; preds = %8, %1
%11 = load i32*, i32** %3
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* %2
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [25 x i8] c"Usage: %s <declaration>\0A\00"
@.str.1 = [6 x i8] c"cdecl\00"
define void @helpAndLeave(i32 %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = icmp eq i32 %2, %0
%4 = load i32*, i32** @stdout
%5 = load i32*, i32** @stderr
%6 = select i1 %3, i32* %4, i32* %5
%7 = tail call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @exit(i32 %0)
unreachable
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  long long quot;
  long long rem;
};
typedef TYPE_1__ lldiv_t;

/* Variables and functions */
lldiv_t lldiv(long long numerator, long long denominator) {
  lldiv_t x;
  x.quot = numerator / denominator;
  x.rem = numerator - x.quot * denominator;
  return x;
}


x86 assembly (clang, -O0):
<lldiv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rdx
imul   %rdx,%rcx
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<lldiv>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <lldiv+0x15>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
define { i64, i64 } @lldiv(i64 %0, i64 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = sdiv i64 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i64 %8, i64* %9
%10 = load i64, i64* %4
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%12 = load i64, i64* %11
%13 = load i64, i64* %5
%14 = mul nsw i64 %12, %13
%15 = sub nsw i64 %10, %14
%16 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i64 %15, i64* %16
%17 = bitcast %struct.TYPE_3__* %3 to { i64, i64 }*
%18 = load { i64, i64 }, { i64, i64 }* %17
ret { i64, i64 } %18
}

LLVM IR (-O2):
define { i64, i64 } @lldiv(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
%4 = mul nsw i64 %3, %1
%5 = srem i64 %0, %1
%6 = insertvalue { i64, i64 } poison, i64 %3, 0
%7 = insertvalue { i64, i64 } %6, i64 %5, 1
ret { i64, i64 } %7
}
void gs_shell_open(long display) {}


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

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

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

LLVM IR (-O2):
define void @gs_shell_open(i64 %0) {
ret void
}
void RTG() {}


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

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

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

LLVM IR (-O2):
define void @RTG() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void __aeabi_unwind_cpp_pr0(void) { panic("__aeabi_unwind_cpp_pr0()\n"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"__aeabi_unwind_cpp_pr0()\0A\00"
define void @__aeabi_unwind_cpp_pr0() {
%1 = call i32 @panic(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"__aeabi_unwind_cpp_pr0()\0A\00"
define void @__aeabi_unwind_cpp_pr0() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
int mod_64(int i) {
  while (i < 0)
    i += 64;
  return (i % 64);
}


x86 assembly (clang, -O0):
<mod_64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111f <mod_64+0x1f>
mov    -0x4(%rbp),%eax
add    $0x40,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <mod_64+0x7>
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_64>:
mov    %edi,%eax
and    $0x3f,%eax
ret

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

LLVM IR (-O2):
define i32 @mod_64(i32 %0) {
%2 = and i32 %0, 63
ret i32 %2
}
/* Variables and functions */
char *_ulltoa_n(long long, char *, size_t, int);
char *_lltoa_n(long long value, char *str, size_t size, int base) {
  if (value < 0) {
    str = _ulltoa_n(-value, str, size, base);
    (*--str) = '-';
  } else {
    str = _ulltoa_n(value, str, size, base);
  }
  return str;
}


x86 assembly (clang, -O0):
<_lltoa_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1166 <_lltoa_n+0x56>
xor    %eax,%eax
mov    %eax,%edi
sub    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <_ulltoa_n@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,-0x1(%rax)
jmp    117e <_lltoa_n+0x6e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <_ulltoa_n@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_lltoa_n>:
test   %rdi,%rdi
js     111a <_lltoa_n+0xa>
jmp    1030 <_ulltoa_n@plt>
push   %rax
neg    %rdi
call   1030 <_ulltoa_n@plt>
movb   $0x2d,-0x1(%rax)
add    $0xffffffffffffffff,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @_lltoa_n(i64 %0, i8* %1, i64 %2, i32 %3) {
%5 = icmp slt i64 %0, 0
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = sub nsw i64 0, %0
%8 = tail call i8* @_ulltoa_n(i64 %7, i8* %1, i64 %2, i32 %3)
%9 = getelementptr inbounds i8, i8* %8, i64 -1
store i8 45, i8* %9
br label %12
10: ; preds = %4
%11 = tail call i8* @_ulltoa_n(i64 %0, i8* %1, i64 %2, i32 %3)
br label %12
12: ; preds = %10, %6
%13 = phi i8* [ %9, %6 ], [ %11, %10 ]
ret i8* %13
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ assert(int);
void main() {
  int a = add(2, 3) + add(3, 4);
  a *= 2;
  assert(a >= 20 && a <= 28);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <add@plt>
mov    %eax,-0xc(%rbp)
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <add@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x14,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1175 <main+0x55>
cmpl   $0x1c,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <add@plt>
mov    %eax,%ebx
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <add@plt>
add    %ebx,%eax
add    $0xfffffff6,%eax
xor    %edi,%edi
cmp    $0x5,%eax
setb   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 @add(i32 2, i32 3)
%3 = call i32 @add(i32 3, i32 4)
%4 = add nsw i32 %2, %3
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = mul nsw i32 %5, 2
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = icmp sge i32 %7, 20
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %1
%11 = icmp sle i32 %10, 28
br label %12
12: ; preds = %9, %0
%13 = phi i1 [ false, %0 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @add(i32 2, i32 3)
%2 = tail call i32 @add(i32 3, i32 4)
%3 = add i32 %1, -10
%4 = add i32 %3, %2
%5 = icmp ult i32 %4, 5
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
ret void
}
/* Type definitions */
struct msghdr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ nrecvmsg(int, struct msghdr *, int);
ssize_t __recvmsg(int fd, struct msghdr *message, int flags) {
  return nrecvmsg(fd, message, flags);
}


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

x86 assembly (clang, -O2):
<__recvmsg>:
jmp    1030 <nrecvmsg@plt>

LLVM IR (-O0):
%struct.msghdr = type { i32 }
define i32 @__recvmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.msghdr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.msghdr* %1, %struct.msghdr** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.msghdr*, %struct.msghdr** %5
%9 = load i32, i32* %6
%10 = call i32 @nrecvmsg(i32 %7, %struct.msghdr* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
define i32 @__recvmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = tail call i32 @nrecvmsg(i32 %0, %struct.msghdr* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, void *);
void print_ptr(FILE *f, void *v) { fprintf(f, "%p", v); }


x86 assembly (clang, -O0):
<print_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%p\00"
define void @print_ptr(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  {
    state[0UL] = input[0UL] ^ 700325083U;
    local1 = 0UL;
    while (local1 < 0U) {
      local2 = 0UL;
      while (local2 < 0U) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] << 1U) | 396342719U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
xor    $0x29be1cdb,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jae    115a <RandomFunc+0x5a>
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jae    114b <RandomFunc+0x4b>
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    1132 <RandomFunc+0x32>
mov    -0x1c(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x1c(%rbp)
jmp    1121 <RandomFunc+0x21>
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
or     $0x179fb5bf,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%eax
add    %eax,%eax
or     $0x179fb5bf,%eax
xor    $0x40600800,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = xor i32 %10, 700325083
%12 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %11, i32* %12
store i32 0, i32* %7
br label %13
13: ; preds = %25, %2
%14 = load i32, i32* %7
%15 = icmp ult i32 %14, 0
br i1 %15, label %16, label %30
16: ; preds = %13
store i32 0, i32* %6
br label %17
17: ; preds = %20, %16
%18 = load i32, i32* %6
%19 = icmp ult i32 %18, 0
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %6
%22 = zext i32 %21 to i64
%23 = add i64 %22, 2
%24 = trunc i64 %23 to i32
store i32 %24, i32* %6
br label %17
25: ; preds = %17
%26 = load i32, i32* %7
%27 = zext i32 %26 to i64
%28 = add i64 %27, 2
%29 = trunc i64 %28 to i32
store i32 %29, i32* %7
br label %13
30: ; preds = %13
%31 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%32 = load i32, i32* %31
%33 = shl i32 %32, 1
%34 = or i32 %33, 396342719
%35 = load i32*, i32** %4
%36 = getelementptr inbounds i32, i32* %35, i64 0
store i32 %34, i32* %36
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = shl i32 %3, 1
%5 = or i32 %4, 396342719
%6 = xor i32 %5, 1080035328
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TwoFunc();
void OneFunc() {
  static int i = 0;
  ++i;
  if (i == 1) {
    TwoFunc();
  }
}


x86 assembly (clang, -O0):
<OneFunc>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f12(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f09(%rip)
cmpl   $0x1,0x2f02(%rip)
jne    1137 <OneFunc+0x27>
mov    $0x0,%al
call   1030 <TwoFunc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OneFunc>:
mov    0x2f16(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0d(%rip)
test   %eax,%eax
je     1124 <OneFunc+0x14>
ret
xor    %eax,%eax
jmp    1030 <TwoFunc@plt>

LLVM IR (-O0):
@OneFunc.i = internal global i32 0
define void @OneFunc() {
%1 = load i32, i32* @OneFunc.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @OneFunc.i
%3 = load i32, i32* @OneFunc.i
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @TwoFunc()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@OneFunc.i = internal unnamed_addr global i32 0
define void @OneFunc() {
%1 = load i32, i32* @OneFunc.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @OneFunc.i
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @TwoFunc()
br label %6
6: ; preds = %4, %0
ret void
}
void ScaleFilterCols64_C() {}


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

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

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

LLVM IR (-O2):
define void @ScaleFilterCols64_C() {
ret void
}