xunge/DecIR huggingface dataset:
void cal(int sectorNum, int *ph, int *pc, int *ps) {
  int nh = (sectorNum - 1) / (80 * 18);
  int nc = (sectorNum - 1 - (nh * 18 * 80)) / 18;
  *ps = sectorNum - (nc * 18) - (nh * 18 * 80);
  *pc = nc;
  *ph = nh;
}


x86 assembly (clang, -O0):
<cal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    $0x5a0,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
imul   $0x12,-0x24(%rbp),%ecx
imul   $0x50,%ecx,%ecx
sub    %ecx,%eax
mov    $0x12,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0x4(%rbp),%ecx
imul   $0x12,-0x28(%rbp),%eax
sub    %eax,%ecx
imul   $0x12,-0x24(%rbp),%eax
imul   $0x50,%eax,%eax
sub    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cal>:
lea    -0x1(%rdi),%eax
movslq %eax,%r8
imul   $0xffffffffb60b60b7,%r8,%rax
shr    $0x20,%rax
lea    (%rax,%rdi,1),%r10d
add    $0xffffffff,%r10d
mov    %r10d,%r9d
shr    $0x1f,%r9d
sar    $0xa,%r10d
add    %r9d,%r10d
imul   $0x5a0,%r10d,%r9d
sub    %r9d,%r8d
movslq %r8d,%rax
imul   $0x38e38e39,%rax,%r11
mov    %r11,%r8
shr    $0x3f,%r8
sar    $0x22,%r11
add    %r8d,%r11d
lea    (%r11,%r11,1),%eax
lea    (%rax,%rax,8),%eax
sub    %r9d,%edi
sub    %eax,%edi
mov    %edi,(%rcx)
mov    %r11d,(%rdx)
mov    %r10d,(%rsi)
ret

LLVM IR (-O0):
define void @cal(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = sdiv i32 %12, 1440
store i32 %13, i32* %9
%14 = load i32, i32* %5
%15 = sub nsw i32 %14, 1
%16 = load i32, i32* %9
%17 = mul nsw i32 %16, 18
%18 = mul nsw i32 %17, 80
%19 = sub nsw i32 %15, %18
%20 = sdiv i32 %19, 18
store i32 %20, i32* %10
%21 = load i32, i32* %5
%22 = load i32, i32* %10
%23 = mul nsw i32 %22, 18
%24 = sub nsw i32 %21, %23
%25 = load i32, i32* %9
%26 = mul nsw i32 %25, 18
%27 = mul nsw i32 %26, 80
%28 = sub nsw i32 %24, %27
%29 = load i32*, i32** %8
store i32 %28, i32* %29
%30 = load i32, i32* %10
%31 = load i32*, i32** %7
store i32 %30, i32* %31
%32 = load i32, i32* %9
%33 = load i32*, i32** %6
store i32 %32, i32* %33
ret void
}

LLVM IR (-O2):
define void @cal(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = add nsw i32 %0, -1
%6 = sdiv i32 %5, 1440
%7 = mul nsw i32 %6, 1440
%8 = srem i32 %5, 1440
%9 = sdiv i32 %8, 18
%10 = mul nsw i32 %9, -18
%11 = sub i32 %0, %7
%12 = add i32 %11, %10
store i32 %12, i32* %3
store i32 %9, i32* %2
store i32 %6, i32* %1
ret void
}
int checkSystem() {
  union check {
    int i;
    char ch;
  } c;
  c.i = 1;
  return c.ch == 1;
}


