xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ convert_file(char *);
int main(int argc, char **argv) {
  for (int i = 1; i < argc; ++i) {
    convert_file(argv[i]);
  }
  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)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <convert_file@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <convert_file@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
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 = %18, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
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 @convert_file(i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %7
21: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 1, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @convert_file(i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
int countTokens(char **array) {
  char **tokens = array;
  int count = 0;
  while (*tokens != 0) {
    count++;
    tokens++;
  }
  return count;
}


x86 assembly (clang, -O0):
<countTokens>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     113f <countTokens+0x3f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <countTokens+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countTokens>:
cmpq   $0x0,(%rdi)
je     111d <countTokens+0x1d>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <countTokens+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @countTokens(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8** [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
void select_chip() { (*(volatile unsigned long *)0x70200004) &= ~(1 << 1); }


x86 assembly (clang, -O0):
<select_chip>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70200004,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffd,%rcx
mov    $0x70200004,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<select_chip>:
andq   $0xfffffffffffffffd,0x70200004
70 fd
ret

LLVM IR (-O0):
define void @select_chip() {
%1 = load volatile i64, i64* inttoptr (i64 1881145348 to i64*)
%2 = and i64 %1, -3
store volatile i64 %2, i64* inttoptr (i64 1881145348 to i64*)
ret void
}

LLVM IR (-O2):
define void @select_chip() {
%1 = load volatile i64, i64* inttoptr (i64 1881145348 to i64*)
%2 = and i64 %1, -3
store volatile i64 %2, i64* inttoptr (i64 1881145348 to i64*)
ret void
}
/* Variables and functions */
int sin(int);
double senoidal(int amplitud, int frecuencia, float t, int angulo_inicial) {
  float resultado;
  resultado = amplitud * sin(2 * 3.14 * frecuencia * t + angulo_inicial);
  return resultado;
}


x86 assembly (clang, -O0):
<senoidal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xec7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
cvtsi2sdl -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<senoidal>:
push   %rbx
cvtsi2sd %esi,%xmm1
mulsd  0xee3(%rip),%xmm1
mov    %edi,%ebx
cvtss2sd %xmm0,%xmm0
cvtsi2sd %edx,%xmm2
mulsd  %xmm1,%xmm0
addsd  %xmm0,%xmm2
cvttsd2si %xmm2,%edi
call   1030 <sin@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @senoidal(i32 %0, i32 %1, float %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
%8 = alloca i32
%9 = alloca float
store i32 %0, i32* %5
store i32 %1, i32* %6
store float %2, float* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = sitofp i32 %11 to double
%13 = fmul double 6.280000e+00, %12
%14 = load float, float* %7
%15 = fpext float %14 to double
%16 = load i32, i32* %8
%17 = sitofp i32 %16 to double
%18 = call double @llvm.fmuladd.f64(double %13, double %15, double %17)
%19 = fptosi double %18 to i32
%20 = call i32 @sin(i32 %19)
%21 = mul nsw i32 %10, %20
%22 = sitofp i32 %21 to float
store float %22, float* %9
%23 = load float, float* %9
%24 = fpext float %23 to double
ret double %24
}

LLVM IR (-O2):
define double @senoidal(i32 %0, i32 %1, float %2, i32 %3) {
%5 = sitofp i32 %1 to double
%6 = fmul double %5, 6.280000e+00
%7 = fpext float %2 to double
%8 = sitofp i32 %3 to double
%9 = tail call double @llvm.fmuladd.f64(double %6, double %7, double %8)
%10 = fptosi double %9 to i32
%11 = tail call i32 @sin(i32 %10)
%12 = mul nsw i32 %11, %0
%13 = sitofp i32 %12 to float
%14 = fpext float %13 to double
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char const);
int isint(const char *s) {
  if (!*s) {
    return 0;
  }
  while (*s) {
    if (!isdigit(*s)) {
      return 0;
    }
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1135 <isint+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1180 <isint+0x70>
jmp    113a <isint+0x2a>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1179 <isint+0x69>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1168 <isint+0x58>
movl   $0x0,-0x4(%rbp)
jmp    1180 <isint+0x70>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113a <isint+0x2a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isint>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
xor    %ebp,%ebp
test   %al,%al
je     114c <isint+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     114c <isint+0x3c>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <isint+0x20>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isint(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8* [ %10, %9 ], [ %0, %1 ]
%6 = phi i8 [ %11, %9 ], [ %2, %1 ]
%7 = tail call i32 @isdigit(i8 signext %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i32 [ 0, %1 ], [ 0, %4 ], [ 1, %9 ]
ret i32 %14
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int crc8_p93_next(int /*<<< orphan*/, int const);
int /*<<< orphan*/ printf(char *, int const, int const);
uint8_t test1(uint8_t const b) {
  uint8_t const crc = crc8_p93_next(0, b);
  printf("b1=%02x crc=%02x\n", b, crc);
  return crc;
}


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

x86 assembly (clang, -O2):
<test1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %edi,%edi
mov    %ebx,%esi
call   1030 <crc8_p93_next@plt>
mov    %eax,%ebp
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"b1=%02x crc=%02x\0A\00"
define i32 @test1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @crc8_p93_next(i32 0, i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@.str = [18 x i8] c"b1=%02x crc=%02x\0A\00"
define i32 @test1(i32 %0) {
%2 = tail call i32 @crc8_p93_next(i32 0, i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2)
ret i32 %2
}
void foo2(int *c) { *c = 2; }


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
movl   $0x2,(%rdi)
ret

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

LLVM IR (-O2):
define void @foo2(i32* nocapture writeonly %0) {
store i32 2, i32* %0
ret void
}
int find_one(unsigned int bits8) {
  if (bits8 >= 8)
    return 4;
  else if (bits8 >= 4)
    return 3;
  else if (bits8 >= 2)
    return 2;
  else if (bits8 == 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<find_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jb     111d <find_one+0x1d>
movl   $0x4,-0x4(%rbp)
jmp    1175 <find_one+0x75>
cmpl   $0x4,-0x8(%rbp)
jb     1133 <find_one+0x33>
movl   $0x3,-0x4(%rbp)
jmp    1175 <find_one+0x75>
cmpl   $0x2,-0x8(%rbp)
jb     1149 <find_one+0x49>
movl   $0x2,-0x4(%rbp)
jmp    1175 <find_one+0x75>
cmpl   $0x1,-0x8(%rbp)
jne    115f <find_one+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1175 <find_one+0x75>
jmp    1164 <find_one+0x64>
jmp    1169 <find_one+0x69>
jmp    116e <find_one+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_one>:
mov    $0x4,%eax
cmp    $0x7,%edi
ja     1124 <find_one+0x24>
mov    $0x3,%eax
cmp    $0x3,%edi
ja     1124 <find_one+0x24>
mov    $0x2,%eax
cmp    $0x1,%edi
ja     1124 <find_one+0x24>
sete   %al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @find_one(i32 %0) {
%2 = icmp ugt i32 %0, 7
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 3
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp ugt i32 %0, 1
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp eq i32 %0, 1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i32 [ 4, %1 ], [ 3, %3 ], [ 2, %5 ], [ %9, %7 ]
ret i32 %11
}
int cmp_int_lt(const void *a, const void *b) {
  int a_ = *(int *)a;
  int b_ = *(int *)b;
  if (a_ < b_)
    return -1;
  if (a_ > b_)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_int_lt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <cmp_int_lt+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <cmp_int_lt+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <cmp_int_lt+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <cmp_int_lt+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @cmp_int_lt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int dec128_is754version2008(void) { return 0; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dec128_is754version2008() {
ret i32 0
}

LLVM IR (-O2):
define i32 @dec128_is754version2008() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ O_NONBLOCK;
int /*<<< orphan*/ assert(int);
int socket_add_attribute(int, int /*<<< orphan*/);
int socket_make_non_block(int fd) {
  int rv = -1;
  rv = socket_add_attribute(fd, O_NONBLOCK);
  assert(rv == 0);
  return 0;
}


x86 assembly (clang, -O0):
<socket_make_non_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1030 <socket_add_attribute@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_make_non_block>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <socket_add_attribute@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@O_NONBLOCK = global i32 0
define i32 @socket_make_non_block(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @O_NONBLOCK
%6 = call i32 @socket_add_attribute(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
ret i32 0
}

LLVM IR (-O2):
@O_NONBLOCK = global i32 0
define i32 @socket_make_non_block(i32 %0) {
%2 = load i32, i32* @O_NONBLOCK
%3 = tail call i32 @socket_add_attribute(i32 %0, i32 %2)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i32 0
}
double str2ra(in) const char *in;
{
  double ra;
  ra = str2dec(in);
  if (strsrch(in, ":"))
    ra = ra * 15.0;
  return (ra);
}


x86 assembly (clang, -O0):
<str2ra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <str2dec@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1030 <strsrch@plt>
cmp    $0x0,%eax
je     116d <str2ra+0x4d>
movsd  0xe9d(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2ra>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <str2dec@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <strsrch@plt>
test   %eax,%eax
je     115e <str2ra+0x3e>
movsd  0x8(%rsp),%xmm0
mulsd  0xea4(%rip),%xmm0
jmp    1164 <str2ra+0x44>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
define double @str2ra(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @str2dec to i32 (i8*, ...)*)(i8* %4)
%6 = sitofp i32 %5 to double
store double %6, double* %3
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @strsrch to i32 (i8*, i8*, ...)*)(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load double, double* %3
%12 = fmul double %11, 1.500000e+01
store double %12, double* %3
br label %13
13: ; preds = %10, %1
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
define double @str2ra(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str2dec to i32 (i8*, ...)*)(i8* %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @strsrch to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
%6 = fmul double %3, 1.500000e+01
%7 = select i1 %5, double %3, double %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ call_kriger_point_(int *, double *, double *, double *,
                                      double *, double *, double *, double *);
void Kriger_Point(int num_in_samples, double *X_samples, double *Y_samples,
                  double X_in, double *Y_out, double min_value,
                  double max_value, double nuget_kri) {
  call_kriger_point_(&num_in_samples, X_samples, Y_samples, &X_in, Y_out,
                     &min_value, &max_value, &nuget_kri);
}


x86 assembly (clang, -O0):
<Kriger_Point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%r8
lea    -0x4(%rbp),%rdi
lea    -0x20(%rbp),%rcx
lea    -0x30(%rbp),%r9
lea    -0x38(%rbp),%r10
lea    -0x40(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <call_kriger_point_@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kriger_Point>:
sub    $0x28,%rsp
mov    %rcx,%r8
mov    %edi,0x4(%rsp)
movsd  %xmm0,0x20(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
lea    0x8(%rsp),%rax
lea    0x10(%rsp),%r10
lea    0x4(%rsp),%rdi
lea    0x20(%rsp),%rcx
lea    0x18(%rsp),%r9
push   %rax
push   %r10
call   1030 <call_kriger_point_@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define void @Kriger_Point(i32 %0, double* %1, double* %2, double %3, double* %4, double %5, double %6, double %7) {
%9 = alloca i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca double
%13 = alloca double*
%14 = alloca double
%15 = alloca double
%16 = alloca double
store i32 %0, i32* %9
store double* %1, double** %10
store double* %2, double** %11
store double %3, double* %12
store double* %4, double** %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%17 = load double*, double** %10
%18 = load double*, double** %11
%19 = load double*, double** %13
%20 = call i32 @call_kriger_point_(i32* %9, double* %17, double* %18, double* %12, double* %19, double* %14, double* %15, double* %16)
ret void
}

LLVM IR (-O2):
define void @Kriger_Point(i32 %0, double* %1, double* %2, double %3, double* %4, double %5, double %6, double %7) {
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store i32 %0, i32* %9
store double %3, double* %10
store double %5, double* %11
store double %6, double* %12
store double %7, double* %13
%14 = call i32 @call_kriger_point_(i32* %9, double* %1, double* %2, double* %10, double* %4, double* %11, double* %12, double* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int);
void dispcode(unsigned int charnum) {
  printf("%3d (0x%02x):%c\n", charnum, charnum, charnum);
}


x86 assembly (clang, -O0):
<dispcode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dispcode>:
mov    %edi,%ecx
lea    0xee7(%rip),%rdi
mov    %ecx,%esi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%3d (0x%02x):%c\0A\00"
define void @dispcode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%3d (0x%02x):%c\0A\00"
define void @dispcode(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %0, i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *get_data(int i) {
  char *data1 = (char *)malloc(32);
  sprintf(data1, "helloworld%d", i);
  return data1;
}


x86 assembly (clang, -O0):
<get_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x20,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_data>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x20,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"helloworld%d\00"
define i8* @get_data(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 32)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"helloworld%d\00"
define i8* @get_data(i32 %0) {
%2 = tail call i64 @malloc(i32 32)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ CON_Print(char const *);
void Sys_Print(const char *msg) { CON_Print(msg); }


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

x86 assembly (clang, -O2):
<Sys_Print>:
jmp    1030 <CON_Print@plt>

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

LLVM IR (-O2):
define void @Sys_Print(i8* %0) {
%2 = tail call i32 @CON_Print(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void banner(void) {
  fprintf(stderr, "UNECM - Decoder for Error Code Modeler format v1.0\n"
                  "Copyright (C) 2002 Neill Corlett\n\n");
}


x86 assembly (clang, -O0):
<banner>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<banner>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [86 x i8] c"UNECM - Decoder for Error Code Modeler format v1.0\0ACopyright (C) 2002 Neill Corlett\0A\0A\00"
define void @banner() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [86 x i8] c"UNECM - Decoder for Error Code Modeler format v1.0\0ACopyright (C) 2002 Neill Corlett\0A\0A\00"
define void @banner() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clean_exit(int /*<<< orphan*/);
void signal_handler(int sig) { clean_exit(0); }


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

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

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

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = tail call i32 @clean_exit(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void setOption(char option[]) { printf("Option set: %s\n", option); }


x86 assembly (clang, -O0):
<setOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setOption>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Option set: %s\0A\00"
define void @setOption(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Option set: %s\0A\00"
define void @setOption(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int f(void) { return '\0' + 'c' * '\f'; }


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

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

LLVM IR (-O0):
define i32 @f() {
ret i32 1188
}

LLVM IR (-O2):
define i32 @f() {
ret i32 1188
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void breakpoint() {
  static int preventInline = 0;
  abort();
}


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

x86 assembly (clang, -O2):
<breakpoint>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@breakpoint.preventInline = internal global i32 0
define void @breakpoint() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @breakpoint() {
%1 = tail call i32 (...) @abort()
unreachable
}
char *dlop1(void) {
  return "passage dans dlop1 de "
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/elekmad/dlopen/refs/heads/master/dllib1.c";
}


x86 assembly (clang, -O0):
<dlop1>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlop1>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [154 x i8] c"passage dans dlop1 de /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/elekmad/dlopen/refs/heads/master/dllib1.c\00"
define i8* @dlop1() {
ret i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [154 x i8] c"passage dans dlop1 de /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/elekmad/dlopen/refs/heads/master/dllib1.c\00"
define i8* @dlop1() {
ret i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *zalloc(size_t size) {
  void *p;
  p = malloc(size);
  if (p)
    memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <zalloc+0x33>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <zalloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @zalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ print_tty_input_seq_str(char *);
void print_tty_input_seq(void) {
  print_tty_input_seq_str("Input string (upper or lower case)");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Input string (upper or lower case)\00"
define void @print_tty_input_seq() {
%1 = call i32 @print_tty_input_seq_str(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Input string (upper or lower case)\00"
define void @print_tty_input_seq() {
%1 = tail call i32 @print_tty_input_seq_str(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}
void test_five(int x, int y, int z) {
#pragma omp target
#pragma omp teams distribute parallel for simd collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      for (int i = 0; i < z; i++)
        ;
}


x86 assembly (clang, -O0):
<test_five>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117f <test_five+0x7f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <test_five+0x6c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <test_five+0x59>
jmp    114b <test_five+0x4b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <test_five+0x3a>
jmp    115e <test_five+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <test_five+0x27>
jmp    1171 <test_five+0x71>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <test_five+0x14>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_five(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
size_t hp_parent(size_t i) {
  assert(i != 0);
  return (i - 1) / 2;
}


x86 assembly (clang, -O0):
<hp_parent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
shr    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hp_parent>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
add    $0xffffffffffffffff,%rbx
setb   %dil
call   1030 <assert@plt>
shr    %rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @hp_parent(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i64, i64* %2
%8 = sub i64 %7, 1
%9 = udiv i64 %8, 2
ret i64 %9
}

LLVM IR (-O2):
define i64 @hp_parent(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = add i64 %0, -1
%6 = lshr i64 %5, 1
ret i64 %6
}
int isWhiteSpace(char c) {
  return ((c == ' ') || (c == '\r') || (c == '\n') || (c == '\t'));
}


x86 assembly (clang, -O0):
<isWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <isWhiteSpace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     114d <isWhiteSpace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <isWhiteSpace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWhiteSpace>:
cmp    $0x20,%dil
ja     1120 <isWhiteSpace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002400,%rdx
bt     %rcx,%rdx
jae    1120 <isWhiteSpace+0x20>
ret
xor    %eax,%eax
cmp    $0x9,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isWhiteSpace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 13
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 9
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @isWhiteSpace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 10, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 9
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ObjectRefDecImpl(void *, char *, int);
void ListFreeObject(void *ptr) {
  ObjectRefDecImpl(ptr,
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/silid/dvbstreamer/refs/"
                   "heads/master/src/list.c",
                   67);
}


x86 assembly (clang, -O0):
<ListFreeObject>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x43,%edx
call   1030 <ObjectRefDecImpl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ListFreeObject>:
lea    0xee9(%rip),%rsi
mov    $0x43,%edx
jmp    1030 <ObjectRefDecImpl@plt>

LLVM IR (-O0):
@.str = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/silid/dvbstreamer/refs/heads/master/src/list.c\00"
define void @ListFreeObject(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ObjectRefDecImpl(i8* %3, i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 67)
ret void
}

LLVM IR (-O2):
@.str = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/silid/dvbstreamer/refs/heads/master/src/list.c\00"
define void @ListFreeObject(i8* %0) {
%2 = tail call i32 @ObjectRefDecImpl(i8* %0, i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 67)
ret void
}
int cmd_reset(int fd, int argc, char *argv[]) { return 0; }


x86 assembly (clang, -O0):
<cmd_reset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @cmd_reset(i32 %0, i32 %1, i8** nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dumpSignalList(void *, int /*<<< orphan*/);
void signalListTraverse(void *data) { dumpSignalList(data, 0); }


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

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

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

LLVM IR (-O2):
define void @signalListTraverse(i8* %0) {
%2 = tail call i32 @dumpSignalList(i8* %0, i32 0)
ret void
}
void barrier() { asm volatile("" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @barrier() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int main() {
  print("Hello world!");
  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 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcslen(const wchar_t *str) {
  const wchar_t *s = str;
  while (*s++)
    ;
  return (size_t)(s - 1 - str);
}


x86 assembly (clang, -O0):
<wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
cmpl   $0x0,(%rax)
je     112d <wcslen+0x2d>
jmp    1110 <wcslen+0x10>
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcslen>:
mov    $0xfffffffffffffffc,%rax
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0x4(%rdi,%rax,1)
lea    0x4(%rax),%rax
jne    1110 <wcslen+0x10>
sar    $0x2,%rax
ret

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

LLVM IR (-O2):
define i64 @wcslen(i32* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i32* %3 to i64
%9 = ptrtoint i32* %0 to i64
%10 = sub i64 %8, %9
%11 = ashr exact i64 %10, 2
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ resetFlag(int);
int /*<<< orphan*/ setFlag(int);
scalar_t__ testFlag(int);
void CCF(void) {
  resetFlag(6);
  resetFlag(5);
  if (testFlag(4))
    resetFlag(4);
  else
    setFlag(4);
}


x86 assembly (clang, -O0):
<CCF>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1050 <resetFlag@plt>
mov    $0x5,%edi
call   1050 <resetFlag@plt>
mov    $0x4,%edi
call   1030 <testFlag@plt>
cmp    $0x0,%rax
je     116b <CCF+0x3b>
mov    $0x4,%edi
call   1050 <resetFlag@plt>
jmp    1175 <CCF+0x45>
mov    $0x4,%edi
call   1040 <setFlag@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CCF>:
push   %rax
mov    $0x6,%edi
call   1050 <resetFlag@plt>
mov    $0x5,%edi
call   1050 <resetFlag@plt>
mov    $0x4,%edi
call   1030 <testFlag@plt>
mov    $0x4,%edi
test   %rax,%rax
je     115f <CCF+0x2f>
pop    %rax
jmp    1050 <resetFlag@plt>
pop    %rax
jmp    1040 <setFlag@plt>

LLVM IR (-O0):
define void @CCF() {
%1 = call i32 @resetFlag(i32 6)
%2 = call i32 @resetFlag(i32 5)
%3 = call i64 @testFlag(i32 4)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @resetFlag(i32 4)
br label %9
7: ; preds = %0
%8 = call i32 @setFlag(i32 4)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @CCF() {
%1 = tail call i32 @resetFlag(i32 6)
%2 = tail call i32 @resetFlag(i32 5)
%3 = tail call i64 @testFlag(i32 4)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @resetFlag(i32 4)
br label %9
7: ; preds = %0
%8 = tail call i32 @setFlag(i32 4)
br label %9
9: ; preds = %7, %5
ret void
}
int DNSServiceProcessResult() { return 1; }


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

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

LLVM IR (-O0):
define i32 @DNSServiceProcessResult() {
ret i32 1
}

LLVM IR (-O2):
define i32 @DNSServiceProcessResult() {
ret i32 1
}