xunge/DecIR huggingface dataset:
/* Variables and functions */
long EthernetPacketGetInternal(unsigned long, unsigned char *, long);
long EthernetPacketGetNonBlocking(unsigned long ulBase, unsigned char *pucBuf,
                                  long lBufLen) {
  ;
  ;
  ;
  if (((*((volatile unsigned long *)(ulBase + 0x00000034))) & 0x0000003F) ==
      0) {
    return (0);
  }
  return (EthernetPacketGetInternal(ulBase, pucBuf, lBufLen));
}


x86 assembly (clang, -O0):
<EthernetPacketGetNonBlocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x34(%rax),%rax
and    $0x3f,%rax
cmp    $0x0,%rax
jne    1147 <EthernetPacketGetNonBlocking+0x37>
movq   $0x0,-0x8(%rbp)
jmp    115c <EthernetPacketGetNonBlocking+0x4c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <EthernetPacketGetInternal@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EthernetPacketGetNonBlocking>:
testq  $0x3f,0x34(%rdi)
je     111f <EthernetPacketGetNonBlocking+0xf>
jmp    1030 <EthernetPacketGetInternal@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @EthernetPacketGetNonBlocking(i64 %0, i8* %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
store i64 %0, i64* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load i64, i64* %5
%9 = add i64 %8, 52
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, 63
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i64 0, i64* %4
br label %20
15: ; preds = %3
%16 = load i64, i64* %5
%17 = load i8*, i8** %6
%18 = load i64, i64* %7
%19 = call i64 @EthernetPacketGetInternal(i64 %16, i8* %17, i64 %18)
store i64 %19, i64* %4
br label %20
20: ; preds = %15, %14
%21 = load i64, i64* %4
ret i64 %21
}

