xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ die(char *, size_t);
void *malloc(size_t);
void *checkedMalloc(size_t size) {
  void *data = malloc(size);
  if (data == NULL) {
    die("failed to allocate %zu bytes", size);
  }
  return data;
}


x86 assembly (clang, -O0):
<checkedMalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <checkedMalloc+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkedMalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <checkedMalloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [29 x i8] c"failed to allocate %zu bytes\00"
define i8* @checkedMalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [29 x i8] c"failed to allocate %zu bytes\00"
define noalias i8* @checkedMalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello, ");
  printf("world");
  printf("\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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"hello, \00"
@.str.1 = [6 x i8] c"world\00"
@.str.2 = [2 x i8] c"\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 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"hello, \00"
@.str.1 = [6 x i8] c"world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret i32 0
}
void SHA1_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @SHA1_Init() {
ret void
}
/* Variables and functions */
int __syscall_flock(int, int);
int flock(int fd, int operation) { return (__syscall_flock(fd, operation)); }


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

x86 assembly (clang, -O2):
<flock>:
jmp    1030 <__syscall_flock@plt>

LLVM IR (-O0):
define i32 @flock(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 @__syscall_flock(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @flock(i32 %0, i32 %1) {
%3 = tail call i32 @__syscall_flock(i32 %0, i32 %1)
ret i32 %3
}
void INT_Excep_RIIC1_ICEEI1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RIIC1_ICEEI1() {
ret void
}
/* Type definitions */
struct pool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pool_free1(struct pool *, int /*<<< orphan*/ *);
void pool_free(struct pool *p) { pool_free1(p, NULL); }


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

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

LLVM IR (-O0):
%struct.pool = type { i32 }
define void @pool_free(%struct.pool* %0) {
%2 = alloca %struct.pool*
store %struct.pool* %0, %struct.pool** %2
%3 = load %struct.pool*, %struct.pool** %2
%4 = call i32 @pool_free1(%struct.pool* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.pool = type { i32 }
define void @pool_free(%struct.pool* %0) {
%2 = tail call i32 @pool_free1(%struct.pool* %0, i32* null)
ret void
}
/* Variables and functions */
size_t get_hostname_max(void) { return 64; }


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

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

LLVM IR (-O0):
define i64 @get_hostname_max() {
ret i64 64
}

LLVM IR (-O2):
define i64 @get_hostname_max() {
ret i64 64
}
void test45_Test5_pollen__run__E() {}


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

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

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

LLVM IR (-O2):
define void @test45_Test5_pollen__run__E() {
ret void
}
unsigned char *foo2(unsigned char *to, const unsigned char *from, int n) {
  switch (n) {
  case 3:
    *to = *from;
    break;
  case 5:
    to[4] = from[4];
    break;
  }
  return to;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
sub    $0x3,%eax
je     1134 <foo2+0x34>
jmp    1123 <foo2+0x23>
mov    -0x18(%rbp),%eax
sub    $0x5,%eax
je     1145 <foo2+0x45>
jmp    1153 <foo2+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    1153 <foo2+0x53>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x4(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
mov    %rdi,%rax
cmp    $0x5,%edx
je     1112 <foo2+0x12>
cmp    $0x3,%edx
jne    1118 <foo2+0x18>
mov    (%rsi),%cl
mov    %cl,(%rax)
ret
mov    0x4(%rsi),%cl
mov    %cl,0x4(%rax)
ret

LLVM IR (-O0):
define i8* @foo2(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
switch i32 %7, label %18 [
i32 3, label %8
i32 5, label %12
]
8: ; preds = %3
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = load i8*, i8** %4
store i8 %10, i8* %11
br label %18
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i64 4
%15 = load i8, i8* %14
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 4
store i8 %15, i8* %17
br label %18
18: ; preds = %3, %12, %8
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
define i8* @foo2(i8* returned writeonly %0, i8* nocapture %1, i32 %2) {
switch i32 %2, label %10 [
i32 3, label %4
i32 5, label %6
]
4: ; preds = %3
%5 = load i8, i8* %1
store i8 %5, i8* %0
br label %10
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %1, i64 4
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 4
store i8 %8, i8* %9
br label %10
10: ; preds = %3, %6, %4
ret i8* %0
}
/* Type definitions */
struct fofPos {
  int dummy;
};
struct fof {
  int dummy;
};

/* Variables and functions */
int fofSearch(struct fof *, char *, int /*<<< orphan*/, int /*<<< orphan*/,
              struct fofPos *);
int /*<<< orphan*/ strlen(char *);
int fofFind(struct fof *fof, char *name, struct fofPos *retPos) {
  return fofSearch(fof, name, strlen(name), 0, retPos);
}


x86 assembly (clang, -O0):
<fofFind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    -0x18(%rbp),%r8
xor    %ecx,%ecx
call   1040 <fofSearch@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fofFind>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    %r14,%r8
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <fofSearch@plt>

LLVM IR (-O0):
%struct.fof = type { i32 }
%struct.fofPos = type { i32 }
define i32 @fofFind(%struct.fof* %0, i8* %1, %struct.fofPos* %2) {
%4 = alloca %struct.fof*
%5 = alloca i8*
%6 = alloca %struct.fofPos*
store %struct.fof* %0, %struct.fof** %4
store i8* %1, i8** %5
store %struct.fofPos* %2, %struct.fofPos** %6
%7 = load %struct.fof*, %struct.fof** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @strlen(i8* %9)
%11 = load %struct.fofPos*, %struct.fofPos** %6
%12 = call i32 @fofSearch(%struct.fof* %7, i8* %8, i32 %10, i32 0, %struct.fofPos* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.fof = type { i32 }
%struct.fofPos = type { i32 }
define i32 @fofFind(%struct.fof* %0, i8* %1, %struct.fofPos* %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @fofSearch(%struct.fof* %0, i8* %1, i32 %4, i32 0, %struct.fofPos* %2)
ret i32 %5
}
/* Variables and functions */
int *malloc(int);
int *f(int a) {
  int *b = malloc(a * 4);
  return b;
}


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

x86 assembly (clang, -O2):
<f>:
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 4
%6 = call i32* @malloc(i32 %5)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
ret i32* %7
}

LLVM IR (-O2):
define noalias i32* @f(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = tail call i32* @malloc(i32 %2)
ret i32* %3
}
int main() { return 1 % 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 poison
}
/* Type definitions */
struct b6_sref {
  int dummy;
};
struct b6_deque {
  int dummy;
};

/* Variables and functions */
struct b6_sref *b6_deque_del_after(struct b6_deque *, int /*<<< orphan*/);
int /*<<< orphan*/ b6_deque_head(struct b6_deque *);
struct b6_sref *b6_deque_del_first(struct b6_deque *deque) {
  return b6_deque_del_after(deque, b6_deque_head(deque));
}


x86 assembly (clang, -O0):
<b6_deque_del_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <b6_deque_head@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <b6_deque_del_after@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b6_deque_del_first>:
push   %rbx
mov    %rdi,%rbx
call   1040 <b6_deque_head@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <b6_deque_del_after@plt>

LLVM IR (-O0):
%struct.b6_sref = type { i32 }
%struct.b6_deque = type { i32 }
define %struct.b6_sref* @b6_deque_del_first(%struct.b6_deque* %0) {
%2 = alloca %struct.b6_deque*
store %struct.b6_deque* %0, %struct.b6_deque** %2
%3 = load %struct.b6_deque*, %struct.b6_deque** %2
%4 = load %struct.b6_deque*, %struct.b6_deque** %2
%5 = call i32 @b6_deque_head(%struct.b6_deque* %4)
%6 = call %struct.b6_sref* @b6_deque_del_after(%struct.b6_deque* %3, i32 %5)
ret %struct.b6_sref* %6
}

LLVM IR (-O2):
%struct.b6_sref = type { i32 }
%struct.b6_deque = type { i32 }
define %struct.b6_sref* @b6_deque_del_first(%struct.b6_deque* %0) {
%2 = tail call i32 @b6_deque_head(%struct.b6_deque* %0)
%3 = tail call %struct.b6_sref* @b6_deque_del_after(%struct.b6_deque* %0, i32 %2)
ret %struct.b6_sref* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int PlusFunc(int argc, char **argv) {
  int a, b, c;
  scanf("%d", &a);
  scanf("%d", &b);
  c = a + b;
  printf("The result is %d\n", c);
  return 1;
}


x86 assembly (clang, -O0):
<PlusFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PlusFunc>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
add    0xc(%rsp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [18 x i8] c"The result is %d\0A\00"
define i32 @PlusFunc(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 1
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [18 x i8] c"The result is %d\0A\00"
define i32 @PlusFunc(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %10, %9
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 1
}
/* Variables and functions */
int strcmp(char const *, char const *);
int pstrcmp(const void *a, const void *b) {
  return strcmp((const char *)*(char **)a, (const char *)*(char **)b);
}


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

x86 assembly (clang, -O2):
<pstrcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @pstrcmp(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @pstrcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
char *hash_plugin_detailed(void) {
  return ("vbulletin - A simple md5(md5(pass).salt) plugin (vBulletin)\n"
          "------------------------\n"
          "Use this module to crack md5(md5(pass).salt) hashes\n"
          "Input should be in form: \'user:hash:salt\' or just \'hash:salt\'\n"
          "Note that the dilimiter is whitespace, not ':'\n"
          "Known software that uses this password hashing method:\n"
          "vBulletin, IceBB, etc\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [369 x i8] c"vbulletin - A simple md5(md5(pass).salt) plugin (vBulletin)\0A------------------------\0AUse this module to crack md5(md5(pass).salt) hashes\0AInput should be in form: 'user:hash:salt' or just 'hash:salt'\0ANote that the dilimiter is whitespace, not ':'\0AKnown software that uses this password hashing method:\0AvBulletin, IceBB, etc\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([369 x i8], [369 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [369 x i8] c"vbulletin - A simple md5(md5(pass).salt) plugin (vBulletin)\0A------------------------\0AUse this module to crack md5(md5(pass).salt) hashes\0AInput should be in form: 'user:hash:salt' or just 'hash:salt'\0ANote that the dilimiter is whitespace, not ':'\0AKnown software that uses this password hashing method:\0AvBulletin, IceBB, etc\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([369 x i8], [369 x i8]* @.str, i64 0, i64 0)
}
int plus_one(int x) { return x + 1; }


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

x86 assembly (clang, -O2):
<plus_one>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @plus_one(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @plus_one(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int execute_clock_getres() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_clock_getres() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
int /*<<< orphan*/ sesc_exit(int /*<<< orphan*/);
void *print_hello_world(void *threadid) {
  printf("/n%d: Hello World!/n", threadid);
  sesc_exit(0);
}


x86 assembly (clang, -O0):
<print_hello_world>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <sesc_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hello_world>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <sesc_exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"/n%d: Hello World!/n\00"
define i8* @print_hello_world(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @sesc_exit(i32 0)
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
@.str = [21 x i8] c"/n%d: Hello World!/n\00"
define noalias i8* @print_hello_world(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @sesc_exit(i32 0)
ret i8* undef
}
int reset_controller(bn)
int bn;
{
  char bbn;
  bbn = (char)bn;
  return (pvInitCapture(bbn));
}


x86 assembly (clang, -O0):
<reset_controller>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
mov    $0x0,%al
call   1030 <pvInitCapture@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_controller>:
movsbl %dil,%edi
xor    %eax,%eax
jmp    1030 <pvInitCapture@plt>

LLVM IR (-O0):
define i32 @reset_controller(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = call i32 (i32, ...) bitcast (i32 (...)* @pvInitCapture to i32 (i32, ...)*)(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @reset_controller(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @pvInitCapture to i32 (i32, ...)*)(i32 %3)
ret i32 %4
}
int hash(char *name) {
  register int hashval = 0;
  while (*name)
    hashval += *name++;
  return (hashval & 256 - 1);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1139 <hash+0x39>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     1124 <hash+0x24>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movzbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
movzbl %cl,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = zext i8 %5 to i32
%10 = add i32 %6, %9
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = and i32 %10, 255
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
int cmp_int_desc(const void *a, const void *b) { return *(int *)b - *(int *)a; }


x86 assembly (clang, -O0):
<cmp_int_desc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_int_desc>:
mov    (%rsi),%eax
sub    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_int_desc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ ff_bfin_put_pixels16uc_nornd(int /*<<< orphan*/ *,
                                                int /*<<< orphan*/ const *,
                                                int /*<<< orphan*/ const *,
                                                int /*<<< orphan*/, int);
void bfin_put_pixels16_x2_nornd(uint8_t *block, const uint8_t *pixels,
                                ptrdiff_t line_size, int h) {
  ff_bfin_put_pixels16uc_nornd(block, pixels, pixels + 1, line_size, h);
}


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

x86 assembly (clang, -O2):
<bfin_put_pixels16_x2_nornd>:
mov    %ecx,%r8d
mov    %edx,%ecx
lea    0x4(%rsi),%rdx
jmp    1030 <ff_bfin_put_pixels16uc_nornd@plt>

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

LLVM IR (-O2):
define void @bfin_put_pixels16_x2_nornd(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = tail call i32 @ff_bfin_put_pixels16uc_nornd(i32* %0, i32* %1, i32* %5, i32 %2, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
void closefile(FILE *file, int type) {
  if (type == 1)
    fclose(file);
  if (type == 2)
    pclose(file);
}


x86 assembly (clang, -O0):
<closefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1142 <closefile+0x22>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
cmpl   $0x2,-0xc(%rbp)
jne    1155 <closefile+0x35>
mov    -0x8(%rbp),%rdi
call   1040 <pclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closefile>:
cmp    $0x2,%esi
je     112f <closefile+0xf>
cmp    $0x1,%esi
jne    1134 <closefile+0x14>
jmp    1030 <fclose@plt>
jmp    1040 <pclose@plt>
ret

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

LLVM IR (-O2):
define void @closefile(i32* nocapture %0, i32 %1) {
switch i32 %1, label %7 [
i32 1, label %3
i32 2, label %5
]
3: ; preds = %2
%4 = tail call i32 @fclose(i32* %0)
br label %7
5: ; preds = %2
%6 = tail call i32 @pclose(i32* %0)
br label %7
7: ; preds = %3, %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putc(char const, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usleep(int);
void output(const char *msg) {
  while (*msg != '\0') {
    putc(*msg, stdout);
    usleep(100);
    msg += 1;
  }
  return;
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116e <output+0x4e>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    0x2e97(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
mov    $0x64,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <output+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1160 <output+0x40>
mov    %rdi,%rbx
add    $0x1,%rbx
mov    0x2ea8(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r14),%esi
movsbl %al,%edi
call   1030 <putc@plt>
mov    $0x64,%edi
call   1040 <usleep@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <output+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @output(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = load i32, i32* @stdout
%12 = call i32 @putc(i8 signext %10, i32 %11)
%13 = call i32 @usleep(i32 100)
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %2
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @output(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = load i32, i32* @stdout
%8 = tail call i32 @putc(i8 signext %5, i32 %7)
%9 = tail call i32 @usleep(i32 100)
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Type definitions */
struct label_struct {
  int dummy;
};

/* Variables and functions */
int errno;
int syscall(int, struct label_struct *);
int replace_label_tcb(struct label_struct *label) {
  int rv = syscall(334, label);
  return rv ? -errno : 0;
}


x86 assembly (clang, -O0):
<replace_label_tcb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x14e,%edi
call   1030 <syscall@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114a <replace_label_tcb+0x3a>
xor    %eax,%eax
mov    0x2ea0(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <replace_label_tcb+0x44>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <replace_label_tcb+0x44>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace_label_tcb>:
push   %rax
mov    %rdi,%rsi
mov    $0x14e,%edi
call   1030 <syscall@plt>
mov    0x2ebb(%rip),%rcx
xor    %edx,%edx
sub    (%rcx),%edx
test   %eax,%eax
cmovne %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.label_struct = type { i32 }
@errno = global i32 0
define i32 @replace_label_tcb(%struct.label_struct* %0) {
%2 = alloca %struct.label_struct*
%3 = alloca i32
store %struct.label_struct* %0, %struct.label_struct** %2
%4 = load %struct.label_struct*, %struct.label_struct** %2
%5 = call i32 @syscall(i32 334, %struct.label_struct* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @errno
%10 = sub nsw i32 0, %9
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %8
%13 = phi i32 [ %10, %8 ], [ 0, %11 ]
ret i32 %13
}

LLVM IR (-O2):
%struct.label_struct = type { i32 }
@errno = global i32 0
define i32 @replace_label_tcb(%struct.label_struct* %0) {
%2 = tail call i32 @syscall(i32 334, %struct.label_struct* %0)
%3 = icmp eq i32 %2, 0
%4 = load i32, i32* @errno
%5 = sub nsw i32 0, %4
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xd3() {
  Assert_real((isalnum(211) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1060, ("isalnum should be 0 for 0xd3"));
}


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

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

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

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

/* Variables and functions */
scalar_t__ kill(int, int /*<<< orphan*/);
scalar_t__ process_exists(int);
int look_for_process_by_pid(pid_t pid) {
  if (process_exists(pid))
    return (kill(pid, 0) == 0) ? pid : -pid;
  return 0;
}


x86 assembly (clang, -O0):
<look_for_process_by_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <process_exists@plt>
cmp    $0x0,%rax
je     116f <look_for_process_by_pid+0x4f>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1040 <kill@plt>
cmp    $0x0,%rax
jne    115c <look_for_process_by_pid+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1164 <look_for_process_by_pid+0x44>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1176 <look_for_process_by_pid+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<look_for_process_by_pid>:
push   %rbx
mov    %edi,%ebx
call   1030 <process_exists@plt>
test   %rax,%rax
je     1145 <look_for_process_by_pid+0x25>
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <kill@plt>
mov    %rax,%rcx
mov    %ebx,%eax
neg    %eax
test   %rcx,%rcx
cmove  %ebx,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @look_for_process_by_pid(i32 %0) {
%2 = tail call i64 @process_exists(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i64 @kill(i32 %0, i32 0)
%6 = icmp eq i64 %5, 0
%7 = sub nsw i32 0, %0
%8 = select i1 %6, i32 %0, i32 %7
br label %9
9: ; preds = %1, %4
%10 = phi i32 [ %8, %4 ], [ 0, %1 ]
ret i32 %10
}
int compare_int_keys_gt(void *key1, void *key2) {
  int key1_v = *((int *)key1);
  int key2_v = *((int *)key2);
  if (key1_v >= key2_v)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<compare_int_keys_gt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jl     1136 <compare_int_keys_gt+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <compare_int_keys_gt+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int_keys_gt>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setge  %al
ret

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

LLVM IR (-O2):
define i32 @compare_int_keys_gt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sge i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ __NR_arch_prctl;
long syscall2(int /*<<< orphan*/, int, long);
long sys_arch_prctl(int code, long arg) {
  return syscall2(__NR_arch_prctl, code, arg);
}


x86 assembly (clang, -O0):
<sys_arch_prctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <syscall2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_arch_prctl>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall2@plt>

LLVM IR (-O0):
@__NR_arch_prctl = global i32 0
define i64 @sys_arch_prctl(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* @__NR_arch_prctl
%6 = load i32, i32* %3
%7 = load i64, i64* %4
%8 = call i64 @syscall2(i32 %5, i32 %6, i64 %7)
ret i64 %8
}

LLVM IR (-O2):
@__NR_arch_prctl = global i32 0
define i64 @sys_arch_prctl(i32 %0, i64 %1) {
%3 = load i32, i32* @__NR_arch_prctl
%4 = tail call i64 @syscall2(i32 %3, i32 %0, i64 %1)
ret i64 %4
}
void XHeightMMOfScreen() {}


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

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

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

LLVM IR (-O2):
define void @XHeightMMOfScreen() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void blah(void) {
  printf("In blah\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<blah>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<blah>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"In blah\0A\00"
@stdout = global i32 0
define void @blah() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [8 x i8] c"In blah\00"
define void @blah() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
int maior(int, int);
int /*<<< orphan*/ printf(char *, int);
main() {
  printf("O maior número entre 8 e 10 eh: %d", maior(8, 10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
mov    $0xa,%esi
call   1040 <maior@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
mov    $0xa,%esi
call   1040 <maior@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"O maior n\C3\BAmero entre 8 e 10 eh: %d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @maior(i32 8, i32 10)
%3 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"O maior n\C3\BAmero entre 8 e 10 eh: %d\00"
define i32 @main() {
%1 = tail call i32 @maior(i32 8, i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ force_mb_all_threads();
int /*<<< orphan*/ internal_urcu_lock();
int /*<<< orphan*/ internal_urcu_unlock();
int /*<<< orphan*/ switch_next_urcu_qparity();
int /*<<< orphan*/ wait_for_quiescent_state();
void synchronize_rcu(void) {
  internal_urcu_lock();
  force_mb_all_threads();
  switch_next_urcu_qparity();
  wait_for_quiescent_state();
  switch_next_urcu_qparity();
  wait_for_quiescent_state();
  force_mb_all_threads();
  internal_urcu_unlock();
}


x86 assembly (clang, -O0):
<synchronize_rcu>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <internal_urcu_lock@plt>
mov    $0x0,%al
call   1070 <force_mb_all_threads@plt>
mov    $0x0,%al
call   1040 <switch_next_urcu_qparity@plt>
mov    $0x0,%al
call   1060 <wait_for_quiescent_state@plt>
mov    $0x0,%al
call   1040 <switch_next_urcu_qparity@plt>
mov    $0x0,%al
call   1060 <wait_for_quiescent_state@plt>
mov    $0x0,%al
call   1070 <force_mb_all_threads@plt>
mov    $0x0,%al
call   1050 <internal_urcu_unlock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<synchronize_rcu>:
push   %rax
xor    %eax,%eax
call   1030 <internal_urcu_lock@plt>
xor    %eax,%eax
call   1070 <force_mb_all_threads@plt>
xor    %eax,%eax
call   1040 <switch_next_urcu_qparity@plt>
xor    %eax,%eax
call   1060 <wait_for_quiescent_state@plt>
xor    %eax,%eax
call   1040 <switch_next_urcu_qparity@plt>
xor    %eax,%eax
call   1060 <wait_for_quiescent_state@plt>
xor    %eax,%eax
call   1070 <force_mb_all_threads@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <internal_urcu_unlock@plt>

LLVM IR (-O0):
define void @synchronize_rcu() {
%1 = call i32 (...) @internal_urcu_lock()
%2 = call i32 (...) @force_mb_all_threads()
%3 = call i32 (...) @switch_next_urcu_qparity()
%4 = call i32 (...) @wait_for_quiescent_state()
%5 = call i32 (...) @switch_next_urcu_qparity()
%6 = call i32 (...) @wait_for_quiescent_state()
%7 = call i32 (...) @force_mb_all_threads()
%8 = call i32 (...) @internal_urcu_unlock()
ret void
}

LLVM IR (-O2):
define void @synchronize_rcu() {
%1 = tail call i32 (...) @internal_urcu_lock()
%2 = tail call i32 (...) @force_mb_all_threads()
%3 = tail call i32 (...) @switch_next_urcu_qparity()
%4 = tail call i32 (...) @wait_for_quiescent_state()
%5 = tail call i32 (...) @switch_next_urcu_qparity()
%6 = tail call i32 (...) @wait_for_quiescent_state()
%7 = tail call i32 (...) @force_mb_all_threads()
%8 = tail call i32 (...) @internal_urcu_unlock()
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *strclone(const char *source) {
  int length;
  char *clone;
  if (source == NULL)
    return NULL;
  length = strlen(source) + 1;
  clone = malloc(length);
  strcpy(clone, source);
}


x86 assembly (clang, -O0):
<strclone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <strclone+0x24>
movq   $0x0,-0x8(%rbp)
jmp    117c <strclone+0x4c>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strclone>:
test   %rdi,%rdi
je     1152 <strclone+0x22>
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
pop    %rbx
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @strclone(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i8* @malloc(i32 %5)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %8
8: ; preds = %1, %3
ret i8* null
}
int test_imm_8Fint8_mem(signed char *val) {
  return ((*val) & (-0x8F << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Fint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff71,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Fint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -143
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}