xunge/DecIR huggingface dataset:
int get_bitmap(unsigned char *map, int n, int size) {
  if (n >= size)
    return -1;
  int s = 0x80;
  if (map[n / 8] & (s >> (n % 8)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<get_bitmap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     1126 <get_bitmap+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    118b <get_bitmap+0x8b>
movl   $0x80,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x24(%rbp),%eax
mov    %edx,%ecx
mov    -0x20(%rbp),%edx
sar    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1184 <get_bitmap+0x84>
movl   $0x1,-0x4(%rbp)
jmp    118b <get_bitmap+0x8b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bitmap>:
mov    $0xffffffff,%eax
cmp    %edx,%esi
jge    1128 <get_bitmap+0x28>
lea    0x7(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
cltq
movzbl (%rdi,%rax,1),%eax
and    $0x7,%sil
mov    %esi,%ecx
shl    %cl,%eax
movzbl %al,%eax
shr    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @get_bitmap(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = icmp sge i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 -1, i32* %4
br label %29
13: ; preds = %3
store i32 128, i32* %8
%14 = load i8*, i8** %5
%15 = load i32, i32* %6
%16 = sdiv i32 %15, 8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = load i32, i32* %8
%22 = load i32, i32* %6
%23 = srem i32 %22, 8
%24 = ashr i32 %21, %23
%25 = and i32 %20, %24
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %13
store i32 1, i32* %4
br label %29
28: ; preds = %13
store i32 0, i32* %4
br label %29
29: ; preds = %28, %27, %12
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @get_bitmap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %16
5: ; preds = %3
%6 = sdiv i32 %1, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = and i32 %1, 7
%12 = lshr i32 128, %11
%13 = and i32 %12, %10
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %3, %5
%17 = phi i32 [ %15, %5 ], [ -1, %3 ]
ret i32 %17
}
int __attribute__((unused)) isdigit(int c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double busywork(int);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char **argv) {
  double result;
  result = busywork(10000000);
  printf("test_child, result=%lf\n", result);
  return 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)
mov    $0x989680,%edi
call   1040 <busywork@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x989680,%edi
call   1040 <busywork@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"test_child, result=%lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call double @busywork(i32 10000000)
store double %7, double* %6
%8 = load double, double* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"test_child, result=%lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @busywork(i32 10000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
void qsd_lsensor_enable_onOff(unsigned int mode, unsigned int onOff) {}


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

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

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

LLVM IR (-O2):
define void @qsd_lsensor_enable_onOff(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
char *strchr(char const *, int);
int indexOf(const char *s, int c) {
  char *first = strchr(s, c);
  if (first)
    return first - s;
  else
    return -1;
}


x86 assembly (clang, -O0):
<indexOf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     114d <indexOf+0x3d>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
jmp    1154 <indexOf+0x44>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indexOf>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strchr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @indexOf(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = select i1 %4, i32 -1, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ SoundDriver_CD_SetVolume(int);
void CD_SetVolume(int volume) { SoundDriver_CD_SetVolume(volume); }


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

x86 assembly (clang, -O2):
<CD_SetVolume>:
jmp    1030 <SoundDriver_CD_SetVolume@plt>

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

LLVM IR (-O2):
define void @CD_SetVolume(i32 %0) {
%2 = tail call i32 @SoundDriver_CD_SetVolume(i32 %0)
ret void
}
int fun236() { return 236; }


x86 assembly (clang, -O0):
<fun236>:
push   %rbp
mov    %rsp,%rbp
mov    $0xec,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun236() {
ret i32 236
}

LLVM IR (-O2):
define i32 @fun236() {
ret i32 236
}
int maxflow_scratch_size(int nv) { return (nv * 4) * sizeof(int); }


x86 assembly (clang, -O0):
<maxflow_scratch_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxflow_scratch_size>:
mov    %edi,%eax
shl    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @maxflow_scratch_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 4
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @maxflow_scratch_size(i32 %0) {
%2 = shl i32 %0, 4
ret i32 %2
}
void memsetd(long *adr, long val, int len) {
  __asm__("rep stosl " ::"D"(adr), "a"(val), "c"(len) :);
}


x86 assembly (clang, -O0):
<memsetd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
rep stos %eax,%es:(%rdi)
pop    %rbp
ret

x86 assembly (clang, -O2):
<memsetd>:
mov    %edx,%ecx
mov    %rsi,%rax
rep stos %eax,%es:(%rdi)
ret

LLVM IR (-O0):
define void @memsetd(i64* %0, i64 %1, i32 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i32
store i64* %0, i64** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i64*, i64** %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @memsetd(i64* %0, i64 %1, i32 %2) {
tail call void asm sideeffect "rep stosl ", "{di},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i64* %0, i64 %1, i32 %2)
ret void
}
double factorial(unsigned int n) { return n == 0 ? 1 : n * factorial(n - 1); }


x86 assembly (clang, -O0):
<factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1137 <factorial+0x27>
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1160 <factorial+0x50>
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial>:
push   %rax
test   %edi,%edi
je     1130 <factorial+0x20>
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
add    $0xffffffff,%edi
call   1030 <factorial@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xec8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @factorial(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %13
6: ; preds = %1
%7 = load i32, i32* %2
%8 = uitofp i32 %7 to double
%9 = load i32, i32* %2
%10 = sub i32 %9, 1
%11 = call double @factorial(i32 %10)
%12 = fmul double %8, %11
br label %13
13: ; preds = %6, %5
%14 = phi double [ 1.000000e+00, %5 ], [ %12, %6 ]
ret double %14
}

LLVM IR (-O2):
define double @factorial(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi double [ %9, %5 ], [ 1.000000e+00, %1 ]
ret double %4
5: ; preds = %1
%6 = uitofp i32 %0 to double
%7 = add i32 %0, -1
%8 = tail call double @factorial(i32 %7)
%9 = fmul double %8, %6
br label %3
}
int vergleiche_char(const void *i, const void *j) {
  return *(char *)i - *(char *)j;
}


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

x86 assembly (clang, -O2):
<vergleiche_char>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @vergleiche_char(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @vergleiche_char(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int calculate_full_tree_size(int node_count) {
  int full_size = 1;
  while (full_size <= node_count) {
    full_size = 2 * full_size + 1;
  }
  return full_size / 2;
}


x86 assembly (clang, -O0):
<calculate_full_tree_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     112b <calculate_full_tree_size+0x2b>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <calculate_full_tree_size+0xe>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_full_tree_size>:
test   %edi,%edi
jle    1123 <calculate_full_tree_size+0x23>
mov    $0x1,%ecx
nopl   0x0(%rax)
add    %ecx,%ecx
add    $0x1,%ecx
cmp    %edi,%ecx
jle    1110 <calculate_full_tree_size+0x10>
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @calculate_full_tree_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp sle i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i32, i32* %3
%10 = mul nsw i32 2, %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
%14 = sdiv i32 %13, 2
ret i32 %14
}

LLVM IR (-O2):
define i32 @calculate_full_tree_size(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = shl nsw i32 %4, 1
%6 = or i32 %5, 1
%7 = icmp sgt i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = sdiv i32 %6, 2
br label %10
10: ; preds = %8, %1
%11 = phi i32 [ 0, %1 ], [ %9, %8 ]
ret i32 %11
}
pe_teclou_x(num_arg, vet_arg) int num_arg;
char **vet_arg;
{
  register int i;
  for (i = 0; i < num_arg; i++) {
    if (strcmp(vet_arg[i], "-X") == 0) {
      return (1);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<pe_teclou_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1172 <pe_teclou_x+0x62>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xebb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    115f <pe_teclou_x+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1179 <pe_teclou_x+0x69>
jmp    1164 <pe_teclou_x+0x54>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <pe_teclou_x+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pe_teclou_x>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1149 <pe_teclou_x+0x39>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     114d <pe_teclou_x+0x3d>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <pe_teclou_x+0x20>
xor    %eax,%eax
jmp    1152 <pe_teclou_x+0x42>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-X\00"
define i32 @pe_teclou_x(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
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 @strcmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %11
store i32 1, i32* %3
br label %25
20: ; preds = %11
br label %21
21: ; preds = %20
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %7
24: ; preds = %7
store i32 0, i32* %3
br label %25
25: ; preds = %24, %19
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
@.str = [3 x i8] c"-X\00"
define i32 @pe_teclou_x(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %14, %5
br i1 %7, label %15, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %14, %6 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %11, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
%14 = add nuw nsw i64 %9, 1
br i1 %13, label %15, label %6
15: ; preds = %8, %6, %2
%16 = phi i32 [ 0, %2 ], [ 0, %6 ], [ 1, %8 ]
ret i32 %16
}
/* Type definitions */
struct main_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ main_cmdline_parser_release(struct main_args_info *);
void main_cmdline_parser_free(struct main_args_info *args_info) {
  main_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<main_cmdline_parser_free>:
jmp    1030 <main_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.main_args_info = type { i32 }
define void @main_cmdline_parser_free(%struct.main_args_info* %0) {
%2 = tail call i32 @main_cmdline_parser_release(%struct.main_args_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_cpu_id();
scalar_t__ memcmp(char *, int /*<<< orphan*/, int);
int cpu_is_intel(void) {
  static char cpustr[] = "GenuineIntel";
  return memcmp(cpustr, get_cpu_id(), 12) == 0;
}


x86 assembly (clang, -O0):
<cpu_is_intel>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <get_cpu_id@plt>
mov    %eax,%esi
lea    0x2efc(%rip),%rdi
mov    $0xc,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_is_intel>:
push   %rax
xor    %eax,%eax
call   1040 <get_cpu_id@plt>
lea    0x2f01(%rip),%rdi
mov    %eax,%esi
mov    $0xc,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@cpu_is_intel.cpustr = internal global [13 x i8] c"GenuineIntel\00"
define i32 @cpu_is_intel() {
%1 = call i32 (...) @get_cpu_id()
%2 = call i64 @memcmp(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @cpu_is_intel.cpustr, i64 0, i64 0), i32 %1, i32 12)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
@cpu_is_intel.cpustr = internal global [13 x i8] c"GenuineIntel\00"
define i32 @cpu_is_intel() {
%1 = tail call i32 (...) @get_cpu_id()
%2 = tail call i64 @memcmp(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @cpu_is_intel.cpustr, i64 0, i64 0), i32 %1, i32 12)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/Passw/C/refs/heads/master/builtin_macros.c");
  printf("\n");
  printf(0);
  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>
lea    0xf53(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Passw/C/refs/heads/master/builtin_macros.c\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Passw/C/refs/heads/master/builtin_macros.c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @printf(i8* dereferenceable(1) null)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
scalar_t__ little_endianess();
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
uint16_t ntohs_util(uint16_t input) {
  if (little_endianess()) {
    return ntohs(input);
  } else {
    return input;
  }
}


x86 assembly (clang, -O0):
<ntohs_util>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <little_endianess@plt>
cmp    $0x0,%rax
je     114c <ntohs_util+0x2c>
mov    -0x8(%rbp),%edi
call   1040 <ntohs@plt>
mov    %eax,-0x4(%rbp)
jmp    1152 <ntohs_util+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohs_util>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <little_endianess@plt>
test   %rax,%rax
je     1137 <ntohs_util+0x17>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <ntohs@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ntohs_util(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 (...) @little_endianess()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @ntohs(i32 %7)
store i32 %8, i32* %2
br label %11
9: ; preds = %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @ntohs_util(i32 %0) {
%2 = tail call i64 (...) @little_endianess()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @ntohs(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_data_qos(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x0080)) ==
         __cpu_to_le16(0x0008 | 0x0080);
}


x86 assembly (clang, -O0):
<ieee80211_is_data_qos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x8c,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x88,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_data_qos>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x8c,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0x88,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_data_qos(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 140)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 136)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_data_qos(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 140)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 136)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ window;
};
struct TYPE_5__ {
  TYPE_1__ xmaprequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int /*<<< orphan*/ win_map(int /*<<< orphan*/);
void maprequest(XEvent *e) { win_map(e->xmaprequest.window); }


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

x86 assembly (clang, -O2):
<maprequest>:
mov    (%rdi),%edi
jmp    1030 <win_map@plt>

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
define void @maprequest(%struct.TYPE_5__* %0) {
%2 = alloca %struct.TYPE_5__*
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %2
%3 = load %struct.TYPE_5__*, %struct.TYPE_5__** %2
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @win_map(i32 %6)
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
define void @maprequest(%struct.TYPE_5__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @win_map(i32 %3)
ret void
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec3_multiply(float *, float *, float *);
__attribute__((always_)) struct vec3 *
psvec3_multiply(struct vec3 *result, struct vec3 *a, struct vec3 *b) {
  vec3_multiply((float *)result, (float *)a, (float *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3_multiply>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3_multiply@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_multiply(%struct.vec3* %0, %struct.vec3* %1, %struct.vec3* %2) {
%4 = alloca %struct.vec3*
%5 = alloca %struct.vec3*
%6 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %4
store %struct.vec3* %1, %struct.vec3** %5
store %struct.vec3* %2, %struct.vec3** %6
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = load %struct.vec3*, %struct.vec3** %5
%10 = bitcast %struct.vec3* %9 to float*
%11 = load %struct.vec3*, %struct.vec3** %6
%12 = bitcast %struct.vec3* %11 to float*
%13 = call i32 @vec3_multiply(float* %8, float* %10, float* %12)
%14 = load %struct.vec3*, %struct.vec3** %4
ret %struct.vec3* %14
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_multiply(%struct.vec3* returned %0, %struct.vec3* %1, %struct.vec3* %2) {
%4 = bitcast %struct.vec3* %0 to float*
%5 = bitcast %struct.vec3* %1 to float*
%6 = bitcast %struct.vec3* %2 to float*
%7 = tail call i32 @vec3_multiply(float* %4, float* %5, float* %6)
ret %struct.vec3* %0
}
void foo743(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo743(i32 %0) {
ret void
}
/* Variables and functions */
int send(int, char *, int, int /*<<< orphan*/);
int w5100_sock_write(int fd, char *buf, int len) {
  return send(fd, buf, len, 0);
}


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

x86 assembly (clang, -O2):
xor    %ecx,%ecx
jmp    1030 <send@plt>

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

LLVM IR (-O2):
define i32 @w5100_sock_write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int _rdrand32_step(unsigned int *);
int rdrand32(unsigned *p) { return _rdrand32_step(p); }


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

x86 assembly (clang, -O2):
<rdrand32>:
jmp    1030 <_rdrand32_step@plt>

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

LLVM IR (-O2):
define i32 @rdrand32(i32* %0) {
%2 = tail call i32 @_rdrand32_step(i32* %0)
ret i32 %2
}
/* Variables and functions */
unsigned long vx86_NBSB_Read(int, unsigned char);
unsigned long sb1_Read(unsigned char offset) {
  return vx86_NBSB_Read(3, offset);
}


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

x86 assembly (clang, -O2):
<sb1_Read>:
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <vx86_NBSB_Read@plt>

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

LLVM IR (-O2):
define i64 @sb1_Read(i8 zeroext %0) {
%2 = tail call i64 @vx86_NBSB_Read(i32 3, i8 zeroext %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_13065() {
  Assert_real((isqrt(13065) == 114),
              "/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/stdlib/isqrt.c",
              1555, ("Integer square root of 13065 should be 114"));
}


x86 assembly (clang, -O0):
<t_sqrt_13065>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3309,%edi
call   1030 <isqrt@plt>
cmp    $0x72,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x613,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_13065>:
push   %rax
mov    $0x3309,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x72,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x613,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 13065 should be 114\00"
define void @t_sqrt_13065() {
%1 = call i32 @isqrt(i32 13065)
%2 = icmp eq i32 %1, 114
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1555, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 13065 should be 114\00"
define void @t_sqrt_13065() {
%1 = tail call i32 @isqrt(i32 13065)
%2 = icmp eq i32 %1, 114
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1555, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset32(int *, int, int);
void memset32_uncached(int *dest, int c, int count) {
  memset32(dest, c, count);
}


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

x86 assembly (clang, -O2):
<memset32_uncached>:
jmp    1030 <memset32@plt>

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

LLVM IR (-O2):
define void @memset32_uncached(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @memset32(i32* %0, i32 %1, i32 %2)
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ *find_pid_by_name(char *);
int /*<<< orphan*/ free(scalar_t__ *);
int pids(char *appname) {
  pid_t *pidList;
  pid_t *pl;
  int count = 0;
  pidList = find_pid_by_name(appname);
  for (pl = pidList; *pl; pl++) {
    count++;
  }
  free(pidList);
  if (count)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<pids>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <find_pid_by_name@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     1170 <pids+0x50>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    1148 <pids+0x28>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x0,-0x24(%rbp)
je     118f <pids+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    1196 <pids+0x76>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pids>:
push   %rbx
call   1040 <find_pid_by_name@plt>
xor    %ebx,%ebx
cmpq   $0x0,(%rax)
setne  %bl
mov    %rax,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pids(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %6
%7 = load i8*, i8** %3
%8 = call i64* @find_pid_by_name(i8* %7)
store i64* %8, i64** %4
%9 = load i64*, i64** %4
store i64* %9, i64** %5
br label %10
10: ; preds = %17, %1
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %10
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
br label %17
17: ; preds = %14
%18 = load i64*, i64** %5
%19 = getelementptr inbounds i64, i64* %18, i32 1
store i64* %19, i64** %5
br label %10
20: ; preds = %10
%21 = load i64*, i64** %4
%22 = call i32 @free(i64* %21)
%23 = load i32, i32* %6
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %20
store i32 1, i32* %2
br label %27
26: ; preds = %20
store i32 0, i32* %2
br label %27
27: ; preds = %26, %25
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @pids(i8* %0) {
%2 = tail call i64* @find_pid_by_name(i8* %0)
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
%5 = tail call i32 @free(i64* %2)
%6 = zext i1 %4 to i32
ret i32 %6
}
void func(char *fmt, ...) {
  (void)fmt;
  return;
}


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

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

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

LLVM IR (-O2):
define void @func(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int inlineAsm();
int testInlineAsm() { return inlineAsm(); }


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

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

LLVM IR (-O0):
define i32 @testInlineAsm() {
%1 = call i32 (...) @inlineAsm()
ret i32 %1
}

LLVM IR (-O2):
define i32 @testInlineAsm() {
%1 = tail call i32 (...) @inlineAsm()
ret i32 %1
}
/* Variables and functions */
int listen(int, unsigned int);
int socket_listen(int s, unsigned backlog) { return listen(s, backlog); }


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

x86 assembly (clang, -O2):
<socket_listen>:
jmp    1030 <listen@plt>

LLVM IR (-O0):
define i32 @socket_listen(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 @listen(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @socket_listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ uf_backtrack_one();
void uf_rollback() {
  while (uf_backtrack_one())
    ;
}


x86 assembly (clang, -O0):
<uf_rollback>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <uf_rollback+0x9>
mov    $0x0,%al
call   1030 <uf_backtrack_one@plt>
cmp    $0x0,%rax
je     112f <uf_rollback+0x1f>
jmp    1119 <uf_rollback+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uf_rollback>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <uf_backtrack_one@plt>
test   %rax,%rax
jne    1120 <uf_rollback+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @uf_rollback() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @uf_backtrack_one()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @uf_rollback() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @uf_backtrack_one()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
__attribute__((no, noclone)) unsigned __int128 t105_4mul(unsigned char x) {
  signed char y = (-2);
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t105_4mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %dil,%al
mov    %al,-0x11(%rbp)
movb   $0xfe,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
mov    %rax,-0x48(%rbp)
movsbq -0x12(%rbp),%rdx
mov    %rdx,%rcx
sar    $0x3f,%rcx
mov    %eax,%edi
mov    %ecx,%esi
imul   %edi,%esi
mov    %esi,-0x3c(%rbp)
mul    %rdx
mov    %rax,%rsi
mov    -0x48(%rbp),%rax
mov    %rsi,-0x38(%rbp)
mov    %rdx,%rdi
mul    %rcx
mov    %rax,%rcx
mov    -0x3c(%rbp),%eax
mov    %rdx,%rsi
mov    -0x38(%rbp),%rdx
add    %rdi,%rcx
adc    %sil,%al
and    $0x1,%al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    117e <t105_4mul+0x6e>
jmp    1185 <t105_4mul+0x75>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t105_4mul>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
add    %rbx,%rbx
neg    %rbx
mov    $0x0,%r14d
sbb    %r14,%r14
sbb    %rax,%rax
and    $0x1,%rax
je     1137 <t105_4mul+0x27>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t105_4mul(i8 zeroext %0) {
%2 = alloca i128
%3 = alloca i8
%4 = alloca i8
%5 = alloca i128
store i8 %0, i8* %3
store i8 -2, i8* %4
%6 = load i8, i8* %3
%7 = load i8, i8* %4
%8 = zext i8 %6 to i129
%9 = sext i8 %7 to i129
%10 = call { i129, i1 } @llvm.smul.with.overflow.i129(i129 %8, i129 %9)
%11 = extractvalue { i129, i1 } %10, 1
%12 = extractvalue { i129, i1 } %10, 0
%13 = trunc i129 %12 to i128
%14 = zext i128 %13 to i129
%15 = icmp ne i129 %12, %14
%16 = or i1 %11, %15
store i128 %13, i128* %5
br i1 %16, label %17, label %19
17: ; preds = %1
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %1
%20 = load i128, i128* %5
store i128 %20, i128* %2
%21 = bitcast i128* %2 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t105_4mul(i8 zeroext %0) {
%2 = zext i8 %0 to i129
%3 = mul nsw i129 %2, -2
%4 = and i129 %3, 340282366920938463463374607431768211454
%5 = icmp eq i129 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 (...) @bar()
br label %8
8: ; preds = %6, %1
%9 = trunc i129 %3 to i64
%10 = lshr i129 %3, 64
%11 = trunc i129 %10 to i64
%12 = insertvalue { i64, i64 } poison, i64 %9, 0
%13 = insertvalue { i64, i64 } %12, i64 %11, 1
ret { i64, i64 } %13
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
char *malloc(int);
int /*<<< orphan*/ stderr;
char *tiger_chr(int c) {
  char *p_res;
  p_res = malloc(2);
  if (!p_res) {
    fprintf(stderr, "FATAL ERROR: [tiger_chr]: failed\n");
  }
  p_res[0] = c;
  p_res[1] = '\000';
  return p_res;
}


x86 assembly (clang, -O0):
<tiger_chr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1159 <tiger_chr+0x39>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tiger_chr>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x2,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114c <tiger_chr+0x2c>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    %bpl,(%rbx)
movb   $0x0,0x1(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"FATAL ERROR: [tiger_chr]: failed\0A\00"
define i8* @tiger_chr(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @malloc(i32 2)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %2
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 0
store i8 %12, i8* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 0, i8* %16
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"FATAL ERROR: [tiger_chr]: failed\0A\00"
define noalias i8* @tiger_chr(i32 %0) {
%2 = tail call dereferenceable_or_null(2) i8* @malloc(i32 2)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %4, %1
%8 = trunc i32 %0 to i8
store i8 %8, i8* %2
%9 = getelementptr inbounds i8, i8* %2, i64 1
store i8 0, i8* %9
ret i8* %2
}
void foo175(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo175(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ silc_free(void *);
void silc_mime_field_dest(void *key, void *context, void *user_context) {
  silc_free(key);
  silc_free(context);
}


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

x86 assembly (clang, -O2):
<silc_mime_field_dest>:
push   %rbx
mov    %rsi,%rbx
call   1030 <silc_free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <silc_free@plt>

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

LLVM IR (-O2):
define void @silc_mime_field_dest(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @silc_free(i8* %0)
%5 = tail call i32 @silc_free(i8* %1)
ret void
}
int csub(double *a, double *b, double *c) {
  *c = *a - *b;
  return 0;
}


x86 assembly (clang, -O0):
<csub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csub>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @csub(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = load double*, double** %5
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = load double*, double** %6
store double %11, double* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @csub(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fsub double %4, %5
store double %6, double* %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print(void) { printf("Hello my name is something"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Hello my name is something\00"
define void @print() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Hello my name is something\00"
define void @print() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}