xunge/DecIR huggingface dataset:
/* Variables and functions */
double Bfunc(int, int, double);
double binomial_prefactor(int, int, int, double, double);
double fB(int i, int l1, int l2, double px, double ax, double bx, int r,
          double g) {
  return binomial_prefactor(i, l1, l2, px - ax, px - bx) * Bfunc(i, r, g);
}


x86 assembly (clang, -O0):
<fB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
movsd  %xmm3,-0x38(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
call   1030 <binomial_prefactor@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x2c(%rbp),%esi
movsd  -0x38(%rbp),%xmm0
call   1040 <Bfunc@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fB>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm3,0x10(%rsp)
mov    %ecx,%ebx
movapd %xmm0,%xmm3
mov    %edi,%ebp
subsd  %xmm1,%xmm0
subsd  %xmm2,%xmm3
movapd %xmm3,%xmm1
call   1030 <binomial_prefactor@plt>
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
mov    %ebx,%esi
movsd  0x10(%rsp),%xmm0
call   1040 <Bfunc@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @fB(i32 %0, i32 %1, i32 %2, double %3, double %4, double %5, i32 %6, double %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca i32
%16 = alloca double
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store i32 %6, i32* %15
store double %7, double* %16
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = load i32, i32* %11
%20 = load double, double* %12
%21 = load double, double* %13
%22 = fsub double %20, %21
%23 = load double, double* %12
%24 = load double, double* %14
%25 = fsub double %23, %24
%26 = call double @binomial_prefactor(i32 %17, i32 %18, i32 %19, double %22, double %25)
%27 = load i32, i32* %9
%28 = load i32, i32* %15
%29 = load double, double* %16
%30 = call double @Bfunc(i32 %27, i32 %28, double %29)
%31 = fmul double %26, %30
ret double %31
}

LLVM IR (-O2):
define double @fB(i32 %0, i32 %1, i32 %2, double %3, double %4, double %5, i32 %6, double %7) {
%9 = fsub double %3, %4
%10 = fsub double %3, %5
%11 = tail call double @binomial_prefactor(i32 %0, i32 %1, i32 %2, double %9, double %10)
%12 = tail call double @Bfunc(i32 %0, i32 %6, double %7)
%13 = fmul double %11, %12
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "rtmpserver ver:%s by duanx\n\n", "1.0");
  fprintf(stderr, "usage: rtmpserver [nodaemon] [stop]\n");
  exit(-1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
lea    0xee5(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed9(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"rtmpserver ver:%s by duanx\0A\0A\00"
@.str.1 = [4 x i8] c"1.0\00"
@.str.2 = [37 x i8] c"usage: rtmpserver [nodaemon] [stop]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"rtmpserver ver:%s by duanx\0A\0A\00"
@.str.1 = [4 x i8] c"1.0\00"
@.str.2 = [37 x i8] c"usage: rtmpserver [nodaemon] [stop]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
}
void gtk_ruler_set_range() {}


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

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

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

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

/* Variables and functions */
int ntohl(int);
int /*<<< orphan*/ printf(char *, int, int, int, int);
void print_quad_ipv4(in_addr_t i) {
  i = ntohl(i);
  printf("%d.%d.%d.%d", (i & 0xff000000) >> 24, (i & 0x00ff0000) >> 16,
         (i & 0x0000ff00) >> 8, (i & 0x000000ff));
}


x86 assembly (clang, -O0):
<print_quad_ipv4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <ntohl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
and    $0xff000000,%esi
shr    $0x18,%esi
mov    -0x4(%rbp),%edx
and    $0xff0000,%edx
sar    $0x10,%edx
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
mov    -0x4(%rbp),%r8d
and    $0xff,%r8d
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_quad_ipv4>:
push   %rax
call   1040 <ntohl@plt>
mov    %eax,%edx
movzbl %ah,%ecx
movzbl %al,%r8d
shr    $0x18,%eax
shr    $0x10,%edx
movzbl %dl,%edx
lea    0xec1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @print_quad_ipv4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ntohl(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, -16777216
%7 = lshr i32 %6, 24
%8 = load i32, i32* %2
%9 = and i32 %8, 16711680
%10 = ashr i32 %9, 16
%11 = load i32, i32* %2
%12 = and i32 %11, 65280
%13 = ashr i32 %12, 8
%14 = load i32, i32* %2
%15 = and i32 %14, 255
%16 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10, i32 %13, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @print_quad_ipv4(i32 %0) {
%2 = tail call i32 @ntohl(i32 %0)
%3 = lshr i32 %2, 24
%4 = lshr i32 %2, 16
%5 = and i32 %4, 255
%6 = lshr i32 %2, 8
%7 = and i32 %6, 255
%8 = and i32 %2, 255
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int num;
  num = 1;
  printf("Hello world!!\n");
  printf("I think my department is #%d.\n", num);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello world!!\0A\00"
@.str.1 = [31 x i8] c"I think my department is #%d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [31 x i8] c"I think my department is #%d.\0A\00"
@str = [14 x i8] c"Hello world!!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ trunc(double);
int /*<<< orphan*/ truncf(float);
int /*<<< orphan*/ truncl(long double);
void uninitvar_trunc(void) {
  float f;
  (void)truncf(f);
  double d;
  (void)trunc(d);
  long double ld;
  (void)truncl(ld);
}


x86 assembly (clang, -O0):
<uninitvar_trunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  -0x4(%rbp),%xmm0
call   1050 <truncf@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <trunc@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <truncl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_trunc>:
sub    $0x18,%rsp
call   1050 <truncf@plt>
call   1030 <trunc@plt>
call   1040 <truncl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_trunc() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = call i32 @truncf(float %4)
%6 = load double, double* %2
%7 = call i32 @trunc(double %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @truncl(x86_fp80 %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_trunc() {
%1 = tail call i32 @truncf(float undef)
%2 = tail call i32 @trunc(double undef)
%3 = tail call i32 @truncl(x86_fp80 undef)
ret void
}
/* Variables and functions */
int fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
int Print_stderr_header(char *header) {
  return fprintf(stderr, "%s %s ", "TP-DNS", header);
}


x86 assembly (clang, -O0):
<Print_stderr_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
lea    0xed0(%rip),%rsi
lea    0xed0(%rip),%rdx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print_stderr_header>:
mov    %rdi,%rcx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
lea    0xedd(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s %s \00"
@.str.1 = [7 x i8] c"TP-DNS\00"
define i32 @Print_stderr_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s %s \00"
@.str.1 = [7 x i8] c"TP-DNS\00"
define i32 @Print_stderr_header(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 %3
}
unsigned long Pow2(int exp) {
  unsigned char i;
  unsigned long pow2 = 1;
  for (i = 0; i < exp; ++i) {
    pow2 *= 2;
  }
  return pow2;
}


x86 assembly (clang, -O0):
<Pow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movb   $0x0,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1139 <Pow2+0x39>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1113 <Pow2+0x13>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pow2>:
mov    $0x1,%eax
test   %edi,%edi
jle    111d <Pow2+0x1d>
mov    $0x1,%cl
nopl   0x0(%rax,%rax,1)
add    %rax,%rax
movzbl %cl,%edx
lea    0x1(%rdx),%ecx
cmp    %edi,%edx
jl     1110 <Pow2+0x10>
ret

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

LLVM IR (-O2):
define i64 @Pow2(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 1, %1 ]
%5 = phi i8 [ %7, %3 ], [ 0, %1 ]
%6 = shl i64 %4, 1
%7 = add i8 %5, 1
%8 = zext i8 %7 to i32
%9 = icmp slt i32 %8, %0
br i1 %9, label %3, label %10
10: ; preds = %3, %1
%11 = phi i64 [ 1, %1 ], [ %6, %3 ]
ret i64 %11
}
/* Variables and functions */
char atoi(char *);
int main(int argc, char *argv[]) {
  int t;
  char p;
  p = atoi(argv[1]);
  t = 0;
  while (p < 0) {
    p = -p;
    ++t;
  }
  return t;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %al,-0x15(%rbp)
movl   $0x0,-0x14(%rbp)
movsbl -0x15(%rbp),%eax
cmp    $0x0,%eax
jge    1163 <main+0x53>
movsbl -0x15(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %al,-0x15(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x2d>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %cl,%cl
js     1124 <main+0x14>
pop    %rcx
ret
add    $0xff,%cl
js     1132 <main+0x22>
nopl   0x0(%rax)
jmp    1130 <main+0x20>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call signext i8 @atoi(i8* %4)
%6 = icmp slt i8 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = add i8 %5, -1
%9 = icmp sgt i8 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %7, %10
br label %10
11: ; preds = %7, %2
%12 = phi i32 [ 0, %2 ], [ 1, %7 ]
ret i32 %12
}
void main() {
  int a = 200;
  int b = 300;
  int x = 500;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0xc8,-0x4(%rbp)
movl   $0x12c,-0x8(%rbp)
movl   $0x1f4,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 200, i32* %1
store i32 300, i32* %2
store i32 500, i32* %3
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int snprintf(char *, int, char *, int, int, double);
int main(void) {
  char tmp[320];
  int x = snprintf(tmp, sizeof(tmp), "output is %*.*f\n", 2, 3, 20.3);
  puts(tmp);
  printf("snprintf returned %d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x150(%rbp),%rdi
mov    $0x140,%esi
lea    0xeb3(%rip),%rdx
mov    $0x2,%ecx
mov    $0x3,%r8d
movsd  0xe98(%rip),%xmm0
call   1050 <snprintf@plt>
mov    %eax,-0x154(%rbp)
lea    -0x150(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x154(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x148,%rsp
lea    0xec8(%rip),%rdx
mov    %rsp,%rbx
movsd  0xeb5(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x140,%esi
mov    $0x2,%ecx
mov    $0x3,%r8d
call   1050 <snprintf@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xea5(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"output is %*.*f\0A\00"
@.str.1 = [22 x i8] c"snprintf returned %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [320 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [320 x i8], [320 x i8]* %2, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 320, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 2, i32 3, double 2.030000e+01)
store i32 %5, i32* %3
%6 = getelementptr inbounds [320 x i8], [320 x i8]* %2, i64 0, i64 0
%7 = call i32 @puts(i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"output is %*.*f\0A\00"
@.str.1 = [22 x i8] c"snprintf returned %d\0A\00"
define i32 @main() {
%1 = alloca [320 x i8]
%2 = getelementptr inbounds [320 x i8], [320 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 320, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 2, i32 3, double 2.030000e+01)
%4 = call i32 @puts(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void invalidInputError() {
  printf("\nThe factorial is undefined for negative integers.\n");
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"\0AThe factorial is undefined for negative integers.\0A\00"
define void @invalidInputError() {
%1 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [51 x i8] c"\0AThe factorial is undefined for negative integers.\00"
define void @invalidInputError() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_CLEAR_BIT(int, int);
void xburst_cgm_ungate_x2d() { MIPS_CLEAR_BIT((0xB0000000 + 0x28), 14); }


x86 assembly (clang, -O0):
<xburst_cgm_ungate_x2d>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0xe,%esi
call   1030 <MIPS_CLEAR_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_ungate_x2d>:
mov    $0xb0000028,%edi
mov    $0xe,%esi
jmp    1030 <MIPS_CLEAR_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_ungate_x2d() {
%1 = call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 14)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_ungate_x2d() {
%1 = tail call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 14)
ret void
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ rand();
float ct_randf(const float min, const float max) {
  return min + (float)rand() / RAND_MAX * (max - min);
}


x86 assembly (clang, -O0):
<ct_randf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movss  -0xc(%rbp),%xmm1
cvtsi2ss %rax,%xmm0
mov    0x2ea4(%rip),%rax
divss  (%rax),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ct_randf>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %rax,%xmm1
mov    0x2eb6(%rip),%rax
divss  (%rax),%xmm1
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm2
subss  %xmm2,%xmm0
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define float @ct_randf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call i64 (...) @rand()
%7 = sitofp i64 %6 to float
%8 = load float, float* @RAND_MAX
%9 = fdiv float %7, %8
%10 = load float, float* %4
%11 = load float, float* %3
%12 = fsub float %10, %11
%13 = call float @llvm.fmuladd.f32(float %9, float %12, float %5)
ret float %13
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define float @ct_randf(float %0, float %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load float, float* @RAND_MAX
%6 = fdiv float %4, %5
%7 = fsub float %1, %0
%8 = tail call float @llvm.fmuladd.f32(float %6, float %7, float %0)
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Socket test skipped (thread support not enabled)\n");
  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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Socket test skipped (thread support not enabled)\0A\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 ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"Socket test skipped (thread support not enabled)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ clockid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __clock_getres(clockid_t clock_id, struct timespec *res) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__clock_getres>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__clock_getres>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@ENOSYS = global i32 0
define i32 @__clock_getres(i32 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca %struct.timespec*
store i32 %0, i32* %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@ENOSYS = global i32 0
define i32 @__clock_getres(i32 %0, %struct.timespec* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
int pbool(void) {
  typedef const _Bool cbool;
  _Bool pbool1 = (void *)0;
  cbool pbool2 = &pbool;
  return pbool2;
}


x86 assembly (clang, -O0):
<pbool>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
movb   $0x1,-0x2(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @pbool() {
ret i32 1
}
double Det2x2(double a1, double b1, double a2, double b2) {
  return (a1 * b2 - b1 * a2);
}


x86 assembly (clang, -O0):
<Det2x2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Det2x2>:
mulsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm0
subsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @Det2x2(double %0, double %1, double %2, double %3) {
%5 = fneg double %1
%6 = fmul double %5, %2
%7 = tail call double @llvm.fmuladd.f64(double %0, double %3, double %6)
ret double %7
}
int atomic_inc_return(volatile int *p) {
  int i = 1;
  asm volatile("lock; xaddl %0, %1" : "+r"(i), "+m"(*p) : : "memory");
  return i + 1;
}


x86 assembly (clang, -O0):
<atomic_inc_return>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
lock xadd %eax,(%rcx)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_inc_return>:
mov    $0x1,%eax
lock xadd %eax,(%rdi)
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @atomic_inc_return(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 1, i32* %3
%4 = load i32, i32* %3
%5 = load i32*, i32** %2
%6 = call i32 asm sideeffect "lock; xaddl $0, $1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %5, i32 %4, i32* elementtype(i32) %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @atomic_inc_return(i32* %0) {
%2 = tail call i32 asm sideeffect "lock; xaddl $0, $1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 1, i32* elementtype(i32) %0)
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int strlen(char *);
int strncmp(char *, char *, int);
int strcmp(char *s1, char *s2) {
  int count1 = strlen(s1);
  int count2 = strlen(s2);
  if (count1 != count2) {
    return 0;
  } else {
    return strncmp(s1, s2, count1);
  }
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
je     1160 <strcmp+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1173 <strcmp+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebp
jne    114e <strcmp+0x2e>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <strncmp@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %3)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
double metresToYards(double metres) { return metres * 1.09361; }


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

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

LLVM IR (-O0):
define double @metresToYards(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.093610e+00
ret double %4
}

LLVM IR (-O2):
define double @metresToYards(double %0) {
%2 = fmul double %0, 1.093610e+00
ret double %2
}
/* Variables and functions */
scalar_t__ ft_isspace(char const);
const char *skip_white_space(const char *s) {
  while (s && ft_isspace(*s))
    s++;
  return (s);
}


x86 assembly (clang, -O0):
<skip_white_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1142 <skip_white_space+0x32>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ft_isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <skip_white_space+0x42>
jmp    1163 <skip_white_space+0x53>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_white_space+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_white_space>:
push   %rbx
test   %rdi,%rdi
je     1134 <skip_white_space+0x24>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <ft_isspace@plt>
test   %rax,%rax
jne    1120 <skip_white_space+0x10>
jmp    1136 <skip_white_space+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_white_space(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %13, %1
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = call i64 @ft_isspace(i8 signext %8)
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %6, %3
%12 = phi i1 [ false, %3 ], [ %10, %6 ]
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %2
br label %3
16: ; preds = %11
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define i8* @skip_white_space(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i64 @ft_isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("Hellow world!");
  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 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
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 = [14 x i8] c"Hellow world!\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 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hellow world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t u8max(uint8_t x, uint8_t y) { return x < y ? y : x; }


x86 assembly (clang, -O0):
<u8max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <u8max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <u8max+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8max>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @u8max(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 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %4
br label %12
10: ; preds = %2
%11 = load i64, i64* %3
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @u8max(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void set_stage_in_tweak(uint8_t *tweak, const uint8_t value) {
  tweak[0] = (tweak[0] & 0x1f) ^ value;
}


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

x86 assembly (clang, -O2):
<set_stage_in_tweak>:
mov    (%rdi),%eax
and    $0x1f,%eax
xor    %esi,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @set_stage_in_tweak(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = and i32 %7, 31
%9 = load i32, i32* %4
%10 = xor i32 %8, %9
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
define void @set_stage_in_tweak(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = and i32 %3, 31
%5 = xor i32 %4, %1
store i32 %5, i32* %0
ret void
}
void uchar_to_string(unsigned int foo, unsigned char *bar) {
  char hexdigit[16] = "0123456789abcdef";
  int i;
  bar[1] = hexdigit[foo & 0x0f];
  bar[0] = hexdigit[foo >> 4];
}


x86 assembly (clang, -O0):
<uchar_to_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    -0x20(%rbp,%rax,1),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
mov    %eax,%eax
mov    -0x20(%rbp,%rax,1),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uchar_to_string>:
mov    %edi,%eax
mov    %eax,%ecx
and    $0xf,%ecx
lea    0xef2(%rip),%rdx
mov    (%rcx,%rdx,1),%cl
mov    %cl,0x1(%rsi)
shr    $0x4,%rax
mov    (%rax,%rdx,1),%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
@__const.uchar_to_string.hexdigit = [16 x i8] c"0123456789abcdef"
define void @uchar_to_string(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [16 x i8]
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = bitcast [16 x i8]* %5 to i8*
%8 = load i32, i32* %3
%9 = and i32 %8, 15
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i32, i32* %3
%16 = lshr i32 %15, 4
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i64 0
store i8 %19, i8* %21
ret void
}

LLVM IR (-O2):
@__const.uchar_to_string.hexdigit = [16 x i8] c"0123456789abcdef"
define void @uchar_to_string(i32 %0, i8* nocapture writeonly %1) {
%3 = and i32 %0, 15
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [16 x i8], [16 x i8]* @__const.uchar_to_string.hexdigit, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %0, 4
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [16 x i8], [16 x i8]* @__const.uchar_to_string.hexdigit, i64 0, i64 %9
%11 = load i8, i8* %10
store i8 %11, i8* %1
ret void
}
int ti_max_start(double const *options) { return (int)options[0] - 1; }


x86 assembly (clang, -O0):
<ti_max_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_max_start>:
cvttsd2si (%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_max_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_max_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = add nsw i32 %3, -1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/ const);
char *pack_u16(const uint16_t *data, char *buffer) {
  *((uint16_t *)buffer) = htons(*data);
  return buffer + sizeof(*data);
}


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

x86 assembly (clang, -O2):
<pack_u16>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <htons@plt>
mov    %eax,(%rbx)
add    $0x4,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @pack_u16(i32* nocapture %0, i8* writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @htons(i32 %3)
%5 = bitcast i8* %1 to i32*
store i32 %4, i32* %5
%6 = getelementptr inbounds i8, i8* %1, i64 4
ret i8* %6
}
/* Variables and functions */
bool op_geq(double x, double y) { return x >= y; }


x86 assembly (clang, -O0):
<op_geq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_geq>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @op_geq(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 = load double, double* %4
%7 = fcmp oge double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @op_geq(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void __attribute__((no, noclone)) test1(int x) {
  if ((2 << x) == 1 || (8 << x) == 1 || (8 << x) == 2 || (3072 << x) == 3 ||
      (294912 << x) == 9 || (45056 << x) == 11 || (2176 << x) == 17)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x2,%eax
shl    %cl,%eax
cmp    $0x1,%eax
je     11a0 <test1+0x90>
mov    -0x4(%rbp),%ecx
mov    $0x8,%eax
shl    %cl,%eax
cmp    $0x1,%eax
je     11a0 <test1+0x90>
mov    -0x4(%rbp),%ecx
mov    $0x8,%eax
shl    %cl,%eax
cmp    $0x2,%eax
je     11a0 <test1+0x90>
mov    -0x4(%rbp),%ecx
mov    $0xc00,%eax
shl    %cl,%eax
cmp    $0x3,%eax
je     11a0 <test1+0x90>
mov    -0x4(%rbp),%ecx
mov    $0x48000,%eax
shl    %cl,%eax
cmp    $0x9,%eax
je     11a0 <test1+0x90>
mov    -0x4(%rbp),%ecx
mov    $0xb000,%eax
shl    %cl,%eax
cmp    $0xb,%eax
je     11a0 <test1+0x90>
mov    -0x4(%rbp),%ecx
mov    $0x880,%eax
shl    %cl,%eax
cmp    $0x11,%eax
jne    11a5 <test1+0x95>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 2, %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %30, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = shl i32 8, %7
%9 = icmp eq i32 %8, 1
br i1 %9, label %30, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = shl i32 8, %11
%13 = icmp eq i32 %12, 2
br i1 %13, label %30, label %14
14: ; preds = %10
%15 = load i32, i32* %2
%16 = shl i32 3072, %15
%17 = icmp eq i32 %16, 3
br i1 %17, label %30, label %18
18: ; preds = %14
%19 = load i32, i32* %2
%20 = shl i32 294912, %19
%21 = icmp eq i32 %20, 9
br i1 %21, label %30, label %22
22: ; preds = %18
%23 = load i32, i32* %2
%24 = shl i32 45056, %23
%25 = icmp eq i32 %24, 11
br i1 %25, label %30, label %26
26: ; preds = %22
%27 = load i32, i32* %2
%28 = shl i32 2176, %27
%29 = icmp eq i32 %28, 17
br i1 %29, label %30, label %31
30: ; preds = %26, %22, %18, %14, %10, %6, %1
unreachable
31: ; preds = %26
ret void
}

LLVM IR (-O2):
define void @test1(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
int /*<<< orphan*/ xxx();
int main(void) {
  xxx();
  foo();
  bar();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @xxx()
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @bar()
ret i32 0
}
int main() {
  int ret;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int PAPI_query_event(int);
void papif_query_event__(int *EventCode, int *check) {
  *check = PAPI_query_event(*EventCode);
}


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

x86 assembly (clang, -O2):
<papif_query_event__>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_query_event@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_query_event__(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_query_event(i32 %3)
store i32 %4, i32* %1
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int min(int64_t x, int64_t y) { return (x < y) ? x : y; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @min(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 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @min(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ put8(unsigned char);
void jg_rj(unsigned char saut) {
  put8(0x7F);
  put8(saut);
}


x86 assembly (clang, -O0):
<jg_rj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x7f,%edi
call   1030 <put8@plt>
movzbl -0x1(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jg_rj>:
push   %rbx
mov    %edi,%ebx
mov    $0x7f,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @jg_rj(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @put8(i8 zeroext 127)
%4 = load i8, i8* %2
%5 = call i32 @put8(i8 zeroext %4)
ret void
}

LLVM IR (-O2):
define void @jg_rj(i8 zeroext %0) {
%2 = tail call i32 @put8(i8 zeroext 127)
%3 = tail call i32 @put8(i8 zeroext %0)
ret void
}