LLVM IR (-O2):
define i64 @EthernetPacketGetNonBlocking(i64 %0, i8* %1, i64 %2) {
%4 = add i64 %0, 52
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 63
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i64 @EthernetPacketGetInternal(i64 %0, i8* %1, i64 %2)
br label %11
11: ; preds = %3, %9
%12 = phi i64 [ %10, %9 ], [ 0, %3 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
int strlen(char const *);
scalar_t__ vrna_alloc(int);
char *add_root(const char *structure) {
  char *xS;
  xS = (char *)vrna_alloc(sizeof(char) * (strlen(structure) + 4));
  xS[0] = '(';
  strcat(xS, structure);
  strcat(xS, "R)");
  return xS;
}


x86 assembly (clang, -O0):
<add_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x4,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <vrna_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x28,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x10(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_root>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x4(%rax),%edi
call   1040 <vrna_alloc@plt>
mov    %rax,%rbx
movb   $0x28,(%rax)
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
lea    0xea4(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"R)\00"
define i8* @add_root(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 4
%7 = sext i32 %6 to i64
%8 = mul i64 1, %7
%9 = trunc i64 %8 to i32
%10 = call i64 @vrna_alloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 40, i8* %13
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = call i32 @strcat(i8* %14, i8* %15)
%17 = load i8*, i8** %3
%18 = call i32 @strcat(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [3 x i8] c"R)\00"
define i8* @add_root(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 4
%4 = tail call i64 @vrna_alloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
store i8 40, i8* %5
%6 = tail call i32 @strcat(i8* %5, i8* %0)
%7 = tail call i32 @strcat(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %5
}
long long a() { return (long long)(int *)-1; }


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @a() {
ret i64 -1
}

LLVM IR (-O2):
define i64 @a() {
ret i64 -1
}
/* Variables and functions */
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, long);
void ivec_0(int *v, long n) { memset(v, 0, n * sizeof(*v)); }


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

x86 assembly (clang, -O2):
<ivec_0>:
lea    0x0(,%rsi,4),%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @ivec_0(i32* %0, i64 %1) {
%3 = shl i64 %1, 2
%4 = tail call i32 @memset(i32* %0, i32 0, i64 %3)
ret void
}
long long proc1() { return 1LL; }


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

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

LLVM IR (-O0):
define i64 @proc1() {
ret i64 1
}

LLVM IR (-O2):
define i64 @proc1() {
ret i64 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *,
                           char const *, char const *);
void echo_client_version(FILE *out) {
  static const char prog_str[] = "echo client";
  static const char ver_str[] = "1.0";
  static const char author_str[] = "Paolo Rovelli";
  fprintf(out, "%s %s written by %s\n", prog_str, ver_str, author_str);
  fflush(out);
  return;
}


x86 assembly (clang, -O0):
<echo_client_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xee7(%rip),%rsi
lea    0xec2(%rip),%rdx
lea    0xec7(%rip),%rcx
lea    0xec4(%rip),%r8
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_client_version>:
push   %rbx
mov    %rdi,%rbx
lea    0xef3(%rip),%rsi
lea    0xece(%rip),%rdx
lea    0xed3(%rip),%rcx
lea    0xed0(%rip),%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@echo_client_version.prog_str = internal constant [12 x i8] c"echo client\00"
@echo_client_version.ver_str = internal constant [4 x i8] c"1.0\00"
@echo_client_version.author_str = internal constant [14 x i8] c"Paolo Rovelli\00"
@.str = [21 x i8] c"%s %s written by %s\0A\00"
define void @echo_client_version(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @echo_client_version.prog_str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @echo_client_version.ver_str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @echo_client_version.author_str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fflush(i32* %5)
ret void
}

LLVM IR (-O2):
@echo_client_version.prog_str = internal constant [12 x i8] c"echo client\00"
@echo_client_version.ver_str = internal constant [4 x i8] c"1.0\00"
@echo_client_version.author_str = internal constant [14 x i8] c"Paolo Rovelli\00"
@.str = [21 x i8] c"%s %s written by %s\0A\00"
define void @echo_client_version(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @echo_client_version.prog_str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @echo_client_version.ver_str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @echo_client_version.author_str, i64 0, i64 0))
%3 = tail call i32 @fflush(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ p_sat_buf(char *);
void p_sat_boundary_row(void) {
  char s[20];
  int i;
  s[0] = '+';
  s[20 - 2] = '+';
  s[20 - 1] = 0;
  for (i = 1; i < 20 - 2; i++)
    s[i] = '-';
  p_sat_buf(s);
}


x86 assembly (clang, -O0):
<p_sat_boundary_row>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movb   $0x2b,-0x20(%rbp)
movb   $0x2b,-0xe(%rbp)
movb   $0x0,-0xd(%rbp)
movl   $0x1,-0x24(%rbp)
cmpl   $0x12,-0x24(%rbp)
jge    114c <p_sat_boundary_row+0x3c>
movslq -0x24(%rbp),%rax
movb   $0x2d,-0x20(%rbp,%rax,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112b <p_sat_boundary_row+0x1b>
lea    -0x20(%rbp),%rdi
call   1030 <p_sat_buf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_sat_boundary_row>:
sub    $0x18,%rsp
movb   $0x2b,(%rsp)
movb   $0x0,0x13(%rsp)
movaps 0xedc(%rip),%xmm0
movups %xmm0,0x1(%rsp)
movw   $0x2b2d,0x11(%rsp)
mov    %rsp,%rdi
call   1030 <p_sat_buf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @p_sat_boundary_row() {
%1 = alloca [20 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
store i8 43, i8* %3
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 18
store i8 43, i8* %4
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 19
store i8 0, i8* %5
store i32 1, i32* %2
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 18
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %11
store i8 45, i8* %12
br label %13
13: ; preds = %9
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %6
16: ; preds = %6
%17 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%18 = call i32 @p_sat_buf(i8* %17)
ret void
}

LLVM IR (-O2):
define void @p_sat_boundary_row() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
store i8 43, i8* %2
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 18
store i8 43, i8* %3
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 19
store i8 0, i8* %4
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 1
%6 = call i32 @p_sat_buf(i8* %2)
ret void
}
int getbit(char *set, int number) {
  set += number / 8;
  return (*set & (1 << (number % 8))) != 0;
}


x86 assembly (clang, -O0):
<getbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
mov    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbit>:
mov    %esi,%ecx
lea    0x7(%rcx),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
cltq
movsbl (%rdi,%rax,1),%eax
and    $0x7,%cl
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @getbit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 8
%7 = load i8*, i8** %3
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load i32, i32* %4
%14 = srem i32 %13, 8
%15 = shl i32 1, %14
%16 = and i32 %12, %15
%17 = icmp ne i32 %16, 0
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @getbit(i8* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 8
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = and i32 %1, 7
%9 = lshr i32 %7, %8
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ paintLoop();
void callPaintLoop() { paintLoop(); }


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

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

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

LLVM IR (-O2):
define void @callPaintLoop() {
%1 = tail call i32 (...) @paintLoop()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ vetor;

/* Variables and functions */
int maximo(int, int *);
int /*<<< orphan*/ printf(char *, int);
void main(void) {
  int vetor[] = {1, 2, 3, 4, 5};
  int q = sizeof(vetor) / sizeof(int);
  printf("%d\n", maximo(q, vetor));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x5,-0x24(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1040 <maximo@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x5,%edi
call   1040 <maximo@plt>
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.vetor = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @maximo(i32 5, i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
void NET_about(void) {}


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

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

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

LLVM IR (-O2):
define void @NET_about() {
ret void
}
/* Variables and functions */
int m_len(int);
int v_klen(int key) { return m_len(key) - 1; }


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

x86 assembly (clang, -O2):
<v_klen>:
push   %rax
call   1030 <m_len@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @v_klen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @m_len(i32 %3)
%5 = sub nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @v_klen(i32 %0) {
%2 = tail call i32 @m_len(i32 %0)
%3 = add nsw i32 %2, -1
ret i32 %3
}
void *uncurry(void *arg, void *fun) {
  register void *(*func)(void *) = fun;
  return func(arg);
}


x86 assembly (clang, -O0):
<uncurry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uncurry>:
jmp    *%rsi

LLVM IR (-O0):
define i8* @uncurry(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8* (i8*)*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i8* (i8*)*
store i8* (i8*)* %7, i8* (i8*)** %5
%8 = load i8* (i8*)*, i8* (i8*)** %5
%9 = load i8*, i8** %3
%10 = call i8* %8(i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @uncurry(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8* (i8*)*
%4 = tail call i8* %3(i8* %0)
ret i8* %4
}
/* Variables and functions */
int __syscall(int, int, int /*<<< orphan*/, int /*<<< orphan*/,
              int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int errno;
int close(int fd) {
  int ret = __syscall(3, fd, 0, 0, 0, 0, 0);
  if (ret < 0) {
    errno = -ret;
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x3,%edi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <__syscall@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1162 <close+0x52>
xor    %ecx,%ecx
sub    -0xc(%rbp),%ecx
mov    0x2e8c(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <close+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%esi
movl   $0x0,(%rsp)
xor    %ebx,%ebx
mov    $0x3,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <__syscall@plt>
test   %eax,%eax
jns    1148 <close+0x38>
neg    %eax
mov    0x2e9f(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @close(i32 %0) {
%2 = tail call i32 @__syscall(i32 3, i32 %0, i32 0, i32 0, i32 0, i32 0, i32 0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = sub nsw i32 0, %2
store i32 %5, i32* @errno
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
void WDC_TLLInit(void) {}


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

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

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

LLVM IR (-O2):
define void @WDC_TLLInit() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *sqlite3_errmsg(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void error_handler(sqlite3 *db) {
  fprintf(stderr, "Error: %s\n", sqlite3_errmsg(db));
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sqlite3_errmsg@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error_handler>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
call   1030 <sqlite3_errmsg@plt>
lea    0xeba(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error_handler(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @stderr
%4 = load i32*, i32** %2
%5 = call i8* @sqlite3_errmsg(i32* %4)
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error_handler(i32* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @sqlite3_errmsg(i32* %0)
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
void find_track_regex(char pattern[]) {}


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

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

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

LLVM IR (-O2):
define void @find_track_regex(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int funAuxiliar(float);
float f2(float x) { return 3 * funAuxiliar(x); }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <funAuxiliar@plt>
imul   $0x3,%eax,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
call   1030 <funAuxiliar@plt>
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @funAuxiliar(float %3)
%5 = mul nsw i32 3, %4
%6 = sitofp i32 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @f2(float %0) {
%2 = tail call i32 @funAuxiliar(float %0)
%3 = mul nsw i32 %2, 3
%4 = sitofp i32 %3 to float
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ ff_bfin_z_put_pixels8_xy2(int /*<<< orphan*/ *,
                                             int /*<<< orphan*/ const *,
                                             int /*<<< orphan*/,
                                             int /*<<< orphan*/, int);
void bfin_put_pixels8_xy2(uint8_t *block, const uint8_t *s0,
                          ptrdiff_t line_size, int h) {
  ff_bfin_z_put_pixels8_xy2(block, s0, line_size, line_size, h);
}


x86 assembly (clang, -O0):
<bfin_put_pixels8_xy2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
call   1030 <ff_bfin_z_put_pixels8_xy2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfin_put_pixels8_xy2>:
mov    %ecx,%r8d
mov    %edx,%ecx
jmp    1030 <ff_bfin_z_put_pixels8_xy2@plt>

LLVM IR (-O0):
define void @bfin_put_pixels8_xy2(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @ff_bfin_z_put_pixels8_xy2(i32* %9, i32* %10, i32 %11, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @bfin_put_pixels8_xy2(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @ff_bfin_z_put_pixels8_xy2(i32* %0, i32* %1, i32 %2, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int mem_getAllocated();
unsigned int mem_getAvailable(void) {
  int allocatedMemory = mem_getAllocated();
  return 536870912 - allocatedMemory;
}


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

x86 assembly (clang, -O2):
<mem_getAvailable>:
push   %rax
xor    %eax,%eax
call   1030 <mem_getAllocated@plt>
mov    $0x20000000,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mem_getAvailable() {
%1 = alloca i32
%2 = call i32 (...) @mem_getAllocated()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = sub nsw i32 536870912, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @mem_getAvailable() {
%1 = tail call i32 (...) @mem_getAllocated()
%2 = sub nsw i32 536870912, %1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int E0000(int /*<<< orphan*/ *, int /*<<< orphan*/, int *, double, double,
          double, double, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int geomag(FILE *wmmdat, int *maxdeg) {
  return (E0000(wmmdat, 0, maxdeg, 0.0, 0.0, 0.0, 0.0, NULL, NULL, NULL, NULL));
}


x86 assembly (clang, -O0):
<geomag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
xorps  %xmm3,%xmm3
xor    %eax,%eax
mov    %eax,%r9d
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
mov    %r9,%rcx
mov    %r9,%r8
movq   $0x0,(%rsp)
call   1030 <E0000@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geomag>:
push   %rax
mov    %rsi,%rdx
movq   $0x0,(%rsp)
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
xor    %esi,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <E0000@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @geomag(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i32 @E0000(i32* %5, i32 0, i32* %6, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32* null, i32* null, i32* null, i32* null)
ret i32 %7
}

LLVM IR (-O2):
define i32 @geomag(i32* %0, i32* %1) {
%3 = tail call i32 @E0000(i32* %0, i32 0, i32* %1, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32* null, i32* null, i32* null, i32* null)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ recv(int, char *, size_t, int /*<<< orphan*/);
ssize_t lnx_eth_recv(int sck, char *buffer, size_t len) {
  return (recv(sck, buffer, len, 0));
}


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

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

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

LLVM IR (-O2):
define i32 @lnx_eth_recv(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit_status(int);
void int_handler(int dummy) { exit_status(9); }


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

x86 assembly (clang, -O2):
<int_handler>:
mov    $0x9,%edi
jmp    1030 <exit_status@plt>

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

LLVM IR (-O2):
define void @int_handler(i32 %0) {
%2 = tail call i32 @exit_status(i32 9)
ret void
}
void compat_lock_enable(void) {}


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

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

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

LLVM IR (-O2):
define void @compat_lock_enable() {
ret void
}
/* Variables and functions */
unsigned char cmos_read_byte(unsigned int);
void cmos_read_all(unsigned char data[]) {
  unsigned i;
  for (i = 0; i < 14; i++)
    data[i] = 0;
  for (; i < 256; i++)
    data[i] = cmos_read_byte(i);
}


x86 assembly (clang, -O0):
<cmos_read_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xe,-0xc(%rbp)
jae    1146 <cmos_read_all+0x36>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <cmos_read_all+0x13>
jmp    114b <cmos_read_all+0x3b>
cmpl   $0x100,-0xc(%rbp)
jae    117a <cmos_read_all+0x6a>
mov    -0xc(%rbp),%edi
call   1030 <cmos_read_byte@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114b <cmos_read_all+0x3b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmos_read_all>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movq   $0x0,0x6(%rdi)
movq   $0x0,(%rdi)
mov    $0xe,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <cmos_read_byte@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    $0x100,%rbx
jne    1130 <cmos_read_all+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @cmos_read_all(i8* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 14, %1 ], [ %7, %2 ]
%4 = trunc i64 %3 to i32
%5 = tail call zeroext i8 @cmos_read_byte(i32 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %3
store i8 %5, i8* %6
%7 = add nuw nsw i64 %3, 1
%8 = icmp eq i64 %7, 256
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ net_send(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
void irc_part(char *channel) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s", "PART", channel);
  net_send(msg);
}


x86 assembly (clang, -O0):
<irc_part>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    $0x1fd,%esi
lea    0xeba(%rip),%rdx
lea    0xeb9(%rip),%rcx
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
call   1040 <net_send@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_part>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%r8
lea    0xece(%rip),%rdx
lea    0xecd(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1fd,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <net_send@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [5 x i8] c"PART\00"
define void @irc_part(i8* %0) {
%2 = alloca i8*
%3 = alloca [509 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 509, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%8 = call i32 @net_send(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [5 x i8] c"PART\00"
define void @irc_part(i8* %0) {
%2 = alloca [509 x i8]
%3 = getelementptr inbounds [509 x i8], [509 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 509, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = call i32 @net_send(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xb2() {
  Assert_real((isgraph(178) == 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_isgraph.c",
              895, ("isgraph should be 0 for 0xb2"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xb2\00"
define void @t_isgraph_0xb2() {
%1 = call i64 @isgraph(i32 178)
%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 895, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xb2\00"
define void @t_isgraph_0xb2() {
%1 = tail call i64 @isgraph(i32 178)
%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 895, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_10int64_lowword_mem(long long *val) {
  return ((*val) & (0x10 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_10int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 16
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
float randr(int min, int max) {
  double scaled = (double)rand() / RAND_MAX;
  return (max - min + 1) * scaled + min;
}


x86 assembly (clang, -O0):
<randr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb7(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x10(%rbp),%xmm2
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ebe(%rip),%rax
divsd  (%rax),%xmm0
sub    %ebp,%ebx
add    $0x1,%ebx
cvtsi2sd %ebx,%xmm1
cvtsi2sd %ebp,%xmm2
mulsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define float @randr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i64 (...) @rand()
%7 = sitofp i64 %6 to double
%8 = load double, double* @RAND_MAX
%9 = fdiv double %7, %8
store double %9, double* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
%13 = add nsw i32 %12, 1
%14 = sitofp i32 %13 to double
%15 = load double, double* %5
%16 = load i32, i32* %3
%17 = sitofp i32 %16 to double
%18 = call double @llvm.fmuladd.f64(double %14, double %15, double %17)
%19 = fptrunc double %18 to float
ret float %19
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define float @randr(i32 %0, i32 %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = load double, double* @RAND_MAX
%6 = fdiv double %4, %5
%7 = sub i32 1, %0
%8 = add i32 %7, %1
%9 = sitofp i32 %8 to double
%10 = sitofp i32 %0 to double
%11 = tail call double @llvm.fmuladd.f64(double %9, double %6, double %10)
%12 = fptrunc double %11 to float
ret float %12
}
/* Variables and functions */
int /*<<< orphan*/ CG_Argv(int);
int /*<<< orphan*/ trap_AddCommand(int /*<<< orphan*/);
int trap_Argc();
void CG_GameCmds_f(void) {
  int i;
  int c = trap_Argc();
  for (i = 1; i < c; i++)
    trap_AddCommand(CG_Argv(i));
}


x86 assembly (clang, -O0):
<CG_GameCmds_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <trap_Argc@plt>
mov    %eax,-0x8(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1172 <CG_GameCmds_f+0x42>
mov    -0x4(%rbp),%edi
call   1030 <CG_Argv@plt>
mov    %eax,%edi
call   1050 <trap_AddCommand@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <CG_GameCmds_f+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_GameCmds_f>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <trap_Argc@plt>
cmp    $0x2,%eax
jl     1165 <CG_GameCmds_f+0x35>
mov    %eax,%ebx
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <CG_Argv@plt>
mov    %eax,%edi
call   1050 <trap_AddCommand@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1150 <CG_GameCmds_f+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @CG_GameCmds_f() {
%1 = tail call i32 (...) @trap_Argc()
%2 = icmp sgt i32 %1, 1
br i1 %2, label %3, label %9
3: ; preds = %0, %3
%4 = phi i32 [ %7, %3 ], [ 1, %0 ]
%5 = tail call i32 @CG_Argv(i32 %4)
%6 = tail call i32 @trap_AddCommand(i32 %5)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %3
9: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/
deceptiveTrapKTightEncodingFunctionProblemEvaluation(char *, double *, double *,
                                                     int);
void deceptiveTrap4TightEncodingFunctionProblemEvaluation(
    char *parameters, double *objective_value, double *constraint_value) {
  deceptiveTrapKTightEncodingFunctionProblemEvaluation(
      parameters, objective_value, constraint_value, 4);
}


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

x86 assembly (clang, -O2):
<deceptiveTrap4TightEncodingFunctionProblemEvaluation>:
mov    $0x4,%ecx
jmp    1030 <deceptiveTrapKTightEncodingFunctionProblemEvaluation@plt>

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

LLVM IR (-O2):
define void @deceptiveTrap4TightEncodingFunctionProblemEvaluation(i8* %0, double* %1, double* %2) {
%4 = tail call i32 @deceptiveTrapKTightEncodingFunctionProblemEvaluation(i8* %0, double* %1, double* %2, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int *ivector(int n) {
  int *v;
  v = (int *)calloc(n, sizeof(int));
  if (v == NULL) {
    fprintf(stderr, "couldn't reserve memory for an %i vector\n", n);
    exit(EXIT_FAILURE);
  }
  return v;
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117d <ivector+0x4d>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe96(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1144 <ivector+0x14>
pop    %rbx
ret
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"couldn't reserve memory for an %i vector\0A\00"
@EXIT_FAILURE = global i32 0
define i32* @ivector(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = load i32, i32* %2
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %1
%16 = load i32*, i32** %3
ret i32* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"couldn't reserve memory for an %i vector\0A\00"
@EXIT_FAILURE = global i32 0
define i32* @ivector(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %2 to i32*
ret i32* %10
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() { assert(0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_a5(int, char *, int, char *, char *);
int main(int argc, char **argv) {
  test_a5(3, "2BD6459F82C5BC00", 0x24F20F, "889EEAAF9ED1BA1ABBD8436232E440",
          "5CA3406AA244CF69CF047AADA2DF40");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3,%edi
lea    0xece(%rip),%rsi
mov    $0x24f20f,%edx
lea    0xed3(%rip),%rcx
lea    0xeeb(%rip),%r8
call   1030 <test_a5@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef2(%rip),%rcx
lea    0xf0a(%rip),%r8
mov    $0x3,%edi
mov    $0x24f20f,%edx
call   1030 <test_a5@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"2BD6459F82C5BC00\00"
@.str.1 = [31 x i8] c"889EEAAF9ED1BA1ABBD8436232E440\00"
@.str.2 = [31 x i8] c"5CA3406AA244CF69CF047AADA2DF40\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @test_a5(i32 3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 2421263, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"2BD6459F82C5BC00\00"
@.str.1 = [31 x i8] c"889EEAAF9ED1BA1ABBD8436232E440\00"
@.str.2 = [31 x i8] c"5CA3406AA244CF69CF047AADA2DF40\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_a5(i32 3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 2421263, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}