xunge/DecIR huggingface dataset:
/* Type definitions */
struct h264_vui {
  int dummy;
};
struct bitstream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int h264_svc_vui_parameters(struct bitstream *str, struct h264_vui *vui) {
  abort();
  return 0;
}


x86 assembly (clang, -O0):
<h264_svc_vui_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
%struct.bitstream = type { i32 }
%struct.h264_vui = type { i32 }
define i32 @h264_svc_vui_parameters(%struct.bitstream* %0, %struct.h264_vui* %1) {
%3 = alloca %struct.bitstream*
%4 = alloca %struct.h264_vui*
store %struct.bitstream* %0, %struct.bitstream** %3
store %struct.h264_vui* %1, %struct.h264_vui** %4
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.bitstream = type { i32 }
%struct.h264_vui = type { i32 }
define i32 @h264_svc_vui_parameters(%struct.bitstream* nocapture readnone %0, %struct.h264_vui* nocapture readnone %1) {
%3 = tail call i32 (...) @abort()
unreachable
}
int main() {
  int a = 23;
  const int *pc = &a;
  int *const cp = &a;
  ++pc;
  *cp = 24;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x17,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x18,(%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 i32*
%3 = alloca i32*
store i32 23, i32* %1
store i32* %1, i32** %2
store i32* %1, i32** %3
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i32 1
store i32* %5, i32** %2
%6 = load i32*, i32** %3
store i32 24, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char *argv[]) {
  int a = 100;
  printf("%d, %d, %d\n", a <= 10, a = 10, a > 10);
  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)
movl   $0x64,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%esi
movl   $0xa,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xead(%rip),%rdi
mov    $0xa,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
mov    $0xa,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d, %d, %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
%7 = load i32, i32* %6
%8 = icmp sle i32 %7, 10
%9 = zext i1 %8 to i32
store i32 10, i32* %6
%10 = load i32, i32* %6
%11 = icmp sgt i32 %10, 10
%12 = zext i1 %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %9, i32 10, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d, %d, %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0, i32 10, i32 0)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int x;
};
typedef TYPE_1__ XExposeEvent;

