xunge/DecIR huggingface dataset:
/* Type definitions */
struct uwsgi_instance {
  int dummy;
};

/* Variables and functions */
int atoi(char *);
char *vassal_attr_get(struct uwsgi_instance *, char *);
int uwsgi_zeus_spawn_instance(struct uwsgi_instance *ui) {
  int i, nodes = 1;
  char *how_many_nodes = vassal_attr_get(ui, "zeus-nodes");
  if (how_many_nodes) {
    nodes = atoi(how_many_nodes);
  }
  for (i = 0; i < nodes; i++) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<uwsgi_zeus_spawn_instance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <vassal_attr_get@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115e <uwsgi_zeus_spawn_instance+0x3e>
mov    -0x18(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1184 <uwsgi_zeus_spawn_instance+0x64>
jmp    1176 <uwsgi_zeus_spawn_instance+0x56>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1165 <uwsgi_zeus_spawn_instance+0x45>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.uwsgi_instance = type { i32 }
@.str = [11 x i8] c"zeus-nodes\00"
define i32 @uwsgi_zeus_spawn_instance(%struct.uwsgi_instance* %0) {
%2 = alloca %struct.uwsgi_instance*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store %struct.uwsgi_instance* %0, %struct.uwsgi_instance** %2
store i32 1, i32* %4
%6 = load %struct.uwsgi_instance*, %struct.uwsgi_instance** %2
%7 = call i8* @vassal_attr_get(%struct.uwsgi_instance* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %5
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %4
br label %13
13: ; preds = %10, %1
store i32 0, i32* %3
br label %14
14: ; preds = %19, %13
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %22
18: ; preds = %14
br label %19
19: ; preds = %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %14
22: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
%struct.uwsgi_instance = type { i32 }
@.str = [11 x i8] c"zeus-nodes\00"
define i32 @uwsgi_zeus_spawn_instance(%struct.uwsgi_instance* %0) {
%2 = tail call i8* @vassal_attr_get(%struct.uwsgi_instance* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double atof(char *);
int numcmp(char *s1, char *s2) {
  double v1 = 0.0;
  double v2 = 0.0;
  v1 = atof(s1);
  v2 = atof(s2);
  if (v1 < v2)
    return -1;
  else if (v1 > v2)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<numcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    116c <numcmp+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    118f <numcmp+0x7f>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1188 <numcmp+0x78>
movl   $0x1,-0x4(%rbp)
jmp    118f <numcmp+0x7f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numcmp>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
call   1030 <atof@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <atof@plt>
xor    %ecx,%ecx
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
seta   %cl
ucomisd %xmm1,%xmm0
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @numcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
%8 = load i8*, i8** %4
%9 = call double @atof(i8* %8)
store double %9, double* %6
%10 = load i8*, i8** %5
%11 = call double @atof(i8* %10)
store double %11, double* %7
%12 = load double, double* %6
%13 = load double, double* %7
%14 = fcmp olt double %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %22
16: ; preds = %2
%17 = load double, double* %6
%18 = load double, double* %7
%19 = fcmp ogt double %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %3
br label %22
21: ; preds = %16
store i32 0, i32* %3
br label %22
22: ; preds = %21, %20, %15
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @numcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call double @atof(i8* %0)
%4 = tail call double @atof(i8* %1)
%5 = fcmp olt double %3, %4
%6 = fcmp ogt double %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_container_to_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(262, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_container_to_target_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x106,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_container_to_target_system>:
mov    $0x106,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_container_to_target_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 262, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_container_to_target_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 262, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
struct term {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct term **);
int /*<<< orphan*/ free_term(struct term *);
void free_list_terms(struct term **tt, int blen) {
  int i;
  for (i = 0; i < blen; i++) {
    free_term(tt[i]);
  }
  free(tt);
}


x86 assembly (clang, -O0):
<free_list_terms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1161 <free_list_terms+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <free_term@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <free_list_terms+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.term = type { i32 }
define void @free_list_terms(%struct.term** %0, i32 %1) {
%3 = alloca %struct.term**
%4 = alloca i32
%5 = alloca i32
store %struct.term** %0, %struct.term*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load %struct.term**, %struct.term*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds %struct.term*, %struct.term** %11, i64 %13
%15 = load %struct.term*, %struct.term** %14
%16 = call i32 @free_term(%struct.term* %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = load %struct.term**, %struct.term*** %3
%22 = call i32 @free(%struct.term** %21)
ret void
}

LLVM IR (-O2):
%struct.term = type { i32 }
define void @free_list_terms(%struct.term** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds %struct.term*, %struct.term** %0, i64 %7
%9 = load %struct.term*, %struct.term** %8
%10 = tail call i32 @free_term(%struct.term* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @free(%struct.term** %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ set_big_endian_32(int /*<<< orphan*/ *, int /*<<< orphan*/);
void set_big_endian_64(uint8_t *buf, uint64_t val) {
  set_big_endian_32(buf, (uint32_t)(val >> 32));
  set_big_endian_32(buf + 4, (uint32_t)val);
}


x86 assembly (clang, -O0):
<set_big_endian_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <set_big_endian_32@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0xc(%rbp),%esi
call   1030 <set_big_endian_32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_big_endian_64>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <set_big_endian_32@plt>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <set_big_endian_32@plt>

LLVM IR (-O0):
define void @set_big_endian_64(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 = ashr i32 %6, 32
%8 = call i32 @set_big_endian_32(i32* %5, i32 %7)
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 4
%11 = load i32, i32* %4
%12 = call i32 @set_big_endian_32(i32* %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @set_big_endian_64(i32* %0, i32 %1) {
%3 = tail call i32 @set_big_endian_32(i32* %0, i32 poison)
%4 = getelementptr inbounds i32, i32* %0, i64 4
%5 = tail call i32 @set_big_endian_32(i32* %4, i32 %1)
ret void
}
void xmlvm_init_native_org_xmlvm_runtime_Mutex() {}


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

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

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

LLVM IR (-O2):
define void @xmlvm_init_native_org_xmlvm_runtime_Mutex() {
ret void
}
strsave(s) register char *s;
{
  register char *t;
  char *calloc();
  t = calloc(strlen(s) + 1, 1);
  strcpy(t, s);
  return (t);
}


x86 assembly (clang, -O0):
<strsave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsave>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <calloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i32 @strsave(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 %5, 1
%7 = call i8* (i64, i32, ...) bitcast (i8* (...)* @calloc to i8* (i64, i32, ...)*)(i64 %6, i32 1)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i8* @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
%12 = ptrtoint i8* %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @strsave(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* (i64, i32, ...) bitcast (i8* (...)* @calloc to i8* (i64, i32, ...)*)(i64 %3, i32 1)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
%6 = ptrtoint i8* %4 to i64
%7 = trunc i64 %6 to i32
ret i32 %7
}
void RTTcpFlush(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTcpFlush() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void p005() {
  char mod = 19;
  int num = 20;
  while (mod > 0) {
    if (!(num % mod)) {
      mod--;
    } else {
      mod = 19;
      num += 20;
    }
  }
  printf("Smallest multiple that is evenly divisible by numbers 1 - 20: %d",
         num);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x13,-0x1(%rbp)
movl   $0x14,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jle    1162 <p005+0x52>
mov    -0x8(%rbp),%eax
movsbl -0x1(%rbp),%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1150 <p005+0x40>
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
jmp    115d <p005+0x4d>
movb   $0x13,-0x1(%rbp)
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    1123 <p005+0x13>
mov    -0x8(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x13,%al
mov    $0x14,%esi
mov    $0x13,%edi
nopl   0x0(%rax)
mov    %esi,%ecx
movzbl %al,%esi
mov    %ecx,%eax
cltd
idiv   %esi
add    $0xff,%sil
test   %edx,%edx
movzbl %sil,%eax
cmovne %edi,%eax
lea    0x14(%rcx),%esi
cmove  %ecx,%esi
test   %al,%al
jne    1120 <p005+0x10>
lea    0xeb8(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"Smallest multiple that is evenly divisible by numbers 1 - 20: %d\00"
define void @p005() {
%1 = alloca i8
%2 = alloca i32
store i8 19, i8* %1
store i32 20, i32* %2
br label %3
3: ; preds = %19, %0
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %20
7: ; preds = %3
%8 = load i32, i32* %2
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = srem i32 %8, %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %7
%14 = load i8, i8* %1
%15 = add i8 %14, -1
store i8 %15, i8* %1
br label %19
16: ; preds = %7
store i8 19, i8* %1
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 20
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %13
br label %3
20: ; preds = %3
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"Smallest multiple that is evenly divisible by numbers 1 - 20: %d\00"
define void @p005() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 20, %0 ], [ %10, %1 ]
%3 = phi i8 [ 19, %0 ], [ %9, %1 ]
%4 = zext i8 %3 to i32
%5 = srem i32 %2, %4
%6 = icmp eq i32 %5, 0
%7 = add nsw i32 %2, 20
%8 = add nsw i8 %3, -1
%9 = select i1 %6, i8 %8, i8 19
%10 = select i1 %6, i32 %2, i32 %7
%11 = icmp eq i8 %9, 0
br i1 %11, label %12, label %1
12: ; preds = %1
%13 = tail call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x7e() {
  Assert_real((isascii(126)),
              "/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_isascii.c",
              635, ("isascii should be 1 for ~"));
}


x86 assembly (clang, -O0):
<t_isascii_0x7e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x27b,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x7e>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x27b,%edx
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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for ~\00"
define void @t_isascii_0x7e() {
%1 = call i32 @isascii(i32 126)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 635, i8* getelementptr inbounds ([26 x i8], [26 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for ~\00"
define void @t_isascii_0x7e() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 635, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int /*<<< orphan*/ getwc(int /*<<< orphan*/);
wint_t my_getwc(struct aFILE *fp) { return getwc(_get_actual_fp(fp)); }


x86 assembly (clang, -O0):
<my_getwc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_get_actual_fp@plt>
mov    %eax,%edi
call   1040 <getwc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_getwc>:
push   %rax
call   1030 <_get_actual_fp@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <getwc@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_getwc(%struct.aFILE* %0) {
%2 = alloca %struct.aFILE*
store %struct.aFILE* %0, %struct.aFILE** %2
%3 = load %struct.aFILE*, %struct.aFILE** %2
%4 = call i32 @_get_actual_fp(%struct.aFILE* %3)
%5 = call i32 @getwc(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_getwc(%struct.aFILE* %0) {
%2 = tail call i32 @_get_actual_fp(%struct.aFILE* %0)
%3 = tail call i32 @getwc(i32 %2)
ret i32 %3
}
int do_098() { return 98; }


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

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

LLVM IR (-O0):
define i32 @do_098() {
ret i32 98
}

LLVM IR (-O2):
define i32 @do_098() {
ret i32 98
}
/* Variables and functions */
int FALSE;
int TRUE;
int is_terrain_town(int terrain) {
  switch (terrain) {
  case 64:
  case 65:
  case 66:
  case 67:
    return TRUE;
  default:
    return FALSE;
  }
}


x86 assembly (clang, -O0):
<is_terrain_town>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffc0,%eax
sub    $0x3,%eax
ja     112c <is_terrain_town+0x2c>
jmp    111b <is_terrain_town+0x1b>
mov    0x2ec6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <is_terrain_town+0x38>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_terrain_town>:
and    $0xfffffffc,%edi
cmp    $0x40,%edi
jne    1112 <is_terrain_town+0x12>
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@TRUE = global i32 0
@FALSE = global i32 0
define i32 @is_terrain_town(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 64, label %5
i32 65, label %5
i32 66, label %5
i32 67, label %5
]
5: ; preds = %1, %1, %1, %1
%6 = load i32, i32* @TRUE
store i32 %6, i32* %2
br label %9
7: ; preds = %1
%8 = load i32, i32* @FALSE
store i32 %8, i32* %2
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@TRUE = global i32 0
@FALSE = global i32 0
define i32 @is_terrain_town(i32 %0) {
%2 = and i32 %0, -4
%3 = icmp eq i32 %2, 64
%4 = load i32, i32* @TRUE
%5 = load i32, i32* @FALSE
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
void Usage() { ("Usage: compress [-dfvcV] [-b maxbits] \n"); }


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"Usage: compress [-dfvcV] [-b maxbits] \0A\00"
define void @Usage() {
ret void
}

LLVM IR (-O2):
define void @Usage() {
ret void
}
int fibonacciR(int pIndex) {
  int answer;
  if (pIndex <= 1) {
    answer = pIndex;
  } else {
    answer = fibonacciR(pIndex - 1) + fibonacciR(pIndex - 2);
  }
  return answer;
}


x86 assembly (clang, -O0):
<fibonacciR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jg     1130 <fibonacciR+0x20>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1153 <fibonacciR+0x43>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacciR@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacciR@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacciR>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fibonacciR+0x10>
mov    %ebx,%ecx
jmp    1144 <fibonacciR+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibonacciR@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fibonacciR+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacciR(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibonacciR(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
/* Variables and functions */
int *realloc(int *, int);
void resize(int **a, int cap) { *a = realloc(*a, cap * sizeof(int)); }


x86 assembly (clang, -O0):
<resize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   1030 <realloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resize>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
shl    $0x2,%esi
call   1030 <realloc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @resize(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** %5
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 4
%10 = trunc i64 %9 to i32
%11 = call i32* @realloc(i32* %6, i32 %10)
%12 = load i32**, i32*** %3
store i32* %11, i32** %12
ret void
}

LLVM IR (-O2):
define void @resize(i32** nocapture %0, i32 %1) {
%3 = load i32*, i32** %0
%4 = shl i32 %1, 2
%5 = tail call i32* @realloc(i32* %3, i32 %4)
store i32* %5, i32** %0
ret void
}
void McASPTxEnable(unsigned int baseAddr) {
  (*((volatile unsigned int *)(baseAddr + (0x44)))) |= (0x00000800u);
  while (((*((volatile unsigned int *)(baseAddr + (0x44)))) & (0x00000800u)) !=
         (0x00000800u))
    ;
  (*((volatile unsigned int *)(baseAddr + (0x44)))) |= (0x00001000u);
  while (((*((volatile unsigned int *)(baseAddr + (0x44)))) & (0x00001000u)) !=
         (0x00001000u))
    ;
}


x86 assembly (clang, -O0):
<McASPTxEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x44,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     $0x800,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x44,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x800,%eax
cmp    $0x800,%eax
je     1138 <McASPTxEnable+0x38>
jmp    1119 <McASPTxEnable+0x19>
mov    -0x4(%rbp),%eax
add    $0x44,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     $0x1000,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x44,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x1000,%eax
cmp    $0x1000,%eax
je     1169 <McASPTxEnable+0x69>
jmp    114a <McASPTxEnable+0x4a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPTxEnable>:
add    $0x44,%edi
orl    $0x800,(%rdi)
nopl   0x0(%rax)
testl  $0x800,(%rdi)
je     1110 <McASPTxEnable+0x10>
orl    $0x1000,(%rdi)
xchg   %ax,%ax
testl  $0x1000,(%rdi)
je     1120 <McASPTxEnable+0x20>
ret

LLVM IR (-O0):
define void @McASPTxEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 68
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 2048
store volatile i32 %8, i32* %6
br label %9
9: ; preds = %17, %1
%10 = load i32, i32* %2
%11 = add i32 %10, 68
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = and i32 %14, 2048
%16 = icmp ne i32 %15, 2048
br i1 %16, label %17, label %18
17: ; preds = %9
br label %9
18: ; preds = %9
%19 = load i32, i32* %2
%20 = add i32 %19, 68
%21 = zext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
%23 = load volatile i32, i32* %22
%24 = or i32 %23, 4096
store volatile i32 %24, i32* %22
br label %25
25: ; preds = %33, %18
%26 = load i32, i32* %2
%27 = add i32 %26, 68
%28 = zext i32 %27 to i64
%29 = inttoptr i64 %28 to i32*
%30 = load volatile i32, i32* %29
%31 = and i32 %30, 4096
%32 = icmp ne i32 %31, 4096
br i1 %32, label %33, label %34
33: ; preds = %25
br label %25
34: ; preds = %25
ret void
}

LLVM IR (-O2):
define void @McASPTxEnable(i32 %0) {
%2 = add i32 %0, 68
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = or i32 %5, 2048
store volatile i32 %6, i32* %4
br label %7
7: ; preds = %7, %1
%8 = load volatile i32, i32* %4
%9 = and i32 %8, 2048
%10 = icmp eq i32 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7
%12 = load volatile i32, i32* %4
%13 = or i32 %12, 4096
store volatile i32 %13, i32* %4
br label %14
14: ; preds = %14, %11
%15 = load volatile i32, i32* %4
%16 = and i32 %15, 4096
%17 = icmp eq i32 %16, 0
br i1 %17, label %14, label %18
18: ; preds = %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kmp_search(char *, char *);
void main() {
  char *txt = "ABABDABACDABABCABAB";
  char *pat = "ABABCABAB";
  kmp_search(txt, pat);
  return;
}


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

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <kmp_search@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"ABABDABACDABABCABAB\00"
@.str.1 = [10 x i8] c"ABABCABAB\00"
define void @main() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @kmp_search(i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"ABABDABACDABABCABAB\00"
@.str.1 = [10 x i8] c"ABABCABAB\00"
define void @main() {
%1 = tail call i32 @kmp_search(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ execve(char *, char **, char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char *void_array[] = {NULL};
  if (argc == 0)
    exit(EXIT_SUCCESS);
  execve("/proc/self/exe", void_array, void_array);
  exit(EXIT_FAILURE);
}


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)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
cmpl   $0x0,-0x8(%rbp)
jne    116e <main+0x3e>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
lea    -0x18(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    0xe83(%rip),%rdi
call   1040 <execve@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movq   $0x0,(%rsp)
test   %edi,%edi
jne    113b <main+0x1b>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
lea    0xebe(%rip),%rdi
mov    %rsp,%rdx
mov    %rdx,%rsi
call   1030 <execve@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@.str = [15 x i8] c"/proc/self/exe\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [1 x i8*]* %6 to i8*
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* @EXIT_SUCCESS
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = getelementptr inbounds [1 x i8*], [1 x i8*]* %6, i64 0, i64 0
%15 = getelementptr inbounds [1 x i8*], [1 x i8*]* %6, i64 0, i64 0
%16 = call i32 @execve(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %14, i8** %15)
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@.str = [15 x i8] c"/proc/self/exe\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1 x i8*]
%4 = bitcast [1 x i8*]* %3 to i8*
%5 = bitcast [1 x i8*]* %3 to i64*
store i64 0, i64* %5
%6 = icmp eq i32 %0, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* @EXIT_SUCCESS
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds [1 x i8*], [1 x i8*]* %3, i64 0, i64 0
%12 = call i32 @execve(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %11, i8** %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_output {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_set_user_data(struct wl_proxy *, void *);
void wl_output_set_user_data(struct wl_output *wl_output, void *user_data) {
  wl_proxy_set_user_data((struct wl_proxy *)wl_output, user_data);
}


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

x86 assembly (clang, -O2):
<wl_output_set_user_data>:
jmp    1030 <wl_proxy_set_user_data@plt>

LLVM IR (-O0):
%struct.wl_output = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_output_set_user_data(%struct.wl_output* %0, i8* %1) {
%3 = alloca %struct.wl_output*
%4 = alloca i8*
store %struct.wl_output* %0, %struct.wl_output** %3
store i8* %1, i8** %4
%5 = load %struct.wl_output*, %struct.wl_output** %3
%6 = bitcast %struct.wl_output* %5 to %struct.wl_proxy*
%7 = load i8*, i8** %4
%8 = call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %6, i8* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_output = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_output_set_user_data(%struct.wl_output* %0, i8* %1) {
%3 = bitcast %struct.wl_output* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %3, i8* %1)
ret void
}
int DynamicLibrary1ExtraFunction() { return 128; }


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

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

LLVM IR (-O0):
define i32 @DynamicLibrary1ExtraFunction() {
ret i32 128
}

LLVM IR (-O2):
define i32 @DynamicLibrary1ExtraFunction() {
ret i32 128
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr,
          "This program demonstrates the new tesselator API in GLU 1.2.\n");
  fprintf(stderr,
          "Your GLU library does not support this new interface, sorry.\n");
  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    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xef3(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0f(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"This program demonstrates the new tesselator API in GLU 1.2.\0A\00"
@.str.1 = [62 x i8] c"Your GLU library does not support this new interface, sorry.\0A\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 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"This program demonstrates the new tesselator API in GLU 1.2.\0A\00"
@.str.1 = [62 x i8] c"Your GLU library does not support this new interface, sorry.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ sbphostn32n(int *, char *, int /*<<< orphan*/);
void sbphostn32n__(int *ierr, char *name, uint32_t namelen) {
  sbphostn32n(ierr, name, namelen);
}


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

x86 assembly (clang, -O2):
<sbphostn32n__>:
jmp    1030 <sbphostn32n@plt>

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

LLVM IR (-O2):
define void @sbphostn32n__(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sbphostn32n(i32* %0, i8* %1, i32 %2)
ret void
}
int glutCreateSubWindow(int win, int x, int y, int width, int height) {
  return 0;
}


x86 assembly (clang, -O0):
<glutCreateSubWindow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @glutCreateSubWindow(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @glutCreateSubWindow(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ msleep_interruptible(unsigned int);
void ii2DelayTimer(unsigned int mseconds) { msleep_interruptible(mseconds); }


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

x86 assembly (clang, -O2):
<ii2DelayTimer>:
jmp    1030 <msleep_interruptible@plt>

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

LLVM IR (-O2):
define void @ii2DelayTimer(i32 %0) {
%2 = tail call i32 @msleep_interruptible(i32 %0)
ret void
}
void foo_1_1_2_2_1_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_2_1_2_1_1_1() {
ret void
}
int _fib(int x0, int x1, int n) {
  if (n == 0)
    return x0;
  else
    return _fib(x1, (x0 + x1), (n - 1));
}


x86 assembly (clang, -O0):
<_fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1136 <_fib+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <_fib+0x3d>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
sub    $0x1,%edx
call   1030 <_fib@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fib>:
mov    %edi,%eax
test   %edx,%edx
je     1155 <_fib+0x55>
lea    -0x1(%rdx),%r8d
mov    %edx,%r9d
and    $0x7,%r9d
je     1132 <_fib+0x32>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%edi
mov    %esi,%eax
mov    %edi,%esi
add    %eax,%esi
add    $0x1,%ecx
cmp    %ecx,%r9d
jne    1120 <_fib+0x20>
sub    %ecx,%edx
cmp    $0x7,%r8d
jb     1155 <_fib+0x55>
nopl   0x0(%rax,%rax,1)
add    %esi,%eax
add    %eax,%esi
add    %esi,%eax
add    %eax,%esi
add    %esi,%eax
add    %eax,%esi
add    %esi,%eax
add    %eax,%esi
add    $0xfffffff8,%edx
jne    1140 <_fib+0x40>
ret

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

LLVM IR (-O2):
define i32 @_fib(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %38, label %5
5: ; preds = %3
%6 = add i32 %2, -1
%7 = and i32 %2, 7
%8 = icmp eq i32 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %5, %9
%10 = phi i32 [ %15, %9 ], [ %2, %5 ]
%11 = phi i32 [ %14, %9 ], [ %1, %5 ]
%12 = phi i32 [ %11, %9 ], [ %0, %5 ]
%13 = phi i32 [ %16, %9 ], [ 0, %5 ]
%14 = add nsw i32 %11, %12
%15 = add nsw i32 %10, -1
%16 = add i32 %13, 1
%17 = icmp eq i32 %16, %7
br i1 %17, label %18, label %9
18: ; preds = %9, %5
%19 = phi i32 [ undef, %5 ], [ %11, %9 ]
%20 = phi i32 [ %2, %5 ], [ %15, %9 ]
%21 = phi i32 [ %1, %5 ], [ %14, %9 ]
%22 = phi i32 [ %0, %5 ], [ %11, %9 ]
%23 = icmp ult i32 %6, 7
br i1 %23, label %38, label %24
24: ; preds = %18, %24
%25 = phi i32 [ %36, %24 ], [ %20, %18 ]
%26 = phi i32 [ %35, %24 ], [ %21, %18 ]
%27 = phi i32 [ %34, %24 ], [ %22, %18 ]
%28 = add nsw i32 %26, %27
%29 = add nsw i32 %28, %26
%30 = add nsw i32 %29, %28
%31 = add nsw i32 %30, %29
%32 = add nsw i32 %31, %30
%33 = add nsw i32 %32, %31
%34 = add nsw i32 %33, %32
%35 = add nsw i32 %34, %33
%36 = add nsw i32 %25, -8
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %24
38: ; preds = %18, %24, %3
%39 = phi i32 [ %0, %3 ], [ %19, %18 ], [ %34, %24 ]
ret i32 %39
}
/* Variables and functions */
double exp(double const);
double const pow(double const, int);
double grad_inverse_logit(const double y) {
  const double exp_y = exp(y);
  return exp_y / pow(exp_y + 1.0, 2);
}


x86 assembly (clang, -O0):
<grad_inverse_logit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb2(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grad_inverse_logit>:
push   %rax
call   1030 <exp@plt>
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  0xec9(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @grad_inverse_logit(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @exp(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = load double, double* %3
%8 = fadd double %7, 1.000000e+00
%9 = call double @pow(double %8, i32 2)
%10 = fdiv double %6, %9
ret double %10
}

LLVM IR (-O2):
define double @grad_inverse_logit(double %0) {
%2 = tail call double @exp(double %0)
%3 = fadd double %2, 1.000000e+00
%4 = tail call double @pow(double %3, i32 2)
%5 = fdiv double %2, %4
ret double %5
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
main() {
  int c = getchar();
  while (c != EOF) {
    putchar(c);
    c = getchar();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ea5(%rip),%rcx
cmp    (%rcx),%eax
je     1162 <main+0x42>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    1139 <main+0x19>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret i32 0
}
/* Type definitions */
struct hash_map {
  int dummy;
};

/* Variables and functions */
scalar_t__ hmap_find_member(struct hash_map const *, char const *,
                            unsigned int);
int hmap_is_member(const struct hash_map *ht, const char *key_str,
                   unsigned int len) {
  if (hmap_find_member(ht, key_str, len))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<hmap_is_member>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <hmap_find_member@plt>
cmp    $0x0,%rax
je     1149 <hmap_is_member+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1150 <hmap_is_member+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmap_is_member>:
push   %rax
call   1030 <hmap_find_member@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.hash_map = type { i32 }
define i32 @hmap_is_member(%struct.hash_map* %0, i8* %1, i32 %2) {
%4 = tail call i64 @hmap_find_member(%struct.hash_map* %0, i8* %1, i32 %2)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Debug_FreeComparisonLists();
void Debug_Finish(void) { Debug_FreeComparisonLists(); }


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

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

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

LLVM IR (-O2):
define void @Debug_Finish() {
%1 = tail call i32 (...) @Debug_FreeComparisonLists()
ret void
}