xunge/DecIR huggingface dataset:
/* Variables and functions */
long long doubleToRawLongBits(double);
double const longBitsToDouble(long long);
__attribute__((always_)) const double mulsign(double x, double y) {
  return longBitsToDouble(doubleToRawLongBits(x) ^
                          (doubleToRawLongBits(y) & (1LL << 63)));
}


x86 assembly (clang, -O0):
<mulsign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <doubleToRawLongBits@plt>
mov    %rax,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <doubleToRawLongBits@plt>
mov    -0x18(%rbp),%rdi
movabs $0x8000000000000000,%rcx
and    %rcx,%rax
xor    %rax,%rdi
call   1030 <longBitsToDouble@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mulsign>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
call   1040 <doubleToRawLongBits@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1040 <doubleToRawLongBits@plt>
movabs $0x8000000000000000,%rdi
and    %rax,%rdi
xor    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <longBitsToDouble@plt>

LLVM IR (-O0):
define double @mulsign(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call i64 @doubleToRawLongBits(double %5)
%7 = load double, double* %4
%8 = call i64 @doubleToRawLongBits(double %7)
%9 = and i64 %8, -9223372036854775808
%10 = xor i64 %6, %9
%11 = call double @longBitsToDouble(i64 %10)
ret double %11
}

LLVM IR (-O2):
define double @mulsign(double %0, double %1) {
%3 = tail call i64 @doubleToRawLongBits(double %0)
%4 = tail call i64 @doubleToRawLongBits(double %1)
%5 = and i64 %4, -9223372036854775808
%6 = xor i64 %5, %3
%7 = tail call double @longBitsToDouble(i64 %6)
ret double %7
}
/* Variables and functions */
int strlen(char s[]) {
  int i;
  for (i = 0; s[i] != '\0'; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <strlen+0x37>
jmp    1129 <strlen+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fmtint(char *, long, int, int);
int fputs(char *, int /*<<< orphan*/ *);
int fputld(long int d, FILE *f) {
  char buff[32];
  fmtint(buff, d, 10, 1);
  return fputs(buff, f);
}


x86 assembly (clang, -O0):
<fputld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0xa,%edx
mov    $0x1,%ecx
call   1030 <fmtint@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputld>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0xa,%edx
mov    $0x1,%ecx
call   1030 <fmtint@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fputs@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @fputld(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca [32 x i8]
store i64 %0, i64* %3
store i32* %1, i32** %4
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%7 = load i64, i64* %3
%8 = call i32 @fmtint(i8* %6, i64 %7, i32 10, i32 1)
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%10 = load i32*, i32** %4
%11 = call i32 @fputs(i8* %9, i32* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @fputld(i64 %0, i32* nocapture %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @fmtint(i8* %4, i64 %0, i32 10, i32 1)
%6 = call i32 @fputs(i8* %4, i32* %1)
ret i32 %6
}
/* Variables and functions */
double acos(double);
double acos2(double ca) {
  if (ca < -1)
    ca = -1;
  if (ca > 1)
    ca = 1;
  return acos(ca);
}


x86 assembly (clang, -O0):
<acos2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    113d <acos2+0x2d>
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1161 <acos2+0x51>
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <acos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acos2>:
movsd  0xee8(%rip),%xmm1
maxsd  %xmm0,%xmm1
movsd  0xee4(%rip),%xmm0
minsd  %xmm1,%xmm0
jmp    1030 <acos@plt>

LLVM IR (-O0):
define double @acos2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, -1.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
store double -1.000000e+00, double* %2
br label %6
6: ; preds = %5, %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
store double 1.000000e+00, double* %2
br label %10
10: ; preds = %9, %6
%11 = load double, double* %2
%12 = call double @acos(double %11)
ret double %12
}

LLVM IR (-O2):
define double @acos2(double %0) {
%2 = fcmp olt double %0, -1.000000e+00
%3 = select i1 %2, double -1.000000e+00, double %0
%4 = fcmp ogt double %3, 1.000000e+00
%5 = select i1 %4, double 1.000000e+00, double %3
%6 = tail call double @acos(double %5)
ret double %6
}
/* Variables and functions */
double add_doubles(double, double);
int /*<<< orphan*/ classic();
int main() {
  double a, b, c;
  a = 1;
  b = 2;
  c = add_doubles(a, b);
  classic();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <add_doubles@plt>
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <classic@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1040 <add_doubles@plt>
xor    %eax,%eax
call   1030 <classic@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
store double 1.000000e+00, double* %1
store double 2.000000e+00, double* %2
%4 = load double, double* %1
%5 = load double, double* %2
%6 = call double @add_doubles(double %4, double %5)
store double %6, double* %3
%7 = call i32 (...) @classic()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @add_doubles(double 1.000000e+00, double 2.000000e+00)
%2 = tail call i32 (...) @classic()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
trailer() { ol(".end"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c".end\00"
define i32 @trailer() {
%1 = alloca i32
%2 = call i32 @ol(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".end\00"
define i32 @trailer() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ string_full_permutation(char *, int, int /*<<< orphan*/);
int strlen(char *);
void main() {
  char s[] = "abc";
  int len = strlen(s);
  string_full_permutation(s, len, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1040 <string_full_permutation@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x636261,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <string_full_permutation@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s = [4 x i8] c"abc\00"
define void @main() {
%1 = alloca [4 x i8]
%2 = alloca i32
%3 = bitcast [4 x i8]* %1 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %2
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @string_full_permutation(i8* %6, i32 %7, i32 0)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 6513249, i32* %1
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @string_full_permutation(i8* %2, i32 %3, i32 0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ gen_s();
int /*<<< orphan*/ gen_sn();
int main(void) {
  gen_s();
  gen_sn();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <gen_s@plt>
mov    $0x0,%al
call   1040 <gen_sn@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <gen_s@plt>
xor    %eax,%eax
call   1040 <gen_sn@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @gen_s()
%3 = call i32 (...) @gen_sn()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @gen_s()
%2 = tail call i32 (...) @gen_sn()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
int sgn(float n) { return (n < 0) ? -1 : 1; }


x86 assembly (clang, -O0):
<sgn>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
xorps  %xmm0,%xmm0
mov    $0x1,%eax
mov    $0xffffffff,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgn>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setbe  %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @sgn(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 -1, i32 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @sgn(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = select i1 %2, i32 -1, i32 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  int a = 1;
  int b = 2;
  char x[] = "HI";
  char y[] = "BYE";
  printf("Magic message is: %s\n", a > b ? x : y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x1b(%rbp)
mov    0xebd(%rip),%al
mov    %al,-0x19(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x1f(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    116a <main+0x5a>
lea    -0x1b(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1172 <main+0x62>
lea    -0x1f(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x455942,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.x = [3 x i8] c"HI\00"
@__const.main.y = [4 x i8] c"BYE\00"
@.str = [22 x i8] c"Magic message is: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [3 x i8]
%9 = alloca [4 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store i32 2, i32* %7
%10 = bitcast [3 x i8]* %8 to i8*
%11 = bitcast [4 x i8]* %9 to i8*
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
br label %19
17: ; preds = %2
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 0
br label %19
19: ; preds = %17, %15
%20 = phi i8* [ %16, %15 ], [ %18, %17 ]
%21 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Magic message is: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 4544834, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, int);
void unpartial(void *partial) { munmap(partial, (64)); }


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

x86 assembly (clang, -O2):
<unpartial>:
mov    $0x40,%esi
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define void @unpartial(i8* %0) {
%2 = tail call i32 @munmap(i8* %0, i32 64)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ led_test();
int main() {
  led_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @led_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ terminal_match_hitory(int);
void terminal_action_find_history_forward(int c,
                                          void (*process_line)(char *line)) {
  terminal_match_hitory(false);
}


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

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

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

LLVM IR (-O2):
define void @terminal_action_find_history_forward(i32 %0, void (i8*)* nocapture readnone %1) {
%3 = tail call i32 @terminal_match_hitory(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displayBytes(int, char const *, unsigned char const *, int);
void displayStateAsBytes(int level, const char *text,
                         const unsigned char *state) {
  displayBytes(level, text, state, 200 / 8);
}


x86 assembly (clang, -O0):
<displayStateAsBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x19,%ecx
call   1030 <displayBytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayStateAsBytes>:
mov    $0x19,%ecx
jmp    1030 <displayBytes@plt>

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

LLVM IR (-O2):
define void @displayStateAsBytes(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @displayBytes(i32 %0, i8* %1, i8* %2, i32 25)
ret void
}
/* Variables and functions */
double pow(int, double);
double exp2(double x) { return pow(2, x); }


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

x86 assembly (clang, -O2):
<exp2>:
mov    $0x2,%edi
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define double @exp2(double %0) {
%2 = tail call double @pow(i32 2, double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, unsigned long long *);
unsigned long long arg_ull(char *arg) {
  unsigned long long n = 0;
  if (arg[0] == '0' && arg[1] == 'x') {
    sscanf(arg, "%llx", &n);
  } else {
    sscanf(arg, "%llu", &n);
  }
  return n;
}


x86 assembly (clang, -O0):
<arg_ull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    115e <arg_ull+0x4e>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x78,%eax
jne    115e <arg_ull+0x4e>
mov    -0x8(%rbp),%rdi
lea    0xeb0(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
jmp    1172 <arg_ull+0x62>
mov    -0x8(%rbp),%rdi
lea    0xe9c(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_ull>:
push   %rax
movq   $0x0,(%rsp)
cmpb   $0x30,(%rdi)
jne    112d <arg_ull+0x1d>
cmpb   $0x78,0x1(%rdi)
jne    112d <arg_ull+0x1d>
lea    0xed5(%rip),%rsi
jmp    1134 <arg_ull+0x24>
lea    0xed1(%rip),%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llx\00"
@.str.1 = [5 x i8] c"%llu\00"
define i64 @arg_ull(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 48
br i1 %8, label %9, label %18
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 120
br i1 %14, label %15, label %18
15: ; preds = %9
%16 = load i8*, i8** %2
%17 = call i32 @sscanf(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
br label %21
18: ; preds = %9, %1
%19 = load i8*, i8** %2
%20 = call i32 @sscanf(i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64* %3)
br label %21
21: ; preds = %18, %15
%22 = load i64, i64* %3
ret i64 %22
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llx\00"
@.str.1 = [5 x i8] c"%llu\00"
define i64 @arg_ull(i8* nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 120
br i1 %9, label %11, label %10
10: ; preds = %6, %1
br label %11
11: ; preds = %6, %10
%12 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %10 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %6 ]
%13 = call i32 @sscanf(i8* %0, i8* %12, i64* %2)
%14 = load i64, i64* %2
ret i64 %14
}
void REMR3ReplayHandlerNotifications(void) {}


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

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

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

LLVM IR (-O2):
define void @REMR3ReplayHandlerNotifications() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ spiSendReceive(int);
void initFrame() {
  int i;
  if (1)
    for (i = 0; i < 4; i++)
      spiSendReceive(0x00);
}


x86 assembly (clang, -O0):
<initFrame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    113e <initFrame+0x2e>
xor    %edi,%edi
call   1030 <spiSendReceive@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <initFrame+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initFrame>:
push   %rax
xor    %edi,%edi
call   1030 <spiSendReceive@plt>
xor    %edi,%edi
call   1030 <spiSendReceive@plt>
xor    %edi,%edi
call   1030 <spiSendReceive@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <spiSendReceive@plt>

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

LLVM IR (-O2):
define void @initFrame() {
%1 = tail call i32 @spiSendReceive(i32 0)
%2 = tail call i32 @spiSendReceive(i32 0)
%3 = tail call i32 @spiSendReceive(i32 0)
%4 = tail call i32 @spiSendReceive(i32 0)
ret void
}
int msm_routing_get_dolby_dap_param_to_set_control(
    struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.snd_kcontrol = type opaque
%struct.snd_ctl_elem_value = type opaque
define i32 @msm_routing_get_dolby_dap_param_to_set_control(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_value* %1) {
%3 = alloca %struct.snd_kcontrol*
%4 = alloca %struct.snd_ctl_elem_value*
store %struct.snd_kcontrol* %0, %struct.snd_kcontrol** %3
store %struct.snd_ctl_elem_value* %1, %struct.snd_ctl_elem_value** %4
ret i32 0
}

LLVM IR (-O2):
%struct.snd_kcontrol = type opaque
%struct.snd_ctl_elem_value = type opaque
define i32 @msm_routing_get_dolby_dap_param_to_set_control(%struct.snd_kcontrol* nocapture readnone %0, %struct.snd_ctl_elem_value* nocapture readnone %1) {
ret i32 0
}
char *substitute_char(char new, char old, char *seq) {
  int i;
  for (i = 0; seq[i] != '\0'; ++i) {
    if (seq[i] == old)
      seq[i] = new;
  }
  return seq;
}


x86 assembly (clang, -O0):
<substitute_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1169 <substitute_char+0x69>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jne    1156 <substitute_char+0x56>
mov    -0x1(%rbp),%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    115b <substitute_char+0x5b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <substitute_char+0x1b>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<substitute_char>:
mov    %rdx,%rax
mov    (%rdx),%cl
test   %cl,%cl
je     1126 <substitute_char+0x26>
lea    0x1(%rax),%rdx
jmp    111b <substitute_char+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     1126 <substitute_char+0x26>
cmp    %sil,%cl
jne    1110 <substitute_char+0x10>
mov    %dil,-0x1(%rdx)
jmp    1110 <substitute_char+0x10>
ret

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

LLVM IR (-O2):
define i8* @substitute_char(i8 signext %0, i8 signext %1, i8* returned %2) {
%4 = load i8, i8* %2
%5 = icmp eq i8 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %3, %12
%7 = phi i64 [ %13, %12 ], [ 0, %3 ]
%8 = phi i8 [ %15, %12 ], [ %4, %3 ]
%9 = phi i8* [ %14, %12 ], [ %2, %3 ]
%10 = icmp eq i8 %8, %1
br i1 %10, label %11, label %12
11: ; preds = %6
store i8 %0, i8* %9
br label %12
12: ; preds = %6, %11
%13 = add nuw i64 %7, 1
%14 = getelementptr inbounds i8, i8* %2, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %6
17: ; preds = %12, %3
ret i8* %2
}
void pxa2xx_clear_reset_status(unsigned int mask) {}


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

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

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

LLVM IR (-O2):
define void @pxa2xx_clear_reset_status(i32 %0) {
ret void
}
/* Variables and functions */
char *string_copyext(char *);
char *copy_string2(char *s) { return string_copyext(s); }


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

x86 assembly (clang, -O2):
<copy_string2>:
jmp    1030 <string_copyext@plt>

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

LLVM IR (-O2):
define i8* @copy_string2(i8* %0) {
%2 = tail call i8* @string_copyext(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("461");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"461\00"
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 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"461\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void RTTestIErrorCount(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTestIErrorCount() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX1(int);
int /*<<< orphan*/ ROL8(int /*<<< orphan*/);
void Op3EM1X1(void) { ROL8(AbsoluteIndexedXX1(3)); }


x86 assembly (clang, -O0):
<Op3EM1X1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
call   1030 <ROL8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op3EM1X1>:
push   %rax
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ROL8@plt>

LLVM IR (-O0):
define void @Op3EM1X1() {
%1 = call i32 @AbsoluteIndexedXX1(i32 3)
%2 = call i32 @ROL8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op3EM1X1() {
%1 = tail call i32 @AbsoluteIndexedXX1(i32 3)
%2 = tail call i32 @ROL8(i32 %1)
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int fasttime_gettime_context(int /*<<< orphan*/ *, struct timespec *);
int fasttime_gettime(struct timespec *tp) {
  return fasttime_gettime_context(NULL, tp);
}


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

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

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @fasttime_gettime(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = call i32 @fasttime_gettime_context(i32* null, %struct.timespec* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @fasttime_gettime(%struct.timespec* %0) {
%2 = tail call i32 @fasttime_gettime_context(i32* null, %struct.timespec* %0)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int compare_uint8_t(const uint8_t *lhs, const uint8_t *rhs) {
  assert(lhs != NULL && rhs != NULL);
  return (((*lhs) > (*rhs)) - ((*lhs) < (*rhs)));
}


x86 assembly (clang, -O0):
<compare_uint8_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     113b <compare_uint8_t+0x2b>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x10(%rbp),%rdx
cmp    (%rdx),%rcx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_uint8_t>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    (%rbx),%rcx
xor    %eax,%eax
xor    %edx,%edx
cmp    (%r14),%rcx
setg   %al
setl   %dl
sub    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @compare_uint8_t(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %3
%6 = icmp ne i64* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64*, i64** %4
%9 = icmp ne i64* %8, null
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i64*, i64** %3
%15 = load i64, i64* %14
%16 = load i64*, i64** %4
%17 = load i64, i64* %16
%18 = icmp sgt i64 %15, %17
%19 = zext i1 %18 to i32
%20 = load i64*, i64** %3
%21 = load i64, i64* %20
%22 = load i64*, i64** %4
%23 = load i64, i64* %22
%24 = icmp slt i64 %21, %23
%25 = zext i1 %24 to i32
%26 = sub nsw i32 %19, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @compare_uint8_t(i64* %0, i64* %1) {
%3 = icmp ne i64* %0, null
%4 = icmp ne i64* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = load i64, i64* %0
%9 = load i64, i64* %1
%10 = icmp sgt i64 %8, %9
%11 = zext i1 %10 to i32
%12 = icmp slt i64 %8, %9
%13 = sext i1 %12 to i32
%14 = add nsw i32 %13, %11
ret i32 %14
}
int(islower)(int c) { return islower(c); }


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

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

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

LLVM IR (-O2):
define i32 @islower(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ lobatto_nodes_aux(double *, int);
void lobatto_nodes_n(double *restrict z, int n) {
  z[0] = -1, z[n - 1] = 1;
  lobatto_nodes_aux(&z[1], n - 2);
}


x86 assembly (clang, -O0):
<lobatto_nodes_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xedd(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0xc(%rbp),%esi
sub    $0x2,%esi
call   1030 <lobatto_nodes_aux@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lobatto_nodes_n>:
movabs $0xbff0000000000000,%rax
mov    %rax,(%rdi)
movslq %esi,%rsi
movabs $0x3ff0000000000000,%rax
mov    %rax,-0x8(%rdi,%rsi,8)
add    $0x8,%rdi
add    $0xfffffffe,%esi
jmp    1030 <lobatto_nodes_aux@plt>

LLVM IR (-O0):
define void @lobatto_nodes_n(double* noalias %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
store double -1.000000e+00, double* %6
%7 = load double*, double** %3
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %7, i64 %10
store double 1.000000e+00, double* %11
%12 = load double*, double** %3
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 2
%16 = call i32 @lobatto_nodes_aux(double* %13, i32 %15)
ret void
}

LLVM IR (-O2):
define void @lobatto_nodes_n(double* noalias %0, i32 %1) {
store double -1.000000e+00, double* %0
%3 = add nsw i32 %1, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds double, double* %0, i64 %4
store double 1.000000e+00, double* %5
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = add nsw i32 %1, -2
%8 = tail call i32 @lobatto_nodes_aux(double* %6, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
scalar_t__ shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
bool qshm_free(int shmid) {
  if (shmid < 0)
    return false;
  if (shmctl(shmid, IPC_RMID, 0) != 0)
    return false;
  return true;
}


x86 assembly (clang, -O0):
<qshm_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1131 <qshm_free+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1161 <qshm_free+0x51>
mov    -0x8(%rbp),%edi
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <shmctl@plt>
cmp    $0x0,%rax
je     115a <qshm_free+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1161 <qshm_free+0x51>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qshm_free>:
test   %edi,%edi
js     1135 <qshm_free+0x25>
push   %rax
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <shmctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@IPC_RMID = global i32 0
define i32 @qshm_free(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %14
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* @IPC_RMID
%10 = call i64 @shmctl(i32 %8, i32 %9, i32 0)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
store i32 0, i32* %2
br label %14
13: ; preds = %7
store i32 1, i32* %2
br label %14
14: ; preds = %13, %12, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @qshm_free(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i32, i32* @IPC_RMID
%5 = tail call i64 @shmctl(i32 %0, i32 %4, i32 0)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %3, %1
%9 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %9
}
/* Type definitions */
struct argp_state {
  int dummy;
};
typedef int /*<<< orphan*/ error_t;

/* Variables and functions */
int /*<<< orphan*/ ARGP_ERR_UNKNOWN;
#define ARGP_KEY_ARG 129
#define ARGP_KEY_INIT 128
error_t parse_opt(int key, char *arg, struct argp_state *state) {
  switch (key) {
  case ARGP_KEY_INIT:
    break;
  case ARGP_KEY_ARG:
    break;
  default:
    return ARGP_ERR_UNKNOWN;
  }
  return 0;
}


x86 assembly (clang, -O0):
<parse_opt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x80,%eax
je     1138 <parse_opt+0x38>
jmp    1125 <parse_opt+0x25>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     113d <parse_opt+0x3d>
jmp    1142 <parse_opt+0x42>
jmp    1153 <parse_opt+0x53>
jmp    1153 <parse_opt+0x53>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <parse_opt+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_opt>:
and    $0xfffffffe,%edi
xor    %eax,%eax
cmp    $0x80,%edi
je     1116 <parse_opt+0x16>
mov    0x2ecc(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.argp_state = type { i32 }
@ARGP_ERR_UNKNOWN = global i32 0
define i32 @parse_opt(i32 %0, i8* %1, %struct.argp_state* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca %struct.argp_state*
store i32 %0, i32* %5
store i8* %1, i8** %6
store %struct.argp_state* %2, %struct.argp_state** %7
%8 = load i32, i32* %5
switch i32 %8, label %11 [
i32 128, label %9
i32 129, label %10
]
9: ; preds = %3
br label %13
10: ; preds = %3
br label %13
11: ; preds = %3
%12 = load i32, i32* @ARGP_ERR_UNKNOWN
store i32 %12, i32* %4
br label %14
13: ; preds = %10, %9
store i32 0, i32* %4
br label %14
14: ; preds = %13, %11
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
%struct.argp_state = type { i32 }
@ARGP_ERR_UNKNOWN = global i32 0
define i32 @parse_opt(i32 %0, i8* nocapture readnone %1, %struct.argp_state* nocapture readnone %2) {
%4 = and i32 %0, -2
%5 = icmp eq i32 %4, 128
%6 = load i32, i32* @ARGP_ERR_UNKNOWN
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ portctl(char, int, char *);
int keyup() {
  int pin = 1;
  char mask = 0x04;
  portctl(mask, pin, "keyup");
  return 1;
}


x86 assembly (clang, -O0):
<keyup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movb   $0x4,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%esi
lea    0xed0(%rip),%rdx
movsbl %al,%edi
call   1030 <portctl@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyup>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <portctl@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"keyup\00"
define i32 @keyup() {
%1 = tail call i32 @portctl(i8 signext 4, i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "Usage: getaddr [options] program [version]\n"
          "Available options:\n"
          "  --hostname <name>\n"
          "         Specify the host name or address to contact (default "
          "localhost)\n"
          "  --netid <name>\n"
          "         Specify the netid of the transport to use (default udp)\n"
          "  --owner <name>\n"
          "         Specify the owner to use in the query\n"
          "  --no-hint\n"
          "         Leave out the address in the getaddr query\n"
          "  --no-netid\n"
          "         Leave out the netid in the getaddr query\n"
          "  --use-getversaddr\n"
          "         Use the RPCB_GETVERSADDR instead of RPCB_GETADDR\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [507 x i8] c"Usage: getaddr [options] program [version]\0AAvailable options:\0A --hostname <name>\0A Specify the host name or address to contact (default localhost)\0A --netid <name>\0A Specify the netid of the transport to use (default udp)\0A --owner <name>\0A Specify the owner to use in the query\0A --no-hint\0A Leave out the address in the getaddr query\0A --no-netid\0A Leave out the netid in the getaddr query\0A --use-getversaddr\0A Use the RPCB_GETVERSADDR instead of RPCB_GETADDR\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([507 x i8], [507 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [507 x i8] c"Usage: getaddr [options] program [version]\0AAvailable options:\0A --hostname <name>\0A Specify the host name or address to contact (default localhost)\0A --netid <name>\0A Specify the netid of the transport to use (default udp)\0A --owner <name>\0A Specify the owner to use in the query\0A --no-hint\0A Leave out the address in the getaddr query\0A --no-netid\0A Leave out the netid in the getaddr query\0A --use-getversaddr\0A Use the RPCB_GETVERSADDR instead of RPCB_GETADDR\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([507 x i8], [507 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
__typeof(sizeof(int)) strlcpy(char *dest, const char *src,
                              __typeof(sizeof(int)) size) {
  return 3;
}


x86 assembly (clang, -O0):
<strlcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x3,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @strlcpy(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
ret i64 3
}
void HSetFontSize(int size) {}


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

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

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

LLVM IR (-O2):
define void @HSetFontSize(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ isalpha(char);
scalar_t__ isblank(char);
int canPrint(char ch) { return isalpha(ch) || isblank(ch); }


x86 assembly (clang, -O0):
<canPrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <canPrint+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <isblank@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canPrint>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <canPrint+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <isblank@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @canPrint(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isblank(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @canPrint(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isblank(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int setbits(unsigned int, int, int, unsigned int);
int main(void) { printf("%u", setbits((unsigned)12, 3, 2, (unsigned)57)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x39,%ecx
call   1040 <setbits@plt>
mov    %eax,%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x39,%ecx
call   1040 <setbits@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = call i32 @setbits(i32 12, i32 3, i32 2, i32 57)
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = tail call i32 @setbits(i32 12, i32 3, i32 2, i32 57)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}