xunge/DecIR huggingface dataset:
/* Variables and functions */
float fmod(float, float);
float wrap(float x, float min, float max) {
  x = fmod(x + max, (max - min));
  if (x < 0) {
    x += (max - min);
  }
  return x + min;
}


x86 assembly (clang, -O0):
<wrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
call   1030 <fmod@plt>
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1166 <wrap+0x56>
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap>:
sub    $0x28,%rsp
movss  %xmm1,0xc(%rsp)
addss  %xmm2,%xmm0
subss  %xmm1,%xmm2
movaps %xmm2,0x10(%rsp)
movaps %xmm2,%xmm1
call   1030 <fmod@plt>
xorps  %xmm1,%xmm1
movaps %xmm0,%xmm2
cmpltss %xmm1,%xmm2
movaps 0x10(%rsp),%xmm3
andps  %xmm2,%xmm3
movss  0xeb6(%rip),%xmm1
andnps %xmm1,%xmm2
orps   %xmm3,%xmm2
addss  %xmm2,%xmm0
addss  0xc(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float @wrap(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* %6
%9 = fadd float %7, %8
%10 = load float, float* %6
%11 = load float, float* %5
%12 = fsub float %10, %11
%13 = call float @fmod(float %9, float %12)
store float %13, float* %4
%14 = load float, float* %4
%15 = fcmp olt float %14, 0.000000e+00
br i1 %15, label %16, label %22
16: ; preds = %3
%17 = load float, float* %6
%18 = load float, float* %5
%19 = fsub float %17, %18
%20 = load float, float* %4
%21 = fadd float %20, %19
store float %21, float* %4
br label %22
22: ; preds = %16, %3
%23 = load float, float* %4
%24 = load float, float* %5
%25 = fadd float %23, %24
ret float %25
}

LLVM IR (-O2):
define float @wrap(float %0, float %1, float %2) {
%4 = fadd float %0, %2
%5 = fsub float %2, %1
%6 = tail call float @fmod(float %4, float %5)
%7 = fcmp olt float %6, 0.000000e+00
%8 = select i1 %7, float %5, float -0.000000e+00
%9 = fadd float %6, %8
%10 = fadd float %9, %1
ret float %10
}
long ndb_alloc_init(long i_maxptr) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @ndb_alloc_init(i64 %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_cvolume_inc() {
  printf("NOT IMPLEMENTED:"
         "pa_cvolume_inc"
         "\n");
}


x86 assembly (clang, -O0):
<pa_cvolume_inc>:
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_cvolume_inc>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_cvolume_inc\00"
define i32 @pa_cvolume_inc() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ __NR_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
void do_null_syscall(unsigned long nr) {
  unsigned long i;
  for (i = 0; i < nr; i++)
    syscall(__NR_gettid);
}


x86 assembly (clang, -O0):
<do_null_syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1151 <do_null_syscall+0x41>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <do_null_syscall+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_null_syscall>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     113e <do_null_syscall+0x2e>
mov    %rdi,%rbx
mov    0x2ec5(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14),%edi
call   1030 <syscall@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <do_null_syscall+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__NR_gettid = global i32 0
define void @do_null_syscall(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %11, %1
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i32, i32* @__NR_gettid
%10 = call i32 @syscall(i32 %9)
br label %11
11: ; preds = %8
%12 = load i64, i64* %3
%13 = add i64 %12, 1
store i64 %13, i64* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
@__NR_gettid = global i32 0
define void @do_null_syscall(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = load i32, i32* @__NR_gettid
%6 = tail call i32 @syscall(i32 %5)
%7 = add nuw i64 %4, 1
%8 = icmp eq i64 %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
char *savestr(char *);
char *fakedate(time_t t) {
  char *cp, *cq;
  cp = ctime(&t);
  for (cq = cp; *cq && *cq != '\n'; cq++)
    ;
  *cq = '\0';
  return savestr(cp);
}


x86 assembly (clang, -O0):
<fakedate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1165 <fakedate+0x45>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1175 <fakedate+0x55>
jmp    118b <fakedate+0x6b>
jmp    117a <fakedate+0x5a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1140 <fakedate+0x20>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <savestr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fakedate>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rcx),%edx
test   %dl,%dl
je     1152 <fakedate+0x32>
cmp    $0xa,%dl
je     1152 <fakedate+0x32>
add    $0x1,%rcx
jmp    1140 <fakedate+0x20>
movb   $0x0,(%rcx)
mov    %rax,%rdi
call   1040 <savestr@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @fakedate(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = call i8* @ctime(i32* %2)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
store i8* %6, i8** %4
br label %7
7: ; preds = %20, %1
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 10
br label %17
17: ; preds = %12, %7
%18 = phi i1 [ false, %7 ], [ %16, %12 ]
br i1 %18, label %19, label %23
19: ; preds = %17
br label %20
20: ; preds = %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
br label %7
23: ; preds = %17
%24 = load i8*, i8** %4
store i8 0, i8* %24
%25 = load i8*, i8** %3
%26 = call i8* @savestr(i8* %25)
ret i8* %26
}

LLVM IR (-O2):
define i8* @fakedate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i8* @ctime(i32* %2)
br label %4
4: ; preds = %7, %1
%5 = phi i8* [ %3, %1 ], [ %8, %7 ]
%6 = load i8, i8* %5
switch i8 %6, label %7 [
i8 0, label %9
i8 10, label %9
]
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
br label %4
9: ; preds = %4, %4
store i8 0, i8* %5
%10 = call i8* @savestr(i8* %3)
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ LRDP(char *);
int /*<<< orphan*/ RDP_E(char *);
void uc6_select_dl() {
  LRDP("uc6:select_dl\n");
  RDP_E("uc6:select_dl\n");
}


x86 assembly (clang, -O0):
<uc6_select_dl>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <LRDP@plt>
lea    0xec9(%rip),%rdi
call   1030 <RDP_E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uc6_select_dl>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <LRDP@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <RDP_E@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"uc6:select_dl\0A\00"
define void @uc6_select_dl() {
%1 = call i32 @LRDP(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @RDP_E(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"uc6:select_dl\0A\00"
define void @uc6_select_dl() {
%1 = tail call i32 @LRDP(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @RDP_E(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long long gettimeofdayms(void) {
  struct timeval tv;
  unsigned long long ret;
  gettimeofday(&tv, NULL);
  ret = (unsigned long long)tv.tv_sec * 1000ULL;
  ret += (unsigned long long)tv.tv_usec / 1000ULL;
  return ret;
}


x86 assembly (clang, -O0):
<gettimeofdayms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeofdayms>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x10(%rsp),%rcx
mov    0x8(%rsp),%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rdx
9b c4 20
mul    %rdx
shr    $0x4,%rdx
add    %rdx,%rcx
mov    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @gettimeofdayms() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000
store i64 %6, i64* %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = udiv i64 %8, 1000
%10 = load i64, i64* %2
%11 = add i64 %10, %9
store i64 %11, i64* %2
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @gettimeofdayms() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = udiv i64 %8, 1000
%10 = add i64 %9, %6
ret i64 %10
}
/* Variables and functions */
int fitsBits(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int number = 0, word = 0;
  scanf("%d %d", &number, &word);
  printf("%d", fitsBits(number, word));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xeb9(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <fitsBits@plt>
lea    0xe9c(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @fitsBits(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
int __doFlopBet(struct hand *thishand) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.hand = type opaque
define i32 @__doFlopBet(%struct.hand* nocapture readnone %0) {
ret i32 0
}
unsigned long long rdtsc(void) {
  unsigned long long ret;
  asm volatile("rdtsc" : "=A"(ret));
  return ret;
}


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

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

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i64
%2 = call i64 asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @rdtsc() {
%1 = tail call i64 asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
/* Variables and functions */
void swap_oct(char *a, char *b) {
  char c;
  if (a == NULL || b == NULL)
    return;
  c = *a;
  *a = *b;
  *b = c;
}


x86 assembly (clang, -O0):
<swap_oct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1122 <swap_oct+0x22>
cmpq   $0x0,-0x10(%rbp)
jne    1127 <swap_oct+0x27>
jmp    1145 <swap_oct+0x45>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_oct>:
test   %rdi,%rdi
je     1112 <swap_oct+0x12>
test   %rsi,%rsi
je     1112 <swap_oct+0x12>
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @swap_oct(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %8, %2
br label %20
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
store i8 %14, i8* %5
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = load i8*, i8** %3
store i8 %16, i8* %17
%18 = load i8, i8* %5
%19 = load i8*, i8** %4
store i8 %18, i8* %19
br label %20
20: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @swap_oct(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = load i8, i8* %0
%8 = load i8, i8* %1
store i8 %8, i8* %0
store i8 %7, i8* %1
br label %9
9: ; preds = %2, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _rand_uuid_gen(void *);
void uuid_gen(void *uuidaddr) { _rand_uuid_gen(uuidaddr); }


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

x86 assembly (clang, -O2):
<uuid_gen>:
jmp    1030 <_rand_uuid_gen@plt>

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

LLVM IR (-O2):
define void @uuid_gen(i8* %0) {
%2 = tail call i32 @_rand_uuid_gen(i8* %0)
ret void
}
void troca(int *data1, int *data2) {
  int temp;
  temp = *data1;
  *data1 = *data2;
  *data2 = temp;
}


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

LLVM IR (-O0):
define void @troca(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 @troca(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*/ BNCIO(int);
long int BNCDigitDown() {
  long int stat = 99;
  BNCIO(43);
  return (stat);
}


x86 assembly (clang, -O0):
<BNCDigitDown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x63,-0x8(%rbp)
mov    $0x2b,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @BNCDigitDown() {
%1 = alloca i64
store i64 99, i64* %1
%2 = call i32 @BNCIO(i32 43)
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @BNCDigitDown() {
%1 = tail call i32 @BNCIO(i32 43)
ret i64 99
}
/* Type definitions */
struct rlimit {
  int dummy;
};

/* Variables and functions */
scalar_t__ setrlimit(int, struct rlimit *);
int /*<<< orphan*/ shutdown(int, char *, int);
void setr(int type, struct rlimit *rlim) {
  if (setrlimit(type, rlim))
    shutdown(7, "setrlimit()", 146 - 1);
}


x86 assembly (clang, -O0):
<setr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <setrlimit@plt>
cmp    $0x0,%rax
je     115b <setr+0x3b>
mov    $0x7,%edi
lea    0xeaf(%rip),%rsi
mov    $0x91,%edx
call   1030 <shutdown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setr>:
push   %rax
call   1040 <setrlimit@plt>
test   %rax,%rax
je     1142 <setr+0x22>
lea    0xece(%rip),%rsi
mov    $0x7,%edi
mov    $0x91,%edx
pop    %rax
jmp    1030 <shutdown@plt>
pop    %rax
ret

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

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@.str = [12 x i8] c"setrlimit()\00"
define void @setr(i32 %0, %struct.rlimit* %1) {
%3 = tail call i64 @setrlimit(i32 %0, %struct.rlimit* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @shutdown(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 145)
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void logit(FILE *fp, char *client, char *message) {
  fprintf(fp, "%s", client);
  fprintf(fp, message);
  fprintf(fp, "\n");
  fflush(fp);
}


x86 assembly (clang, -O0):
<logit>:
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    -0x10(%rbp),%rdx
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logit>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <fflush@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @logit(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32*, i32** %4
%11 = load i8*, i8** %6
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* %11)
%13 = load i32*, i32** %4
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32*, i32** %4
%16 = call i32 @fflush(i32* %15)
ret void
}

LLVM IR (-O2):
define void @logit(i32* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call i32 @fputs(i8* %1, i32* %0)
%5 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* %2)
%6 = tail call i32 @fputc(i32 10, i32* %0)
%7 = tail call i32 @fflush(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *safe_alloc(size_t size) {
  void *ptr;
  if ((ptr = malloc(size)) == NULL) {
    perror("Out of memory");
    exit(EXIT_FAILURE);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<safe_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    116d <safe_alloc+0x3d>
lea    0xea6(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_alloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     113d <safe_alloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
@EXIT_FAILURE = global i32 0
define i8* @safe_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @safe_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pthread_rwlock_timedrdlock;
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  (void)pthread_rwlock_timedrdlock;
  exit(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)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
@pthread_rwlock_timedrdlock = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
double sqrt(double);
double user_func_4(double x, double y, double z, double q) {
  return sqrt(x * x + y * y + z * z + q * q);
}


x86 assembly (clang, -O0):
<user_func_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_func_4>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm3,%xmm3
addsd  %xmm2,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
jb     113e <user_func_4+0x2e>
xorps  %xmm0,%xmm0
sqrtsd %xmm3,%xmm0
ret
movapd %xmm3,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @user_func_4(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %5
%11 = load double, double* %6
%12 = load double, double* %6
%13 = fmul double %11, %12
%14 = call double @llvm.fmuladd.f64(double %9, double %10, double %13)
%15 = load double, double* %7
%16 = load double, double* %7
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double %14)
%18 = load double, double* %8
%19 = load double, double* %8
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double %17)
%21 = call double @sqrt(double %20)
ret double %21
}

LLVM IR (-O2):
define double @user_func_4(double %0, double %1, double %2, double %3) {
%5 = fmul double %1, %1
%6 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %5)
%7 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %6)
%8 = tail call double @llvm.fmuladd.f64(double %3, double %3, double %7)
%9 = tail call double @sqrt(double %8)
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ opener(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int main() {
  FILE *file;
  file = fopen("test1", "r");
  if (file != NULL) {
    opener(file);
  } else {
    printf("File opening failed\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1178 <main+0x38>
mov    -0x8(%rbp),%rdi
call   1030 <opener@plt>
jmp    118b <main+0x4b>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0xeb7(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1165 <main+0x25>
mov    %rax,%rdi
call   1040 <opener@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe9c(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"test1\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [21 x i8] c"File opening failed\0A\00"
define i32 @main() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32*, i32** %1
%7 = call i32 @opener(i32* %6)
br label %11
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"test1\00"
@.str.1 = [2 x i8] c"r\00"
@str = [20 x i8] c"File opening failed\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @opener(i32* %1)
ret i32 0
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *malloc_(size_t size) {
  void *p;
  p = malloc(size);
  if (!p) {
    perror("malloc");
    abort();
  }
  return p;
}


x86 assembly (clang, -O0):
<malloc_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1167 <malloc_+0x37>
lea    0xea5(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <malloc_+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"malloc\00"
define i8* @malloc_(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
define noalias i8* @malloc_(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i8* %2
}
int test_imm_08uint16_reg(unsigned short val) {
  return ((val) & (0x08 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_08uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 8
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
main() {
  int i;
  for (i = 1; i < 128; i++) {
    printf("%d , %x , %c \n", i, i, i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1156 <main+0x46>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%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
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x80,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d , %x , %c \0A\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 = %11, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 128
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
br label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %3
14: ; preds = %3
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d , %x , %c \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 128
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void glmGenerateNormalizedInverseQuaternionf(float result[4],
                                             const float q[4]) {
  result[0] = q[0];
  result[1] = -q[1];
  result[2] = -q[2];
  result[3] = -q[3];
}


x86 assembly (clang, -O0):
<glmGenerateNormalizedInverseQuaternionf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateNormalizedInverseQuaternionf>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
movaps 0xeec(%rip),%xmm1
xorps  %xmm1,%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
xorps  %xmm1,%xmm0
movss  %xmm0,0x8(%rdi)
movss  0xc(%rsi),%xmm0
xorps  %xmm1,%xmm0
movss  %xmm0,0xc(%rdi)
ret

LLVM IR (-O0):
define void @glmGenerateNormalizedInverseQuaternionf(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %4
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = fneg float %12
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i64 1
store float %13, float* %15
%16 = load float*, float** %4
%17 = getelementptr inbounds float, float* %16, i64 2
%18 = load float, float* %17
%19 = fneg float %18
%20 = load float*, float** %3
%21 = getelementptr inbounds float, float* %20, i64 2
store float %19, float* %21
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 3
%24 = load float, float* %23
%25 = fneg float %24
%26 = load float*, float** %3
%27 = getelementptr inbounds float, float* %26, i64 3
store float %25, float* %27
ret void
}

LLVM IR (-O2):
define void @glmGenerateNormalizedInverseQuaternionf(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
store float %3, float* %0
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = fneg float %5
%7 = getelementptr inbounds float, float* %0, i64 1
store float %6, float* %7
%8 = getelementptr inbounds float, float* %1, i64 2
%9 = load float, float* %8
%10 = fneg float %9
%11 = getelementptr inbounds float, float* %0, i64 2
store float %10, float* %11
%12 = getelementptr inbounds float, float* %1, i64 3
%13 = load float, float* %12
%14 = fneg float %13
%15 = getelementptr inbounds float, float* %0, i64 3
store float %14, float* %15
ret void
}
/* Variables and functions */
int cgiFromCommandLine(int *, char **, int);
int cgiSpoof(int *pArgc, char *argv[]) {
  return cgiFromCommandLine(pArgc, argv, 1);
}


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

x86 assembly (clang, -O2):
<cgiSpoof>:
mov    $0x1,%edx
jmp    1030 <cgiFromCommandLine@plt>

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

LLVM IR (-O2):
define i32 @cgiSpoof(i32* %0, i8** %1) {
%3 = tail call i32 @cgiFromCommandLine(i32* %0, i8** %1, i32 1)
ret i32 %3
}
int do_054() { return 54; }


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

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

LLVM IR (-O0):
define i32 @do_054() {
ret i32 54
}

LLVM IR (-O2):
define i32 @do_054() {
ret i32 54
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t Function10Int32(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e,
                        int32_t f, int32_t g, int32_t h, int32_t i, int32_t j) {
  return a + b + c + d + e + f + g + h + i + j;
}


x86 assembly (clang, -O0):
<Function10Int32>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
add    -0x28(%rbp),%rax
add    -0x30(%rbp),%rax
add    0x10(%rbp),%rax
add    0x18(%rbp),%rax
add    0x20(%rbp),%rax
add    0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Function10Int32>:
lea    (%rdi,%rsi,1),%rax
add    %rdx,%rax
add    %rcx,%rax
add    %r8,%rax
add    %r9,%rax
add    0x8(%rsp),%rax
add    0x10(%rsp),%rax
add    0x18(%rsp),%rax
add    0x20(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @Function10Int32(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
store i64 %0, i64* %11
store i64 %1, i64* %12
store i64 %2, i64* %13
store i64 %3, i64* %14
store i64 %4, i64* %15
store i64 %5, i64* %16
store i64 %6, i64* %17
store i64 %7, i64* %18
store i64 %8, i64* %19
store i64 %9, i64* %20
%21 = load i64, i64* %11
%22 = load i64, i64* %12
%23 = add nsw i64 %21, %22
%24 = load i64, i64* %13
%25 = add nsw i64 %23, %24
%26 = load i64, i64* %14
%27 = add nsw i64 %25, %26
%28 = load i64, i64* %15
%29 = add nsw i64 %27, %28
%30 = load i64, i64* %16
%31 = add nsw i64 %29, %30
%32 = load i64, i64* %17
%33 = add nsw i64 %31, %32
%34 = load i64, i64* %18
%35 = add nsw i64 %33, %34
%36 = load i64, i64* %19
%37 = add nsw i64 %35, %36
%38 = load i64, i64* %20
%39 = add nsw i64 %37, %38
ret i64 %39
}

LLVM IR (-O2):
define i64 @Function10Int32(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = add nsw i64 %1, %0
%12 = add nsw i64 %11, %2
%13 = add nsw i64 %12, %3
%14 = add nsw i64 %13, %4
%15 = add nsw i64 %14, %5
%16 = add nsw i64 %15, %6
%17 = add nsw i64 %16, %7
%18 = add nsw i64 %17, %8
%19 = add nsw i64 %18, %9
ret i64 %19
}
void dlog_finish() {}


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

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

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

LLVM IR (-O2):
define void @dlog_finish() {
ret void
}
int readIntB(char **pInData) {
  char *pData = *pInData;
  int iRet = *((int *)pData);
  pData += 4;
  *pInData = pData;
  return iRet;
}


x86 assembly (clang, -O0):
<readIntB>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readIntB>:
mov    (%rdi),%rcx
mov    (%rcx),%eax
add    $0x4,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i32 @readIntB(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
%4 = alloca i32
store i8** %0, i8*** %2
%5 = load i8**, i8*** %2
%6 = load i8*, i8** %5
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %4
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 4
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = load i8**, i8*** %2
store i8* %12, i8** %13
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
define i32 @readIntB(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = getelementptr inbounds i8, i8* %2, i64 4
store i8* %5, i8** %0
ret i32 %4
}
int main(void) {
  struct {
    int i;
    int xxx[0x100];
  } v = {0};
  return v.i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x408(%rbp),%rdi
xor    %esi,%esi
mov    $0x404,%edx
call   1030 <memset@plt>
mov    -0x408(%rbp),%eax
add    $0x410,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, [256 x i32] }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
store i32 0, i32* %1
%3 = bitcast %struct.anon* %2 to i8*
%4 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int fun(int a) {
  printf("a ========== %d\n", a);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"a ========== %d\0A\00"
define i32 @fun(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
int tls_deinit(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @tls_deinit() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @tls_deinit() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "%s",
          "plom-ii - plomlompom's ii fork - "
          "0.2"
          "\n"
          "(c)opyright MMV-MMVI Anselm R. Garbe\n"
          "(c)opyright MMV-MMXI Nico Golde\n"
          "(c)opyright MMXII    Christian Heller\n"
          "usage: ii [-i <irc dir>] [-s <host>] [-p <port>]\n"
          "          [-n <nick>] [-k <password>] [-f <fullname>]\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xec8(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecb(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [248 x i8] c"plom-ii - plomlompom's ii fork - 0.2\0A(c)opyright MMV-MMVI Anselm R. Garbe\0A(c)opyright MMV-MMXI Nico Golde\0A(c)opyright MMXII Christian Heller\0Ausage: ii [-i <irc dir>] [-s <host>] [-p <port>]\0A [-n <nick>] [-k <password>] [-f <fullname>]\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([248 x i8], [248 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [248 x i8] c"plom-ii - plomlompom's ii fork - 0.2\0A(c)opyright MMV-MMVI Anselm R. Garbe\0A(c)opyright MMV-MMXI Nico Golde\0A(c)opyright MMXII Christian Heller\0Ausage: ii [-i <irc dir>] [-s <host>] [-p <port>]\0A [-n <nick>] [-k <password>] [-f <fullname>]\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([248 x i8], [248 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}