xunge/DecIR huggingface dataset:
void foo(char *a) {
  char *b;
  for (; *a; a++)
    a = b++;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1139 <foo+0x39>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <foo+0x8>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo(i8* nocapture %0) {
ret void
}
int fun598() { return 598; }


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

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

LLVM IR (-O0):
define i32 @fun598() {
ret i32 598
}

LLVM IR (-O2):
define i32 @fun598() {
ret i32 598
}
void start_microaccounting(void) {}


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

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

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

LLVM IR (-O2):
define void @start_microaccounting() {
ret void
}
void gdk_x11_get_xatom_by_name() {}


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

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

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

LLVM IR (-O2):
define void @gdk_x11_get_xatom_by_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_204() {
  Assert_real((isqrt(204) == 14),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1025, ("Integer square root of 204 should be 14"));
}


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

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

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 204 should be 14\00"
define void @t_sqrt_204() {
%1 = call i32 @isqrt(i32 204)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1025, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 204 should be 14\00"
define void @t_sqrt_204() {
%1 = tail call i32 @isqrt(i32 204)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1025, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int atoi(char *);
int startServer(int);
int main(int argc, char *argv[]) {
  int port;
  if (argc < 2)
    port = 4000;
  else if (argc == 2)
    port = atoi(argv[1]);
  else
    return 1;
  return startServer(port);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    114c <main+0x2c>
movl   $0xfa0,-0x14(%rbp)
jmp    117c <main+0x5c>
cmpl   $0x2,-0x8(%rbp)
jne    116b <main+0x4b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    1177 <main+0x57>
movl   $0x1,-0x4(%rbp)
jmp    1187 <main+0x67>
jmp    117c <main+0x5c>
mov    -0x14(%rbp),%edi
call   1030 <startServer@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    %edi,%eax
mov    $0xfa0,%edi
cmp    $0x2,%eax
jl     113e <main+0x1e>
jne    1143 <main+0x23>
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
add    $0x8,%rsp
jmp    1030 <startServer@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i32 %0, 2
br i1 %5, label %6, label %13
6: ; preds = %4
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 4000, %2 ]
%12 = tail call i32 @startServer(i32 %11)
br label %13
13: ; preds = %4, %10
%14 = phi i32 [ %12, %10 ], [ 1, %4 ]
ret i32 %14
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct timeval *);
void timeval_clear(struct timeval *a) {
  assert(a);
  a->tv_sec = a->tv_usec = 0;
}


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

x86 assembly (clang, -O2):
<timeval_clear>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
xorps  %xmm0,%xmm0
movups %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define void @timeval_clear(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i32 @assert(%struct.timeval* %3)
%5 = load %struct.timeval*, %struct.timeval** %2
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
store i64 0, i64* %6
%7 = load %struct.timeval*, %struct.timeval** %2
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
store i64 0, i64* %8
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define void @timeval_clear(%struct.timeval* %0) {
%2 = tail call i32 @assert(%struct.timeval* %0)
%3 = bitcast %struct.timeval* %0 to i8*
ret void
}
void *test_anti_range_51(short n) {
  extern void *alloc_anti_range_51(short) __attribute__((alloc_size(1)));
  if ((-0x7fff - 1) + 2 <= n && n <= 12)
    n = (-0x7fff - 1) + 2 - 1;
  return alloc_anti_range_51(n);
}


x86 assembly (clang, -O0):
<test_anti_range_51>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0xffff8002,%eax
cmp    %ecx,%eax
jg     1143 <test_anti_range_51+0x33>
movswl -0x2(%rbp),%eax
cmp    $0xc,%eax
jg     1143 <test_anti_range_51+0x33>
movw   $0x8001,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <alloc_anti_range_51@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_51>:
lea    0x7ffe(%rdi),%eax
movzwl %ax,%eax
cmp    $0x800b,%eax
mov    $0x8001,%eax
cmovae %edi,%eax
movswl %ax,%edi
jmp    1030 <alloc_anti_range_51@plt>

LLVM IR (-O0):
define i8* @test_anti_range_51(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp sle i32 -32766, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = icmp sle i32 %8, 12
br i1 %9, label %10, label %11
10: ; preds = %6
store i16 -32767, i16* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i16, i16* %2
%13 = call i8* @alloc_anti_range_51(i16 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_51(i16 signext %0) {
%2 = add i16 %0, 32766
%3 = icmp ult i16 %2, -32757
%4 = select i1 %3, i16 -32767, i16 %0
%5 = tail call i8* @alloc_anti_range_51(i16 signext %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ bind;
int get_socket(int /*<<< orphan*/ *, char *, int, int /*<<< orphan*/ *);
scalar_t__ listen(int, int);
int ssock(int fam, char *port) {
  int s = get_socket(NULL, port, fam, &bind);
  if (s != -1 && listen(s, 3) < 0) {
    s = -1;
  }
  return s;
}


x86 assembly (clang, -O0):
<ssock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    %eax,%edi
mov    0x2ea7(%rip),%rcx
call   1030 <get_socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1171 <ssock+0x51>
mov    -0x14(%rbp),%edi
mov    $0x3,%esi
call   1040 <listen@plt>
cmp    $0x0,%rax
jge    1171 <ssock+0x51>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssock>:
push   %rbx
mov    %edi,%edx
mov    0x2ebe(%rip),%rcx
xor    %edi,%edi
call   1030 <get_socket@plt>
cmp    $0xffffffff,%eax
je     1151 <ssock+0x31>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x3,%esi
call   1040 <listen@plt>
test   %rax,%rax
mov    $0xffffffff,%eax
cmovns %ebx,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@bind = global i32 0
define i32 @ssock(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i32, i32* %3
%8 = call i32 @get_socket(i32* null, i8* %6, i32 %7, i32* @bind)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, -1
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* %5
%13 = call i64 @listen(i32 %12, i32 3)
%14 = icmp slt i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 -1, i32* %5
br label %16
16: ; preds = %15, %11, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@bind = global i32 0
define i32 @ssock(i32 %0, i8* %1) {
%3 = tail call i32 @get_socket(i32* null, i8* %1, i32 %0, i32* @bind)
%4 = icmp eq i32 %3, -1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i64 @listen(i32 %3, i32 3)
%7 = icmp slt i64 %6, 0
%8 = select i1 %7, i32 -1, i32 %3
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ -1, %2 ], [ %8, %5 ]
ret i32 %10
}
void cdft(int n, int isgn, float *a) {
  void cftfsub(int n, float *a);
  void cftbsub(int n, float *a);
  if (isgn >= 0) {
    cftfsub(n, a);
  } else {
    cftbsub(n, a);
  }
}


x86 assembly (clang, -O0):
<cdft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114d <cdft+0x2d>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <cftfsub@plt>
jmp    1159 <cdft+0x39>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <cftbsub@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdft>:
test   %esi,%esi
js     112c <cdft+0xc>
mov    %rdx,%rsi
jmp    1040 <cftfsub@plt>
mov    %rdx,%rsi
jmp    1030 <cftbsub@plt>

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

LLVM IR (-O2):
define void @cdft(i32 %0, i32 %1, float* %2) {
%4 = icmp sgt i32 %1, -1
br i1 %4, label %5, label %6
5: ; preds = %3
tail call void @cftfsub(i32 %0, float* %2)
br label %7
6: ; preds = %3
tail call void @cftbsub(i32 %0, float* %2)
br label %7
7: ; preds = %6, %5
ret void
}
/* Variables and functions */
char *genTySkelApp(char *, char *);
char *genTySkelSort(char *sortName) { return genTySkelApp(sortName, "[]"); }


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

x86 assembly (clang, -O2):
<genTySkelSort>:
lea    0xee9(%rip),%rsi
jmp    1030 <genTySkelApp@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"[]\00"
define i8* @genTySkelSort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @genTySkelApp(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [3 x i8] c"[]\00"
define i8* @genTySkelSort(i8* %0) {
%2 = tail call i8* @genTySkelApp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
int grub_tolower(int c) {
  if (c >= 'A' && c <= 'Z') {
    return c - 'A' + 'a';
  }
  return c;
}


x86 assembly (clang, -O0):
<grub_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     112c <grub_tolower+0x2c>
cmpl   $0x5a,-0x8(%rbp)
jg     112c <grub_tolower+0x2c>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <grub_tolower+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grub_tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @grub_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ XPixmapFormatValues;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XPixmapFormatValues(void) {
  XPixmapFormatValues *_p =
      (XPixmapFormatValues *)malloc(sizeof(XPixmapFormatValues));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XPixmapFormatValues>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XPixmapFormatValues+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XPixmapFormatValues>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XPixmapFormatValues+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XPixmapFormatValues() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XPixmapFormatValues() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Type definitions */
struct parameters {
  int dummy;
};

/* Variables and functions */
double chi_12(struct parameters *);
double chi_21(struct parameters *p) { return -chi_12(p); }


x86 assembly (clang, -O0):
<chi_21>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <chi_12@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chi_21>:
push   %rax
call   1030 <chi_12@plt>
xorps  0xee3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.parameters = type { i32 }
define double @chi_21(%struct.parameters* %0) {
%2 = alloca %struct.parameters*
store %struct.parameters* %0, %struct.parameters** %2
%3 = load %struct.parameters*, %struct.parameters** %2
%4 = call double @chi_12(%struct.parameters* %3)
%5 = fneg double %4
ret double %5
}

LLVM IR (-O2):
%struct.parameters = type { i32 }
define double @chi_21(%struct.parameters* %0) {
%2 = tail call double @chi_12(%struct.parameters* %0)
%3 = fneg double %2
ret double %3
}
void test___atomic_fetch_xor_0(char *mem) { __atomic_fetch_xor(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_fetch_xor_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    (%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
xor    %sil,%dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    114a <test___atomic_fetch_xor_0+0x4a>
jmp    111f <test___atomic_fetch_xor_0+0x1f>
mov    -0x19(%rbp),%al
mov    %al,-0xa(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_fetch_xor_0>:
lock xorb $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test___atomic_fetch_xor_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8 1, i8* %3
%6 = load i8, i8* %3
%7 = atomicrmw xor i8* %5, i8 %6 acq_rel
store i8 %7, i8* %4
%8 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_fetch_xor_0(i8* nocapture %0) {
%2 = atomicrmw xor i8* %0, i8 1 acq_rel
ret void
}
/* Variables and functions */
double FPop();
int /*<<< orphan*/ Push(int);
void pFZEQUAL() { Push(FPop() == 0.0 ? -1 : 0); }


x86 assembly (clang, -O0):
<pFZEQUAL>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <FPop@plt>
xorps  %xmm1,%xmm1
xor    %edi,%edi
mov    $0xffffffff,%eax
ucomisd %xmm1,%xmm0
setnp  %dl
sete   %cl
test   %dl,%cl
cmovne %eax,%edi
call   1030 <Push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pFZEQUAL>:
push   %rax
xor    %eax,%eax
call   1040 <FPop@plt>
xorpd  %xmm1,%xmm1
cmpeqsd %xmm0,%xmm1
movq   %xmm1,%rdi
pop    %rax
jmp    1030 <Push@plt>

LLVM IR (-O0):
define void @pFZEQUAL() {
%1 = call double (...) @FPop()
%2 = fcmp oeq double %1, 0.000000e+00
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 -1, i32 0
%5 = call i32 @Push(i32 %4)
ret void
}

LLVM IR (-O2):
define void @pFZEQUAL() {
%1 = tail call double (...) @FPop()
%2 = fcmp oeq double %1, 0.000000e+00
%3 = sext i1 %2 to i32
%4 = tail call i32 @Push(i32 %3)
ret void
}
int f(int n, int c, int s) {
  int a, x1, x2, x3;
  x1 = x2 = x3 = c;
  if (n > 64) {
    a = 2 * s;
    x1 = c + a;
    a = 4 * s;
    x2 = c + a;
    a = 6 * s;
    x3 = c + a;
  }
  return x1 + x2 + x3;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    %eax,-0x18(%rbp)
mov    %eax,-0x14(%rbp)
cmpl   $0x40,-0x4(%rbp)
jle    1157 <f+0x57>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
imul   $0x6,-0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %esi,%eax
cmp    $0x41,%edi
jl     1115 <f+0x15>
lea    (%rax,%rdx,4),%ecx
lea    (%rdx,%rdx,2),%esi
lea    (%rax,%rsi,2),%esi
lea    (%rax,%rdx,2),%eax
jmp    1119 <f+0x19>
mov    %eax,%ecx
mov    %eax,%esi
add    %ecx,%eax
add    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, 64
br i1 %4, label %5, label %12
5: ; preds = %3
%6 = shl nsw i32 %2, 1
%7 = add nsw i32 %6, %1
%8 = shl nsw i32 %2, 2
%9 = add nsw i32 %8, %1
%10 = mul nsw i32 %2, 6
%11 = add nsw i32 %10, %1
br label %12
12: ; preds = %5, %3
%13 = phi i32 [ %7, %5 ], [ %1, %3 ]
%14 = phi i32 [ %9, %5 ], [ %1, %3 ]
%15 = phi i32 [ %11, %5 ], [ %1, %3 ]
%16 = add nsw i32 %14, %13
%17 = add nsw i32 %16, %15
ret i32 %17
}
int Operand_uimm6_decode(unsigned int *valp) {
  unsigned uimm6_0, imm6_0;
  imm6_0 = *valp & 0x3f;
  uimm6_0 = 0x4 + ((((0)) << 6) | imm6_0);
  *valp = uimm6_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_uimm6_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x3f,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     $0x0,%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_uimm6_decode>:
mov    (%rdi),%eax
and    $0x3f,%eax
add    $0x4,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_uimm6_decode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = and i32 %6, 63
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = or i32 0, %8
%10 = add i32 4, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32*, i32** %2
store i32 %11, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_uimm6_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 63
%4 = add nuw nsw i32 %3, 4
store i32 %4, i32* %0
ret i32 0
}
/* Variables and functions */
double __ieee754_exp(double);
double exp(double x) { return __ieee754_exp(x); }


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

x86 assembly (clang, -O2):
<exp>:
jmp    1030 <__ieee754_exp@plt>

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

LLVM IR (-O2):
define double @exp(double %0) {
%2 = tail call double @__ieee754_exp(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_setsockopt;
int syscall(int /*<<< orphan*/, int, int, int, void const *,
            int /*<<< orphan*/);
__attribute__((always_)) int _syscall_setsockopt(int socket, int level,
                                                 int option_name,
                                                 const void *option_value,
                                                 socklen_t option_len) {
  return syscall(__NR_setsockopt, socket, level, option_name, option_value,
                 option_len);
}


x86 assembly (clang, -O0):
<_syscall_setsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_setsockopt>:
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_setsockopt = global i32 0
define i32 @_syscall_setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* @__NR_setsockopt
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i8*, i8** %9
%16 = load i32, i32* %10
%17 = call i32 @syscall(i32 %11, i32 %12, i32 %13, i32 %14, i8* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
@__NR_setsockopt = global i32 0
define i32 @_syscall_setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = load i32, i32* @__NR_setsockopt
%7 = tail call i32 @syscall(i32 %6, i32 %0, i32 %1, i32 %2, i8* %3, i32 %4)
ret i32 %7
}
/* Variables and functions */
char *cet_utf8_strndup(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *cet_utf8_strdup(const char *str) {
  if (str)
    return cet_utf8_strndup(str, strlen(str));
  else
    return NULL;
}


x86 assembly (clang, -O0):
<cet_utf8_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115c <cet_utf8_strdup+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <cet_utf8_strndup@plt>
mov    %rax,-0x8(%rbp)
jmp    1164 <cet_utf8_strdup+0x44>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cet_utf8_strdup>:
test   %rdi,%rdi
je     1139 <cet_utf8_strdup+0x19>
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <cet_utf8_strndup@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @cet_utf8_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i8* @cet_utf8_strndup(i8* %0, i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ %5, %3 ], [ null, %1 ]
ret i8* %7
}
int fvec_all_0(float *v, long n) {
  while (n--)
    if (v[n] != 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<fvec_all_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     115a <fvec_all_0+0x5a>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1149 <fvec_all_0+0x49>
jp     1149 <fvec_all_0+0x49>
jmp    1155 <fvec_all_0+0x55>
movl   $0x0,-0x4(%rbp)
jmp    1161 <fvec_all_0+0x61>
jmp    110c <fvec_all_0+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fvec_all_0>:
xorps  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
sub    $0x1,%rsi
jb     1125 <fvec_all_0+0x25>
movss  (%rdi,%rsi,4),%xmm1
ucomiss %xmm0,%xmm1
jne    1122 <fvec_all_0+0x22>
jnp    1110 <fvec_all_0+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @fvec_all_0(float* %0, i64 %1) {
%3 = alloca i32
%4 = alloca float*
%5 = alloca i64
store float* %0, float** %4
store i64 %1, i64* %5
br label %6
6: ; preds = %17, %2
%7 = load i64, i64* %5
%8 = add nsw i64 %7, -1
store i64 %8, i64* %5
%9 = icmp ne i64 %7, 0
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load float*, float** %4
%12 = load i64, i64* %5
%13 = getelementptr inbounds float, float* %11, i64 %12
%14 = load float, float* %13
%15 = fcmp une float %14, 0.000000e+00
br i1 %15, label %16, label %17
16: ; preds = %10
store i32 0, i32* %3
br label %19
17: ; preds = %10
br label %6
18: ; preds = %6
store i32 1, i32* %3
br label %19
19: ; preds = %18, %16
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @fvec_all_0(float* nocapture %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %1, %2 ], [ %5, %7 ]
%5 = add nsw i64 %4, -1
%6 = icmp eq i64 %4, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = getelementptr inbounds float, float* %0, i64 %5
%9 = load float, float* %8
%10 = fcmp une float %9, 0.000000e+00
br i1 %10, label %11, label %3
11: ; preds = %3, %7
%12 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ test_create();
void run_tests() { test_create(); }


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

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

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

LLVM IR (-O2):
define void @run_tests() {
%1 = tail call i32 (...) @test_create()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void __attribute__((regparm(3))) memcpy_13(void *dest, void *src) {
  memcpy(dest, src, 13);
}


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

x86 assembly (clang, -O2):
<memcpy_13>:
mov    $0xd,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @memcpy_13(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 13)
ret void
}
void mesh_graph_dev_init(struct mesh *m) {}


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

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

LLVM IR (-O0):
%struct.mesh = type opaque
define void @mesh_graph_dev_init(%struct.mesh* %0) {
%2 = alloca %struct.mesh*
store %struct.mesh* %0, %struct.mesh** %2
ret void
}

LLVM IR (-O2):
%struct.mesh = type opaque
define void @mesh_graph_dev_init(%struct.mesh* nocapture %0) {
ret void
}
int numa_available() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @numa_available() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x0f() {
  Assert_real((isxdigit(15) == 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_isxdigit.c",
              80, ("isxdigit should be 0 for 0x0f"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x0f>:
push   %rax
mov    $0xf,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x50,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x0f\00"
define void @t_isxdigit_0x0f() {
%1 = call i64 @isxdigit(i32 15)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x0f\00"
define void @t_isxdigit_0x0f() {
%1 = tail call i64 @isxdigit(i32 15)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pmu_reg_write(int, int);
void pmu_enable_4V_harvesting() {
  pmu_reg_write(0x0E, ((0 << 12) | (0 << 11) | (1 << 10) | (0 << 9) | (0 << 8) |
                       (3 << 4) | (0)));
}


x86 assembly (clang, -O0):
<pmu_enable_4V_harvesting>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe,%edi
mov    $0x430,%esi
call   1030 <pmu_reg_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_enable_4V_harvesting>:
mov    $0xe,%edi
mov    $0x430,%esi
jmp    1030 <pmu_reg_write@plt>

LLVM IR (-O0):
define void @pmu_enable_4V_harvesting() {
%1 = call i32 @pmu_reg_write(i32 14, i32 1072)
ret void
}

LLVM IR (-O2):
define void @pmu_enable_4V_harvesting() {
%1 = tail call i32 @pmu_reg_write(i32 14, i32 1072)
ret void
}
/* Variables and functions */
void CL_StartHunkUsers(void) {}


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

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

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

LLVM IR (-O2):
define void @CL_StartHunkUsers() {
ret void
}
/* Variables and functions */
unsigned int bar();
void foo20x7(void) {
  unsigned int a = bar();
  if (a > 0x7)
    bar();
}


x86 assembly (clang, -O0):
<foo20x7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jbe    1133 <foo20x7+0x23>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo20x7>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
cmp    $0x8,%eax
jb     1125 <foo20x7+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @foo20x7() {
%1 = tail call i32 (...) @bar()
%2 = icmp ugt i32 %1, 7
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ real_unlockb(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void unlockb(pthread_mutex_t *ua, pthread_mutex_t *ub) {
  real_unlockb(ua, ub);
  return;
}


x86 assembly (clang, -O0):
<unlockb>:
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 <real_unlockb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlockb>:
jmp    1030 <real_unlockb@plt>

LLVM IR (-O0):
define void @unlockb(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 @real_unlockb(i32* %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @unlockb(i32* %0, i32* %1) {
%3 = tail call i32 @real_unlockb(i32* %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void stomperenv_note_free(void *data) { free(data); }


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

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

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

LLVM IR (-O2):
define void @stomperenv_note_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int sck_sendf(int, char *, char const *, char const *);
int irc_msg(int s, const char *channel, const char *data) {
  return sck_sendf(s, "PRIVMSG %s :%s\r\n", channel, data);
}


x86 assembly (clang, -O0):
<irc_msg>:
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),%rdx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rsi
call   1030 <sck_sendf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_msg>:
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee3(%rip),%rsi
jmp    1030 <sck_sendf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"PRIVMSG %s :%s\0D\0A\00"
define i32 @irc_msg(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @sck_sendf(i32 %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [17 x i8] c"PRIVMSG %s :%s\0D\0A\00"
define i32 @irc_msg(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @sck_sendf(i32 %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ sorter_quick_sort_recursive(int /*<<< orphan*/ *,
                                               unsigned int, size_t const);
void sorter_quick_sort(int64_t *dst, const size_t size) {
  if (size <= 1) {
    return;
  }
  sorter_quick_sort_recursive(dst, 0U, size - 1U);
}


x86 assembly (clang, -O0):
<sorter_quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
ja     1130 <sorter_quick_sort+0x20>
jmp    1143 <sorter_quick_sort+0x33>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
sub    $0x1,%rdx
xor    %esi,%esi
call   1030 <sorter_quick_sort_recursive@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sorter_quick_sort>:
cmp    $0x2,%rsi
jae    1117 <sorter_quick_sort+0x7>
ret
mov    %rsi,%rdx
add    $0xffffffffffffffff,%rdx
xor    %esi,%esi
jmp    1030 <sorter_quick_sort_recursive@plt>

LLVM IR (-O0):
define void @sorter_quick_sort(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp ule i64 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %2
br label %13
8: ; preds = %2
%9 = load i32*, i32** %3
%10 = load i64, i64* %4
%11 = sub i64 %10, 1
%12 = call i32 @sorter_quick_sort_recursive(i32* %9, i32 0, i64 %11)
br label %13
13: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @sorter_quick_sort(i32* %0, i64 %1) {
%3 = icmp ult i64 %1, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = add i64 %1, -1
%6 = tail call i32 @sorter_quick_sort_recursive(i32* %0, i32 0, i64 %5)
br label %7
7: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPPROTO_IP;
int /*<<< orphan*/ IP_TTL;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              char *, int);
void set_socket_ttl(int s, unsigned int ttl) {
  setsockopt(s, IPPROTO_IP, IP_TTL, (char *)&ttl, sizeof(int));
}


x86 assembly (clang, -O0):
<set_socket_ttl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2e9f(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_socket_ttl>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ecc(%rip),%rax
mov    (%rax),%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rax
ret

LLVM IR (-O0):
@IPPROTO_IP = global i32 0
@IP_TTL = global i32 0
define void @set_socket_ttl(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* @IPPROTO_IP
%7 = load i32, i32* @IP_TTL
%8 = bitcast i32* %4 to i8*
%9 = call i32 @setsockopt(i32 %5, i32 %6, i32 %7, i8* %8, i32 4)
ret void
}

LLVM IR (-O2):
@IPPROTO_IP = global i32 0
@IP_TTL = global i32 0
define void @set_socket_ttl(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @IPPROTO_IP
%5 = load i32, i32* @IP_TTL
%6 = bitcast i32* %3 to i8*
%7 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i8* %6, i32 4)
ret void
}
void mem_pool_free(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @mem_pool_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *strchr(char const *, char);
int has_port(const char *s) {
  const char *slash = strchr(s, '/');
  const char *colon = strchr(s, ':');
  if (!colon) {
    return 0;
  }
  return colon < slash;
}


x86 assembly (clang, -O0):
<has_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1157 <has_port+0x47>
movl   $0x0,-0x4(%rbp)
jmp    116a <has_port+0x5a>
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_port>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1143 <has_port+0x33>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rbx
setb   %al
jmp    1145 <has_port+0x35>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @has_port(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 58)
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 47)
%6 = icmp ult i8* %2, %5
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char const *);
int /*<<< orphan*/ stderr;
void reporter(const char *file, int line, const char *error) {
  fprintf(stderr, "%s:%d: %s\n", file, line, error);
  exit(1);
}


x86 assembly (clang, -O0):
<reporter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<reporter>:
push   %rax
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

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