x86 assembly (clang, -O0):
<checkSystem>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.check = type { i32 }
define i32 @checkSystem() {
%1 = alloca %union.check
%2 = bitcast %union.check* %1 to i32*
store i32 1, i32* %2
%3 = bitcast %union.check* %1 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @checkSystem() {
ret i32 1
}
/* Variables and functions */
char *char_prepend(char const *, char const *);
char *char_append(const char *ostr, const char *suffix) {
  return char_prepend(ostr, suffix);
}


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

x86 assembly (clang, -O2):
<char_append>:
jmp    1030 <char_prepend@plt>

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

LLVM IR (-O2):
define i8* @char_append(i8* %0, i8* %1) {
%3 = tail call i8* @char_prepend(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
unsigned char CRC_Build_8(unsigned char const *, unsigned long const);
char CRC_Check_8(const unsigned char *cDataPointer, const unsigned long iLength,
                 const unsigned char iCRC_8) {
  unsigned char iReceiverCRC;
  iReceiverCRC = CRC_Build_8(cDataPointer, iLength);
  return ((char)(iReceiverCRC == iCRC_8));
}


x86 assembly (clang, -O0):
<CRC_Check_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <CRC_Build_8@plt>
mov    %al,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
movzbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRC_Check_8>:
push   %rbx
mov    %edx,%ebx
call   1030 <CRC_Build_8@plt>
cmp    %bl,%al
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @CRC_Check_8(i8* %0, i64 %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = call zeroext i8 @CRC_Build_8(i8* %8, i64 %9)
store i8 %10, i8* %7
%11 = load i8, i8* %7
%12 = zext i8 %11 to i32
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %12, %14
%16 = zext i1 %15 to i32
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @CRC_Check_8(i8* %0, i64 %1, i8 zeroext %2) {
%4 = tail call zeroext i8 @CRC_Build_8(i8* %0, i64 %1)
%5 = icmp eq i8 %4, %2
%6 = zext i1 %5 to i8
ret i8 %6
}
/* Variables and functions */
int main(void) {
  const char **cpp;
  char *p;
  const char c = 'A';
  cpp = &p;
  *cpp = &c;
  *p = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x19(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    -0x19(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void foo_2_2_2_1_2_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_1_2_1_2_1_1() {
ret void
}
/* Variables and functions */
int errno;
void store_errno(int value) { errno = value; }


x86 assembly (clang, -O0):
<store_errno>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2ecf(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_errno>:
mov    0x2ed9(%rip),%rax
mov    %edi,(%rax)
ret

LLVM IR (-O0):
@errno = global i32 0
define void @store_errno(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* @errno
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @store_errno(i32 %0) {
store i32 %0, i32* @errno
ret void
}
void test_lib(void) {}


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

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

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

LLVM IR (-O2):
define void @test_lib() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ readFromDisk(int, int);
int loadFileToVirtualDisk() {
  int i;
  for (i = 20; i < 20 + 1; i++)
    readFromDisk(i, i);
  for (i = 19; i < 19 + 1; i++)
    readFromDisk(i, i);
}


x86 assembly (clang, -O0):
<loadFileToVirtualDisk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x14,-0x8(%rbp)
cmpl   $0x15,-0x8(%rbp)
jge    1142 <loadFileToVirtualDisk+0x32>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <readFromDisk@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <loadFileToVirtualDisk+0xf>
movl   $0x13,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    116c <loadFileToVirtualDisk+0x5c>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <readFromDisk@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <loadFileToVirtualDisk+0x39>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loadFileToVirtualDisk>:
push   %rax
mov    $0x14,%edi
mov    $0x14,%esi
call   1030 <readFromDisk@plt>
mov    $0x13,%edi
mov    $0x13,%esi
pop    %rax
jmp    1030 <readFromDisk@plt>

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

LLVM IR (-O2):
define i32 @loadFileToVirtualDisk() {
%1 = tail call i32 @readFromDisk(i32 20, i32 20)
%2 = tail call i32 @readFromDisk(i32 19, i32 19)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ r(long);
long strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  long n = 15;
  if (argc > 1)
    n = strtol(argv[1], NULL, 10);
  puts("Basic collatz fun - recursive C function");
  r(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0xf,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1172 <main+0x42>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %rax,-0x18(%rbp)
lea    0xe87(%rip),%rdi
call   1030 <puts@plt>
mov    -0x18(%rbp),%rdi
call   1040 <r@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xf,%ebx
cmp    $0x2,%edi
jl     114e <main+0x1e>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %rax,%rbx
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <r@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Basic collatz fun - recursive C function\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 15, i64* %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i64 @strtol(i8* %12, i32* null, i32 10)
store i64 %13, i64* %6
br label %14
14: ; preds = %9, %2
%15 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%16 = load i64, i64* %6
%17 = call i32 @r(i64 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"Basic collatz fun - recursive C function\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strtol(i8* nocapture %6, i32* null, i32 10)
br label %8
8: ; preds = %4, %2
%9 = phi i64 [ %7, %4 ], [ 15, %2 ]
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @r(i64 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ signal_sub(int *, void (*)(int), int *);
int signal_func(int *number, void (*handler)(int)) {
  int status;
  signal_sub(number, handler, &status);
  return status;
}


x86 assembly (clang, -O0):
<signal_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <signal_sub@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_func>:
push   %rax
lea    0x4(%rsp),%rdx
call   1030 <signal_sub@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @signal_func(i32* %0, void (i32)* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @signal_sub(i32* %0, void (i32)* %1, i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}
/* Variables and functions */
int core3_safe(char const *);
int U_EMRSELECTCLIPPATH_safe(const char *record) {
  return (core3_safe(record));
}


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

x86 assembly (clang, -O2):
<U_EMRSELECTCLIPPATH_safe>:
jmp    1030 <core3_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSELECTCLIPPATH_safe(i8* %0) {
%2 = tail call i32 @core3_safe(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void display_error(char *msg) { printf("%s", msg); }


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

x86 assembly (clang, -O2):
<display_error>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @display_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
double ldexp(double x, int n) { return __builtin_ldexp(x, n); }


x86 assembly (clang, -O0):
<ldexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <ldexp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @ldexp(double %0, i32 %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, double);
int treeprt2(void *data, int lvl) {
  printf("(%d; %d)\n", lvl, *(double *)data);
  return 0;
}


x86 assembly (clang, -O0):
<treeprt2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<treeprt2>:
push   %rax
movsd  (%rdi),%xmm0
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"(%d; %d)\0A\00"
define i32 @treeprt2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to double*
%8 = load double, double* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"(%d; %d)\0A\00"
define i32 @treeprt2(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1, double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ default_isr();
__attribute__((weak)) void FTDF_WAKEUP_Handler() { default_isr(); }


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

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

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

LLVM IR (-O2):
define weak void @FTDF_WAKEUP_Handler() {
%1 = tail call i32 (...) @default_isr()
ret void
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_datefunc1_nochange(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_datefunc1_nochange() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_datefunc1_nochange() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
/* Variables and functions */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c)) {
    return (c + 0x20);
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113b <toupper+0x2b>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <toupper+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @islower(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 32
store i32 %9, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;
struct pcg_state_16 {
  int dummy;
};

/* Variables and functions */
int pcg_unique_16_xsh_rs_8_random_r(struct pcg_state_16 *);
uint8_t pcg_unique_16_xsh_rs_8_boundedrand_r(struct pcg_state_16 *rng,
                                             uint8_t bound) {
  uint8_t threshold = ((uint8_t)(-bound)) % bound;
  for (;;) {
    uint8_t r = pcg_unique_16_xsh_rs_8_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_unique_16_xsh_rs_8_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_unique_16_xsh_rs_8_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_unique_16_xsh_rs_8_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_unique_16_xsh_rs_8_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_unique_16_xsh_rs_8_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_unique_16_xsh_rs_8_random_r@plt>
test   %eax,%eax
js     1120 <pcg_unique_16_xsh_rs_8_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_16 = type { i32 }
define i32 @pcg_unique_16_xsh_rs_8_boundedrand_r(%struct.pcg_state_16* %0, i32 %1) {
%3 = alloca %struct.pcg_state_16*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_16* %0, %struct.pcg_state_16** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_16*, %struct.pcg_state_16** %3
%13 = call i32 @pcg_unique_16_xsh_rs_8_random_r(%struct.pcg_state_16* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_16 = type { i32 }
define i32 @pcg_unique_16_xsh_rs_8_boundedrand_r(%struct.pcg_state_16* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_unique_16_xsh_rs_8_random_r(%struct.pcg_state_16* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
int test_imm_8Aint16_reg(short val) {
  return ((val) & (0x8A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Aint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x8a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_8Aint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 138
%6 = icmp ne i32 %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_8Aint16_reg(i16 signext %0) {
%2 = and i16 %0, 138
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void (*signal(int sig, void (*func)(int)))(int) {
  void (*res)(int) = __infer_nondet_ptr();
  return res;
}


x86 assembly (clang, -O0):
<signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_ptr@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_ptr@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define void (i32)* @signal(i32 %0, void (i32)* %1) {
%3 = alloca i32
%4 = alloca void (i32)*
%5 = alloca void (i32)*
store i32 %0, i32* %3
store void (i32)* %1, void (i32)** %4
%6 = call i32 (...) @__infer_nondet_ptr()
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to void (i32)*
store void (i32)* %8, void (i32)** %5
%9 = load void (i32)*, void (i32)** %5
ret void (i32)* %9
}

LLVM IR (-O2):
define void (i32)* @signal(i32 %0, void (i32)* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_ptr()
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to void (i32)*
ret void (i32)* %5
}
/* Variables and functions */
int /*<<< orphan*/ __WFI();
void lpm_drop(void) { __WFI(); }


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

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

LLVM IR (-O0):
define void @lpm_drop() {
%1 = call i32 (...) @__WFI()
ret void
}

LLVM IR (-O2):
define void @lpm_drop() {
%1 = tail call i32 (...) @__WFI()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
void set_XGraphicsExposeEvent_serial(void *_p, unsigned long _v) {
  ((XGraphicsExposeEvent *)_p)->serial = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XGraphicsExposeEvent_serial>:
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_XGraphicsExposeEvent_serial>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XGraphicsExposeEvent_serial(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_XGraphicsExposeEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
int BNC_2() {
  int ii, stat = 99;
  char com1, data;
  BNCIO(2);
  return (stat);
}


x86 assembly (clang, -O0):
<BNC_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x2,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNC_2>:
push   %rax
mov    $0x2,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BNC_2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 99, i32* %2
%5 = call i32 @BNCIO(i32 2)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BNC_2() {
%1 = tail call i32 @BNCIO(i32 2)
ret i32 99
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("need defined _LIB_ZC_SQLITE3_\n");
  printf("cat makefiles/defined.include\n");
  printf("\n");
  printf("EXTRA_CFLAGS = -D_LIB_ZC_SQLITE3_\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xeea(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xef2(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"need defined _LIB_ZC_SQLITE3_\0A\00"
@.str.1 = [31 x i8] c"cat makefiles/defined.include\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [35 x i8] c"EXTRA_CFLAGS = -D_LIB_ZC_SQLITE3_\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"need defined _LIB_ZC_SQLITE3_\00"
@str.4 = [30 x i8] c"cat makefiles/defined.include\00"
@str.5 = [34 x i8] c"EXTRA_CFLAGS = -D_LIB_ZC_SQLITE3_\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
void itfcfg(char *if_name, int up_flag) {}


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

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

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

LLVM IR (-O2):
define void @itfcfg(i8* nocapture %0, i32 %1) {
ret void
}
int dgtpicom_get_button_message(char *buttons, char *time) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dgtpicom_get_button_message(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
void SysCtlMOSCConfigSet(unsigned long ulConfig) {
  (*((volatile unsigned long *)(0x400FE07C))) = ulConfig;
}


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

x86 assembly (clang, -O2):
<SysCtlMOSCConfigSet>:
mov    %rdi,0x400fe07c
40
ret

LLVM IR (-O0):
define void @SysCtlMOSCConfigSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074782332 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlMOSCConfigSet(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074782332 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double a, b;
  scanf("%lf %lf", &a, &b);
  printf("%.9f", a / b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [5 x i8] c"%.9f\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fdiv double %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ printf(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(void) {
  fclose(stdout);
  if (printf("Hello world\n") < 0)
    fprintf(stderr, "printf failed.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
cmp    $0x0,%rax
jge    1178 <main+0x48>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
lea    0xe9a(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
test   %rax,%rax
jns    1165 <main+0x35>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [13 x i8] c"Hello world\0A\00"
@stderr = global i32 0
@.str.1 = [16 x i8] c"printf failed.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @fclose(i32 %2)
%4 = call i64 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %6, %0
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"Hello world\0A\00"
@stderr = global i32 0
@.str.1 = [16 x i8] c"printf failed.\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fclose(i32 %1)
%3 = tail call i64 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void elseFile(void) { printf("[else]\n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"[else]\00"
define void @elseFile() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
void ARGBAttenuateRow_C() {}


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

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

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

LLVM IR (-O2):
define void @ARGBAttenuateRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_si_update_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_sessinfo@%p::update (rtpp_si_update) is invoked after "
          "destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_si_update_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_si_update_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [79 x i8] c"Method rtpp_sessinfo@%p::update (rtpp_si_update) is invoked after destruction\0A\00"
define void @rtpp_si_update_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [79 x i8] c"Method rtpp_sessinfo@%p::update (rtpp_si_update) is invoked after destruction\0A\00"
define void @rtpp_si_update_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t begin_time(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @begin_time() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdout;
int read() {
  int n = 0;
  printf("Enter the N:");
  fflush(stdout);
  scanf("%d", &n);
  return n;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xead(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xeb3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Enter the N:\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%d\00"
define i32 @read() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [13 x i8] c"Enter the N:\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%d\00"
define i32 @read() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ test_hash_function_different();
int /*<<< orphan*/ test_hash_function_long_compare();
int /*<<< orphan*/ test_hash_function_same();
int /*<<< orphan*/ test_hashtable_insert_and_find_many();
int /*<<< orphan*/ test_hashtable_insert_and_find_simple();
int /*<<< orphan*/ test_hashtable_insert_find_identical();
int main() {
  test_hash_function_same();
  test_hash_function_different();
  test_hash_function_long_compare();
  test_hashtable_insert_and_find_simple();
  test_hashtable_insert_and_find_many();
  test_hashtable_insert_find_identical();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <test_hash_function_same@plt>
mov    $0x0,%al
call   1080 <test_hash_function_different@plt>
mov    $0x0,%al
call   1060 <test_hash_function_long_compare@plt>
mov    $0x0,%al
call   1040 <test_hashtable_insert_and_find_simple@plt>
mov    $0x0,%al
call   1030 <test_hashtable_insert_and_find_many@plt>
mov    $0x0,%al
call   1070 <test_hashtable_insert_find_identical@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_hash_function_same@plt>
xor    %eax,%eax
call   1080 <test_hash_function_different@plt>
xor    %eax,%eax
call   1060 <test_hash_function_long_compare@plt>
xor    %eax,%eax
call   1040 <test_hashtable_insert_and_find_simple@plt>
xor    %eax,%eax
call   1030 <test_hashtable_insert_and_find_many@plt>
xor    %eax,%eax
call   1070 <test_hashtable_insert_find_identical@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_hash_function_same()
%2 = call i32 (...) @test_hash_function_different()
%3 = call i32 (...) @test_hash_function_long_compare()
%4 = call i32 (...) @test_hashtable_insert_and_find_simple()
%5 = call i32 (...) @test_hashtable_insert_and_find_many()
%6 = call i32 (...) @test_hashtable_insert_find_identical()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_hash_function_same()
%2 = tail call i32 (...) @test_hash_function_different()
%3 = tail call i32 (...) @test_hash_function_long_compare()
%4 = tail call i32 (...) @test_hashtable_insert_and_find_simple()
%5 = tail call i32 (...) @test_hashtable_insert_and_find_many()
%6 = tail call i32 (...) @test_hashtable_insert_find_identical()
ret i32 0
}
/* Type definitions */
struct shuffle2_ctx {
  int dummy;
};
struct prime_current_block {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_early_prime_group_1_11(struct shuffle2_ctx *,
                                             struct prime_current_block *);
void do_early_prime_11(struct shuffle2_ctx *ctx,
                       struct prime_current_block *pcb) {
  do_early_prime_group_1_11(ctx, pcb);
}


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

x86 assembly (clang, -O2):
<do_early_prime_11>:
jmp    1030 <do_early_prime_group_1_11@plt>

LLVM IR (-O0):
%struct.shuffle2_ctx = type { i32 }
%struct.prime_current_block = type { i32 }
define void @do_early_prime_11(%struct.shuffle2_ctx* %0, %struct.prime_current_block* %1) {
%3 = alloca %struct.shuffle2_ctx*
%4 = alloca %struct.prime_current_block*
store %struct.shuffle2_ctx* %0, %struct.shuffle2_ctx** %3
store %struct.prime_current_block* %1, %struct.prime_current_block** %4
%5 = load %struct.shuffle2_ctx*, %struct.shuffle2_ctx** %3
%6 = load %struct.prime_current_block*, %struct.prime_current_block** %4
%7 = call i32 @do_early_prime_group_1_11(%struct.shuffle2_ctx* %5, %struct.prime_current_block* %6)
ret void
}

LLVM IR (-O2):
%struct.shuffle2_ctx = type { i32 }
%struct.prime_current_block = type { i32 }
define void @do_early_prime_11(%struct.shuffle2_ctx* %0, %struct.prime_current_block* %1) {
%3 = tail call i32 @do_early_prime_group_1_11(%struct.shuffle2_ctx* %0, %struct.prime_current_block* %1)
ret void
}
int _get_char_index(char ch) { return (int)(ch - 'a'); }


x86 assembly (clang, -O0):
<_get_char_index>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_char_index>:
lea    -0x61(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @_get_char_index(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 97
ret i32 %5
}

LLVM IR (-O2):
define i32 @_get_char_index(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -97
ret i32 %3
}
void clflush_buffer(void *vaddr, unsigned int size) {
  unsigned long clflush_mask = 64 - 1;
  void *vend = vaddr + size;
  void *p;
  for (p = (void *)((unsigned long)vaddr & ~clflush_mask); p < vend; p += 64) {
    clflush(p);
  }
  asm volatile("sfence" ::: "memory");
}


x86 assembly (clang, -O0):
<clflush_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x3f,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1172 <clflush_buffer+0x62>
mov    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1030 <clflush@plt>
mov    -0x28(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x28(%rbp)
jmp    1148 <clflush_buffer+0x38>
sfence
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clflush_buffer>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %esi,%r14d
add    %rdi,%r14
and    $0xffffffffffffffc0,%rbx
cmp    %rbx,%r14
jbe    1143 <clflush_buffer+0x33>
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <clflush@plt>
add    $0x40,%rbx
cmp    %r14,%rbx
jb     1130 <clflush_buffer+0x20>
sfence
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @clflush_buffer(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
store i64 63, i64* %5
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = getelementptr i8, i8* %8, i64 %10
store i8* %11, i8** %6
%12 = load i8*, i8** %3
%13 = ptrtoint i8* %12 to i64
%14 = load i64, i64* %5
%15 = xor i64 %14, -1
%16 = and i64 %13, %15
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %7
br label %18
18: ; preds = %25, %2
%19 = load i8*, i8** %7
%20 = load i8*, i8** %6
%21 = icmp ult i8* %19, %20
br i1 %21, label %22, label %28
22: ; preds = %18
%23 = load i8*, i8** %7
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @clflush to i32 (i8*, ...)*)(i8* %23)
br label %25
25: ; preds = %22
%26 = load i8*, i8** %7
%27 = getelementptr i8, i8* %26, i64 64
store i8* %27, i8** %7
br label %18
28: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @clflush_buffer(i8* %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr i8, i8* %0, i64 %3
%5 = ptrtoint i8* %0 to i64
%6 = and i64 %5, -64
%7 = inttoptr i64 %6 to i8*
%8 = icmp ugt i8* %4, %7
br i1 %8, label %9, label %14
9: ; preds = %2, %9
%10 = phi i8* [ %12, %9 ], [ %7, %2 ]
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @clflush to i32 (i8*, ...)*)(i8* %10)
%12 = getelementptr i8, i8* %10, i64 64
%13 = icmp ult i8* %12, %4
br i1 %13, label %9, label %14
14: ; preds = %9, %2
tail call void asm sideeffect "sfence", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}