xunge/DecIR huggingface dataset:
int dheap_parent_index(int i, int n) {
  if (i == 0)
    return -1;
  else
    return (i - 1) / 2;
}


x86 assembly (clang, -O0):
<dheap_parent_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <dheap_parent_index+0x20>
movl   $0xffffffff,-0x4(%rbp)
jmp    1131 <dheap_parent_index+0x31>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dheap_parent_index>:
test   %edi,%edi
je     1114 <dheap_parent_index+0x14>
mov    %edi,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0xffffffff,%eax
sar    %eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @dheap_parent_index(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = add nsw i32 %0, -1
%6 = sdiv i32 %5, 2
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ -1, %2 ]
ret i32 %8
}
Vmul(a, b, s) double a[3], b[3], s;
{
  a[0] = b[0] * s;
  a[1] = b[1] * s;
  a[2] = b[2] * s;
}


x86 assembly (clang, -O0):
<Vmul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vmul>:
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rdi)
mulsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define i32 @Vmul(double* nocapture writeonly %0, double* nocapture %1, double %2) {
%4 = load double, double* %1
%5 = fmul double %4, %2
store double %5, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = fmul double %7, %2
%9 = getelementptr inbounds double, double* %0, i64 1
store double %8, double* %9
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %10
%12 = fmul double %11, %2
%13 = getelementptr inbounds double, double* %0, i64 2
store double %12, double* %13
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
__attribute__((noreturn)) void format(void) {
  fprintf(stderr, "Usage: scripts/sign-file [-dp] <hash algo> <key> <x509> "
                  "<module> [<dest>]\n");
  fprintf(stderr, "       scripts/sign-file -s <raw sig> <hash algo> <x509> "
                  "<module> [<dest>]\n");
  exit(2);
}


x86 assembly (clang, -O0):
<format>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xf02(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<format>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [75 x i8] c"Usage: scripts/sign-file [-dp] <hash algo> <key> <x509> <module> [<dest>]\0A\00"
@.str.1 = [76 x i8] c" scripts/sign-file -s <raw sig> <hash algo> <x509> <module> [<dest>]\0A\00"
define void @format() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [75 x i8] c"Usage: scripts/sign-file [-dp] <hash algo> <key> <x509> <module> [<dest>]\0A\00"
@.str.1 = [76 x i8] c" scripts/sign-file -s <raw sig> <hash algo> <x509> <module> [<dest>]\0A\00"
define void @format() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ PIN_IRQ_Handler(int);
void PIN_INT5_IRQHandler(void) { PIN_IRQ_Handler(5); }


x86 assembly (clang, -O0):
<PIN_INT5_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <PIN_IRQ_Handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PIN_INT5_IRQHandler>:
mov    $0x5,%edi
jmp    1030 <PIN_IRQ_Handler@plt>

LLVM IR (-O0):
define void @PIN_INT5_IRQHandler() {
%1 = call i32 @PIN_IRQ_Handler(i32 5)
ret void
}

LLVM IR (-O2):
define void @PIN_INT5_IRQHandler() {
%1 = tail call i32 @PIN_IRQ_Handler(i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mousezone(int, int, int, int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basMouseZone() {
  int x, y, w, h;
  h = popNumber();
  w = popNumber();
  y = popNumber();
  x = popNumber();
  pushNumber(mousezone(x, y, w, h));
}


x86 assembly (clang, -O0):
<basMouseZone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <mousezone@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basMouseZone>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <mousezone@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basMouseZone() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @popNumber()
store i32 %5, i32* %4
%6 = call i32 (...) @popNumber()
store i32 %6, i32* %3
%7 = call i32 (...) @popNumber()
store i32 %7, i32* %2
%8 = call i32 (...) @popNumber()
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @mousezone(i32 %9, i32 %10, i32 %11, i32 %12)
%14 = call i32 @pushNumber(i32 %13)
ret void
}

LLVM IR (-O2):
define void @basMouseZone() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 (...) @popNumber()
%4 = tail call i32 (...) @popNumber()
%5 = tail call i32 @mousezone(i32 %4, i32 %3, i32 %2, i32 %1)
%6 = tail call i32 @pushNumber(i32 %5)
ret void
}
long compareDataPtrAddresses(const void *a, const void *b) {
  return ((long)a - (long)b);
}


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

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

LLVM IR (-O0):
define i64 @compareDataPtrAddresses(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = sub nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @compareDataPtrAddresses(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub nsw i64 %3, %4
ret i64 %5
}
void BIO_find_type(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_find_type() {
ret void
}
int main() {
  int a = 5, b = 5, c = 10, d = 15;
  return (-2 == -2) * (3 != 4) * (6 > 5) * (7 >= 7) * (8 <= 9) * (-3 < 19) *
         (1 - (-2 == -1)) * (1 - (3 > 5)) * (1 - (3 < 9)) * (a <= b) *
         (c >= b) * (c > b) * (a + b == c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
movl   $0xf,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
imul   $0x0,%eax,%eax
mov    -0x10(%rbp),%ecx
cmp    -0xc(%rbp),%ecx
setge  %cl
and    $0x1,%cl
movzbl %cl,%ecx
imul   %ecx,%eax
mov    -0x10(%rbp),%ecx
cmp    -0xc(%rbp),%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
imul   %ecx,%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    -0x10(%rbp),%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
imul   %ecx,%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
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 5, i32* %3
store i32 10, i32* %4
store i32 15, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp sle i32 %6, %7
%9 = zext i1 %8 to i32
%10 = mul nsw i32 0, %9
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = icmp sge i32 %11, %12
%14 = zext i1 %13 to i32
%15 = mul nsw i32 %10, %14
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = icmp sgt i32 %16, %17
%19 = zext i1 %18 to i32
%20 = mul nsw i32 %15, %19
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %4
%25 = icmp eq i32 %23, %24
%26 = zext i1 %25 to i32
%27 = mul nsw i32 %20, %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int strlen(char const *);
char *db_escape_string(const char *str, unsigned int length) {
  char *q = NULL;
  q = (char *)malloc(strlen(str) * 4 + 1);
  return q;
}


x86 assembly (clang, -O0):
<db_escape_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
shl    $0x2,%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_escape_string>:
push   %rax
call   1030 <strlen@plt>
lea    0x1(,%rax,4),%edi
pop    %rax
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define i8* @db_escape_string(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8* null, i8** %5
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = mul nsw i32 %7, 4
%9 = add nsw i32 %8, 1
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load i8*, i8** %5
ret i8* %12
}

LLVM IR (-O2):
define i8* @db_escape_string(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = shl nsw i32 %3, 2
%5 = or i32 %4, 1
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
void HWBISTShiftClockSet(unsigned char ucShiftClock) {
  unsigned long ulAllowSave;

  ;
  ulAllowSave = (*((volatile unsigned long *)(0x400FB980)));
  (*((volatile unsigned long *)(0x400FB980))) = 0xA5A5A5A5;
  (*((volatile unsigned long *)(0x400FBB00 + 0x0000001C))) |=
      (ucShiftClock << 18) & 0x000C0000;
  (*((volatile unsigned long *)(0x400FB980))) = ulAllowSave;
}


x86 assembly (clang, -O0):
<HWBISTShiftClockSet>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x400fb980,%eax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    $0x400fb980,%eax
mov    $0xa5a5a5a5,%ecx
mov    %rcx,(%rax)
movzbl -0x1(%rbp),%eax
shl    $0x12,%eax
and    $0xc0000,%eax
cltq
mov    $0x400fbb1c,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400fbb1c,%eax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    $0x400fb980,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HWBISTShiftClockSet>:
mov    0x400fb980,%rax
40
mov    $0xa5a5a5a5,%ecx
mov    %rcx,0x400fb980
40
and    $0x3,%edi
shl    $0x12,%rdi
or     %rdi,0x400fbb1c
40
mov    %rax,0x400fb980
40
ret

LLVM IR (-O0):
define void @HWBISTShiftClockSet(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i64
store i8 %0, i8* %2
%4 = load volatile i64, i64* inttoptr (i64 1074772352 to i64*)
store i64 %4, i64* %3
store volatile i64 2779096485, i64* inttoptr (i64 1074772352 to i64*)
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 18
%8 = and i32 %7, 786432
%9 = sext i32 %8 to i64
%10 = load volatile i64, i64* inttoptr (i64 1074772764 to i64*)
%11 = or i64 %10, %9
store volatile i64 %11, i64* inttoptr (i64 1074772764 to i64*)
%12 = load i64, i64* %3
store volatile i64 %12, i64* inttoptr (i64 1074772352 to i64*)
ret void
}

LLVM IR (-O2):
define void @HWBISTShiftClockSet(i8 zeroext %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074772352 to i64*)
store volatile i64 2779096485, i64* inttoptr (i64 1074772352 to i64*)
%3 = zext i8 %0 to i64
%4 = shl nuw nsw i64 %3, 18
%5 = and i64 %4, 786432
%6 = load volatile i64, i64* inttoptr (i64 1074772764 to i64*)
%7 = or i64 %6, %5
store volatile i64 %7, i64* inttoptr (i64 1074772764 to i64*)
store volatile i64 %2, i64* inttoptr (i64 1074772352 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
bcd() { printf("For "); }


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

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

LLVM IR (-O2):
@.str = [5 x i8] c"For \00"
define i32 @bcd() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void homekit_mdns_init() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @PDMR3QueueDestroy() {
ret void
}
int sisEof(void *ud) { return (**(char **)ud) == 0; }


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

x86 assembly (clang, -O2):
<sisEof>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
ret

LLVM IR (-O0):
define i32 @sisEof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i8**
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @sisEof(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_version() { printf("check_meminfo (%s)\n", "0.1.1"); }


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

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
lea    0xef6(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"check_meminfo (%s)\0A\00"
@.str.1 = [6 x i8] c"0.1.1\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putbyte(int);
void putword(signed int w) {
  putbyte(w);
  putbyte(w >> 8);
}


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

x86 assembly (clang, -O2):
<putword>:
push   %rbx
mov    %edi,%ebx
call   1030 <putbyte@plt>
sar    $0x8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <putbyte@plt>

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

LLVM IR (-O2):
define void @putword(i32 %0) {
%2 = tail call i32 @putbyte(i32 %0)
%3 = ashr i32 %0, 8
%4 = tail call i32 @putbyte(i32 %3)
ret void
}
float MAX(float a, float b) {
  if ((a == -1) || (b == -1))
    return -1;
  if (a > b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<MAX>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xee5(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    112f <MAX+0x2f>
jp     112f <MAX+0x2f>
jmp    114b <MAX+0x4b>
movss  -0xc(%rbp),%xmm0
movss  0xec4(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    115d <MAX+0x5d>
jp     115d <MAX+0x5d>
movss  0xead(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1185 <MAX+0x85>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    117b <MAX+0x7b>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1185 <MAX+0x85>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAX>:
movaps %xmm0,%xmm2
maxss  %xmm1,%xmm2
movss  0xef1(%rip),%xmm3
cmpeqss %xmm3,%xmm1
movaps %xmm1,%xmm4
andnps %xmm2,%xmm4
andps  %xmm3,%xmm1
orps   %xmm4,%xmm1
cmpeqss %xmm3,%xmm0
movaps %xmm0,%xmm2
andnps %xmm1,%xmm2
andps  %xmm3,%xmm0
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @MAX(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = fcmp oeq float %6, -1.000000e+00
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load float, float* %5
%10 = fcmp oeq float %9, -1.000000e+00
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store float -1.000000e+00, float* %3
br label %20
12: ; preds = %8
%13 = load float, float* %4
%14 = load float, float* %5
%15 = fcmp ogt float %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load float, float* %4
store float %17, float* %3
br label %20
18: ; preds = %12
%19 = load float, float* %5
store float %19, float* %3
br label %20
20: ; preds = %18, %16, %11
%21 = load float, float* %3
ret float %21
}

LLVM IR (-O2):
define float @MAX(float %0, float %1) {
%3 = fcmp oeq float %0, -1.000000e+00
%4 = fcmp oeq float %1, -1.000000e+00
%5 = or i1 %3, %4
%6 = fcmp ogt float %0, %1
%7 = select i1 %6, float %0, float %1
%8 = select i1 %5, float -1.000000e+00, float %7
ret float %8
}
void s5pv310_cpufreq_upper_limit_free(unsigned int nId) {}


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

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

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

LLVM IR (-O2):
define void @s5pv310_cpufreq_upper_limit_free(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpystr(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
void main() {
  char *pa = "Apple, Samsung, Xiaomi, Smartisan", b[100], *pb;
  pb = b;
  cpystr(pa, pb);
  printf("String a = %s \n String b = %s \n", pa, pb);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x78(%rbp),%rsi
call   1030 <cpystr@plt>
mov    -0x8(%rbp),%rsi
mov    -0x78(%rbp),%rdx
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xed2(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <cpystr@plt>
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <printf@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Apple, Samsung, Xiaomi, Smartisan\00"
@.str.1 = [32 x i8] c"String a = %s \0A String b = %s \0A\00"
define void @main() {
%1 = alloca i8*
%2 = alloca [100 x i8]
%3 = alloca i8*
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8** %1
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
store i8* %4, i8** %3
%5 = load i8*, i8** %1
%6 = load i8*, i8** %3
%7 = call i32 @cpystr(i8* %5, i8* %6)
%8 = load i8*, i8** %1
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Apple, Samsung, Xiaomi, Smartisan\00"
@.str.1 = [32 x i8] c"String a = %s \0A String b = %s \0A\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @cpystr(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_setrts();
int /*<<< orphan*/ waitms(int);
void setrts(void) {
  waitms(200);
  serial_setrts();
  waitms(200);
}


x86 assembly (clang, -O0):
<setrts>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc8,%edi
call   1030 <waitms@plt>
mov    $0x0,%al
call   1040 <serial_setrts@plt>
mov    $0xc8,%edi
call   1030 <waitms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setrts>:
push   %rax
mov    $0xc8,%edi
call   1030 <waitms@plt>
xor    %eax,%eax
call   1040 <serial_setrts@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1030 <waitms@plt>

LLVM IR (-O0):
define void @setrts() {
%1 = call i32 @waitms(i32 200)
%2 = call i32 (...) @serial_setrts()
%3 = call i32 @waitms(i32 200)
ret void
}

LLVM IR (-O2):
define void @setrts() {
%1 = tail call i32 @waitms(i32 200)
%2 = tail call i32 (...) @serial_setrts()
%3 = tail call i32 @waitms(i32 200)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand48(int);
void init_random(int seed) { srand48(seed); }


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

x86 assembly (clang, -O2):
<init_random>:
jmp    1030 <srand48@plt>

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

LLVM IR (-O2):
define void @init_random(i32 %0) {
%2 = tail call i32 @srand48(i32 %0)
ret void
}
int main() { return 0UL > 1UL; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sscanf_test();
int main(int argc, char **argv) {
  sscanf_test();
  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 <sscanf_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <sscanf_test@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 (...) @sscanf_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @sscanf_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ComputeCurve(int);
int /*<<< orphan*/ MakeJointLists(int);
void ComputeCSetAndMakeLists(void) {
  int joint;
  for (joint = 0; joint < 5; joint++) {
    ComputeCurve(joint);
    MakeJointLists(joint);
  }
}


x86 assembly (clang, -O0):
<ComputeCSetAndMakeLists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1157 <ComputeCSetAndMakeLists+0x37>
mov    -0x4(%rbp),%edi
call   1040 <ComputeCurve@plt>
mov    -0x4(%rbp),%edi
call   1030 <MakeJointLists@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <ComputeCSetAndMakeLists+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComputeCSetAndMakeLists>:
push   %rax
xor    %edi,%edi
call   1040 <ComputeCurve@plt>
xor    %edi,%edi
call   1030 <MakeJointLists@plt>
mov    $0x1,%edi
call   1040 <ComputeCurve@plt>
mov    $0x1,%edi
call   1030 <MakeJointLists@plt>
mov    $0x2,%edi
call   1040 <ComputeCurve@plt>
mov    $0x2,%edi
call   1030 <MakeJointLists@plt>
mov    $0x3,%edi
call   1040 <ComputeCurve@plt>
mov    $0x3,%edi
call   1030 <MakeJointLists@plt>
mov    $0x4,%edi
call   1040 <ComputeCurve@plt>
mov    $0x4,%edi
pop    %rax
jmp    1030 <MakeJointLists@plt>

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

LLVM IR (-O2):
define void @ComputeCSetAndMakeLists() {
%1 = tail call i32 @ComputeCurve(i32 0)
%2 = tail call i32 @MakeJointLists(i32 0)
%3 = tail call i32 @ComputeCurve(i32 1)
%4 = tail call i32 @MakeJointLists(i32 1)
%5 = tail call i32 @ComputeCurve(i32 2)
%6 = tail call i32 @MakeJointLists(i32 2)
%7 = tail call i32 @ComputeCurve(i32 3)
%8 = tail call i32 @MakeJointLists(i32 3)
%9 = tail call i32 @ComputeCurve(i32 4)
%10 = tail call i32 @MakeJointLists(i32 4)
ret void
}
signed long long f39(signed long long v_foo, signed long long *v_dest) {
  signed long long v_ashr = v_foo >> 35;
  *v_dest = v_ashr;
  signed long long v_shl = v_ashr << 2;
  signed long long v_and = v_shl & 2147483647;
  return v_and;
}


x86 assembly (clang, -O0):
<f39>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x23,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
and    $0x7fffffff,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f39>:
sar    $0x23,%rdi
mov    %rdi,(%rsi)
lea    0x0(,%rdi,4),%eax
and    $0x7ffffffc,%eax
ret

LLVM IR (-O0):
define i64 @f39(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64* %1, i64** %4
%8 = load i64, i64* %3
%9 = ashr i64 %8, 35
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = load i64*, i64** %4
store i64 %10, i64* %11
%12 = load i64, i64* %5
%13 = shl i64 %12, 2
store i64 %13, i64* %6
%14 = load i64, i64* %6
%15 = and i64 %14, 2147483647
store i64 %15, i64* %7
%16 = load i64, i64* %7
ret i64 %16
}

LLVM IR (-O2):
define i64 @f39(i64 %0, i64* nocapture writeonly %1) {
%3 = ashr i64 %0, 35
store i64 %3, i64* %1
%4 = shl nsw i64 %3, 2
%5 = and i64 %4, 2147483644
ret i64 %5
}
int yaffs_dump_dev_reldir(struct yaffs_obj *reldir, const char *path) {
  (void)path;
  (void)reldir;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.yaffs_obj = type opaque
define i32 @yaffs_dump_dev_reldir(%struct.yaffs_obj* %0, i8* %1) {
%3 = alloca %struct.yaffs_obj*
%4 = alloca i8*
store %struct.yaffs_obj* %0, %struct.yaffs_obj** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load %struct.yaffs_obj*, %struct.yaffs_obj** %3
ret i32 0
}

LLVM IR (-O2):
%struct.yaffs_obj = type opaque
define i32 @yaffs_dump_dev_reldir(%struct.yaffs_obj* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
char *rindex(const char *p, int ch) {
  char *save;
  for (save = NULL;; ++p) {
    if (*p == ch)
      save = (char *)p;
    if (!*p)
      return (save);
  }
}


x86 assembly (clang, -O0):
<rindex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    112b <rindex+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    113e <rindex+0x3e>
mov    -0x18(%rbp),%rax
pop    %rbp
ret
jmp    1143 <rindex+0x43>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <rindex+0x13>

x86 assembly (clang, -O2):
<rindex>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi),%ecx
cmp    %esi,%ecx
cmove  %rdi,%rax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <rindex+0x10>
ret

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

LLVM IR (-O2):
define i8* @rindex(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %11, %3 ]
%5 = phi i8* [ null, %2 ], [ %9, %3 ]
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, %1
%9 = select i1 %8, i8* %4, i8* %5
%10 = icmp eq i8 %6, 0
%11 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %10, label %12, label %3
12: ; preds = %3
ret i8* %9
}
/* Variables and functions */
scalar_t__ VIM_HIF_GetReg8(int);
unsigned long VIM_JPEG_GetJpegWordCount(void) {
  unsigned long value32;
  value32 = (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x043));
  value32 |= (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x042)) << 8;
  value32 |= (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x041)) << 16;
  value32 |= (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x040)) << 24;
  value32 <<= 2;
  return value32;
}


x86 assembly (clang, -O0):
<VIM_JPEG_GetJpegWordCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x43,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,-0x8(%rbp)
mov    $0x42,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x41,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x40,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x18,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_JPEG_GetJpegWordCount>:
push   %r15
push   %r14
push   %rbx
mov    $0x43,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%r15
mov    $0x42,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%r14
mov    $0x41,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%rbx
mov    $0x40,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x1a,%rax
shl    $0x12,%rbx
or     %rbx,%rax
shl    $0xa,%r14
shl    $0x2,%r15
or     %r14,%r15
or     %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @VIM_JPEG_GetJpegWordCount() {
%1 = alloca i64
%2 = call i64 @VIM_HIF_GetReg8(i32 67)
store i64 %2, i64* %1
%3 = call i64 @VIM_HIF_GetReg8(i32 66)
%4 = shl i64 %3, 8
%5 = load i64, i64* %1
%6 = or i64 %5, %4
store i64 %6, i64* %1
%7 = call i64 @VIM_HIF_GetReg8(i32 65)
%8 = shl i64 %7, 16
%9 = load i64, i64* %1
%10 = or i64 %9, %8
store i64 %10, i64* %1
%11 = call i64 @VIM_HIF_GetReg8(i32 64)
%12 = shl i64 %11, 24
%13 = load i64, i64* %1
%14 = or i64 %13, %12
store i64 %14, i64* %1
%15 = load i64, i64* %1
%16 = shl i64 %15, 2
store i64 %16, i64* %1
%17 = load i64, i64* %1
ret i64 %17
}

LLVM IR (-O2):
define i64 @VIM_JPEG_GetJpegWordCount() {
%1 = tail call i64 @VIM_HIF_GetReg8(i32 67)
%2 = tail call i64 @VIM_HIF_GetReg8(i32 66)
%3 = tail call i64 @VIM_HIF_GetReg8(i32 65)
%4 = tail call i64 @VIM_HIF_GetReg8(i32 64)
%5 = shl i64 %4, 26
%6 = shl i64 %3, 18
%7 = shl i64 %2, 10
%8 = shl i64 %1, 2
%9 = or i64 %7, %8
%10 = or i64 %9, %6
%11 = or i64 %10, %5
ret i64 %11
}
int main(void) {
#pragma acc kernels
  {
    while (1)
      ;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    110b <main+0xb>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ SYS_set_thread_area;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  syscall(SYS_set_thread_area, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <syscall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SYS_set_thread_area = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SYS_set_thread_area
%3 = call i32 @syscall(i32 %2, i32 0)
ret i32 0
}

LLVM IR (-O2):
@SYS_set_thread_area = global i32 0
define i32 @main() {
%1 = load i32, i32* @SYS_set_thread_area
%2 = tail call i32 @syscall(i32 %1, i32 0)
ret i32 0
}
void __attribute__((weak)) _exit(int status) {
  (void)status;
  while (1) {
  }
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

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

LLVM IR (-O0):
define weak void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
define weak void @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, char *, char);
void re_fail(char *s, char c) {
  printf("re_fail: %s [opcode 0x%x]\n", s, c);
  abort();
}


x86 assembly (clang, -O0):
<re_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec3(%rip),%rdi
movsbl -0x9(%rbp),%edx
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<re_fail>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"re_fail: %s [opcode 0x%x]\0A\00"
define void @re_fail(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %5, i8 signext %6)
%8 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"re_fail: %s [opcode 0x%x]\0A\00"
define void @re_fail(i8* %0, i8 signext %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i8 signext %1)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
scalar_t__ fmax(double, double);
float fmaxf(float x, float y) { return (float)fmax((double)x, (double)y); }


x86 assembly (clang, -O0):
<fmaxf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <fmax@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmaxf>:
push   %rax
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
call   1030 <fmax@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fmaxf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call i64 @fmax(double %6, double %8)
%10 = sitofp i64 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @fmaxf(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = tail call i64 @fmax(double %3, double %4)
%6 = sitofp i64 %5 to float
ret float %6
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t djb2(const char *str) {
  uint32_t hash = 5381;
  while (*str) {
    hash = hash * 33 + (uint8_t)*str++;
  }
  return hash;
}


x86 assembly (clang, -O0):
<djb2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113c <djb2+0x3c>
imul   $0x21,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <djb2+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <djb2+0x28>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb2+0x10>
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i32 @djb2(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 5381, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, 33
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = add nsw i32 %10, %14
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @djb2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul nsw i32 %6, 33
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add nsw i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
char *test() { return "Hello from c"; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello from c\00"
define i8* @test() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello from c\00"
define i8* @test() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
void *pal_mem_virt_to_phys(void *Va) { return Va; }


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

x86 assembly (clang, -O2):
<pal_mem_virt_to_phys>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @pal_mem_virt_to_phys(i8* readnone returned %0) {
ret i8* %0
}
const char *ajOboinTypeGetFields(void) { return "id acc nam des"; }


x86 assembly (clang, -O0):
<ajOboinTypeGetFields>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ajOboinTypeGetFields>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"id acc nam des\00"
define i8* @ajOboinTypeGetFields() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"id acc nam des\00"
define i8* @ajOboinTypeGetFields() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
void gtk_combo_box_new() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int32_t L_print_char(int32_t n) {
  printf("%c", n);
  return 0;
}


x86 assembly (clang, -O0):
<L_print_char>:
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):
<L_print_char>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @L_print_char(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
double Sleef_floor(double x) { return __builtin_floor(x); }


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

x86 assembly (clang, -O2):
<Sleef_floor>:
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @Sleef_floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.floor.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @Sleef_floor(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
ret double %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int possibly_circular(uint32_t i) {
  for (; (i % 10) % 2; i /= 10)
    ;
  return !i;
}


x86 assembly (clang, -O0):
<possibly_circular>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     113d <possibly_circular+0x3d>
jmp    112a <possibly_circular+0x2a>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1107 <possibly_circular+0x7>
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<possibly_circular>:
test   $0x1,%dil
je     112d <possibly_circular+0x2d>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rax
imul   $0x66666667,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
test   $0x1,%dil
jne    1110 <possibly_circular+0x10>
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @possibly_circular(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %9, %1
%4 = load i32, i32* %2
%5 = srem i32 %4, 10
%6 = srem i32 %5, 2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %3
br label %9
9: ; preds = %8
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 10
store i32 %11, i32* %2
br label %3
12: ; preds = %3
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @possibly_circular(i32 %0) {
%2 = srem i32 %0, 10
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %7, %5 ], [ %0, %1 ]
%7 = sdiv i32 %6, 10
%8 = srem i32 %7, 10
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %5
11: ; preds = %5, %1
%12 = phi i32 [ %0, %1 ], [ %7, %5 ]
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}