/* Variables and functions */
void set_XExposeEvent_x(void *_p, int _v) { ((XExposeEvent *)_p)->x = (int)_v; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XExposeEvent_x(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 %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XExposeEvent_x(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void quit(int status) { exit(status < 0100 ? status : 077); }


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    1130 <quit+0x20>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113d <quit+0x2d>
mov    $0x3f,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <quit+0x2d>
mov    -0x8(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<quit>:
push   %rax
cmp    $0x3f,%edi
mov    $0x3f,%eax
cmovge %eax,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @quit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 64
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi i32 [ %6, %5 ], [ 63, %7 ]
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
define void @quit(i32 %0) {
%2 = icmp slt i32 %0, 63
%3 = select i1 %2, i32 %0, i32 63
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int XFree(void *data) {
  free((data));
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @XFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 1
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void uint16_to_b2_BE(uint32_t data, uint8_t *b) {
  b[0] = (data >> 8) & 0xFF;
  b[1] = data & 0xFF;
}


x86 assembly (clang, -O0):
<uint16_to_b2_BE>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint16_to_b2_BE>:
mov    %edi,%eax
movzbl %ah,%ecx
mov    %ecx,(%rsi)
movzbl %al,%eax
mov    %eax,0x4(%rsi)
ret

LLVM IR (-O0):
define void @uint16_to_b2_BE(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 = ashr i32 %5, 8
%7 = and i32 %6, 255
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %3
%11 = and i32 %10, 255
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
define void @uint16_to_b2_BE(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 8
%4 = and i32 %3, 255
store i32 %4, i32* %1
%5 = and i32 %0, 255
%6 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int pthread_self();
int /*<<< orphan*/ sleep(int);
void sig_handler(int signo) {
  printf("SIGNAL thid %d : %d\n", pthread_self(), signo);
  sleep(1);
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
mov    -0x4(%rbp),%edx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1050 <sleep@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"SIGNAL thid %d : %d\0A\00"
define void @sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @pthread_self()
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = call i32 @sleep(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"SIGNAL thid %d : %d\0A\00"
define void @sig_handler(i32 %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0)
%4 = tail call i32 @sleep(i32 1)
ret void
}
int test_imm_15uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x15 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_15uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 21
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ openssl_set_certs(char **);
int /*<<< orphan*/ safe_free_strs(char **);
char **storage_load(char *);
void auth_ssl_load(int server) {
  char **str = storage_load(server ? "accept" : "connect");
  openssl_set_certs(str);
  safe_free_strs(str);
}


x86 assembly (clang, -O0):
<auth_ssl_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xec2(%rip),%rdi
lea    0xeb4(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
call   1030 <storage_load@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <openssl_set_certs@plt>
mov    -0x10(%rbp),%rdi
call   1050 <safe_free_strs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auth_ssl_load>:
push   %rbx
test   %edi,%edi
lea    0xecd(%rip),%rax
lea    0xebf(%rip),%rdi
cmove  %rax,%rdi
call   1030 <storage_load@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <openssl_set_certs@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <safe_free_strs@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"accept\00"
@.str.1 = [8 x i8] c"connect\00"
define void @auth_ssl_load(i32 %0) {
%2 = alloca i32
%3 = alloca i8**
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%8 = call i8** @storage_load(i8* %7)
store i8** %8, i8*** %3
%9 = load i8**, i8*** %3
%10 = call i32 @openssl_set_certs(i8** %9)
%11 = load i8**, i8*** %3
%12 = call i32 @safe_free_strs(i8** %11)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"accept\00"
@.str.1 = [8 x i8] c"connect\00"
define void @auth_ssl_load(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
%4 = tail call i8** @storage_load(i8* %3)
%5 = tail call i32 @openssl_set_certs(i8** %4)
%6 = tail call i32 @safe_free_strs(i8** %4)
ret void
}
/* Variables and functions */
double exp(double);
void vecexp(double *values, const int n) {
  int i;
  for (i = 0; i < n; ++i) {
    values[i] = exp(values[i]);
  }
}


x86 assembly (clang, -O0):
<vecexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <vecexp+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <vecexp+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vecexp>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114a <vecexp+0x3a>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <vecexp+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @vecexp(double* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = load double, double* %8
%10 = tail call double @exp(double %9)
store double %10, double* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
void brcm_pm_enet_remove(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @abc9defghijklmnopqrstuvwxzy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ flockfile(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void lock_stderr(void) { flockfile(stderr); }


x86 assembly (clang, -O0):
<lock_stderr>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <flockfile@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_stderr>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <flockfile@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @lock_stderr() {
%1 = load i32, i32* @stderr
%2 = call i32 @flockfile(i32 %1)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @lock_stderr() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @flockfile(i32 %1)
ret void
}
/* Variables and functions */
void *memscan(void *addr, int c, size_t size) {
  unsigned char *p = (unsigned char *)addr;
  while (size) {
    if (*p == c)
      return (void *)p;
    p++;
    size--;
  }
  return (void *)p;
}


x86 assembly (clang, -O0):
<memscan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115c <memscan+0x5c>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    113f <memscan+0x3f>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <memscan+0x64>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    1117 <memscan+0x17>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memscan>:
mov    %rdi,%rax
test   %rdx,%rdx
je     1124 <memscan+0x24>
lea    (%rax,%rdx,1),%rcx
nopl   0x0(%rax)
movzbl (%rax),%edi
cmp    %esi,%edi
je     1124 <memscan+0x24>
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1110 <memscan+0x10>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @memscan(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %17, label %5
5: ; preds = %3
%6 = getelementptr i8, i8* %0, i64 %2
br label %7
7: ; preds = %5, %13
%8 = phi i8* [ %14, %13 ], [ %0, %5 ]
%9 = phi i64 [ %15, %13 ], [ %2, %5 ]
%10 = load i8, i8* %8
%11 = zext i8 %10 to i32
%12 = icmp eq i32 %11, %1
br i1 %12, label %17, label %13
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = add i64 %9, -1
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %7
17: ; preds = %7, %13, %3
%18 = phi i8* [ %0, %3 ], [ %6, %13 ], [ %8, %7 ]
ret i8* %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_iochannel_get_recv_fd() {
  printf("NOT IMPLEMENTED:"
         "pa_iochannel_get_recv_fd"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"NOT IMPLEMENTED:pa_iochannel_get_recv_fd\0A\00"
define i32 @pa_iochannel_get_recv_fd() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_iochannel_get_recv_fd\00"
define i32 @pa_iochannel_get_recv_fd() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void INT_Excep_TPU1_TGI1B(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU1_TGI1B() {
ret void
}
/* Type definitions */
union i2c_smbus_data {
  int byte;
};
typedef int /*<<< orphan*/ __s32;

/* Variables and functions */
int /*<<< orphan*/ i2c_smbus_access(int, int /*<<< orphan*/, int, int,
                                    union i2c_smbus_data *);
extern __s32 i2c_smbus_write_byte_data(int fd, int cmd, int value) {
  union i2c_smbus_data data;
  data.byte = value;
  return i2c_smbus_access(fd, 0, cmd, 2, &data);
}


x86 assembly (clang, -O0):
<i2c_smbus_write_byte_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
xor    %esi,%esi
mov    $0x2,%ecx
lea    -0x10(%rbp),%r8
call   1030 <i2c_smbus_access@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_smbus_write_byte_data>:
push   %rax
mov    %esi,%eax
mov    %edx,(%rsp)
mov    %rsp,%r8
xor    %esi,%esi
mov    %eax,%edx
mov    $0x2,%ecx
call   1030 <i2c_smbus_access@plt>
pop    %rcx
ret

LLVM IR (-O0):
%union.i2c_smbus_data = type { i32 }
define i32 @i2c_smbus_write_byte_data(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %union.i2c_smbus_data
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = bitcast %union.i2c_smbus_data* %7 to i32*
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @i2c_smbus_access(i32 %10, i32 0, i32 %11, i32 2, %union.i2c_smbus_data* %7)
ret i32 %12
}

LLVM IR (-O2):
%union.i2c_smbus_data = type { i32 }
define i32 @i2c_smbus_write_byte_data(i32 %0, i32 %1, i32 %2) {
%4 = alloca %union.i2c_smbus_data
%5 = bitcast %union.i2c_smbus_data* %4 to i8*
%6 = getelementptr inbounds %union.i2c_smbus_data, %union.i2c_smbus_data* %4, i64 0, i32 0
store i32 %2, i32* %6
%7 = call i32 @i2c_smbus_access(i32 %0, i32 0, i32 %1, i32 2, %union.i2c_smbus_data* %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ configureMultiProtocolPatch();
void refreshMultiProtocolPatch(void) { configureMultiProtocolPatch(); }


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

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

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

LLVM IR (-O2):
define void @refreshMultiProtocolPatch() {
%1 = tail call i32 (...) @configureMultiProtocolPatch()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ readData4(int, float *);
int /*<<< orphan*/ writeData4(int, int *);
void do_position(int socketfd, int id) {
  writeData4(socketfd, &id);
  float x, y;
  readData4(socketfd, &x);
  readData4(socketfd, &y);
  printf("Coordinate result: < %f %f >\n", x, y);
}


x86 assembly (clang, -O0):
<do_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1040 <writeData4@plt>
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
call   1050 <readData4@plt>
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1050 <readData4@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_position>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,0xc(%rsp)
lea    0xc(%rsp),%rsi
call   1040 <writeData4@plt>
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
call   1050 <readData4@plt>
lea    0x4(%rsp),%rsi
mov    %ebx,%edi
call   1050 <readData4@plt>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Coordinate result: < %f %f >\0A\00"
define void @do_position(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @writeData4(i32 %7, i32* %4)
%9 = load i32, i32* %3
%10 = call i32 @readData4(i32 %9, float* %5)
%11 = load i32, i32* %3
%12 = call i32 @readData4(i32 %11, float* %6)
%13 = load float, float* %5
%14 = load float, float* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), float %13, float %14)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Coordinate result: < %f %f >\0A\00"
define void @do_position(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store i32 %1, i32* %3
%6 = call i32 @writeData4(i32 %0, i32* %3)
%7 = bitcast float* %4 to i8*
%8 = bitcast float* %5 to i8*
%9 = call i32 @readData4(i32 %0, float* %4)
%10 = call i32 @readData4(i32 %0, float* %5)
%11 = load float, float* %4
%12 = load float, float* %5
%13 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), float %11, float %12)
ret void
}
int count(int n) {
  int s = 1, c = 0;
  while (1) {
    s *= 2;
    c++;
    if (s >= n)
      break;
  }
  return c;
}


x86 assembly (clang, -O0):
<count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     1138 <count+0x38>
jmp    113d <count+0x3d>
jmp    1115 <count+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count>:
xor    %eax,%eax
mov    $0x1,%ecx
nopw   0x0(%rax,%rax,1)
add    %ecx,%ecx
add    $0x1,%eax
cmp    %edi,%ecx
jl     1110 <count+0x10>
ret

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

LLVM IR (-O2):
define i32 @count(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = phi i32 [ 0, %1 ], [ %6, %2 ]
%5 = shl nsw i32 %3, 1
%6 = add nuw nsw i32 %4, 1
%7 = icmp slt i32 %5, %0
br i1 %7, label %2, label %8
8: ; preds = %2
ret i32 %6
}
int abs(int val) {
  if (val < 0) {
    return -val;
  }
  return val;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *, char const *);
void buildid_handler(const char *buf) {
  const unsigned *bootrom = (const unsigned *)0x10000000;
  const char *buildid = (const char *)(0x10000000 + bootrom[1]);
  const char *date = (const char *)(0x10000000 + bootrom[2]);
  printk("BuildID:\t%s\n", buildid);
  printk("Build Date:\t%s\n", date);
}


x86 assembly (clang, -O0):
<buildid_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x10000000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
add    $0x10000000,%eax
mov    %eax,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
add    $0x10000000,%eax
mov    %eax,%eax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printk@plt>
mov    -0x20(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <printk@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildid_handler>:
push   %rbx
mov    $0x10000000,%ebx
mov    0x10000004,%esi
add    %ebx,%esi
add    0x10000008,%ebx
lea    0xed3(%rip),%rdi
call   1030 <printk@plt>
lea    0xed4(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printk@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"BuildID:\09%s\0A\00"
@.str.1 = [16 x i8] c"Build Date:\09%s\0A\00"
define void @buildid_handler(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
store i32* inttoptr (i64 268435456 to i32*), i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = add i32 268435456, %8
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %4
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = add i32 268435456, %14
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %5
%18 = load i8*, i8** %4
%19 = call i32 @printk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = load i8*, i8** %5
%21 = call i32 @printk(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %20)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"BuildID:\09%s\0A\00"
@.str.1 = [16 x i8] c"Build Date:\09%s\0A\00"
define void @buildid_handler(i8* nocapture readnone %0) {
%2 = load i32, i32* inttoptr (i64 268435460 to i32*)
%3 = add i32 %2, 268435456
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = load i32, i32* inttoptr (i64 268435464 to i32*)
%7 = add i32 %6, 268435456
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @printk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %5)
%11 = tail call i32 @printk(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find_queen_positions();
int main(int argc, char *argv[]) {
  find_queen_positions();
  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)
mov    $0x0,%al
call   1030 <find_queen_positions@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @find_queen_positions()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ UINT64_C(int);
scalar_t__ rgph_t1ha64s_mux(int /*<<< orphan*/, int /*<<< orphan*/);
void rgph_t1ha64s_fmix1(uint64_t k, uint64_t h[]) {
  h[0] += rgph_t1ha64s_mux(k, UINT64_C(0x82434fe90edcef39));
}


x86 assembly (clang, -O0):
<rgph_t1ha64s_fmix1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0xedcef39,%edi
call   1030 <UINT64_C@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <rgph_t1ha64s_mux@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq (%rax),%rcx
add    %rdx,%rcx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_t1ha64s_fmix1>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0xedcef39,%edi
call   1030 <UINT64_C@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <rgph_t1ha64s_mux@plt>
add    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @rgph_t1ha64s_fmix1(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 = call i32 @UINT64_C(i32 249360185)
%7 = call i64 @rgph_t1ha64s_mux(i32 %5, i32 %6)
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
%12 = add nsw i64 %11, %7
%13 = trunc i64 %12 to i32
store i32 %13, i32* %9
ret void
}

LLVM IR (-O2):
define void @rgph_t1ha64s_fmix1(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @UINT64_C(i32 249360185)
%4 = tail call i64 @rgph_t1ha64s_mux(i32 %0, i32 %3)
%5 = load i32, i32* %1
%6 = trunc i64 %4 to i32
%7 = add i32 %5, %6
store i32 %7, i32* %1
ret void
}
void checkHeapNode(void *node) {}


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

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

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

LLVM IR (-O2):
define void @checkHeapNode(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f(long long a) {
  if ((a & 0xffffffffLL) != 0)
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0xffffffff,%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     113b <f+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
jne    1115 <f+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 4294967295
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f(i64 %0) {
%2 = and i64 %0, 4294967295
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int sqrt(double const);
double rho_huber_without_sqrt(const double x2, const double c) {
  double c2 = c * c;
  if (x2 < c2)
    return x2;
  else
    return 2 * c * sqrt(x2) - c2;
}


x86 assembly (clang, -O0):
<rho_huber_without_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1154 <rho_huber_without_sqrt+0x44>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a2 <rho_huber_without_sqrt+0x92>
movsd  0xea4(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  -0x28(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rho_huber_without_sqrt>:
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
ucomisd %xmm0,%xmm2
ja     114e <rho_huber_without_sqrt+0x3e>
sub    $0x18,%rsp
addsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  %xmm2,0x10(%rsp)
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @rho_huber_without_sqrt(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %5
%8 = load double, double* %5
%9 = fmul double %7, %8
store double %9, double* %6
%10 = load double, double* %4
%11 = load double, double* %6
%12 = fcmp olt double %10, %11
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load double, double* %4
store double %14, double* %3
br label %24
15: ; preds = %2
%16 = load double, double* %5
%17 = fmul double 2.000000e+00, %16
%18 = load double, double* %4
%19 = call i32 @sqrt(double %18)
%20 = sitofp i32 %19 to double
%21 = load double, double* %6
%22 = fneg double %21
%23 = call double @llvm.fmuladd.f64(double %17, double %20, double %22)
store double %23, double* %3
br label %24
24: ; preds = %15, %13
%25 = load double, double* %3
ret double %25
}

LLVM IR (-O2):
define double @rho_huber_without_sqrt(double %0, double %1) {
%3 = fmul double %1, %1
%4 = fcmp ogt double %3, %0
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = fmul double %1, 2.000000e+00
%7 = tail call i32 @sqrt(double %0)
%8 = sitofp i32 %7 to double
%9 = fneg double %3
%10 = tail call double @llvm.fmuladd.f64(double %6, double %8, double %9)
br label %11
11: ; preds = %2, %5
%12 = phi double [ %10, %5 ], [ %0, %2 ]
ret double %12
}
/* Variables and functions */
double strtod(char const *, int /*<<< orphan*/);
double atof(const char *nptr) { return (strtod(nptr, 0)); }


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

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

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

LLVM IR (-O2):
define double @atof(i8* %0) {
%2 = tail call double @strtod(i8* %0, i32 0)
ret double %2
}
int isupper(int c) { return c >= 'A' && c <= 'Z'; }


x86 assembly (clang, -O0):
<isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void ff_hevc_put_hevc_epel_h4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h4_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 1; i <= 100; i++) {
    if (i % 2 == 0) {
      printf("%d", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1166 <main+0x56>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1153 <main+0x43>
mov    -0x8(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1158 <main+0x48>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    1138 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x65,%ebx
je     1149 <main+0x39>
test   $0x1,%bl
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 100
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %6
br label %14
14: ; preds = %13
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 1, %0 ], [ %8, %7 ]
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %1, %5
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 101
br i1 %9, label %10, label %1
10: ; preds = %7
ret i32 0
}
void *baz(void *s, void *a) { return a; }


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

x86 assembly (clang, -O2):
<baz>:
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i8* @baz(i8* nocapture readnone %0, i8* readnone returned %1) {
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ lib1();
int main(int argc __attribute__((unused)),
         char **argv __attribute__((unused))) {
  lib1();
  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)
mov    $0x0,%al
call   1030 <lib1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @lib1()
ret i32 0
}
/* Variables and functions */
int printf(char *, unsigned long long);
int print_ulong_long(unsigned long long v) { return printf("%llu", v); }


x86 assembly (clang, -O0):
<print_ulong_long>:
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):
<print_ulong_long>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
define i32 @print_ulong_long(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 %2
}
/* Variables and functions */
char *ey_fileextension(char const *);
int /*<<< orphan*/ strcmp(char const *, char *);
int ey_file_is_header(const char *filename) {
  const char *ext = ey_fileextension(filename);
  if (ext[0])
    ext++;
  return !strcmp(ext, "h");
}


x86 assembly (clang, -O0):
<ey_file_is_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ey_fileextension@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <ey_file_is_header+0x32>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ey_file_is_header>:
push   %rax
call   1030 <ey_fileextension@plt>
cmpb   $0x1,(%rax)
sbb    $0xffffffffffffffff,%rax
lea    0xecc(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"h\00"
define i32 @ey_file_is_header(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @ey_fileextension(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %1
%14 = load i8*, i8** %3
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"h\00"
define i32 @ey_file_is_header(i8* %0) {
%2 = tail call i8* @ey_fileextension(i8* %0)
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
%5 = zext i1 %4 to i64
%6 = getelementptr i8, i8* %2, i64 %5
%7 = tail call i32 @strcmp(i8* %6, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ echo();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdscr;
void init() {
  echo();
  curs_set(TRUE);
  keypad(stdscr, FALSE);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <echo@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1050 <curs_set@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
mov    0x2e77(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1030 <echo@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1050 <curs_set@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
mov    0x2e7a(%rip),%rax
mov    (%rax),%esi
pop    %rax
jmp    1040 <keypad@plt>

LLVM IR (-O0):
@TRUE = global i32 0
@stdscr = global i32 0
@FALSE = global i32 0
define void @init() {
%1 = call i32 (...) @echo()
%2 = load i32, i32* @TRUE
%3 = call i32 @curs_set(i32 %2)
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @FALSE
%6 = call i32 @keypad(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@TRUE = global i32 0
@stdscr = global i32 0
@FALSE = global i32 0
define void @init() {
%1 = tail call i32 (...) @echo()
%2 = load i32, i32* @TRUE
%3 = tail call i32 @curs_set(i32 %2)
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @FALSE
%6 = tail call i32 @keypad(i32 %4, i32 %5)
ret void
}