xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ app_terminate();
int /*<<< orphan*/ ogs_app_terminate();
int /*<<< orphan*/ ogs_msleep(int);
int /*<<< orphan*/ test_5gc_final();
int /*<<< orphan*/ test_child_terminate();
void terminate(void) {
  ogs_msleep(50);
  test_child_terminate();
  app_terminate();
  test_5gc_final();
  ogs_app_terminate();
}


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
call   1030 <ogs_msleep@plt>
mov    $0x0,%al
call   1050 <test_child_terminate@plt>
mov    $0x0,%al
call   1060 <app_terminate@plt>
mov    $0x0,%al
call   1040 <test_5gc_final@plt>
mov    $0x0,%al
call   1070 <ogs_app_terminate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate>:
push   %rax
mov    $0x32,%edi
call   1030 <ogs_msleep@plt>
xor    %eax,%eax
call   1050 <test_child_terminate@plt>
xor    %eax,%eax
call   1060 <app_terminate@plt>
xor    %eax,%eax
call   1040 <test_5gc_final@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <ogs_app_terminate@plt>

LLVM IR (-O0):
define void @terminate() {
%1 = call i32 @ogs_msleep(i32 50)
%2 = call i32 (...) @test_child_terminate()
%3 = call i32 (...) @app_terminate()
%4 = call i32 (...) @test_5gc_final()
%5 = call i32 (...) @ogs_app_terminate()
ret void
}

