xunge/DecIR huggingface dataset:
/* Variables and functions */
int rnd();
void MD5_Salt(unsigned int len, char *output) {
  unsigned int i;
  for (i = 0; i < len; ++i)
    output[i] = (char)(1 + rnd() % 255);
}


x86 assembly (clang, -O0):
<MD5_Salt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    115c <MD5_Salt+0x4c>
mov    $0x0,%al
call   1030 <rnd@plt>
mov    $0xff,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <MD5_Salt+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MD5_Salt>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
je     1162 <MD5_Salt+0x52>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rnd@plt>
cltq
imul   $0xffffffff80808081,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
shr    $0x7,%ecx
add    %edx,%ecx
add    %eax,%ecx
add    $0x1,%cl
mov    %cl,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <MD5_Salt+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @MD5_Salt(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = call i32 (...) @rnd()
%12 = srem i32 %11, 255
%13 = add nsw i32 1, %12
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
store i8 %14, i8* %18
br label %19
19: ; preds = %10
%20 = load i32, i32* %5
%21 = add i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @MD5_Salt(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %13, %6 ]
%8 = tail call i32 (...) @rnd()
%9 = srem i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = add i8 %10, 1
%12 = getelementptr inbounds i8, i8* %1, i64 %7
store i8 %11, i8* %12
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret void
}
char *get_shortpath(char *path) { return path; }


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

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

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

LLVM IR (-O2):
define i8* @get_shortpath(i8* readnone returned %0) {
ret i8* %0
}
double MItoKM(double MI) { return MI * 1.609344; }


x86 assembly (clang, -O0):
<MItoKM>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MItoKM>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @MItoKM(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x3FF9BFDF7E8038A0
ret double %4
}

LLVM IR (-O2):
define double @MItoKM(double %0) {
%2 = fmul double %0, 0x3FF9BFDF7E8038A0
ret double %2
}
long absdiff(long x, long y) {
  long result;
  if (x > y)
    result = x - y;
  else
    result = y - x;
  return result;
}


x86 assembly (clang, -O0):
<absdiff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    112b <absdiff+0x2b>
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1137 <absdiff+0x37>
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @absdiff(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = icmp sgt i64 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = sub nsw i64 %10, %11
store i64 %12, i64* %5
br label %17
13: ; preds = %2
%14 = load i64, i64* %4
%15 = load i64, i64* %3
%16 = sub nsw i64 %14, %15
store i64 %16, i64* %5
br label %17
17: ; preds = %13, %9
%18 = load i64, i64* %5
ret i64 %18
}

