xunge/DecIR huggingface dataset:
void run_gb_main_loop(void (*main_loop)(void *), struct gb_emu *emu) {
  main_loop(emu);
}


x86 assembly (clang, -O0):
<run_gb_main_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_gb_main_loop>:
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax

LLVM IR (-O0):
%struct.gb_emu = type opaque
define void @run_gb_main_loop(void (i8*)* %0, %struct.gb_emu* %1) {
%3 = alloca void (i8*)*
%4 = alloca %struct.gb_emu*
store void (i8*)* %0, void (i8*)** %3
store %struct.gb_emu* %1, %struct.gb_emu** %4
%5 = load void (i8*)*, void (i8*)** %3
%6 = load %struct.gb_emu*, %struct.gb_emu** %4
%7 = bitcast %struct.gb_emu* %6 to i8*
ret void
}

LLVM IR (-O2):
%struct.gb_emu = type opaque
define void @run_gb_main_loop(void (i8*)* nocapture %0, %struct.gb_emu* %1) {
%3 = bitcast %struct.gb_emu* %1 to i8*
tail call void %0(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main(void) {
  test(17);
  test(31);
  test(5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x11,%edi
call   1030 <test@plt>
mov    $0x1f,%edi
call   1030 <test@plt>
mov    $0x5,%edi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i32 17)
%3 = call i32 @test(i32 31)
%4 = call i32 @test(i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 17)
%2 = tail call i32 @test(i32 31)
%3 = tail call i32 @test(i32 5)
ret i32 0
}
void message_handler_req_lib_amf_componentunregister(void *conn, void *msg) {}


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

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

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

LLVM IR (-O2):
define void @message_handler_req_lib_amf_componentunregister(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ SphGenOh(double *, int /*<<< orphan*/, double, double, double);
int MakeAngularGrid_6(double (*pOut)[4]) {
  double a = 0, b = 0, v;
  int N = 0;
  v = 0.1666666666666667e+0;
  N += SphGenOh(&pOut[N][0], 0, a, b, v);
  return N;
}


x86 assembly (clang, -O0):
<MakeAngularGrid_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x24(%rbp),%rax
shl    $0x5,%rax
add    %rax,%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
xor    %esi,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeAngularGrid_6>:
movsd  0xee8(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xor    %esi,%esi
jmp    1030 <SphGenOh@plt>

LLVM IR (-O0):
define i32 @MakeAngularGrid_6([4 x double]* %0) {
%2 = alloca [4 x double]*
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store [4 x double]* %0, [4 x double]** %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
store i32 0, i32* %6
store double 0x3FC5555555555557, double* %5
%7 = load [4 x double]*, [4 x double]** %2
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 %9
%11 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%12 = load double, double* %3
%13 = load double, double* %4
%14 = load double, double* %5
%15 = call i64 @SphGenOh(double* %11, i32 0, double %12, double %13, double %14)
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = add nsw i64 %17, %15
%19 = trunc i64 %18 to i32
store i32 %19, i32* %6
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
define i32 @MakeAngularGrid_6([4 x double]* %0) {
%2 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 0
%3 = tail call i64 @SphGenOh(double* %2, i32 0, double 0.000000e+00, double 0.000000e+00, double 0x3FC5555555555557)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char *, struct stat *);
void has_public_desktop(char *arg1) {
  0;
  0;
  struct stat stats;
  stat("c:\\Users\\Public\\Desktop", &stats);
  if (S_ISDIR(stats.st_mode)) {
    0;
  } else {
    exit(0);
  }
}


x86 assembly (clang, -O0):
<has_public_desktop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1163 <has_public_desktop+0x33>
jmp    116a <has_public_desktop+0x3a>
xor    %edi,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_public_desktop>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
test   %rax,%rax
je     114f <has_public_desktop+0x1f>
pop    %rax
ret
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [24 x i8] c"c:\\Users\\Public\\Desktop\00"
define void @has_public_desktop(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = call i32 @stat(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), %struct.stat* %3)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i64 @S_ISDIR(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
br label %12
10: ; preds = %1
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %9
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [24 x i8] c"c:\\Users\\Public\\Desktop\00"
define void @has_public_desktop(i8* nocapture readnone %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i64 @S_ISDIR(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = tail call i32 @exit(i32 0)
unreachable
11: ; preds = %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
char base64b16(unsigned char val) {
  const uint32_t base64b16values[4] = {
      (uint32_t)((uint32_t)'A' + ((uint32_t)'E' << 8) + ((uint32_t)'I' << 16) +
                 ((uint32_t)'M' << 24)),
      (uint32_t)((uint32_t)'Q' + ((uint32_t)'U' << 8) + ((uint32_t)'Y' << 16) +
                 ((uint32_t)'c' << 24)),
      (uint32_t)((uint32_t)'g' + ((uint32_t)'k' << 8) + ((uint32_t)'o' << 16) +
                 ((uint32_t)'s' << 24)),
      (uint32_t)((uint32_t)'w' + ((uint32_t)'0' << 8) + ((uint32_t)'4' << 16) +
                 ((uint32_t)'8' << 24))};
  return (char)((base64b16values[val >> 2] >> ((val & 0x03) << 3)) & 0xFF);
}


x86 assembly (clang, -O0):
<base64b16>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeec(%rip),%rax
mov    %rax,-0x18(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x2,%eax
cltq
mov    -0x20(%rbp,%rax,4),%eax
movzbl -0x1(%rbp),%ecx
and    $0x3,%ecx
shl    $0x3,%ecx
sar    %cl,%eax
and    $0xff,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64b16>:
lea    0x0(,%rdi,8),%ecx
and    $0xfffffffc,%edi
lea    0xeef(%rip),%rax
mov    (%rdi,%rax,1),%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
@__const.base64b16.base64b16values = [4 x i32] [i32 1296647489, i32 1666798929, i32 1936681831, i32 942944375]
define signext i8 @base64b16(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca [4 x i32]
store i8 %0, i8* %2
%4 = bitcast [4 x i32]* %3 to i8*
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = ashr i32 %6, 2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %8
%10 = load i32, i32* %9
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = and i32 %12, 3
%14 = shl i32 %13, 3
%15 = ashr i32 %10, %14
%16 = and i32 %15, 255
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
@__const.base64b16.base64b16values = [4 x i32] [i32 1296647489, i32 1666798929, i32 1936681831, i32 942944375]
define signext i8 @base64b16(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = lshr i32 %2, 2
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [4 x i32], [4 x i32]* @__const.base64b16.base64b16values, i64 0, i64 %4
%6 = load i32, i32* %5
%7 = shl nuw nsw i32 %2, 3
%8 = and i32 %7, 24
%9 = ashr i32 %6, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}
/* Variables and functions */
int flash_image(void *, unsigned int, char *);
int flash_fastboot_kernel(void *data, unsigned sz) {
  return flash_image(data, sz, "fastboot");
}


x86 assembly (clang, -O0):
<flash_fastboot_kernel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <flash_image@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash_fastboot_kernel>:
lea    0xee9(%rip),%rdx
jmp    1030 <flash_image@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"fastboot\00"
define i32 @flash_fastboot_kernel(i8* %0, i32 %1) {
%3 = tail call i32 @flash_image(i8* %0, i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
scalar_t__ strlen(char *);
int strlonger(char *s, char *t) { return (int)(strlen(s) - strlen(t)) > 0; }


x86 assembly (clang, -O0):
<strlonger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlonger>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebx
xor    %eax,%eax
test   %ebx,%ebx
setg   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @strlonger(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 = call i64 @strlen(i8* %5)
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = sub nsw i64 %6, %8
%10 = trunc i64 %9 to i32
%11 = icmp sgt i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @strlonger(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = sub nsw i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = icmp sgt i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
void gdk_selection_owner_get() {}


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

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

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

LLVM IR (-O2):
define void @gdk_selection_owner_get() {
ret void
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *AI_memcpy(void *dest, void const *src, size_t size) {
  return memcpy(dest, src, size);
}


x86 assembly (clang, -O0):
<AI_memcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    %rdi,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AI_memcpy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define i8* @AI_memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ SPI_MODE_0;
int test_aardvark(int, int /*<<< orphan*/);
int test_aardvark_mode0(int fd) { return test_aardvark(fd, SPI_MODE_0); }


x86 assembly (clang, -O0):
<test_aardvark_mode0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <test_aardvark@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@SPI_MODE_0 = global i32 0
define i32 @test_aardvark_mode0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SPI_MODE_0
%5 = call i32 @test_aardvark(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SPI_MODE_0 = global i32 0
define i32 @test_aardvark_mode0(i32 %0) {
%2 = load i32, i32* @SPI_MODE_0
%3 = tail call i32 @test_aardvark(i32 %0, i32 %2)
ret i32 %3
}
void init(char *a1, char *a2) {
  char s = -1;
  int i;
  for (i = 0; i < 100000; i++) {
    a1[i] = s;
    a2[i] = i;
    s = -s;
  }
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0xff,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x186a0,-0x18(%rbp)
jge    115b <init+0x5b>
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
movsbl -0x11(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %al,-0x11(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1117 <init+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0xff,(%rdi,%rax,1)
mov    %al,(%rsi,%rax,1)
movb   $0x1,0x1(%rdi,%rax,1)
lea    0x1(%rax),%ecx
mov    %cl,0x1(%rsi,%rax,1)
movb   $0xff,0x2(%rdi,%rax,1)
lea    0x2(%rax),%ecx
mov    %cl,0x2(%rsi,%rax,1)
movb   $0x1,0x3(%rdi,%rax,1)
lea    0x3(%rax),%ecx
mov    %cl,0x3(%rsi,%rax,1)
add    $0x4,%rax
cmp    $0x186a0,%rax
jne    1110 <init+0x10>
ret

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

LLVM IR (-O2):
define void @init(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 0, %2 ], [ %20, %3 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 -1, i8* %5
%6 = trunc i64 %4 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 %4
store i8 %6, i8* %7
%8 = or i64 %4, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 1, i8* %9
%10 = trunc i64 %8 to i8
%11 = getelementptr inbounds i8, i8* %1, i64 %8
store i8 %10, i8* %11
%12 = or i64 %4, 2
%13 = getelementptr inbounds i8, i8* %0, i64 %12
store i8 -1, i8* %13
%14 = trunc i64 %12 to i8
%15 = getelementptr inbounds i8, i8* %1, i64 %12
store i8 %14, i8* %15
%16 = or i64 %4, 3
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 1, i8* %17
%18 = trunc i64 %16 to i8
%19 = getelementptr inbounds i8, i8* %1, i64 %16
store i8 %18, i8* %19
%20 = add nuw nsw i64 %4, 4
%21 = icmp eq i64 %20, 100000
br i1 %21, label %22, label %3
22: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ select(int, int);
void benchmark(void) { select(10, 20); }


x86 assembly (clang, -O0):
<benchmark>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
mov    $0x14,%esi
call   1030 <select@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<benchmark>:
mov    $0xa,%edi
mov    $0x14,%esi
jmp    1030 <select@plt>

LLVM IR (-O0):
define void @benchmark() {
%1 = call i32 @select(i32 10, i32 20)
ret void
}

LLVM IR (-O2):
define void @benchmark() {
%1 = tail call i32 @select(i32 10, i32 20)
ret void
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int stricmp(const char *s1, const char *s2) { return (strcasecmp(s1, s2)); }


x86 assembly (clang, -O0):
<stricmp>:
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 <strcasecmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stricmp>:
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @stricmp(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 i32 @strcasecmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @stricmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  printf("88/11=%d\n", 88 / 11);
  printf("83%11=%d\n", 83 % 11);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x6,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"88/11=%d\0A\00"
@.str.1 = [10 x i8] c"83%11=%d\0A\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 8)
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"88/11=%d\0A\00"
@.str.1 = [10 x i8] c"83%11=%d\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 6)
ret void
}
void permuter(int *a, int *b) {
  int temp = *a;
  *a = *b;
  *b = temp;
}


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

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

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

LLVM IR (-O2):
define void @permuter(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn();
int /*<<< orphan*/ printf(char *);
int main(void) {
  goto label1;
label1:
  printf("main()\n");
  fn();
label2:
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"main()\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @fn()
br label %5
5: ; preds = %2
ret i32 0
}

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


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

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

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

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

/* Variables and functions */
scalar_t__ single_call_time();
clock_t measure_avg_call_time() {
  clock_t t_sum = 0;
  for (int i = 0; i < 5; i++) {
    t_sum += single_call_time();
  }
  return (t_sum / 5);
}


x86 assembly (clang, -O0):
<measure_avg_call_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1152 <measure_avg_call_time+0x42>
mov    $0x0,%al
call   1030 <single_call_time@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <measure_avg_call_time+0x16>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<measure_avg_call_time>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <single_call_time@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1030 <single_call_time@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   1030 <single_call_time@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1030 <single_call_time@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   1030 <single_call_time@plt>
add    %ebx,%eax
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @measure_avg_call_time() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = call i64 (...) @single_call_time()
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %1
br label %12
12: ; preds = %6
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
%16 = load i32, i32* %1
%17 = sdiv i32 %16, 5
ret i32 %17
}

LLVM IR (-O2):
define i32 @measure_avg_call_time() {
%1 = tail call i64 (...) @single_call_time()
%2 = trunc i64 %1 to i32
%3 = tail call i64 (...) @single_call_time()
%4 = trunc i64 %3 to i32
%5 = add i32 %2, %4
%6 = tail call i64 (...) @single_call_time()
%7 = trunc i64 %6 to i32
%8 = add i32 %5, %7
%9 = tail call i64 (...) @single_call_time()
%10 = trunc i64 %9 to i32
%11 = add i32 %8, %10
%12 = tail call i64 (...) @single_call_time()
%13 = trunc i64 %12 to i32
%14 = add i32 %11, %13
%15 = sdiv i32 %14, 5
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ Nokia5110_SetCursor(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ lcddatawrite(int);
void Nokia5110_Clear(void) {
  int i;
  for (i = 0; i < (84 * 48 / 8); i = i + 1) {
    lcddatawrite(0x00);
  }
  Nokia5110_SetCursor(0, 0);
}


x86 assembly (clang, -O0):
<Nokia5110_Clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1f8,-0x4(%rbp)
jge    1151 <Nokia5110_Clear+0x31>
xor    %edi,%edi
call   1030 <lcddatawrite@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <Nokia5110_Clear+0xf>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <Nokia5110_SetCursor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Nokia5110_Clear>:
push   %rbx
mov    $0x1f8,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <lcddatawrite@plt>
add    $0xffffffff,%ebx
jne    1130 <Nokia5110_Clear+0x10>
xor    %edi,%edi
xor    %esi,%esi
pop    %rbx
jmp    1040 <Nokia5110_SetCursor@plt>

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

LLVM IR (-O2):
define void @Nokia5110_Clear() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @lcddatawrite(i32 0)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 504
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @Nokia5110_SetCursor(i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_cond_init(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_init(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int thread_syn_init(pthread_mutex_t *mutex, pthread_cond_t *cond, int *flag) {
  pthread_mutex_init(mutex, NULL);
  pthread_cond_init(cond, NULL);
  *flag = 0;
  return 0;
}


x86 assembly (clang, -O0):
<thread_syn_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_mutex_init@plt>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_cond_init@plt>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_syn_init>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
xor    %esi,%esi
call   1040 <pthread_mutex_init@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <pthread_cond_init@plt>
movl   $0x0,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @thread_syn_init(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 @pthread_mutex_init(i32* %7, i32* null)
%9 = load i32*, i32** %5
%10 = call i32 @pthread_cond_init(i32* %9, i32* null)
%11 = load i32*, i32** %6
store i32 0, i32* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @thread_syn_init(i32* %0, i32* %1, i32* nocapture writeonly %2) {
%4 = tail call i32 @pthread_mutex_init(i32* %0, i32* null)
%5 = tail call i32 @pthread_cond_init(i32* %1, i32* null)
store i32 0, i32* %2
ret i32 0
}
unsigned xrop3_0_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = 0x0000;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_0_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_0_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
not    %eax
and    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_0_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = xor i32 %4, -1
%7 = and i32 %6, %5
ret i32 %7
}
/* Variables and functions */
uintptr_t kernel_phys(void *addr) {
  return (((uintptr_t)addr) - 0xffffffff80000000);
}


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

x86 assembly (clang, -O2):
<kernel_phys>:
mov    %rdi,%rax
sub    $0xffffffff80000000,%rax
ret

LLVM IR (-O0):
define i64 @kernel_phys(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = sub i64 %4, -2147483648
ret i64 %5
}

LLVM IR (-O2):
define i64 @kernel_phys(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = add i64 %2, 2147483648
ret i64 %3
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double rnd_double(void) { return ((double)rand() / (double)RAND_MAX); }


x86 assembly (clang, -O0):
<rnd_double>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd_double>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @rnd_double() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @rnd_double() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}
/* Type definitions */
struct aa_dfa {
  int dummy;
};

/* Variables and functions */
unsigned int aa_dfa_match(struct aa_dfa *, char const *);
unsigned int aa_match(struct aa_dfa *dfa, const char *pathname) {
  return dfa ? aa_dfa_match(dfa, pathname) : 0;
}


x86 assembly (clang, -O0):
<aa_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <aa_match+0x30>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <aa_dfa_match@plt>
mov    %eax,-0x14(%rbp)
jmp    114a <aa_match+0x3a>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    114a <aa_match+0x3a>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.aa_dfa = type { i32 }
define i32 @aa_match(%struct.aa_dfa* %0, i8* %1) {
%3 = alloca %struct.aa_dfa*
%4 = alloca i8*
store %struct.aa_dfa* %0, %struct.aa_dfa** %3
store i8* %1, i8** %4
%5 = load %struct.aa_dfa*, %struct.aa_dfa** %3
%6 = icmp ne %struct.aa_dfa* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load %struct.aa_dfa*, %struct.aa_dfa** %3
%9 = load i8*, i8** %4
%10 = call i32 @aa_dfa_match(%struct.aa_dfa* %8, i8* %9)
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %7
%13 = phi i32 [ %10, %7 ], [ 0, %11 ]
ret i32 %13
}

LLVM IR (-O2):
%struct.aa_dfa = type { i32 }
define i32 @aa_match(%struct.aa_dfa* %0, i8* %1) {
%3 = icmp eq %struct.aa_dfa* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @aa_dfa_match(%struct.aa_dfa* %0, i8* %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
/* Variables and functions */
int get_closest_symbol(int, int *, char **, int /*<<< orphan*/);
int getClosestSymbolAfter(int adr, int *out_adr, char **out_label) {
  return get_closest_symbol(adr, out_adr, out_label, 0);
}


x86 assembly (clang, -O0):
<getClosestSymbolAfter>:
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
xor    %ecx,%ecx
call   1030 <get_closest_symbol@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getClosestSymbolAfter>:
xor    %ecx,%ecx
jmp    1030 <get_closest_symbol@plt>

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

LLVM IR (-O2):
define i32 @getClosestSymbolAfter(i32 %0, i32* %1, i8** %2) {
%4 = tail call i32 @get_closest_symbol(i32 %0, i32* %1, i8** %2, i32 0)
ret i32 %4
}
void my_sa_handler(int signum) {}


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

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

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

LLVM IR (-O2):
define void @my_sa_handler(i32 %0) {
ret void
}
void ff_hevc_dsp_init_arm() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_dsp_init_arm() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t hw_get_backlight(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hw_get_backlight() {
ret i32 0
}
float foo(void) { return __builtin_fmod(0, 0); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1030 <fmod@plt>
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1030 <fmod@plt>
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @foo() {
%1 = call double @fmod(double 0.000000e+00, double 0.000000e+00)
%2 = fptrunc double %1 to float
ret float %2
}

LLVM IR (-O2):
define float @foo() {
%1 = tail call double @fmod(double 0.000000e+00, double 0.000000e+00)
%2 = fptrunc double %1 to float
ret float %2
}
/* Variables and functions */
int irand(int, int);
int Q_irand(int value1, int value2) { return irand(value1, value2); }


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

x86 assembly (clang, -O2):
<Q_irand>:
jmp    1030 <irand@plt>

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

LLVM IR (-O2):
define i32 @Q_irand(i32 %0, i32 %1) {
%3 = tail call i32 @irand(i32 %0, i32 %1)
ret i32 %3
}
void protocol_irc_free_topic_data(struct topic *t) {}


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

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

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

LLVM IR (-O2):
%struct.topic = type opaque
define void @protocol_irc_free_topic_data(%struct.topic* nocapture %0) {
ret void
}
void g_utf8_strup() {}


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

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

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

LLVM IR (-O2):
define void @g_utf8_strup() {
ret void
}
const char *skip_zeroes(const char *s) {
  while (*s == '0')
    ++s;
  return s;
}


x86 assembly (clang, -O0):
<skip_zeroes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1129 <skip_zeroes+0x29>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_zeroes+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @skip_zeroes(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 48
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @skip_zeroes(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 48
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i8* %3
}
void rpdr_(dx, dy, dz) float *dx, *dy, *dz;
{ rpdr(*dx, *dy, *dz); }


x86 assembly (clang, -O0):
<rpdr_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
call   1030 <rpdr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpdr_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
movss  (%rdx),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <rpdr@plt>

LLVM IR (-O0):
define void @rpdr_(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fpext float %8 to double
%10 = load float*, float** %5
%11 = load float, float* %10
%12 = fpext float %11 to double
%13 = load float*, float** %6
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = call i32 (double, double, double, ...) bitcast (i32 (...)* @rpdr to i32 (double, double, double, ...)*)(double %9, double %12, double %15)
ret void
}

LLVM IR (-O2):
define void @rpdr_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = fpext float %4 to double
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @rpdr to i32 (double, double, double, ...)*)(double %5, double %7, double %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *const);
int /*<<< orphan*/ printf(char const *const, char *const);
char *zc_size_format(int /*<<< orphan*/, int);
void print_size(const char *const format, uint64_t size) {
  char *const s = zc_size_format(size, 1);
  printf(format, s);
  free(s);
}


x86 assembly (clang, -O0):
<print_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x1,%esi
call   1050 <zc_size_format@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_size>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %esi,%edi
mov    $0x1,%esi
call   1050 <zc_size_format@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @print_size(i8* %0, i32 %1) {
%3 = tail call i8* @zc_size_format(i32 %1, i32 1)
%4 = tail call i32 @printf(i8* %0, i8* %3)
%5 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
unsigned long hdmi_rd_reg(unsigned long);
void hdmi_wr_reg(unsigned long addr, unsigned long data) {
  unsigned long rd_data;
  (*(volatile unsigned long *)(0xd0040000 + (0x2000)) = addr);
  (*(volatile unsigned long *)(0xd0040000 + (0x2000)) = addr);
  (*(volatile unsigned long *)(0xd0040000 + (0x2004)) = data);
  rd_data = hdmi_rd_reg(addr);
  if (rd_data != data) {
  }
}


x86 assembly (clang, -O0):
<hdmi_wr_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0xd0042000,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rcx
mov    $0xd0042000,%eax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    $0xd0042004,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <hdmi_rd_reg@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1164 <hdmi_wr_reg+0x54>
jmp    1164 <hdmi_wr_reg+0x54>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdmi_wr_reg>:
mov    $0xd0042000,%eax
mov    %rdi,(%rax)
mov    %rdi,(%rax)
mov    %rsi,0x4(%rax)
jmp    1030 <hdmi_rd_reg@plt>

LLVM IR (-O0):
define void @hdmi_wr_reg(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
store volatile i64 %6, i64* inttoptr (i64 3489931264 to i64*)
%7 = load i64, i64* %3
store volatile i64 %7, i64* inttoptr (i64 3489931264 to i64*)
%8 = load i64, i64* %4
store volatile i64 %8, i64* inttoptr (i64 3489931268 to i64*)
%9 = load i64, i64* %3
%10 = call i64 @hdmi_rd_reg(i64 %9)
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = load i64, i64* %4
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
define void @hdmi_wr_reg(i64 %0, i64 %1) {
store volatile i64 %0, i64* inttoptr (i64 3489931264 to i64*)
store volatile i64 %0, i64* inttoptr (i64 3489931264 to i64*)
store volatile i64 %1, i64* inttoptr (i64 3489931268 to i64*)
%3 = tail call i64 @hdmi_rd_reg(i64 %0)
ret void
}
/* Variables and functions */
int s(int, int);
int B(int e) { return s(233, e); }


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

x86 assembly (clang, -O2):
<B>:
mov    %edi,%esi
mov    $0xe9,%edi
jmp    1030 <s@plt>

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

LLVM IR (-O2):
define i32 @B(i32 %0) {
%2 = tail call i32 @s(i32 233, i32 %0)
ret i32 %2
}