LLVM IR (-O2):
define void @terminate() {
%1 = tail call i32 @ogs_msleep(i32 50)
%2 = tail call i32 (...) @test_child_terminate()
%3 = tail call i32 (...) @app_terminate()
%4 = tail call i32 (...) @test_5gc_final()
%5 = tail call i32 (...) @ogs_app_terminate()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int interleave(int sector, int skew, int track_spt) {
  uint32_t skewed_i;
  uint32_t adjusted_r;
  uint32_t add = (track_spt & 1);
  uint32_t adjust = (track_spt >> 1);
  skewed_i = (sector + skew) % track_spt;
  adjusted_r = (skewed_i >> 1) + 1;
  if (skewed_i & 1)
    adjusted_r += (adjust + add);
  return (adjusted_r);
}


x86 assembly (clang, -O0):
<interleave>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1153 <interleave+0x53>
mov    -0x1c(%rbp),%eax
add    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<interleave>:
mov    %edx,%ecx
lea    (%rdi,%rsi,1),%eax
cltd
idiv   %ecx
mov    %edx,%eax
sar    %eax
and    $0x1,%edx
neg    %edx
mov    %ecx,%esi
sar    %esi
and    $0x1,%ecx
add    %esi,%ecx
and    %edx,%ecx
add    %ecx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @interleave(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%11 = load i32, i32* %6
%12 = and i32 %11, 1
store i32 %12, i32* %9
%13 = load i32, i32* %6
%14 = ashr i32 %13, 1
store i32 %14, i32* %10
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %6
%19 = srem i32 %17, %18
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = ashr i32 %20, 1
%22 = add nsw i32 %21, 1
store i32 %22, i32* %8
%23 = load i32, i32* %7
%24 = and i32 %23, 1
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %32
26: ; preds = %3
%27 = load i32, i32* %10
%28 = load i32, i32* %9
%29 = add nsw i32 %27, %28
%30 = load i32, i32* %8
%31 = add nsw i32 %30, %29
store i32 %31, i32* %8
br label %32
32: ; preds = %26, %3
%33 = load i32, i32* %8
ret i32 %33
}

LLVM IR (-O2):
define i32 @interleave(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = srem i32 %4, %2
%6 = ashr i32 %5, 1
%7 = add nsw i32 %6, 1
%8 = and i32 %5, 1
%9 = icmp eq i32 %8, 0
%10 = ashr i32 %2, 1
%11 = and i32 %2, 1
%12 = add nsw i32 %10, %11
%13 = select i1 %9, i32 0, i32 %12
%14 = add nsw i32 %7, %13
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ j64_estr_encode(char *, int);
int /*<<< orphan*/ memset(char *, char, int);
scalar_t__ strcmp(char *, char *);
int test_estr_encode_2(void) {
  char buf[2 + 1];
  memset(buf, '\0', sizeof(buf));
  j64_estr_encode(buf, 2);
  return strcmp(buf, "\"\"") == 0;
}


x86 assembly (clang, -O0):
<test_estr_encode_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x3(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <memset@plt>
lea    -0x3(%rbp),%rdi
mov    $0x2,%esi
call   1050 <j64_estr_encode@plt>
lea    -0x3(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_estr_encode_2>:
push   %rbx
sub    $0x10,%rsp
lea    0xd(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <memset@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1050 <j64_estr_encode@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\22\22\00"
define i32 @test_estr_encode_2() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 0, i32 3)
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%5 = call i32 @j64_estr_encode(i8* %4, i32 2)
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"\22\22\00"
define i32 @test_estr_encode_2() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 0, i32 3)
%4 = call i32 @j64_estr_encode(i8* %2, i32 2)
%5 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
unsigned char BCD7Szegmens(unsigned short num) {
  switch (num) {
  case 0:
    return 0x3F;
  case 1:
    return 0x06;
  case 2:
    return 0x5B;
  case 3:
    return 0x4F;
  case 4:
    return 0x66;
  case 5:
    return 0x6D;
  case 6:
    return 0x7D;
  case 7:
    return 0x07;
  case 8:
    return 0x7F;
  case 9:
    return 0x6F;
  default:
    return 0xFF;
  }
}


x86 assembly (clang, -O0):
<BCD7Szegmens>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x9,%rax
ja     118b <BCD7Szegmens+0x8b>
mov    -0x10(%rbp),%rax
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x3f,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x6,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x5b,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x4f,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x66,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x6d,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x7d,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x7,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x7f,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0x6f,-0x1(%rbp)
jmp    118f <BCD7Szegmens+0x8f>
movb   $0xff,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BCD7Szegmens>:
mov    $0xff,%al
cmp    $0x9,%di
ja     1116 <BCD7Szegmens+0x16>
movswq %di,%rax
lea    0xeed(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
define zeroext i8 @BCD7Szegmens(i16 zeroext %0) {
%2 = alloca i8
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
switch i32 %5, label %16 [
i32 0, label %6
i32 1, label %7
i32 2, label %8
i32 3, label %9
i32 4, label %10
i32 5, label %11
i32 6, label %12
i32 7, label %13
i32 8, label %14
i32 9, label %15
]
6: ; preds = %1
store i8 63, i8* %2
br label %17
7: ; preds = %1
store i8 6, i8* %2
br label %17
8: ; preds = %1
store i8 91, i8* %2
br label %17
9: ; preds = %1
store i8 79, i8* %2
br label %17
10: ; preds = %1
store i8 102, i8* %2
br label %17
11: ; preds = %1
store i8 109, i8* %2
br label %17
12: ; preds = %1
store i8 125, i8* %2
br label %17
13: ; preds = %1
store i8 7, i8* %2
br label %17
14: ; preds = %1
store i8 127, i8* %2
br label %17
15: ; preds = %1
store i8 111, i8* %2
br label %17
16: ; preds = %1
store i8 -1, i8* %2
br label %17
17: ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%18 = load i8, i8* %2
ret i8 %18
}

LLVM IR (-O2):
@switch.table.BCD7Szegmens = [10 x i8] c"?\06[Ofm}\07\7Fo"
define zeroext i8 @BCD7Szegmens(i16 zeroext %0) {
%2 = icmp ult i16 %0, 10
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i16 %0 to i64
%5 = getelementptr inbounds [10 x i8], [10 x i8]* @switch.table.BCD7Szegmens, i64 0, i64 %4
%6 = load i8, i8* %5
br label %7
7: ; preds = %1, %3
%8 = phi i8 [ %6, %3 ], [ -1, %1 ]
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ add(int **);
void reset(int a[][4]) {
  int i, j;
  for (i = 0; i < 4; i++)
    for (j = 0; j < 4; j++)
      a[i][j] = 0;
  add(a);
  add(a);
}


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1179 <reset+0x69>
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1166 <reset+0x56>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <reset+0x24>
jmp    116b <reset+0x5b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <reset+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <add@plt>
mov    -0x8(%rbp),%rdi
call   1030 <add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset>:
push   %rbx
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
call   1030 <add@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <add@plt>

LLVM IR (-O0):
define void @reset([4 x i32]* %0) {
%2 = alloca [4 x i32]*
%3 = alloca i32
%4 = alloca i32
store [4 x i32]* %0, [4 x i32]** %2
store i32 0, i32* %3
br label %5
5: ; preds = %24, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %27
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %20, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load [4 x i32]*, [4 x i32]** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %16, i64 0, i64 %18
store i32 0, i32* %19
br label %20
20: ; preds = %12
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %9
23: ; preds = %9
br label %24
24: ; preds = %23
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %5
27: ; preds = %5
%28 = load [4 x i32]*, [4 x i32]** %2
%29 = bitcast [4 x i32]* %28 to i32**
%30 = call i32 @add(i32** %29)
%31 = load [4 x i32]*, [4 x i32]** %2
%32 = bitcast [4 x i32]* %31 to i32**
%33 = call i32 @add(i32** %32)
ret void
}

LLVM IR (-O2):
define void @reset([4 x i32]* %0) {
%2 = bitcast [4 x i32]* %0 to i8*
%3 = bitcast [4 x i32]* %0 to i32**
%4 = tail call i32 @add(i32** %3)
%5 = tail call i32 @add(i32** %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("PASS\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
double print_time(clock_t time) {
  return ((double)(clock() - time) / CLOCKS_PER_SEC);
}


x86 assembly (clang, -O0):
<print_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
sub    -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2eb5(%rip),%rax
divsd  (%rax),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_time>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
cvtsi2sd %rax,%xmm0
mov    0x2ebe(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @print_time(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 (...) @clock()
%4 = load i64, i64* %2
%5 = sub nsw i64 %3, %4
%6 = sitofp i64 %5 to double
%7 = load double, double* @CLOCKS_PER_SEC
%8 = fdiv double %6, %7
ret double %8
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @print_time(i64 %0) {
%2 = tail call i64 (...) @clock()
%3 = sub nsw i64 %2, %0
%4 = sitofp i64 %3 to double
%5 = load double, double* @CLOCKS_PER_SEC
%6 = fdiv double %4, %5
ret double %6
}
/* Type definitions */
typedef int uint32_t;
struct pcg_state_setseq_32 {
  int dummy;
};

/* Variables and functions */
int pcg_setseq_32_rxs_m_xs_32_random_r(struct pcg_state_setseq_32 *);
uint32_t
pcg_setseq_32_rxs_m_xs_32_boundedrand_r(struct pcg_state_setseq_32 *rng,
                                        uint32_t bound) {
  uint32_t threshold = -bound % bound;
  for (;;) {
    uint32_t r = pcg_setseq_32_rxs_m_xs_32_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_setseq_32_rxs_m_xs_32_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_setseq_32_rxs_m_xs_32_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_setseq_32_rxs_m_xs_32_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_setseq_32_rxs_m_xs_32_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_setseq_32_rxs_m_xs_32_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_setseq_32_rxs_m_xs_32_random_r@plt>
test   %eax,%eax
js     1120 <pcg_setseq_32_rxs_m_xs_32_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_setseq_32 = type { i32 }
define i32 @pcg_setseq_32_rxs_m_xs_32_boundedrand_r(%struct.pcg_state_setseq_32* %0, i32 %1) {
%3 = alloca %struct.pcg_state_setseq_32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_setseq_32* %0, %struct.pcg_state_setseq_32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_setseq_32*, %struct.pcg_state_setseq_32** %3
%13 = call i32 @pcg_setseq_32_rxs_m_xs_32_random_r(%struct.pcg_state_setseq_32* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_setseq_32 = type { i32 }
define i32 @pcg_setseq_32_rxs_m_xs_32_boundedrand_r(%struct.pcg_state_setseq_32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_setseq_32_rxs_m_xs_32_random_r(%struct.pcg_state_setseq_32* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Variables and functions */
float _coshf(float);
float coshf(float x) { return _coshf(x); }


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

x86 assembly (clang, -O2):
<coshf>:
jmp    1030 <_coshf@plt>

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

LLVM IR (-O2):
define float @coshf(float %0) {
%2 = tail call float @_coshf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr, "%s [-d driver[:arg]] [trim_value]\n", name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"%s [-d driver[:arg]] [trim_value]\0A\00"
define void @usage(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 ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"%s [-d driver[:arg]] [trim_value]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ my_printnbr(unsigned long, char *, int /*<<< orphan*/);
int /*<<< orphan*/ my_putchar(int /*<<< orphan*/);
int /*<<< orphan*/ my_strlen(char *);
int my_putunbr_base(unsigned long nbr, char *base) {
  if (nbr == 0) {
    my_putchar('0');
    return (0);
  }
  my_printnbr(nbr, base, my_strlen(base));
  return (0);
}


x86 assembly (clang, -O0):
<my_putunbr_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1161 <my_putunbr_base+0x31>
mov    $0x30,%edi
call   1040 <my_putchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    1190 <my_putunbr_base+0x60>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1050 <my_printnbr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putunbr_base>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1156 <my_putunbr_base+0x26>
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <my_strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1050 <my_printnbr@plt>
jmp    1160 <my_putunbr_base+0x30>
mov    $0x30,%edi
call   1040 <my_putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @my_putunbr_base(i64 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %4
store i8* %1, i8** %5
%6 = load i64, i64* %4
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @my_putchar(i32 48)
store i32 0, i32* %3
br label %16
10: ; preds = %2
%11 = load i64, i64* %4
%12 = load i8*, i8** %5
%13 = load i8*, i8** %5
%14 = call i32 @my_strlen(i8* %13)
%15 = call i32 @my_printnbr(i64 %11, i8* %12, i32 %14)
store i32 0, i32* %3
br label %16
16: ; preds = %10, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @my_putunbr_base(i64 %0, i8* %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @my_putchar(i32 48)
br label %9
6: ; preds = %2
%7 = tail call i32 @my_strlen(i8* %1)
%8 = tail call i32 @my_printnbr(i64 %0, i8* %1, i32 %7)
br label %9
9: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
scalar_t__ is_divisible(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int answer = 40;
  while (1) {
    if (is_divisible(answer))
      break;
    answer += 20;
  }
  printf("ANSWER: %d\n", answer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x28,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <is_divisible@plt>
cmp    $0x0,%rax
je     114d <main+0x2d>
jmp    115b <main+0x3b>
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x14,%ebx
cs nopw 0x0(%rax,%rax,1)
add    $0x14,%ebx
mov    %ebx,%edi
call   1040 <is_divisible@plt>
test   %rax,%rax
je     1130 <main+0x10>
lea    0xeba(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"ANSWER: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 40, i32* %2
br label %3
3: ; preds = %0, %8
%4 = load i32, i32* %2
%5 = call i64 @is_divisible(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %11
8: ; preds = %3
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 20
store i32 %10, i32* %2
br label %3
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"ANSWER: %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 40, %0 ], [ %5, %1 ]
%3 = tail call i64 @is_divisible(i32 %2)
%4 = icmp eq i64 %3, 0
%5 = add nuw nsw i32 %2, 20
br i1 %4, label %1, label %6
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
char *getvalue(char *p, char *buf) {
  int len = *p++;
  len |= ((*p++) << 8);
  memcpy(buf, p, len);
  buf[len] = '\0';
  return p + len;
}


x86 assembly (clang, -O0):
<getvalue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
shl    $0x8,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getvalue>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
movsbq (%rdi),%rax
lea    0x2(%rdi),%rsi
movsbq 0x1(%rdi),%rbx
shl    $0x8,%rbx
or     %rax,%rbx
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <memcpy@plt>
movb   $0x0,(%r14,%rbx,1)
lea    (%r15,%rbx,1),%rax
add    $0x2,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @getvalue(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
store i32 %9, i32* %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
%12 = load i8, i8* %10
%13 = sext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i32, i32* %5
%16 = or i32 %15, %14
store i32 %16, i32* %5
%17 = load i8*, i8** %4
%18 = load i8*, i8** %3
%19 = load i32, i32* %5
%20 = call i32 @memcpy(i8* %17, i8* %18, i32 %19)
%21 = load i8*, i8** %4
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
store i8 0, i8* %24
%25 = load i8*, i8** %3
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
ret i8* %28
}

LLVM IR (-O2):
define i8* @getvalue(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %0
%5 = sext i8 %4 to i32
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = shl nsw i32 %8, 8
%10 = or i32 %9, %5
%11 = tail call i32 @memcpy(i8* %1, i8* %6, i32 %10)
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds i8, i8* %1, i64 %12
store i8 0, i8* %13
%14 = getelementptr inbounds i8, i8* %6, i64 %12
ret i8* %14
}
void testClosureSDSrV(void (*closure)(short, double, short), short a1,
                      double a2, short a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureSDSrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%cx
movsd  -0x18(%rbp),%xmm0
movswl %cx,%edi
movswl -0x1a(%rbp),%esi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureSDSrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %edx,%esi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureSDSrV(void (i16, double, i16)* %0, i16 signext %1, double %2, i16 signext %3) {
%5 = alloca void (i16, double, i16)*
%6 = alloca i16
%7 = alloca double
%8 = alloca i16
store void (i16, double, i16)* %0, void (i16, double, i16)** %5
store i16 %1, i16* %6
store double %2, double* %7
store i16 %3, i16* %8
%9 = load void (i16, double, i16)*, void (i16, double, i16)** %5
%10 = load i16, i16* %6
%11 = load double, double* %7
%12 = load i16, i16* %8
ret void
}

LLVM IR (-O2):
define void @testClosureSDSrV(void (i16, double, i16)* nocapture %0, i16 signext %1, double %2, i16 signext %3) {
tail call void %0(i16 signext %1, double %2, i16 signext %3)
ret void
}
/* Variables and functions */
int sumlots(int, int, int, int, int, int, int, int, int, int, int);
int main(int argc, char **argv) {
  return sumlots(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) != 66;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
movl   $0x7,(%rsp)
movl   $0x8,0x8(%rsp)
movl   $0x9,0x10(%rsp)
movl   $0xa,0x18(%rsp)
movl   $0xb,0x20(%rsp)
call   1030 <sumlots@plt>
cmp    $0x42,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
push   $0xb
push   $0xa
push   $0x9
push   $0x8
push   $0x7
call   1030 <sumlots@plt>
add    $0x30,%rsp
xor    %ecx,%ecx
cmp    $0x42,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @sumlots(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11)
%7 = icmp ne i32 %6, 66
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sumlots(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11)
%4 = icmp ne i32 %3, 66
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
main() { printf("EOF = %d\n", EOF); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"EOF = %d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
float __infer_nondet_float();
float coshf(float x) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<coshf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @coshf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @coshf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ quicksort_recursive(int *, int /*<<< orphan*/, int, int);
void quicksort_ascending(int *array, int length) {
  quicksort_recursive(array, 0, length, 1);
}


x86 assembly (clang, -O0):
<quicksort_ascending>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
mov    $0x1,%ecx
call   1030 <quicksort_recursive@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort_ascending>:
mov    %esi,%edx
xor    %esi,%esi
mov    $0x1,%ecx
jmp    1030 <quicksort_recursive@plt>

LLVM IR (-O0):
define void @quicksort_ascending(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* %4
%7 = call i32 @quicksort_recursive(i32* %5, i32 0, i32 %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @quicksort_ascending(i32* %0, i32 %1) {
%3 = tail call i32 @quicksort_recursive(i32* %0, i32 0, i32 %1, i32 1)
ret void
}
int test_imm_61int16_mem(short *val) {
  return ((*val) & (-0x61 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_61int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff9f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_61int16_mem>:
movzwl (%rdi),%eax
test   $0xff9f,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_61int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -97
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
double f4_sum_pre_int_int_int_int_int_int_int(int v0, int v1, int v2, int v3,
                                              int v4, int v5, int v) {
  return (double)v0 + (double)v1 + (double)v2 + (double)v3 + (double)v4 +
         (double)v5 + ((double)(v));
}


x86 assembly (clang, -O0):
<f4_sum_pre_int_int_int_int_int_int_int>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_sum_pre_int_int_int_int_int_int_int>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
cvtsi2sd %r8d,%xmm2
addsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %r9d,%xmm1
addsd  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f4_sum_pre_int_int_int_int_int_int_int(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = sitofp i32 %15 to double
%17 = load i32, i32* %9
%18 = sitofp i32 %17 to double
%19 = fadd double %16, %18
%20 = load i32, i32* %10
%21 = sitofp i32 %20 to double
%22 = fadd double %19, %21
%23 = load i32, i32* %11
%24 = sitofp i32 %23 to double
%25 = fadd double %22, %24
%26 = load i32, i32* %12
%27 = sitofp i32 %26 to double
%28 = fadd double %25, %27
%29 = load i32, i32* %13
%30 = sitofp i32 %29 to double
%31 = fadd double %28, %30
%32 = load i32, i32* %14
%33 = sitofp i32 %32 to double
%34 = fadd double %31, %33
ret double %34
}

LLVM IR (-O2):
define double @f4_sum_pre_int_int_int_int_int_int_int(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = sitofp i32 %0 to double
%9 = sitofp i32 %1 to double
%10 = fadd double %8, %9
%11 = sitofp i32 %2 to double
%12 = fadd double %10, %11
%13 = sitofp i32 %3 to double
%14 = fadd double %12, %13
%15 = sitofp i32 %4 to double
%16 = fadd double %14, %15
%17 = sitofp i32 %5 to double
%18 = fadd double %16, %17
%19 = sitofp i32 %6 to double
%20 = fadd double %18, %19
ret double %20
}
void wifi_evt_sme_scan_result(
    const struct wifi_msg_sme_scan_result_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_scan_result_evt_t = type opaque
define void @wifi_evt_sme_scan_result(%struct.wifi_msg_sme_scan_result_evt_t* nocapture %0) {
ret void
}
int main() {
lab:
  return 0;
  goto lab;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
indreg0reg1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((*p0) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0reg1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     113f <indreg0reg1+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <indreg0reg1+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @indreg0reg1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double*, double** %12
%15 = load double, double* %14
%16 = load double, double* %9
%17 = fcmp ole double %15, %16
br i1 %17, label %18, label %19
18: ; preds = %6
store i32 1, i32* %7
br label %20
19: ; preds = %6
store i32 0, i32* %7
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @indreg0reg1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture readnone %5) {
%7 = load double, double* %4
%8 = fcmp ole double %7, %1
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
struct list_bp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_bp_free_callback(struct list_bp *,
                                         int /*<<< orphan*/ *);
void list_bp_free(struct list_bp *target) {
  list_bp_free_callback(target, NULL);
}


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

x86 assembly (clang, -O2):
<list_bp_free>:
xor    %esi,%esi
jmp    1030 <list_bp_free_callback@plt>

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

LLVM IR (-O2):
%struct.list_bp = type { i32 }
define void @list_bp_free(%struct.list_bp* %0) {
%2 = tail call i32 @list_bp_free_callback(%struct.list_bp* %0, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ expand(char *, char *);
scalar_t__ getLine(char *, int);
int /*<<< orphan*/ printf(char *, char *);
main() {
  char s[100];
  char t[26 * 100];
  while (getLine(s, 100) > 0) {
    expand(s, t);
    printf("%s\n", t);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xaa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   1040 <getLine@plt>
cmp    $0x0,%rax
jle    1182 <main+0x52>
lea    -0x70(%rbp),%rdi
lea    -0xaa0(%rbp),%rsi
call   1050 <expand@plt>
lea    -0xaa0(%rbp),%rsi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0xaa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xaa0,%rsp
mov    %rsp,%rdi
mov    $0x64,%esi
call   1040 <getLine@plt>
test   %rax,%rax
jle    1188 <main+0x58>
mov    %rsp,%r14
lea    0x70(%rsp),%rbx
lea    0xea3(%rip),%r15
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <expand@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x64,%esi
call   1040 <getLine@plt>
test   %rax,%rax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0xaa0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [2600 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i64 @getLine(i8* %5, i32 100)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [2600 x i8], [2600 x i8]* %3, i64 0, i64 0
%11 = call i32 @expand(i8* %9, i8* %10)
%12 = getelementptr inbounds [2600 x i8], [2600 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %4
14: ; preds = %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [2600 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [2600 x i8], [2600 x i8]* %2, i64 0, i64 0
%5 = call i64 @getLine(i8* %3, i32 100)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0, %7
%8 = call i32 @expand(i8* %3, i8* %4)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%10 = call i64 @getLine(i8* %3, i32 100)
%11 = icmp sgt i64 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  char str[80];
  printf("Input a number: ");
  scanf("%d", &n);
  itoa(n, str);
  printf("string: %s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
lea    -0x60(%rbp),%rsi
call   1050 <itoa@plt>
lea    -0x60(%rbp),%rsi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <itoa@plt>
lea    0xea8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Input a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"string: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [80 x i8]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%8 = call i32 @itoa(i32 %6, i8* %7)
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Input a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"string: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = call i32 @itoa(i32 %7, i8* %4)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}
int getScope(int *entry) { return *(entry + 7); }


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

x86 assembly (clang, -O2):
<getScope>:
mov    0x1c(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @getScope(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 7
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @getScope(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 7
%3 = load i32, i32* %2
ret i32 %3
}
void ECAPPrescaleConfig(unsigned int baseAdd, unsigned int prescale) {
  (*((volatile unsigned short *)(baseAdd + (0x28)))) &= 0xffffc1ff;
  (*((volatile unsigned short *)(baseAdd + (0x28)))) |= (prescale << (0x0009u));
}


x86 assembly (clang, -O0):
<ECAPPrescaleConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x28,%eax
mov    %eax,%eax
mov    (%rax),%cx
movzwl %cx,%ecx
and    $0xffffc1ff,%ecx
mov    %cx,(%rax)
mov    -0x8(%rbp),%edx
shl    $0x9,%edx
mov    -0x4(%rbp),%eax
add    $0x28,%eax
mov    %eax,%eax
mov    (%rax),%cx
movzwl %cx,%ecx
or     %edx,%ecx
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECAPPrescaleConfig>:
add    $0x28,%edi
andw   $0xc1ff,(%rdi)
shl    $0x9,%esi
or     %si,(%rdi)
ret

LLVM IR (-O0):
define void @ECAPPrescaleConfig(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 = add i32 %5, 40
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i16*
%9 = load volatile i16, i16* %8
%10 = zext i16 %9 to i32
%11 = and i32 %10, -15873
%12 = trunc i32 %11 to i16
store volatile i16 %12, i16* %8
%13 = load i32, i32* %4
%14 = shl i32 %13, 9
%15 = load i32, i32* %3
%16 = add i32 %15, 40
%17 = zext i32 %16 to i64
%18 = inttoptr i64 %17 to i16*
%19 = load volatile i16, i16* %18
%20 = zext i16 %19 to i32
%21 = or i32 %20, %14
%22 = trunc i32 %21 to i16
store volatile i16 %22, i16* %18
ret void
}

LLVM IR (-O2):
define void @ECAPPrescaleConfig(i32 %0, i32 %1) {
%3 = add i32 %0, 40
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i16*
%6 = load volatile i16, i16* %5
%7 = and i16 %6, -15873
store volatile i16 %7, i16* %5
%8 = load volatile i16, i16* %5
%9 = trunc i32 %1 to i16
%10 = shl i16 %9, 9
%11 = or i16 %8, %10
store volatile i16 %11, i16* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("this is source1.c");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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 = [18 x i8] c"this is source1.c\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"this is source1.c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void foo_2_1_2_1_1_2_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_1_1_2_2_2_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_clv();
void e_clv_accu() { e_clv(); }


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

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

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

LLVM IR (-O2):
define void @e_clv_accu() {
%1 = tail call i32 (...) @e_clv()
ret void
}