xunge/DecIR huggingface dataset:
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, long);
int main(int argc, char *argv[]) {
  int a, b;
  a = atoi(argv[1]);
  b = atoi(argv[2]);
  long result;
  if (a > b) {
    result = 2147483647L;
  } else {
    result = 0L;
  }
  printf("%ld\n", result);
  return 0;
}


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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    116f <main+0x4f>
movq   $0x7fffffff,-0x20(%rbp)
7f
jmp    1177 <main+0x57>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
mov    $0x7fffffff,%esi
cmovle %rcx,%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %2
store i64 2147483647, i64* %8
br label %22
21: ; preds = %2
store i64 0, i64* %8
br label %22
22: ; preds = %21, %20
%23 = load i64, i64* %8
%24 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = icmp sgt i32 %5, %8
%10 = select i1 %9, i64 2147483647, i64 0
%11 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %10)
ret i32 0
}
int XGetStandardColormap() {}


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

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

LLVM IR (-O0):
define i32 @XGetStandardColormap() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XGetStandardColormap() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assume(int *);
int /*<<< orphan*/ assert(int);
int *malloc(int);
int main() {
  int *p, *q;
  q = p = malloc(sizeof(int));
  __ESBMC_assume(q);
  *p = 2;
  p = malloc(sizeof(int));
  __ESBMC_assume(p);
  *p = 3;
  assert(*q == 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <__ESBMC_assume@plt>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__ESBMC_assume@plt>
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x3,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1030 <__ESBMC_assume@plt>
movl   $0x2,(%r14)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <__ESBMC_assume@plt>
movl   $0x3,(%rbx)
xor    %edi,%edi
cmpl   $0x3,(%r14)
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i32* @malloc(i32 4)
store i32* %3, i32** %1
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @__ESBMC_assume(i32* %4)
%6 = load i32*, i32** %1
store i32 2, i32* %6
%7 = call i32* @malloc(i32 4)
store i32* %7, i32** %1
%8 = load i32*, i32** %1
%9 = call i32 @__ESBMC_assume(i32* %8)
%10 = load i32*, i32** %1
store i32 3, i32* %10
%11 = load i32*, i32** %2
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 3
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
%2 = tail call i32 @__ESBMC_assume(i32* %1)
store i32 2, i32* %1
%3 = tail call i32* @malloc(i32 4)
%4 = tail call i32 @__ESBMC_assume(i32* %3)
store i32 3, i32* %3
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 3
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i32 0
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_sk_zero(int /*<<< orphan*/ *);
void sk_OPENSSL_BLOCK_zero(struct stack_st_OPENSSL_BLOCK *sk) {
  OPENSSL_sk_zero((OPENSSL_STACK *)sk);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_zero>:
jmp    1030 <OPENSSL_sk_zero@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define void @sk_OPENSSL_BLOCK_zero(%struct.stack_st_OPENSSL_BLOCK* %0) {
%2 = alloca %struct.stack_st_OPENSSL_BLOCK*
store %struct.stack_st_OPENSSL_BLOCK* %0, %struct.stack_st_OPENSSL_BLOCK** %2
%3 = load %struct.stack_st_OPENSSL_BLOCK*, %struct.stack_st_OPENSSL_BLOCK** %2
%4 = bitcast %struct.stack_st_OPENSSL_BLOCK* %3 to i32*
%5 = call i32 @OPENSSL_sk_zero(i32* %4)
ret void
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define void @sk_OPENSSL_BLOCK_zero(%struct.stack_st_OPENSSL_BLOCK* %0) {
%2 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%3 = tail call i32 @OPENSSL_sk_zero(i32* %2)
ret void
}
A0AX1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((*((unsigned int *)10000000)) <= (((unsigned int *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<A0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x989680,%eax
mov    (%rax),%eax
movslq -0x14(%rbp),%rdx
mov    $0xa98ac7,%ecx
cmp    (%rcx,%rdx,4),%eax
ja     113d <A0AX1+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <A0AX1+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0AX1>:
mov    0x989680,%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(,%rcx,4),%edx
setbe  %al
ret

LLVM IR (-O0):
define i32 @A0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* inttoptr (i64 10000000 to i32*)
%15 = load i32, i32* %11
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %16
%18 = load i32, i32* %17
%19 = icmp ule i32 %14, %18
br i1 %19, label %20, label %21
20: ; preds = %6
store i32 1, i32* %7
br label %22
21: ; preds = %6
store i32 0, i32* %7
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @A0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = load i32, i32* inttoptr (i64 10000000 to i32*)
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %8
%10 = load i32, i32* %9
%11 = icmp ule i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
struct sembuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int semop(int semid, struct sembuf *sops, size_t nsops) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<semop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<semop>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sembuf = type { i32 }
@ENOSYS = global i32 0
define i32 @semop(i32 %0, %struct.sembuf* %1, i64 %2) {
%4 = alloca i32
%5 = alloca %struct.sembuf*
%6 = alloca i64
store i32 %0, i32* %4
store %struct.sembuf* %1, %struct.sembuf** %5
store i64 %2, i64* %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
%struct.sembuf = type { i32 }
@ENOSYS = global i32 0
define i32 @semop(i32 %0, %struct.sembuf* nocapture readnone %1, i64 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fun(int *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int y = 20;
  fun(&y);
  printf("%d", y);
  return 0;
}


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)
movl   $0x14,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <fun@plt>
mov    -0x14(%rbp),%esi
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x14,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <fun@plt>
mov    0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 20, i32* %6
%7 = call i32 @fun(i32* %6)
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 20, i32* %3
%5 = call i32 @fun(i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello,GNU!\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>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello,GNU!\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 ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"Hello,GNU!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void __hv_add_f(float bIn0, float bIn1, float *bOut) { *bOut = bIn0 + bIn1; }


x86 assembly (clang, -O0):
<__hv_add_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_add_f>:
addss  %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @__hv_add_f(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fadd float %7, %8
%10 = load float*, float** %6
store float %9, float* %10
ret void
}

LLVM IR (-O2):
define void @__hv_add_f(float %0, float %1, float* nocapture writeonly %2) {
%4 = fadd float %0, %1
store float %4, float* %2
ret void
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct clause_list {
  int dummy;
};
struct Clause {
  int dummy;
};

/* Variables and functions */
int genlist_remove_all(struct genlist *, struct Clause const *);
int clause_list_remove_all(struct clause_list *tthis,
                           const struct Clause *pfoo) {
  return genlist_remove_all((struct genlist *)tthis, pfoo);
}


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

x86 assembly (clang, -O2):
<clause_list_remove_all>:
jmp    1030 <genlist_remove_all@plt>

LLVM IR (-O0):
%struct.clause_list = type { i32 }
%struct.Clause = type { i32 }
%struct.genlist = type { i32 }
define i32 @clause_list_remove_all(%struct.clause_list* %0, %struct.Clause* %1) {
%3 = alloca %struct.clause_list*
%4 = alloca %struct.Clause*
store %struct.clause_list* %0, %struct.clause_list** %3
store %struct.Clause* %1, %struct.Clause** %4
%5 = load %struct.clause_list*, %struct.clause_list** %3
%6 = bitcast %struct.clause_list* %5 to %struct.genlist*
%7 = load %struct.Clause*, %struct.Clause** %4
%8 = call i32 @genlist_remove_all(%struct.genlist* %6, %struct.Clause* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.clause_list = type { i32 }
%struct.Clause = type { i32 }
%struct.genlist = type { i32 }
define i32 @clause_list_remove_all(%struct.clause_list* %0, %struct.Clause* %1) {
%3 = bitcast %struct.clause_list* %0 to %struct.genlist*
%4 = tail call i32 @genlist_remove_all(%struct.genlist* %3, %struct.Clause* %1)
ret i32 %4
}
/* Type definitions */
struct hwtest_ctx {
  int dummy;
};

/* Variables and functions */
int nv50_ptherm_prep(struct hwtest_ctx *);
int /*<<< orphan*/ start_sensor(struct hwtest_ctx *);
int nv50_temperature_thresholds_prep(struct hwtest_ctx *ctx) {
  start_sensor(ctx);
  return nv50_ptherm_prep(ctx);
}


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

x86 assembly (clang, -O2):
<nv50_temperature_thresholds_prep>:
push   %rbx
mov    %rdi,%rbx
call   1040 <start_sensor@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <nv50_ptherm_prep@plt>

LLVM IR (-O0):
%struct.hwtest_ctx = type { i32 }
define i32 @nv50_temperature_thresholds_prep(%struct.hwtest_ctx* %0) {
%2 = alloca %struct.hwtest_ctx*
store %struct.hwtest_ctx* %0, %struct.hwtest_ctx** %2
%3 = load %struct.hwtest_ctx*, %struct.hwtest_ctx** %2
%4 = call i32 @start_sensor(%struct.hwtest_ctx* %3)
%5 = load %struct.hwtest_ctx*, %struct.hwtest_ctx** %2
%6 = call i32 @nv50_ptherm_prep(%struct.hwtest_ctx* %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.hwtest_ctx = type { i32 }
define i32 @nv50_temperature_thresholds_prep(%struct.hwtest_ctx* %0) {
%2 = tail call i32 @start_sensor(%struct.hwtest_ctx* %0)
%3 = tail call i32 @nv50_ptherm_prep(%struct.hwtest_ctx* %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ val;

/* Variables and functions */
int /*<<< orphan*/ dill_chrecv(int, int *, int, int);
int /*<<< orphan*/ dill_chsend(int, int *, int, int);
__attribute__((no)) void whisper(int left, int right) {
  int val;
  dill_chrecv(right, &val, sizeof(val), -1);
  val++;
  dill_chsend(left, &val, sizeof(val), -1);
}


x86 assembly (clang, -O0):
<whisper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
mov    $0xffffffff,%ecx
call   1040 <dill_chrecv@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
mov    $0xffffffff,%ecx
call   1030 <dill_chsend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whisper>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %esi,%edi
mov    %r14,%rsi
mov    $0x4,%edx
mov    $0xffffffff,%ecx
call   1040 <dill_chrecv@plt>
addl   $0x1,0x4(%rsp)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x4,%edx
mov    $0xffffffff,%ecx
call   1030 <dill_chsend@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @whisper(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @dill_chrecv(i32 %6, i32* %5, i32 4, i32 -1)
%8 = load i32, i32* %5
%9 = add nsw i32 %8, 1
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = call i32 @dill_chsend(i32 %10, i32* %5, i32 4, i32 -1)
ret void
}

LLVM IR (-O2):
define void @whisper(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @dill_chrecv(i32 %1, i32* %3, i32 4, i32 -1)
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = call i32 @dill_chsend(i32 %0, i32* %3, i32 4, i32 -1)
ret void
}
void MSP430TimerM$CompareA0$fired(void) {
  MSP430TimerM$CompareA0$default$fired();
}


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

x86 assembly (clang, -O2):
<MSP430TimerM$CompareA0$fired>:
xor    %eax,%eax
jmp    1030 <MSP430TimerM$CompareA0$default$fired@plt>

LLVM IR (-O0):
define void @"MSP430TimerM$CompareA0$fired"() {
%1 = call i32 (...) @"MSP430TimerM$CompareA0$default$fired"()
ret void
}

LLVM IR (-O2):
define void @"MSP430TimerM$CompareA0$fired"() {
%1 = tail call i32 (...) @"MSP430TimerM$CompareA0$default$fired"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x57() {
  Assert_real((isupper(87)),
              "/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_isupper.c",
              440, ("isupper should be 1 for W"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x57>:
push   %rax
mov    $0x57,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1b8,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for W\00"
define void @t_isupper_0x57() {
%1 = call i32 @isupper(i32 87)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 440, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for W\00"
define void @t_isupper_0x57() {
%1 = tail call i32 @isupper(i32 87)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
scalar_t__ dopr(char *, size_t, char const *, int /*<<< orphan*/);
int vsnprintf(char *str, size_t count, const char *fmt, va_list args) {
  return (int)dopr(str, count, fmt, args);
}


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

x86 assembly (clang, -O2):
<vsnprintf>:
jmp    1030 <dopr@plt>

LLVM IR (-O0):
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i64 @dopr(i8* %9, i64 %10, i8* %11, i32 %12)
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i64 @dopr(i8* %0, i64 %1, i8* %2, i32 %3)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Type definitions */
struct pt_regs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_signal(struct pt_regs *);
int l4x_do_signal(struct pt_regs *regs, int syscall) {
  do_signal(regs);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.pt_regs = type { i32 }
define i32 @l4x_do_signal(%struct.pt_regs* %0, i32 %1) {
%3 = alloca %struct.pt_regs*
%4 = alloca i32
store %struct.pt_regs* %0, %struct.pt_regs** %3
store i32 %1, i32* %4
%5 = load %struct.pt_regs*, %struct.pt_regs** %3
%6 = call i32 @do_signal(%struct.pt_regs* %5)
ret i32 0
}

LLVM IR (-O2):
%struct.pt_regs = type { i32 }
define i32 @l4x_do_signal(%struct.pt_regs* %0, i32 %1) {
%3 = tail call i32 @do_signal(%struct.pt_regs* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void sim_sleep(unsigned int value) { usleep(value * 1000); }


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

x86 assembly (clang, -O2):
<sim_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @sim_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @sim_sleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
int quadro_ausente_fifo(int valor_quadro, int *vetor_quadros,
                        int numero_de_quadros) {
  int cont = 0;
  for (cont = 0; cont < numero_de_quadros; cont++) {
    if (vetor_quadros[cont] == valor_quadro)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<quadro_ausente_fifo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115b <quadro_ausente_fifo+0x5b>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x8(%rbp),%eax
jne    1148 <quadro_ausente_fifo+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1162 <quadro_ausente_fifo+0x62>
jmp    114d <quadro_ausente_fifo+0x4d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111c <quadro_ausente_fifo+0x1c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadro_ausente_fifo>:
mov    $0x1,%eax
test   %edx,%edx
jle    111e <quadro_ausente_fifo+0x1e>
mov    %edx,%ecx
xor    %edx,%edx
nopl   (%rax)
cmp    %edi,(%rsi,%rdx,4)
je     111f <quadro_ausente_fifo+0x1f>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <quadro_ausente_fifo+0x10>
ret
xor    %eax,%eax
ret

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

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


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

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @foo(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 = call i64 @strlen(i8* %5)
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @foo(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %4, %3
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
__attribute__((no)) int detect_noreturn() { exit(0); }


x86 assembly (clang, -O0):
<detect_noreturn>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<detect_noreturn>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @detect_noreturn() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @detect_noreturn() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  char frase[35] = "LIFE IS NOT A PROBLEM TO BE SOLVED";
  int quantidadeDeCaracteres;
  scanf("%d", &quantidadeDeCaracteres);
  frase[quantidadeDeCaracteres] = '\0';
  printf("%s\n", frase);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x23,%edx
call   1040 <memcpy@plt>
lea    0xec8(%rip),%rdi
lea    -0x34(%rbp),%rsi
call   1050 <scanf@plt>
movslq -0x34(%rbp),%rax
movb   $0x0,-0x30(%rbp,%rax,1)
lea    -0x30(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x444556,0x2f(%rsp)
lea    0xed8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movb   $0x0,0x10(%rsp,%rax,1)
lea    0xec0(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.frase = [35 x i8] c"LIFE IS NOT A PROBLEM TO BE SOLVED\00"
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [35 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [35 x i8]* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %7
store i8 0, i8* %8
%9 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.frase = [35 x i8] c"LIFE IS NOT A PROBLEM TO BE SOLVED\00"
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [35 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 %7
store i8 0, i8* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int usage(char *appName) {
  printf("Usage: %s <public key>\n"
         "\n"
         "Get a cjdns IPv6 address from a public key.\n"
         "The key should be in Base32 and end in '.k'.\n",
         appName);
  return 0;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [114 x i8] c"Usage: %s <public key>\0A\0AGet a cjdns IPv6 address from a public key.\0AThe key should be in Base32 and end in '.k'.\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [114 x i8] c"Usage: %s <public key>\0A\0AGet a cjdns IPv6 address from a public key.\0AThe key should be in Base32 and end in '.k'.\0A\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
void vdebugFinal() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ PTRACE_POKEUSER;
int /*<<< orphan*/ ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int, long);
void syscall_set_result(pid_t pid, long result) {
  ptrace(PTRACE_POKEUSER, pid, (8 * 10), result);
}


x86 assembly (clang, -O0):
<syscall_set_result>:
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),%rcx
mov    $0x50,%edx
call   1030 <ptrace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_set_result>:
mov    %rsi,%rcx
mov    %edi,%esi
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
mov    $0x50,%edx
jmp    1030 <ptrace@plt>

LLVM IR (-O0):
@PTRACE_POKEUSER = global i32 0
define void @syscall_set_result(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* @PTRACE_POKEUSER
%6 = load i32, i32* %3
%7 = load i64, i64* %4
%8 = call i32 @ptrace(i32 %5, i32 %6, i32 80, i64 %7)
ret void
}

LLVM IR (-O2):
@PTRACE_POKEUSER = global i32 0
define void @syscall_set_result(i32 %0, i64 %1) {
%3 = load i32, i32* @PTRACE_POKEUSER
%4 = tail call i32 @ptrace(i32 %3, i32 %0, i32 80, i64 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ erasewchar(int /*<<< orphan*/ *);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_int(int /*<<< orphan*/);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_killwchar(int nargs, char **args) {
  wchar_t ch;
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(2);
  report_return(erasewchar(&ch));
  report_int(ch);
}


x86 assembly (clang, -O0):
<cmd_killwchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1177 <cmd_killwchar+0x27>
jmp    1199 <cmd_killwchar+0x49>
mov    $0x2,%edi
call   1050 <report_count@plt>
lea    -0x14(%rbp),%rdi
call   1060 <erasewchar@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
mov    -0x14(%rbp),%edi
call   1070 <report_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_killwchar>:
push   %rax
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
je     1181 <cmd_killwchar+0x31>
mov    $0x2,%edi
call   1050 <report_count@plt>
lea    0x4(%rsp),%rdi
call   1060 <erasewchar@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
mov    0x4(%rsp),%edi
call   1070 <report_int@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @cmd_killwchar(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @check_arg_count(i32 %0, i32 0)
%6 = icmp eq i32 %5, 1
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = tail call i32 @report_count(i32 2)
%9 = call i32 @erasewchar(i32* %3)
%10 = call i32 @report_return(i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @report_int(i32 %11)
br label %13
13: ; preds = %2, %7
ret void
}
/* Variables and functions */
int lmc_um_getbit(char *bf, size_t i) {
  bf += i / 8;
  return (*bf & (1 << (i % 8))) != 0;
}


x86 assembly (clang, -O0):
<lmc_um_getbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x3,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
and    $0x7,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmc_um_getbit>:
mov    %rsi,%rcx
mov    %rsi,%rax
shr    $0x3,%rax
movsbl (%rdi,%rax,1),%eax
and    $0x7,%cl
shr    %cl,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @lmc_um_getbit(i8* nocapture %0, i64 %1) {
%3 = lshr i64 %1, 3
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = trunc i64 %1 to i32
%8 = and i32 %7, 7
%9 = lshr i32 %6, %8
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
unsigned short JOY_waitPressTime(unsigned short, unsigned short,
                                 int /*<<< orphan*/);
unsigned short JOY_waitPress(unsigned short joy, unsigned short btn) {
  return JOY_waitPressTime(joy, btn, 0);
}


x86 assembly (clang, -O0):
<JOY_waitPress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
xor    %edx,%edx
movzwl %ax,%edi
movzwl -0x4(%rbp),%esi
call   1030 <JOY_waitPressTime@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JOY_waitPress>:
xor    %edx,%edx
jmp    1030 <JOY_waitPressTime@plt>

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

LLVM IR (-O2):
define zeroext i16 @JOY_waitPress(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call zeroext i16 @JOY_waitPressTime(i16 zeroext %0, i16 zeroext %1, i32 0)
ret i16 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int pthread_rwlock_unlock(int /*<<< orphan*/ *);
int my_pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) {
  int value = (*(int *)__rwlock);
  if (value <= 0xFFFF) {

    ;
    return 0;
  }
  pthread_rwlock_t *realrwlock = (pthread_rwlock_t *)value;
  return pthread_rwlock_unlock(realrwlock);
}


x86 assembly (clang, -O0):
<my_pthread_rwlock_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xffff,-0x14(%rbp)
jg     113e <my_pthread_rwlock_unlock+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1152 <my_pthread_rwlock_unlock+0x42>
movslq -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <pthread_rwlock_unlock@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_pthread_rwlock_unlock>:
mov    (%rdi),%edi
cmp    $0x10000,%edi
jge    111d <my_pthread_rwlock_unlock+0xd>
xor    %eax,%eax
ret
jmp    1030 <pthread_rwlock_unlock@plt>

LLVM IR (-O0):
define i32 @my_pthread_rwlock_unlock(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 65535
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = call i32 @pthread_rwlock_unlock(i32* %15)
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @my_pthread_rwlock_unlock(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp slt i32 %2, 65536
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = zext i32 %2 to i64
%6 = inttoptr i64 %5 to i32*
%7 = tail call i32 @pthread_rwlock_unlock(i32* %6)
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void add_mpeg_nav(uint8_t *buf, const unsigned int bs) {
  (void)buf;
  (void)bs;
}


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

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

LLVM IR (-O0):
define void @add_mpeg_nav(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
ret void
}

LLVM IR (-O2):
define void @add_mpeg_nav(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xa8() {
  Assert_real((isascii(168) == 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_isascii.c",
              845, ("isascii should be 0 for 0xa8"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xa8>:
push   %rax
mov    $0xa8,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x34d,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xa8\00"
define void @t_isascii_0xa8() {
%1 = call i64 @isascii(i32 168)
%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 845, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xa8\00"
define void @t_isascii_0xa8() {
%1 = tail call i64 @isascii(i32 168)
%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 845, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int bar(int);
int foo(int);
int main() {
  int valor = 0;
  int x = 0;
  x = foo(foo(valor));
#pragma omp taskwait
  assert(x == 2);
  x = bar(foo(valor));
#pragma omp taskwait
  assert(x == 8);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <foo@plt>
mov    %eax,%edi
call   1050 <foo@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%edi
call   1050 <foo@plt>
mov    %eax,%edi
call   1030 <bar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <foo@plt>
mov    %eax,%edi
call   1050 <foo@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1040 <assert@plt>
xor    %edi,%edi
call   1050 <foo@plt>
mov    %eax,%edi
call   1030 <bar@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %1
%4 = call i32 @foo(i32 %3)
%5 = call i32 @foo(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 2
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %1
%11 = call i32 @foo(i32 %10)
%12 = call i32 @bar(i32 %11)
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 8
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
%2 = tail call i32 @foo(i32 %1)
%3 = icmp eq i32 %2, 2
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @foo(i32 0)
%7 = tail call i32 @bar(i32 %6)
%8 = icmp eq i32 %7, 8
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
ret i32 0
}
void ff_h264_pred_init_arm() {}


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

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

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

LLVM IR (-O2):
define void @ff_h264_pred_init_arm() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void tty_navigation_line_down(void) { write(1, "[1E", 4); }


x86 assembly (clang, -O0):
<tty_navigation_line_down>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_navigation_line_down>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[1E\00"
define void @tty_navigation_line_down() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[1E\00"
define void @tty_navigation_line_down() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
main() {
  foo(10, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
mov    $0x3,%esi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x3,%esi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 10, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 10, i32 3)
ret i32 0
}