LLVM IR (-O2):
define i64 @absdiff(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = sub nsw i64 %0, %1
%5 = sub nsw i64 %1, %0
%6 = select i1 %3, i64 %4, i64 %5
ret i64 %6
}
/* Variables and functions */
double foo();
float bar() { return foo() * 10.0; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <foo@plt>
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
mulsd  0xee0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @bar() {
%1 = call double (...) @foo()
%2 = fmul double %1, 1.000000e+01
%3 = fptrunc double %2 to float
ret float %3
}

LLVM IR (-O2):
define float @bar() {
%1 = tail call double (...) @foo()
%2 = fmul double %1, 1.000000e+01
%3 = fptrunc double %2 to float
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ pl_mm_init();
void pl_init(void) { pl_mm_init(); }


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

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

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

LLVM IR (-O2):
define void @pl_init() {
%1 = tail call i32 (...) @pl_mm_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
double pow(double, double);
scalar_t__ signbit(double);
double sqrt(double);
void __attribute__((no)) f(double x) {
  double pluszero = pow(x, 0.5);
  double minuszero = sqrt(x);
  if (signbit(pluszero) == signbit(minuszero))
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <signbit@plt>
mov    %rax,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <signbit@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jne    11a2 <f+0x62>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,(%rsp)
movsd  0xeae(%rip),%xmm1
call   1050 <pow@plt>
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
movsd  (%rsp),%xmm2
ucomisd %xmm0,%xmm2
movapd %xmm2,%xmm0
jb     1174 <f+0x34>
sqrtsd %xmm0,%xmm0
jmp    1185 <f+0x45>
movsd  %xmm1,0x8(%rsp)
call   1060 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
call   1040 <signbit@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
call   1040 <signbit@plt>
cmp    %rax,%rbx
je     11ab <f+0x6b>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @pow(double %5, double 5.000000e-01)
store double %6, double* %3
%7 = load double, double* %2
%8 = call double @sqrt(double %7)
store double %8, double* %4
%9 = load double, double* %3
%10 = call i64 @signbit(double %9)
%11 = load double, double* %4
%12 = call i64 @signbit(double %11)
%13 = icmp eq i64 %10, %12
br i1 %13, label %14, label %16
14: ; preds = %1
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f(double %0) {
%2 = tail call double @pow(double %0, double 5.000000e-01)
%3 = tail call double @sqrt(double %0)
%4 = tail call i64 @signbit(double %2)
%5 = tail call i64 @signbit(double %3)
%6 = icmp eq i64 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %1
ret void
}
void pac7311_setquality(struct usb_spca50x *spca50x) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @pac7311_setquality(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ AT_SYMLINK_NOFOLLOW;
int utimensat(int /*<<< orphan*/, char const *, struct timespec const *,
              int /*<<< orphan*/);
int lutimens(const char *path, const struct timespec times[2]) {
  return utimensat(AT_FDCWD, path, times, AT_SYMLINK_NOFOLLOW);
}


x86 assembly (clang, -O0):
<lutimens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ecx
call   1030 <utimensat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lutimens>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    0x2eba(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <utimensat@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@AT_FDCWD = global i32 0
@AT_SYMLINK_NOFOLLOW = global i32 0
define i32 @lutimens(i8* %0, %struct.timespec* %1) {
%3 = alloca i8*
%4 = alloca %struct.timespec*
store i8* %0, i8** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load i32, i32* @AT_FDCWD
%6 = load i8*, i8** %3
%7 = load %struct.timespec*, %struct.timespec** %4
%8 = load i32, i32* @AT_SYMLINK_NOFOLLOW
%9 = call i32 @utimensat(i32 %5, i8* %6, %struct.timespec* %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@AT_FDCWD = global i32 0
@AT_SYMLINK_NOFOLLOW = global i32 0
define i32 @lutimens(i8* %0, %struct.timespec* %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = load i32, i32* @AT_SYMLINK_NOFOLLOW
%5 = tail call i32 @utimensat(i32 %3, i8* %0, %struct.timespec* %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("Time : %s\n", "06:22:32");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeec(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Time : %s\0A\00"
@.str.1 = [9 x i8] c"06:22:32\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Time : %s\0A\00"
@.str.1 = [9 x i8] c"06:22:32\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double strtod(char const *, char **);
double StrToDouble(const char *source, const char **endp) {
  return strtod(source, (char **)endp);
}


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

x86 assembly (clang, -O2):
<StrToDouble>:
jmp    1030 <strtod@plt>

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

LLVM IR (-O2):
define double @StrToDouble(i8* %0, i8** nocapture %1) {
%3 = tail call double @strtod(i8* %0, i8** %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_hlt();
void hlt(void) { __builtin_hlt(); }


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

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

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

LLVM IR (-O2):
define void @hlt() {
%1 = tail call i32 (...) @__builtin_hlt()
ret void
}
/* Variables and functions */
int BIT(int);
int wpa_key_mgmt_wpa_ieee8021x(int akm) {
  return !!(akm & (BIT(0) | BIT(5) | BIT(14) | BIT(15) | BIT(7)));
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1030 <BIT@plt>
mov    %eax,-0x18(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0xe,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0xf,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x7,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
xor    %edi,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    $0xe,%edi
call   1030 <BIT@plt>
mov    %eax,%r15d
mov    $0xf,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
or     %r15d,%ebp
or     %ebx,%ebp
mov    $0x7,%edi
call   1030 <BIT@plt>
or     %ebp,%eax
xor    %ecx,%ecx
test   %r14d,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 0)
%5 = call i32 @BIT(i32 5)
%6 = or i32 %4, %5
%7 = call i32 @BIT(i32 14)
%8 = or i32 %6, %7
%9 = call i32 @BIT(i32 15)
%10 = or i32 %8, %9
%11 = call i32 @BIT(i32 7)
%12 = or i32 %10, %11
%13 = and i32 %3, %12
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = tail call i32 @BIT(i32 0)
%3 = tail call i32 @BIT(i32 5)
%4 = or i32 %3, %2
%5 = tail call i32 @BIT(i32 14)
%6 = or i32 %4, %5
%7 = tail call i32 @BIT(i32 15)
%8 = or i32 %6, %7
%9 = tail call i32 @BIT(i32 7)
%10 = or i32 %8, %9
%11 = and i32 %10, %0
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
unsigned int DIV_ROUND_CLOSEST(unsigned int, unsigned int);
unsigned int soc_camera_shift_scale(unsigned int size, unsigned int shift,
                                    unsigned int scale) {
  return DIV_ROUND_CLOSEST(size << shift, scale);
}


x86 assembly (clang, -O0):
<soc_camera_shift_scale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%ecx
shl    %cl,%edi
mov    -0xc(%rbp),%esi
call   1030 <DIV_ROUND_CLOSEST@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soc_camera_shift_scale>:
mov    %esi,%ecx
shl    %cl,%edi
mov    %edx,%esi
jmp    1030 <DIV_ROUND_CLOSEST@plt>

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

LLVM IR (-O2):
define i32 @soc_camera_shift_scale(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, %1
%5 = tail call i32 @DIV_ROUND_CLOSEST(i32 %4, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ testAlgorithms(void (*)(int *, int, int),
                                  void (*)(int *, int, int), int, int);
void testAlgorithmsBothOrders(void (*alg1)(int *, int, bool),
                              void (*alg2)(int *, int, bool), int test_num) {
  testAlgorithms(alg1, alg2, test_num, true);
  testAlgorithms(alg1, alg2, test_num, false);
}


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

x86 assembly (clang, -O2):
<testAlgorithmsBothOrders>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    $0x1,%ecx
call   1030 <testAlgorithms@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
xor    %ecx,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <testAlgorithms@plt>

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

LLVM IR (-O2):
define void @testAlgorithmsBothOrders(void (i32*, i32, i32)* %0, void (i32*, i32, i32)* %1, i32 %2) {
%4 = tail call i32 @testAlgorithms(void (i32*, i32, i32)* %0, void (i32*, i32, i32)* %1, i32 %2, i32 1)
%5 = tail call i32 @testAlgorithms(void (i32*, i32, i32)* %0, void (i32*, i32, i32)* %1, i32 %2, i32 0)
ret void
}
void baz_long(long *x) { *x = __imag foo_long(5); }


x86 assembly (clang, -O0):
<baz_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x5,%edi
mov    $0x0,%al
call   1030 <foo_long@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz_long>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <foo_long@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @baz_long(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @foo_long to i32 (i32, ...)*)(i32 5)
%4 = load i64*, i64** %2
store i64 0, i64* %4
ret void
}

LLVM IR (-O2):
define void @baz_long(i64* nocapture writeonly %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @foo_long to i32 (i32, ...)*)(i32 5)
store i64 0, i64* %0
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xvisibility;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xvisibility_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xvisibility.serial = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xvisibility_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xvisibility_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void OneWireBusReset(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x400B6000);
  (*((volatile uint32_t *)(ui32Base + 0x00000000))) |= 0x00000001;
}


x86 assembly (clang, -O0):
<OneWireBusReset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x400b6000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%ecx
or     $0x1,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OneWireBusReset>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x400b6000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0x1,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @OneWireBusReset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074487296
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 0
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 1
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @OneWireBusReset(i32 %0) {
%2 = icmp eq i32 %0, 1074487296
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = sext i32 %0 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 1
store volatile i32 %8, i32* %6
ret void
}
/* Variables and functions */
int __xstat(int /*<<< orphan*/, char *, void *);
int stat(char *name, void *st) { return __xstat(0, name, st); }


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

x86 assembly (clang, -O2):
<stat>:
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <__xstat@plt>

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

LLVM IR (-O2):
define i32 @stat(i8* %0, i8* %1) {
%3 = tail call i32 @__xstat(i32 0, i8* %0, i8* %1)
ret i32 %3
}
char *idris2_getString(void *p) { return (char *)p; }


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

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

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

LLVM IR (-O2):
define i8* @idris2_getString(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
double max_out_three(float, float, float);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
void Task5() {
  float a, b, c;
  printf("Enter value for A B and C:\n");
  scanf("%f %f %f", &a, &b, &c);
  printf("%f", max_out_three(a, b, c));
}


x86 assembly (clang, -O0):
<Task5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1050 <max_out_three@plt>
lea    0xea9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Task5>:
sub    $0x18,%rsp
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
lea    0xea9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
call   1060 <max_out_three@plt>
lea    0xe7d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Enter value for A B and C:\0A\00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@.str.2 = [3 x i8] c"%f\00"
define void @Task5() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = load float, float* %3
%9 = call double @max_out_three(float %6, float %7, float %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), double %9)
ret void
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%f %f %f\00"
@.str.2 = [3 x i8] c"%f\00"
@str = [27 x i8] c"Enter value for A B and C:\00"
define void @Task5() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = load float, float* %3
%12 = call double @max_out_three(float %9, float %10, float %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), double %12)
ret void
}
void mock_unbind_ppgtt(struct i915_vma *vma) {}


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

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

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

LLVM IR (-O2):
%struct.i915_vma = type opaque
define void @mock_unbind_ppgtt(%struct.i915_vma* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tosThread_exit(void *);
void tosThread_mainWaitedExit(void) { tosThread_exit(((void *)0)); }


x86 assembly (clang, -O0):
<tosThread_mainWaitedExit>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <tosThread_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosThread_mainWaitedExit>:
xor    %edi,%edi
jmp    1030 <tosThread_exit@plt>

LLVM IR (-O0):
define void @tosThread_mainWaitedExit() {
%1 = call i32 @tosThread_exit(i8* null)
ret void
}

LLVM IR (-O2):
define void @tosThread_mainWaitedExit() {
%1 = tail call i32 @tosThread_exit(i8* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freep(void *p) { free(*(void **)p); }


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

x86 assembly (clang, -O2):
<freep>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freep(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 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @freep(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
void YUY2ToUV422Row_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @YUY2ToUV422Row_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
scalar_t__ strlen(char const *);
void test_16b(const char *msg) { __analyzer_eval(strlen(msg) == strlen(msg)); }


x86 assembly (clang, -O0):
<test_16b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_16b>:
mov    $0x1,%edi
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test_16b(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
%9 = call i32 @__analyzer_eval(i32 %8)
ret void
}

LLVM IR (-O2):
define void @test_16b(i8* nocapture readnone %0) {
%2 = tail call i32 @__analyzer_eval(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ OPENSSL_config(int /*<<< orphan*/ *);
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int crypto_init() {
  ERR_load_crypto_strings();
  OpenSSL_add_all_algorithms();
  OPENSSL_config(NULL);
  return 0;
}


x86 assembly (clang, -O0):
<crypto_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <ERR_load_crypto_strings@plt>
mov    $0x0,%al
call   1040 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <OPENSSL_config@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_init>:
push   %rax
xor    %eax,%eax
call   1050 <ERR_load_crypto_strings@plt>
xor    %eax,%eax
call   1040 <OpenSSL_add_all_algorithms@plt>
xor    %edi,%edi
call   1030 <OPENSSL_config@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @crypto_init() {
%1 = call i32 (...) @ERR_load_crypto_strings()
%2 = call i32 (...) @OpenSSL_add_all_algorithms()
%3 = call i32 @OPENSSL_config(i32* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @crypto_init() {
%1 = tail call i32 (...) @ERR_load_crypto_strings()
%2 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%3 = tail call i32 @OPENSSL_config(i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("test\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"test\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int emac2_etherstatsoctets_set(unsigned int dev_id,
                               union emac2_etherstatsoctets_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<emac2_etherstatsoctets_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.emac2_etherstatsoctets_u = type opaque
define i32 @emac2_etherstatsoctets_set(i32 %0, %union.emac2_etherstatsoctets_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac2_etherstatsoctets_u*
store i32 %0, i32* %3
store %union.emac2_etherstatsoctets_u* %1, %union.emac2_etherstatsoctets_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac2_etherstatsoctets_u = type opaque
define i32 @emac2_etherstatsoctets_set(i32 %0, %union.emac2_etherstatsoctets_u* nocapture readnone %1) {
ret i32 1
}
void RGB565ToARGB() {}


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

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

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

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

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


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@stdout = global i32 0
define i32 @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)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@stdout = global i32 0
define i32 @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)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int hash(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/ const *, size_t, int,
         int);
int sha3_384(uint8_t *out, size_t outlen, const uint8_t *in, size_t inlen) {
  if (outlen > (384 / 8)) {
    return -1;
  }
  return hash(out, outlen, in, inlen, 200 - (384 / 4), 0x01);
}


x86 assembly (clang, -O0):
<sha3_384>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x30,-0x18(%rbp)
jbe    113f <sha3_384+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <sha3_384+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x68,%r8d
mov    $0x1,%r9d
call   1030 <hash@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha3_384>:
cmp    $0x30,%rsi
jbe    111c <sha3_384+0xc>
mov    $0xffffffff,%eax
ret
mov    $0x68,%r8d
mov    $0x1,%r9d
jmp    1030 <hash@plt>

LLVM IR (-O0):
define i32 @sha3_384(i32* %0, i64 %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i32* %0, i32** %6
store i64 %1, i64* %7
store i32* %2, i32** %8
store i64 %3, i64* %9
%10 = load i64, i64* %7
%11 = icmp ugt i64 %10, 48
br i1 %11, label %12, label %13
12: ; preds = %4
store i32 -1, i32* %5
br label %19
13: ; preds = %4
%14 = load i32*, i32** %6
%15 = load i64, i64* %7
%16 = load i32*, i32** %8
%17 = load i64, i64* %9
%18 = call i32 @hash(i32* %14, i64 %15, i32* %16, i64 %17, i32 104, i32 1)
store i32 %18, i32* %5
br label %19
19: ; preds = %13, %12
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @sha3_384(i32* %0, i64 %1, i32* %2, i64 %3) {
%5 = icmp ugt i64 %1, 48
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @hash(i32* %0, i64 %1, i32* %2, i64 %3, i32 104, i32 1)
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ %7, %6 ], [ -1, %4 ]
ret i32 %9
}
/* Variables and functions */
double floor(double);
__attribute__((__weak__, __always___)) double softboundcets_floor(double x) {
  return floor(x);
}


x86 assembly (clang, -O0):
<softboundcets_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):
<softboundcets_floor>:
jmp    1030 <floor@plt>

LLVM IR (-O0):
define weak double @softboundcets_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 weak double @softboundcets_floor(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
ret double %2
}
/* Variables and functions */
int lrint(double);
int lbs_to_grams(double lbs) { return lrint(lbs * 453.6); }


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

x86 assembly (clang, -O2):
<lbs_to_grams>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <lrint@plt>

LLVM IR (-O0):
define i32 @lbs_to_grams(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 4.536000e+02
%5 = call i32 @lrint(double %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @lbs_to_grams(double %0) {
%2 = fmul double %0, 4.536000e+02
%3 = tail call i32 @lrint(double %2)
ret i32 %3
}
void digitalWrite(int pin, int value) {}


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

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

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

LLVM IR (-O2):
define void @digitalWrite(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ is_leap_year(int);
int first_day(int year) {
  int ret = 4;
  for (; year > 1970; --year)
    ret = (ret + 365 + is_leap_year(year) ? 1 : 0) % 7;
  return ret;
}


x86 assembly (clang, -O0):
<first_day>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
cmpl   $0x7b2,-0x4(%rbp)
jle    1173 <first_day+0x63>
mov    -0x8(%rbp),%eax
add    $0x16d,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_leap_year@plt>
mov    -0x10(%rbp),%rdx
add    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <first_day+0x12>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<first_day>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%eax
cmp    $0x7b3,%edi
jl     115b <first_day+0x4b>
mov    %edi,%r14d
mov    $0x4,%ebx
nopl   0x0(%rax)
add    $0x16d,%ebx
mov    %r14d,%edi
call   1030 <is_leap_year@plt>
mov    %rax,%rcx
xor    %eax,%eax
add    %rbx,%rcx
setne  %al
lea    -0x1(%r14),%ecx
mov    %eax,%ebx
cmp    $0x7b3,%r14d
mov    %ecx,%r14d
ja     1130 <first_day+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @first_day(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 1970
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 365
%10 = sext i32 %9 to i64
%11 = load i32, i32* %2
%12 = call i64 @is_leap_year(i32 %11)
%13 = add nsw i64 %10, %12
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 1, i32 0
%17 = srem i32 %16, 7
store i32 %17, i32* %3
br label %18
18: ; preds = %7
%19 = load i32, i32* %2
%20 = add nsw i32 %19, -1
store i32 %20, i32* %2
br label %4
21: ; preds = %4
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @first_day(i32 %0) {
%2 = icmp sgt i32 %0, 1970
br i1 %2, label %3, label %14
3: ; preds = %1, %3
%4 = phi i32 [ %11, %3 ], [ 4, %1 ]
%5 = phi i32 [ %12, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 365
%7 = zext i32 %6 to i64
%8 = tail call i64 @is_leap_year(i32 %5)
%9 = sub nsw i64 0, %7
%10 = icmp ne i64 %8, %9
%11 = zext i1 %10 to i32
%12 = add nsw i32 %5, -1
%13 = icmp ugt i32 %5, 1971
br i1 %13, label %3, label %14
14: ; preds = %3, %1
%15 = phi i32 [ 4, %1 ], [ %11, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void putch_tty(char c) {
  if (c & 0x80)
    putchar(' ');
  else
    putchar(c);
}


x86 assembly (clang, -O0):
<putch_tty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     113f <putch_tty+0x2f>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1148 <putch_tty+0x38>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putch_tty>:
test   %dil,%dil
mov    $0x20,%eax
cmovs  %eax,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @putch_tty(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 128
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @putchar(i8 signext 32)
br label %12
9: ; preds = %1
%10 = load i8, i8* %2
%11 = call i32 @putchar(i8 signext %10)
br label %12
12: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
define void @putch_tty(i8 signext %0) {
%2 = icmp sgt i8 %0, -1
%3 = select i1 %2, i8 %0, i8 32
%4 = tail call i32 @putchar(i8 signext %3)
ret void
}
void foo_2_2_2_1_1_1_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_1_1_1_2_1_2() {
ret void
}
void foo052() {}


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

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

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

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

/* Variables and functions */
size_t fwrite(void *, size_t, size_t, int /*<<< orphan*/ *);
size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) {
  size_t written = fwrite(ptr, size, nmemb, (FILE *)stream);
  return written;
}


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

x86 assembly (clang, -O2):
<write_data>:
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
define i64 @write_data(i8* %0, i64 %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i8*, i8** %8
%14 = bitcast i8* %13 to i32*
%15 = call i64 @fwrite(i8* %10, i64 %11, i64 %12, i32* %14)
store i64 %15, i64* %9
%16 = load i64, i64* %9
ret i64 %16
}

LLVM IR (-O2):
define i64 @write_data(i8* nocapture %0, i64 %1, i64 %2, i8* nocapture %3) {
%5 = bitcast i8* %3 to i32*
%6 = tail call i64 @fwrite(i8* %0, i64 %1, i64 %2, i32* %5)
ret i64 %6
}
void percentageCallback(int percentage) { (void)percentage; }


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

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

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

LLVM IR (-O2):
define void @percentageCallback(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check(char *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char *str;
  int n;
  str = (char *)malloc(n * sizeof(char));
  scanf("%d", &n);
  scanf("%s", str);
  check(str, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rsi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <check@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xebc(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1050 <check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 1
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %2
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%11 = load i8*, i8** %2
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = call i32 @check(i8* %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i64 @malloc(i32 undef)
%4 = inttoptr i64 %3 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%7 = load i32, i32* %1
%8 = call i32 @check(i8* %4, i32 %7)
ret i32 0
}