xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int recv(int, void *, int, int /*<<< orphan*/);
int receiveTCP(int socket, char *buffer, int length) {
  int n;
  n = recv(socket, (void *)buffer, length, 0);
  if (n < length) {
    printf("Errore durante il comando recv()\n");
    exit(1);
  } else
    return n;
}


x86 assembly (clang, -O0):
<receiveTCP>:
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 <recv@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1178 <receiveTCP+0x48>
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<receiveTCP>:
push   %rbx
mov    %edx,%ebx
xor    %ecx,%ecx
call   1030 <recv@plt>
cmp    %ebx,%eax
jl     1140 <receiveTCP+0x10>
pop    %rbx
ret
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Errore durante il comando recv()\0A\00"
define i32 @receiveTCP(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @recv(i32 %8, i8* %9, i32 %10, i32 0)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %3
%16 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@str = [33 x i8] c"Errore durante il comando recv()\00"
define i32 @receiveTCP(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @recv(i32 %0, i8* %1, i32 %2, i32 0)
%5 = icmp slt i32 %4, %2
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
int lstat(char const *, struct stat *);
void xlstat(const char *path, struct stat *p) {
  if (lstat(path, p) == -1)
    err(1, "stat: %s", path);
}


x86 assembly (clang, -O0):
<xlstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <lstat@plt>
cmp    $0xffffffff,%eax
jne    115b <xlstat+0x3b>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xeaa(%rip),%rsi
call   1040 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xlstat>:
push   %rbx
mov    %rdi,%rbx
call   1030 <lstat@plt>
cmp    $0xffffffff,%eax
je     1130 <xlstat+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <err@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [9 x i8] c"stat: %s\00"
define void @xlstat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @lstat(i8* %5, %struct.stat* %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [9 x i8] c"stat: %s\00"
define void @xlstat(i8* %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @lstat(i8* %0, %struct.stat* %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %2
ret void
}
reg0adrreg1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ r0 = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<reg0adrreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x87a22(%rax),%ax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reg0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %13
%17 = getelementptr inbounds i16, i16* %16, i64 277777
%18 = load i16, i16* %17
store i16 %18, i16* %8
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @reg0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
ret i32 undef
}
/* Variables and functions */
long ConstExpression();
int /*<<< orphan*/ EnterAbsoluteMode(long);
int /*<<< orphan*/ Error(char *);
void DoPCAssign(void) {
  long PC = ConstExpression();
  if (PC < 0 || PC > 0xFFFFFF) {
    Error("Range error");
  } else {
    EnterAbsoluteMode(PC);
  }
}


x86 assembly (clang, -O0):
<DoPCAssign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <ConstExpression@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jl     115c <DoPCAssign+0x2c>
cmpq   $0xffffff,-0x8(%rbp)
jle    116d <DoPCAssign+0x3d>
lea    0xe9d(%rip),%rdi
call   1040 <Error@plt>
jmp    1176 <DoPCAssign+0x46>
mov    -0x8(%rbp),%rdi
call   1030 <EnterAbsoluteMode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoPCAssign>:
push   %rax
xor    %eax,%eax
call   1050 <ConstExpression@plt>
cmp    $0x1000000,%rax
jb     114d <DoPCAssign+0x1d>
lea    0xeb9(%rip),%rdi
pop    %rax
jmp    1040 <Error@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <EnterAbsoluteMode@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Range error\00"
define void @DoPCAssign() {
%1 = alloca i64
%2 = call i64 (...) @ConstExpression()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp slt i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i64, i64* %1
%7 = icmp sgt i64 %6, 16777215
br i1 %7, label %8, label %10
8: ; preds = %5, %0
%9 = call i32 @Error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %13
10: ; preds = %5
%11 = load i64, i64* %1
%12 = call i32 @EnterAbsoluteMode(i64 %11)
br label %13
13: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Range error\00"
define void @DoPCAssign() {
%1 = tail call i64 (...) @ConstExpression()
%2 = icmp ugt i64 %1, 16777215
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @Error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @EnterAbsoluteMode(i64 %1)
br label %7
7: ; preds = %5, %3
ret void
}
int DigitSum(int x) {
  if (x < 10) {
    return x;
  } else {
    return DigitSum(x / 10) + x % 10;
  }
}


x86 assembly (clang, -O0):
<DigitSum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1130 <DigitSum+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <DigitSum+0x48>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <DigitSum@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DigitSum>:
xor    %eax,%eax
cmp    $0xa,%edi
jge    110c <DigitSum+0xc>
mov    %edi,%edx
add    %edx,%eax
ret
xor    %eax,%eax
mov    $0xcccccccd,%r8d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
add    %ecx,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <DigitSum+0x20>
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @DigitSum(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = udiv i32 %4, 10
%7 = urem i32 %4, 10
%8 = add nuw nsw i32 %7, %5
%9 = icmp ult i32 %4, 100
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
%12 = phi i32 [ %0, %1 ], [ %6, %3 ]
%13 = add nsw i32 %12, %11
ret i32 %13
}
int MediaSetQuality(int streamid, int value) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @MediaSetQuality(i32 %0, i32 %1) {
ret i32 0
}
int g(int n) { return n; }


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

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

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

LLVM IR (-O2):
define i32 @g(i32 returned %0) {
ret i32 %0
}
void (*tag3(int sig, void (*handler)(int)))(int) {
  (*handler)(sig);
  return handler;
}


x86 assembly (clang, -O0):
<tag3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%edi
call   *%rax
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag3>:
push   %rbx
mov    %rsi,%rbx
call   *%rsi
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define void (i32)* @tag3(i32 %0, void (i32)* returned %1) {
tail call void %1(i32 %0)
ret void (i32)* %1
}
/* Variables and functions */
int /*<<< orphan*/ heapify(int *, int, int);
void buildHeap(int *a, int n) {
  int i;
  for (i = (n - 1) / 2; i >= 0; i--) {
    heapify(a, n, i);
  }
}


x86 assembly (clang, -O0):
<buildHeap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <buildHeap+0x47>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <heapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <buildHeap+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildHeap>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
js     1141 <buildHeap+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
lea    -0x1(%rbx),%eax
shr    $0x1f,%eax
lea    (%rbx,%rax,1),%ebp
add    $0xffffffff,%ebp
sar    %ebp
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <heapify@plt>
add    $0xffffffff,%ebp
jb     1130 <buildHeap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @buildHeap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = sdiv i32 %7, 2
store i32 %8, i32* %5
br label %9
9: ; preds = %17, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @heapify(i32* %13, i32 %14, i32 %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @buildHeap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = add nsw i32 %1, -1
%6 = sdiv i32 %5, 2
br label %7
7: ; preds = %4, %7
%8 = phi i32 [ %10, %7 ], [ %6, %4 ]
%9 = tail call i32 @heapify(i32* %0, i32 %1, i32 %8)
%10 = add nsw i32 %8, -1
%11 = icmp eq i32 %8, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret void
}
long signed_im14(i)
unsigned long i;
{ return ((i & 1) ? 0xffffe000 : 0) | ((i >> 1) & 0x1fff); }


x86 assembly (clang, -O0):
<signed_im14>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x1,%rdx
xor    %eax,%eax
mov    $0xffffe000,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,%eax
mov    -0x8(%rbp),%rcx
shr    $0x1,%rcx
and    $0x1fff,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_im14>:
mov    %edi,%eax
and    $0x1,%eax
neg    %eax
and    $0xffffe000,%eax
shr    %edi
and    $0x1fff,%edi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signed_im14(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 1
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -8192, i32 0
%8 = zext i32 %7 to i64
%9 = load i64, i64* %2
%10 = lshr i64 %9, 1
%11 = and i64 %10, 8191
%12 = or i64 %8, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @signed_im14(i64 %0) {
%2 = and i64 %0, 1
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i64 0, i64 4294959104
%5 = lshr i64 %0, 1
%6 = and i64 %5, 8191
%7 = or i64 %4, %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum(int n) {
  int i, a;
  for (i = n - 1; i >= 1; i--) {
    a += i;
  }
  printf("The inner n = %d\n", a);
  return a;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     1145 <sum+0x35>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <sum+0x14>
mov    -0xc(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"The inner n = %d\0A\00"
define i32 @sum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 1
store i32 %6, i32* %3
br label %7
7: ; preds = %14, %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 1
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, %11
store i32 %13, i32* %4
br label %14
14: ; preds = %10
%15 = load i32, i32* %3
%16 = add nsw i32 %15, -1
store i32 %16, i32* %3
br label %7
17: ; preds = %7
%18 = load i32, i32* %4
%19 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@.str = [18 x i8] c"The inner n = %d\0A\00"
define i32 @sum(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 undef
}
int inkernel_mono(int i, int j) {
  int ma, mi;
  if (i > j) {
    ma = i;
  } else {
    ma = j;
  }
  if (i < j) {
    mi = i;
  } else {
    mi = j;
  }
  return mi + ma * (ma - 1) / 2;
}


x86 assembly (clang, -O0):
<inkernel_mono>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <inkernel_mono+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <inkernel_mono+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113e <inkernel_mono+0x3e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <inkernel_mono+0x44>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inkernel_mono>:
cmp    %esi,%edi
mov    %esi,%eax
cmovg  %edi,%eax
cmovl  %edi,%esi
lea    -0x1(%rax),%ecx
imul   %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
add    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @inkernel_mono(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
%5 = icmp slt i32 %0, %1
%6 = select i1 %5, i32 %0, i32 %1
%7 = add nsw i32 %4, -1
%8 = mul nsw i32 %7, %4
%9 = sdiv i32 %8, 2
%10 = add nsw i32 %9, %6
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Exit_Prin(void) {
  printf("Exit Program!\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Exit Program!\0A\00"
define void @Exit_Prin() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Exit Program!\00"
define void @Exit_Prin() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
extern double n1n2s1n3(int n1, int n2, float s1, int n3) {
  return n1 + n2 + s1 + n3;
}


x86 assembly (clang, -O0):
<n1n2s1n3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
addss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<n1n2s1n3>:
add    %esi,%edi
cvtsi2ss %edi,%xmm1
cvtsi2ss %edx,%xmm2
addss  %xmm0,%xmm1
addss  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @n1n2s1n3(i32 %0, i32 %1, float %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store float %2, float* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = sitofp i32 %11 to float
%13 = load float, float* %7
%14 = fadd float %12, %13
%15 = load i32, i32* %8
%16 = sitofp i32 %15 to float
%17 = fadd float %14, %16
%18 = fpext float %17 to double
ret double %18
}

LLVM IR (-O2):
define double @n1n2s1n3(i32 %0, i32 %1, float %2, i32 %3) {
%5 = add nsw i32 %1, %0
%6 = sitofp i32 %5 to float
%7 = fadd float %6, %2
%8 = sitofp i32 %3 to float
%9 = fadd float %7, %8
%10 = fpext float %9 to double
ret double %10
}
/* Variables and functions */
int core5_swap(char *, int);
int U_EMRCLOSEFIGURE_swap(char *record, int torev) {
  return (core5_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRCLOSEFIGURE_swap>:
jmp    1030 <core5_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRCLOSEFIGURE_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core5_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ uart1_writeb(int);
void uart1_test() {
  uint8_t c = 0xAA;
  while (1) {
    uart1_writeb(c);
    delay(100);
  }
}


x86 assembly (clang, -O0):
<uart1_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xaa,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <uart1_writeb@plt>
mov    $0x64,%edi
call   1040 <delay@plt>
jmp    112f <uart1_test+0xf>

x86 assembly (clang, -O2):
<uart1_test>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xaa,%edi
call   1030 <uart1_writeb@plt>
mov    $0x64,%edi
call   1040 <delay@plt>
jmp    1130 <uart1_test+0x10>

LLVM IR (-O0):
define void @uart1_test() {
%1 = alloca i32
store i32 170, i32* %1
br label %2
2: ; preds = %0, %2
%3 = load i32, i32* %1
%4 = call i32 @uart1_writeb(i32 %3)
%5 = call i32 @delay(i32 100)
br label %2
}

LLVM IR (-O2):
define void @uart1_test() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @uart1_writeb(i32 170)
%3 = tail call i32 @delay(i32 100)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void jnx_term_default() { printf("%c[0m", 0x1B); }


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

x86 assembly (clang, -O2):
<jnx_term_default>:
lea    0xee9(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%c[0m\00"
define void @jnx_term_default() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}
void f00(a00) int a00;
{}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @f00(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FIONBIO;
int ioctl(int, int /*<<< orphan*/, int *);
int setNonblocking(int fd) {
  int flags;
  flags = 1;
  return ioctl(fd, FIONBIO, &flags);
}


x86 assembly (clang, -O0):
<setNonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setNonblocking>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
@FIONBIO = global i32 0
define i32 @setNonblocking(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* @FIONBIO
%6 = call i32 @ioctl(i32 %4, i32 %5, i32* %3)
ret i32 %6
}

LLVM IR (-O2):
@FIONBIO = global i32 0
define i32 @setNonblocking(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @FIONBIO
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
ret i32 %5
}
int is_special_sysfs_ops(void *ops) {
  return (((long)((void *)1) <= (long)ops) &&
          ((long)ops <= (long)((void *)1000)));
}


x86 assembly (clang, -O0):
<is_special_sysfs_ops>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rdx,%rcx
mov    %al,-0x9(%rbp)
jg     112f <is_special_sysfs_ops+0x2f>
mov    -0x8(%rbp),%rax
cmp    $0x3e8,%rax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_special_sysfs_ops>:
test   %rdi,%rdi
setg   %al
cmp    $0x3e9,%rdi
setl   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_special_sysfs_ops(i8* readnone %0) {
%2 = icmp sgt i8* %0, null
%3 = icmp slt i8* %0, inttoptr (i64 1001 to i8*)
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xd8() {
  Assert_real((iscntrl(216) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1085, ("iscntrl should be 0 for 0xd8"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0xd8>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd8,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x43d,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0xd8>:
push   %rax
mov    $0xd8,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x43d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xd8\00"
define void @t_iscntrl_0xd8() {
%1 = call i64 @iscntrl(i32 216)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1085, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xd8\00"
define void @t_iscntrl_0xd8() {
%1 = tail call i64 @iscntrl(i32 216)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1085, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ config_compute_prefix_max_length_all_buffers();
int /*<<< orphan*/ gui_window_ask_refresh(int);
void config_change_prefix_align_min(const void *pointer, void *data,
                                    struct t_config_option *option) {
  (void)pointer;
  (void)data;
  (void)option;
  config_compute_prefix_max_length_all_buffers();
  gui_window_ask_refresh(1);
}


x86 assembly (clang, -O0):
<config_change_prefix_align_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <config_compute_prefix_max_length_all_buffers@plt>
mov    $0x1,%edi
call   1040 <gui_window_ask_refresh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_change_prefix_align_min>:
push   %rax
xor    %eax,%eax
call   1030 <config_compute_prefix_max_length_all_buffers@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <gui_window_ask_refresh@plt>

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @config_change_prefix_align_min(i8* %0, i8* %1, %struct.t_config_option* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.t_config_option*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.t_config_option* %2, %struct.t_config_option** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load %struct.t_config_option*, %struct.t_config_option** %6
%10 = call i32 (...) @config_compute_prefix_max_length_all_buffers()
%11 = call i32 @gui_window_ask_refresh(i32 1)
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @config_change_prefix_align_min(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct.t_config_option* nocapture readnone %2) {
%4 = tail call i32 (...) @config_compute_prefix_max_length_all_buffers()
%5 = tail call i32 @gui_window_ask_refresh(i32 1)
ret void
}
void disalloc_matrix(float **matrix, long nx, long ny) {
  long i;
  for (i = 0; i < nx; i++)
    free(matrix[i]);
  free(matrix);
  return;
}


x86 assembly (clang, -O0):
<disalloc_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    115c <disalloc_matrix+0x4c>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <disalloc_matrix+0x1c>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disalloc_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %rsi,%rsi
jle    1142 <disalloc_matrix+0x32>
mov    %rsi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <disalloc_matrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @disalloc_matrix(float** nocapture %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %1, 0
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds float*, float** %0, i64 %6
%8 = bitcast float** %7 to i8**
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %6, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %5
12: ; preds = %5, %3
%13 = bitcast float** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Type definitions */
struct hsearch_data {
  int dummy;
};

/* Variables and functions */
char *search_store(struct hsearch_data *, char *);
char *check_string_setting(struct hsearch_data *store, char *key,
                           char *default_setting) {
  char *setting = search_store(store, key);
  if (!setting) {
    setting = default_setting;
  }
  return setting;
}


x86 assembly (clang, -O0):
<check_string_setting>:
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
call   1030 <search_store@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1148 <check_string_setting+0x38>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_string_setting>:
push   %rbx
mov    %rdx,%rbx
call   1030 <search_store@plt>
test   %rax,%rax
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.hsearch_data = type { i32 }
define i8* @check_string_setting(%struct.hsearch_data* %0, i8* %1, i8* %2) {
%4 = alloca %struct.hsearch_data*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store %struct.hsearch_data* %0, %struct.hsearch_data** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load %struct.hsearch_data*, %struct.hsearch_data** %4
%9 = load i8*, i8** %5
%10 = call i8* @search_store(%struct.hsearch_data* %8, i8* %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp ne i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %3
%14 = load i8*, i8** %6
store i8* %14, i8** %7
br label %15
15: ; preds = %13, %3
%16 = load i8*, i8** %7
ret i8* %16
}

LLVM IR (-O2):
%struct.hsearch_data = type { i32 }
define i8* @check_string_setting(%struct.hsearch_data* %0, i8* %1, i8* readnone %2) {
%4 = tail call i8* @search_store(%struct.hsearch_data* %0, i8* %1)
%5 = icmp eq i8* %4, null
%6 = select i1 %5, i8* %2, i8* %4
ret i8* %6
}
long consumeUptoBreak(char *buffer, long length) {
  long counter;
  counter = 0;
  while (length > 0) {
    counter++;
    length--;
    if (*buffer == '\n') {
      break;
    } else if (*buffer == 0) {
      break;
    } else {
      buffer++;
    }
  }
  return (counter);
}


x86 assembly (clang, -O0):
<consumeUptoBreak>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1177 <consumeUptoBreak+0x77>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    114c <consumeUptoBreak+0x4c>
jmp    1177 <consumeUptoBreak+0x77>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1161 <consumeUptoBreak+0x61>
jmp    1177 <consumeUptoBreak+0x77>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1172 <consumeUptoBreak+0x72>
jmp    1114 <consumeUptoBreak+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<consumeUptoBreak>:
test   %rsi,%rsi
jle    1134 <consumeUptoBreak+0x34>
mov    %rsi,%rcx
neg    %rcx
mov    $0x1,%eax
movzbl -0x1(%rdi,%rax,1),%edx
test   %dl,%dl
je     1133 <consumeUptoBreak+0x33>
cmp    $0xa,%dl
je     1133 <consumeUptoBreak+0x33>
lea    (%rcx,%rax,1),%rdx
add    $0x1,%rdx
add    $0x1,%rax
cmp    $0x1,%rdx
jne    1110 <consumeUptoBreak+0x10>
mov    %rsi,%rax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @consumeUptoBreak(i8* nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %9
%5 = phi i64 [ %7, %9 ], [ 0, %2 ]
%6 = phi i8* [ %10, %9 ], [ %0, %2 ]
%7 = add nuw nsw i64 %5, 1
%8 = load i8, i8* %6
switch i8 %8, label %9 [
i8 10, label %12
i8 0, label %12
]
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = icmp eq i64 %7, %1
br i1 %11, label %12, label %4
12: ; preds = %9, %4, %4, %2
%13 = phi i64 [ 0, %2 ], [ %1, %9 ], [ %7, %4 ], [ %7, %4 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void unknown(char *s) {
  printf("'%s': unknown function\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<unknown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<unknown>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"'%s': unknown function\0A\00"
define void @unknown(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [24 x i8] c"'%s': unknown function\0A\00"
define void @unknown(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x95() {
  Assert_real((isalnum(149) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              750, ("isalnum should be 0 for 0x95"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x95>:
push   %rbp
mov    %rsp,%rbp
mov    $0x95,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x2ee,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x95>:
push   %rax
mov    $0x95,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2ee,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x95\00"
define void @t_isalnum_0x95() {
%1 = call i64 @isalnum(i32 149)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 750, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x95\00"
define void @t_isalnum_0x95() {
%1 = tail call i64 @isalnum(i32 149)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 750, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int linearSearch(float arr[], int size, float key) {
  int count = 0;
  for (int i = 0; i < size - 1; i++) {
    count++;
    if (arr[i] == key) {
      return count;
    }
  }
  return count;
}


x86 assembly (clang, -O0):
<linearSearch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1173 <linearSearch+0x73>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
ucomiss -0x18(%rbp),%xmm0
jne    1160 <linearSearch+0x60>
jp     1160 <linearSearch+0x60>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <linearSearch+0x79>
jmp    1165 <linearSearch+0x65>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    111e <linearSearch+0x1e>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linearSearch>:
xor    %eax,%eax
cmp    $0x2,%esi
jl     1125 <linearSearch+0x25>
add    $0xffffffff,%esi
xor    %eax,%eax
nopl   0x0(%rax)
movss  (%rdi,%rax,4),%xmm1
add    $0x1,%rax
ucomiss %xmm0,%xmm1
jne    1120 <linearSearch+0x20>
jnp    1125 <linearSearch+0x25>
cmp    %rsi,%rax
jb     1110 <linearSearch+0x10>
ret

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

LLVM IR (-O2):
define i32 @linearSearch(float* nocapture %0, i32 %1, float %2) {
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = add nsw i32 %1, -1
%7 = zext i32 %6 to i64
br label %8
8: ; preds = %8, %5
%9 = phi i64 [ %10, %8 ], [ 0, %5 ]
%10 = add nuw nsw i64 %9, 1
%11 = getelementptr inbounds float, float* %0, i64 %9
%12 = load float, float* %11
%13 = fcmp une float %12, %2
%14 = icmp ult i64 %10, %7
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %8, label %16
16: ; preds = %8
%17 = trunc i64 %10 to i32
br label %18
18: ; preds = %16, %3
%19 = phi i32 [ 0, %3 ], [ %17, %16 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(int argc, char **argv) {
  (void)argc;
  fprintf(stderr,
          "USAGE: %s <input consistent-trees directory> <output LHALOTREE "
          "directory> <particle mass (10^10 Msun/h units) >\n",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [113 x i8] c"USAGE: %s <input consistent-trees directory> <output LHALOTREE directory> <particle mass (10^10 Msun/h units) >\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i32, i32* @stderr
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [113 x i8] c"USAGE: %s <input consistent-trees directory> <output LHALOTREE directory> <particle mass (10^10 Msun/h units) >\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Type definitions */
struct sockaddr_in6 {
  unsigned short sin6_port;
};
struct sockaddr_in {
  unsigned short sin_port;
};
struct sockaddr {
  scalar_t__ sa_family;
};

/* Variables and functions */
scalar_t__ AF_INET;
unsigned short int get_in_port(struct sockaddr *sa) {
  if (sa->sa_family == AF_INET) {
    return ((struct sockaddr_in *)sa)->sin_port;
  }
  return ((struct sockaddr_in6 *)sa)->sin6_port;
}


x86 assembly (clang, -O0):
<get_in_port>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2ed2(%rip),%rcx
cmp    (%rcx),%rax
jne    112f <get_in_port+0x2f>
mov    -0x10(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x2(%rbp)
jmp    113a <get_in_port+0x3a>
mov    -0x10(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_in_port>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i64 }
%struct.sockaddr_in = type { i16 }
%struct.sockaddr_in6 = type { i16 }
@AF_INET = global i64 0
define zeroext i16 @get_in_port(%struct.sockaddr* %0) {
%2 = alloca i16
%3 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %3
%4 = load %struct.sockaddr*, %struct.sockaddr** %3
%5 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = load i64, i64* @AF_INET
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load %struct.sockaddr*, %struct.sockaddr** %3
%11 = bitcast %struct.sockaddr* %10 to %struct.sockaddr_in*
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 0
%13 = load i16, i16* %12
store i16 %13, i16* %2
br label %19
14: ; preds = %1
%15 = load %struct.sockaddr*, %struct.sockaddr** %3
%16 = bitcast %struct.sockaddr* %15 to %struct.sockaddr_in6*
%17 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %16, i32 0, i32 0
%18 = load i16, i16* %17
store i16 %18, i16* %2
br label %19
19: ; preds = %14, %9
%20 = load i16, i16* %2
ret i16 %20
}

LLVM IR (-O2):
%struct.sockaddr = type { i64 }
@AF_INET = global i64 0
define zeroext i16 @get_in_port(%struct.sockaddr* nocapture %0) {
%2 = bitcast %struct.sockaddr* %0 to i16*
%3 = load i16, i16* %2
ret i16 %3
}