xunge/DecIR huggingface dataset:
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ timespec_before(struct timespec const *,
                                   struct timespec const *);
int __attribute__((always_))
timespec_after_or_same(const struct timespec *__restrict t1,
                       const struct timespec *__restrict t2) {
  return !timespec_before(t1, t2);
}


x86 assembly (clang, -O0):
<timespec_after_or_same>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <timespec_before@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_after_or_same>:
push   %rax
call   1030 <timespec_before@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @timespec_after_or_same(%struct.timespec* noalias %0, %struct.timespec* noalias %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = load %struct.timespec*, %struct.timespec** %4
%7 = call i32 @timespec_before(%struct.timespec* %5, %struct.timespec* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @timespec_after_or_same(%struct.timespec* noalias %0, %struct.timespec* noalias %1) {
%3 = tail call i32 @timespec_before(%struct.timespec* %0, %struct.timespec* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct siphash {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ siphash24_compress(void const *, int, struct siphash *);
void uint64_hash_func(const void *p, struct siphash *state) {
  siphash24_compress(p, sizeof(uint64_t), state);
}


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

x86 assembly (clang, -O2):
<uint64_hash_func>:
mov    %rsi,%rdx
mov    $0x4,%esi
jmp    1030 <siphash24_compress@plt>

LLVM IR (-O0):
%struct.siphash = type { i32 }
define void @uint64_hash_func(i8* %0, %struct.siphash* %1) {
%3 = alloca i8*
%4 = alloca %struct.siphash*
store i8* %0, i8** %3
store %struct.siphash* %1, %struct.siphash** %4
%5 = load i8*, i8** %3
%6 = load %struct.siphash*, %struct.siphash** %4
%7 = call i32 @siphash24_compress(i8* %5, i32 4, %struct.siphash* %6)
ret void
}

LLVM IR (-O2):
%struct.siphash = type { i32 }
define void @uint64_hash_func(i8* %0, %struct.siphash* %1) {
%3 = tail call i32 @siphash24_compress(i8* %0, i32 4, %struct.siphash* %1)
ret void
}
/* Variables and functions */
scalar_t__ checkdigit(char const);
int skip_atoi(const char **s) {
  int i = 0;
  while (checkdigit(**s))
    i = i * 10 + *((*s)++) - '0';
  return i;
}


x86 assembly (clang, -O0):
<skip_atoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <checkdigit@plt>
cmp    $0x0,%rax
je     1161 <skip_atoi+0x51>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <skip_atoi+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_atoi>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rax
movsbl (%rax),%edi
call   1030 <checkdigit@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1154 <skip_atoi+0x44>
nopl   0x0(%rax)
lea    (%rbx,%rbx,4),%eax
mov    (%r14),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%r14)
movsbl (%rcx),%edx
lea    (%rdx,%rax,2),%ebx
add    $0xffffffd0,%ebx
movsbl 0x1(%rcx),%edi
call   1030 <checkdigit@plt>
test   %rax,%rax
jne    1130 <skip_atoi+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @skip_atoi(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i64 @checkdigit(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %1, %6
%7 = phi i32 [ %14, %6 ], [ 0, %1 ]
%8 = mul nsw i32 %7, 10
%9 = load i8*, i8** %0
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %0
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = add i32 %8, -48
%14 = add i32 %13, %12
%15 = load i8, i8* %10
%16 = tail call i64 @checkdigit(i8 signext %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %6
18: ; preds = %6, %1
%19 = phi i32 [ 0, %1 ], [ %14, %6 ]
ret i32 %19
}
int test_imm_60uint8_mem(unsigned char *val) {
  return ((*val) & (0x60 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_60uint8_mem>:
testb  $0x60,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_60uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 96
%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_60uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 96
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ao();
int /*<<< orphan*/ motor(int, int);
int /*<<< orphan*/ msleep(int);
void twoMotors(int speed, int time) {
  motor(0, speed);
  motor(3, speed);
  msleep(time);
  ao();
}


x86 assembly (clang, -O0):
<twoMotors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
xor    %edi,%edi
call   1030 <motor@plt>
mov    -0x4(%rbp),%esi
mov    $0x3,%edi
call   1030 <motor@plt>
mov    -0x8(%rbp),%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1050 <ao@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twoMotors>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
mov    %ebp,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    %ebp,%esi
call   1030 <motor@plt>
mov    %ebx,%edi
call   1040 <msleep@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <ao@plt>

LLVM IR (-O0):
define void @twoMotors(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 = call i32 @motor(i32 0, i32 %5)
%7 = load i32, i32* %3
%8 = call i32 @motor(i32 3, i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @msleep(i32 %9)
%11 = call i32 (...) @ao()
ret void
}

LLVM IR (-O2):
define void @twoMotors(i32 %0, i32 %1) {
%3 = tail call i32 @motor(i32 0, i32 %0)
%4 = tail call i32 @motor(i32 3, i32 %0)
%5 = tail call i32 @msleep(i32 %1)
%6 = tail call i32 (...) @ao()
ret void
}
/* Type definitions */
struct smp_conn {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct smp_conn *);
void smp_conn_del(void *conn_data) {
  struct smp_conn *conn = conn_data;
  free(conn);
}


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

x86 assembly (clang, -O2):
<smp_conn_del>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.smp_conn = type { i32 }
define void @smp_conn_del(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.smp_conn*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.smp_conn*
store %struct.smp_conn* %5, %struct.smp_conn** %3
%6 = load %struct.smp_conn*, %struct.smp_conn** %3
%7 = call i32 @free(%struct.smp_conn* %6)
ret void
}

LLVM IR (-O2):
%struct.smp_conn = type { i32 }
define void @smp_conn_del(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.smp_conn*
%3 = tail call i32 @free(%struct.smp_conn* %2)
ret void
}
short test_36_2(short *mem) { return __atomic_add_fetch(mem + 0, 1, 4); }


x86 assembly (clang, -O0):
<test_36_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,%ax
lock xadd %ax,(%rdx)
add    %cx,%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @test_36_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 0
store i16 1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw add i16* %6, i16 %7 acq_rel
%9 = add i16 %8, %7
store i16 %9, i16* %4
%10 = load i16, i16* %4
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @test_36_2(i16* nocapture %0) {
%2 = atomicrmw add i16* %0, i16 1 acq_rel
%3 = add i16 %2, 1
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int term_setup();
void scont_handler(int sig) {
  if (-1 == term_setup()) {
    abort();
  }
}


x86 assembly (clang, -O0):
<scont_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <term_setup@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1148 <scont_handler+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scont_handler>:
push   %rax
xor    %eax,%eax
call   1040 <term_setup@plt>
cmp    $0xffffffff,%eax
je     112f <scont_handler+0xf>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @scont_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @term_setup()
%4 = icmp eq i32 -1, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @scont_handler(i32 %0) {
%2 = tail call i32 (...) @term_setup()
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
void test04(int flag, int num) {
  {
    if (flag)
      num = 0;
    num = 1;
  };
}


x86 assembly (clang, -O0):
<test04>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111b <test04+0x1b>
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test04(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
store i32 0, i32* %4
br label %8
8: ; preds = %7, %2
store i32 1, i32* %4
ret void
}

LLVM IR (-O2):
define void @test04(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int atoi(char *);
int invalid_port(char *port) {
  int i = atoi(port);
  return ((i > 65535) || (i <= 0));
}


x86 assembly (clang, -O0):
<invalid_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0xffff,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jg     1144 <invalid_port+0x34>
cmpl   $0x0,-0xc(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalid_port>:
push   %rax
call   1030 <atoi@plt>
add    $0xffff0000,%eax
xor    %ecx,%ecx
cmp    $0xffff0001,%eax
setb   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @invalid_port(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @atoi(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 65535
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 0
br label %11
11: ; preds = %8, %1
%12 = phi i1 [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @invalid_port(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = add i32 %2, -65536
%4 = icmp ult i32 %3, -65535
%5 = zext i1 %4 to i32
ret i32 %5
}
float pow_(float x, float y) {
  double result = 1;
  for (int i = 0; i < y; i++)
    result *= x;
  return result;
}


x86 assembly (clang, -O0):
<pow_>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1156 <pow_+0x56>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1122 <pow_+0x22>
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow_>:
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm1
jbe    1138 <pow_+0x38>
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movsd  0xef1(%rip),%xmm0
mov    $0x1,%eax
nopl   0x0(%rax)
xorps  %xmm3,%xmm3
cvtsi2ss %eax,%xmm3
mulsd  %xmm2,%xmm0
add    $0x1,%eax
ucomiss %xmm3,%xmm1
ja     1120 <pow_+0x20>
cvtsd2ss %xmm0,%xmm0
ret
movss  0xec0(%rip),%xmm0
ret

LLVM IR (-O0):
define float @pow_(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca double
%6 = alloca i32
store float %0, float* %3
store float %1, float* %4
store double 1.000000e+00, double* %5
store i32 0, i32* %6
br label %7
7: ; preds = %17, %2
%8 = load i32, i32* %6
%9 = sitofp i32 %8 to float
%10 = load float, float* %4
%11 = fcmp olt float %9, %10
br i1 %11, label %12, label %20
12: ; preds = %7
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = load double, double* %5
%16 = fmul double %15, %14
store double %16, double* %5
br label %17
17: ; preds = %12
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %7
20: ; preds = %7
%21 = load double, double* %5
%22 = fptrunc double %21 to float
ret float %22
}

LLVM IR (-O2):
define float @pow_(float %0, float %1) {
%3 = fcmp ogt float %1, 0.000000e+00
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = fpext float %0 to double
br label %10
6: ; preds = %10
%7 = fptrunc double %13 to float
br label %8
8: ; preds = %6, %2
%9 = phi float [ 1.000000e+00, %2 ], [ %7, %6 ]
ret float %9
10: ; preds = %4, %10
%11 = phi i32 [ 0, %4 ], [ %14, %10 ]
%12 = phi double [ 1.000000e+00, %4 ], [ %13, %10 ]
%13 = fmul double %12, %5
%14 = add nuw nsw i32 %11, 1
%15 = sitofp i32 %14 to float
%16 = fcmp olt float %15, %1
br i1 %16, label %10, label %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr,
          "Usage: gpwa [-op d/s] [-silent] [-v] [-l/-h] [-diff1/-diff2]\n");
  fprintf(stderr, "\t\t[-cos] groupname[ -cosname]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: gpwa [-op d/s] [-silent] [-v] [-l/-h] [-diff1/-diff2]\0A\00"
@.str.1 = [31 x i8] c"\09\09[-cos] groupname[ -cosname]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: gpwa [-op d/s] [-silent] [-v] [-l/-h] [-diff1/-diff2]\0A\00"
@.str.1 = [31 x i8] c"\09\09[-cos] groupname[ -cosname]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ dist2(float const *, float const *);
float sqrt(int /*<<< orphan*/);
float dist(const float a[3], const float b[3]) { return sqrt(dist2(a, b)); }


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

x86 assembly (clang, -O2):
<dist>:
push   %rax
call   1030 <dist2@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define float @dist(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 = load float*, float** %4
%7 = call i32 @dist2(float* %5, float* %6)
%8 = call float @sqrt(i32 %7)
ret float %8
}

LLVM IR (-O2):
define float @dist(float* %0, float* %1) {
%3 = tail call i32 @dist2(float* %0, float* %1)
%4 = tail call float @sqrt(i32 %3)
ret float %4
}
/* Variables and functions */
double atan(double);
double arctan(double x) { return atan(x); }


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

x86 assembly (clang, -O2):
<arctan>:
jmp    1030 <atan@plt>

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

LLVM IR (-O2):
define double @arctan(double %0) {
%2 = tail call double @atan(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ my_fread(char *);
int /*<<< orphan*/ my_fwrite(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main(void) {
  my_fwrite("06.txt");
  my_fread("06.txt");
  printf("\n");
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1060 <my_fwrite@plt>
lea    0xe9e(%rip),%rdi
call   1030 <my_fread@plt>
lea    0xe99(%rip),%rdi
call   1050 <printf@plt>
lea    0xe8f(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rbx
mov    %rbx,%rdi
call   1060 <my_fwrite@plt>
mov    %rbx,%rdi
call   1040 <my_fread@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe9e(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"06.txt\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @my_fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @my_fread(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"06.txt\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 @my_fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @my_fread(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
int getType(int *list) { return list[1]; }


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

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

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

LLVM IR (-O2):
define i32 @getType(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
ret i32 %3
}
float exp_hl(float a) { return (a <= 0.4781) ? a : 0.25 / (1.001 - a); }


x86 assembly (clang, -O0):
<exp_hl>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1137 <exp_hl+0x37>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    115d <exp_hl+0x5d>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec8(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xeb4(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_hl>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    112a <exp_hl+0x2a>
movsd  0xeee(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xeea(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @exp_hl(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp ole double %4, 4.781000e-01
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
br label %14
9: ; preds = %1
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = fsub double 1.001000e+00, %11
%13 = fdiv double 2.500000e-01, %12
br label %14
14: ; preds = %9, %6
%15 = phi double [ %8, %6 ], [ %13, %9 ]
%16 = fptrunc double %15 to float
ret float %16
}

LLVM IR (-O2):
define float @exp_hl(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ugt double %2, 4.781000e-01
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = fsub double 1.001000e+00, %2
%6 = fdiv double 2.500000e-01, %5
br label %7
7: ; preds = %1, %4
%8 = phi double [ %6, %4 ], [ %2, %1 ]
%9 = fptrunc double %8 to float
ret float %9
}
/* Variables and functions */
scalar_t__ isalnum(char const);
int count_fields(const char *s) {
  int n = 0;
  while (isalnum(s[n]))
    n++;
  return n;
}


x86 assembly (clang, -O0):
<count_fields>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
je     114c <count_fields+0x3c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <count_fields+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_fields>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xffffffff,%ebp
nopl   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <isalnum@plt>
add    $0x1,%ebp
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <count_fields+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @count_fields(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %8, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = tail call i64 @isalnum(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = add nuw i64 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
%10 = trunc i64 %3 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ RunCalculation();
int main(int argc, char *argv[]) {
  RunCalculation();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @RunCalculation()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @RunCalculation()
ret i32 0
}
void tcopy(char *s, char *t) {
  while (*s++ = *t++)
    ;
}


x86 assembly (clang, -O0):
<tcopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <tcopy+0x3b>
jmp    110c <tcopy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcopy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <tcopy+0x10>
ret

LLVM IR (-O0):
define void @tcopy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %12, %2
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %4
%8 = load i8, i8* %6
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
store i8 %8, i8* %9
%11 = icmp ne i8 %8, 0
br i1 %11, label %12, label %13
12: ; preds = %5
br label %5
13: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @tcopy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
void g(int *__restrict x, int *y) { *x = *y; }


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

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

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

LLVM IR (-O2):
define void @g(i32* noalias nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
ret void
}
void _perm(char const **mode) { (*mode)++; }


x86 assembly (clang, -O0):
<_perm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_perm>:
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @_perm(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %3
ret void
}

LLVM IR (-O2):
define void @_perm(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %3, i8** %0
ret void
}
int clearBit(int in, int index) {
  int mask = ~(0x1 << index);
  return (in & mask);
}


x86 assembly (clang, -O0):
<clearBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearBit>:
mov    %edi,%eax
btr    %esi,%eax
ret

LLVM IR (-O0):
define i32 @clearBit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = and i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @clearBit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x3d() {
  Assert_real((isgraph(61)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              310, ("isgraph should be 1 for ="));
}


x86 assembly (clang, -O0):
<t_isgraph_0x3d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3d,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x136,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x3d>:
push   %rax
mov    $0x3d,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x136,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for =\00"
define void @t_isgraph_0x3d() {
%1 = call i32 @isgraph(i32 61)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 310, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for =\00"
define void @t_isgraph_0x3d() {
%1 = tail call i32 @isgraph(i32 61)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 310, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_dobldobl_multi_affinization(int n, int m, int *z) {
  int fail;
  int pars[2];
  double c;
  pars[0] = n;
  pars[1] = m;
  fail = _ada_use_c2phc4c(914, pars, z, &c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_dobldobl_multi_affinization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x1c(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x392,%edi
lea    -0x28(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_dobldobl_multi_affinization>:
sub    $0x18,%rsp
mov    %edi,0x8(%rsp)
mov    %esi,0xc(%rsp)
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x392,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @solcon_dobldobl_multi_affinization(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca [2 x i32]
%9 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%10 = load i32, i32* %4
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %5
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%15 = load i32*, i32** %6
%16 = call i32 @_ada_use_c2phc4c(i32 914, i32* %14, i32* %15, double* %9, i32 0)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @solcon_dobldobl_multi_affinization(i32 %0, i32 %1, i32* %2) {
%4 = alloca [2 x i32]
%5 = alloca double
%6 = bitcast [2 x i32]* %4 to i8*
%7 = bitcast double* %5 to i8*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %1, i32* %9
%10 = call i32 @_ada_use_c2phc4c(i32 914, i32* %8, i32* %2, double* %5, i32 0)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ sw_sdram_clock_init();
int /*<<< orphan*/ sw_sdram_pins_init();
int /*<<< orphan*/ sw_sdram_power_init();
int sw_sdram_init() {
  sw_sdram_power_init();
  sw_sdram_clock_init();
  sw_sdram_pins_init();
  return 0;
}


x86 assembly (clang, -O0):
<sw_sdram_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <sw_sdram_power_init@plt>
mov    $0x0,%al
call   1030 <sw_sdram_clock_init@plt>
mov    $0x0,%al
call   1050 <sw_sdram_pins_init@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sw_sdram_init>:
push   %rax
xor    %eax,%eax
call   1040 <sw_sdram_power_init@plt>
xor    %eax,%eax
call   1030 <sw_sdram_clock_init@plt>
xor    %eax,%eax
call   1050 <sw_sdram_pins_init@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sw_sdram_init() {
%1 = call i32 (...) @sw_sdram_power_init()
%2 = call i32 (...) @sw_sdram_clock_init()
%3 = call i32 (...) @sw_sdram_pins_init()
ret i32 0
}

LLVM IR (-O2):
define i32 @sw_sdram_init() {
%1 = tail call i32 (...) @sw_sdram_power_init()
%2 = tail call i32 (...) @sw_sdram_clock_init()
%3 = tail call i32 (...) @sw_sdram_pins_init()
ret i32 0
}
/* Variables and functions */
char *Diss_char(char *, char);
char *Diss_colon(char *pString) { return Diss_char(pString, ':'); }


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

x86 assembly (clang, -O2):
<Diss_colon>:
mov    $0x3a,%esi
jmp    1030 <Diss_char@plt>

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

LLVM IR (-O2):
define i8* @Diss_colon(i8* %0) {
%2 = tail call i8* @Diss_char(i8* %0, i8 signext 58)
ret i8* %2
}
unsigned char get_best_dtu(unsigned char *p, unsigned char *best) { return 2; }


x86 assembly (clang, -O0):
<get_best_dtu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_best_dtu>:
mov    $0x2,%al
ret

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

LLVM IR (-O2):
define zeroext i8 @get_best_dtu(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8 2
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int cmpfunc(const void *a, const void *b) {
  if (*(uint32_t *)a < *(uint32_t *)b)
    return -1;
  if (*(uint32_t *)a > *(uint32_t *)b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmpfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jge    112c <cmpfunc+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <cmpfunc+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jle    114c <cmpfunc+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <cmpfunc+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpfunc>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmpfunc(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i64*
%11 = load i64, i64* %10
%12 = icmp slt i64 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %24
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to i64*
%17 = load i64, i64* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %19
%21 = icmp sgt i64 %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %24
23: ; preds = %14
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %13
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @cmpfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp slt i64 %4, %6
%8 = icmp sgt i64 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sys(char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++) {
    sys(argv[i]);
    printf("\n");
  }
  _exit(0);
}


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)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1184 <main+0x54>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <sys@plt>
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <main+0x1d>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     116c <main+0x3c>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1050 <sys@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1150 <main+0x20>
xor    %edi,%edi
call   1040 <_exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @sys(i8* %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
%23 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @sys(i8* %9)
%11 = tail call i32 @putchar(i32 10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
typedef double clock_t;

/* Variables and functions */
double clock();
int execute(int);
int /*<<< orphan*/ printf(char *, int, double);
int main(int argc, char *argv[]) {
  int value = 654345;
  clock_t start = clock();
  int result = execute(value);
  clock_t end = clock();
  double elapsed_time = (end - start);
  printf("Binary Gap: %d [%f clock_t]\n", result, elapsed_time);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x9fc09,-0x14(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <execute@plt>
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x24(%rbp),%esi
movsd  -0x38(%rbp),%xmm0
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <clock@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x9fc09,%edi
call   1050 <execute@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <clock@plt>
subsd  0x8(%rsp),%xmm0
lea    0xe9e(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Binary Gap: %d [%f clock_t]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
%8 = alloca double
%9 = alloca double
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 654345, i32* %5
%10 = call double (...) @clock()
store double %10, double* %6
%11 = load i32, i32* %5
%12 = call i32 @execute(i32 %11)
store i32 %12, i32* %7
%13 = call double (...) @clock()
store double %13, double* %8
%14 = load double, double* %8
%15 = load double, double* %6
%16 = fsub double %14, %15
store double %16, double* %9
%17 = load i32, i32* %7
%18 = load double, double* %9
%19 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %17, double %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Binary Gap: %d [%f clock_t]\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double (...) @clock()
%4 = tail call i32 @execute(i32 654345)
%5 = tail call double (...) @clock()
%6 = fsub double %5, %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %4, double %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void createEmptyFile(char *str) {
  FILE *fp = fopen(str, "w");
  fclose(fp);
}


x86 assembly (clang, -O0):
<createEmptyFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createEmptyFile>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @createEmptyFile(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fclose(i32* %2)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void minipack_pack_uint8(void *ptr, uint8_t value, size_t *sz) {
  *sz = 2;
  *((uint8_t *)ptr) = 0xCC;
  *((uint8_t *)(ptr + 1)) = value;
}


x86 assembly (clang, -O0):
<minipack_pack_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x2,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xcc,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<minipack_pack_uint8>:
movq   $0x2,(%rdx)
movl   $0xcc,(%rdi)
mov    %esi,0x1(%rdi)
ret

LLVM IR (-O0):
define void @minipack_pack_uint8(i8* %0, i32 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i64*, i64** %6
store i64 2, i64* %7
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32 204, i32* %9
%10 = load i32, i32* %5
%11 = load i8*, i8** %4
%12 = getelementptr i8, i8* %11, i64 1
%13 = bitcast i8* %12 to i32*
store i32 %10, i32* %13
ret void
}

LLVM IR (-O2):
define void @minipack_pack_uint8(i8* nocapture writeonly %0, i32 %1, i64* nocapture writeonly %2) {
store i64 2, i64* %2
%4 = bitcast i8* %0 to i32*
store i32 204, i32* %4
%5 = getelementptr i8, i8* %0, i64 1
%6 = bitcast i8* %5 to i32*
store i32 %1, i32* %6
ret void
}
void read_forward_arrays_adios_(void) {}


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

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

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

LLVM IR (-O2):
define void @read_forward_arrays_adios_() {
ret void
}
/* Variables and functions */
void test7(int a[b(0)]) {}


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

x86 assembly (clang, -O2):
<test7>:
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <b@plt>

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

LLVM IR (-O2):
define void @test7(i32* nocapture readnone %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @b to i32 (i32, ...)*)(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_ioprio_rt();
int pcap_rw_prepare_reading_pcap(int fd) {
  set_ioprio_rt();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pcap_rw_prepare_reading_pcap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @set_ioprio_rt()
ret i32 0
}

LLVM IR (-O2):
define i32 @pcap_rw_prepare_reading_pcap(i32 %0) {
%2 = tail call i32 (...) @set_ioprio_rt()
ret i32 0
}