xunge/DecIR huggingface dataset:
/* Type definitions */
struct perf_event_attr {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_perf_event_open;
long syscall(int /*<<< orphan*/, struct perf_event_attr *, int /*<<< orphan*/,
             int, int, unsigned long);
long sys_perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu,
                         int group_fd, unsigned long flags) {
  return syscall(SYS_perf_event_open, attr, pid, cpu, group_fd, flags);
}


x86 assembly (clang, -O0):
<sys_perf_event_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x20(%rbp),%r9
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_perf_event_open>:
mov    %r8,%r9
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
%struct.perf_event_attr = type { i32 }
@SYS_perf_event_open = global i32 0
define i64 @sys_perf_event_open(%struct.perf_event_attr* %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = load i32, i32* @SYS_perf_event_open
%7 = tail call i64 @syscall(i32 %6, %struct.perf_event_attr* %0, i32 %1, i32 %2, i32 %3, i64 %4)
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_78K0(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_78K0() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
char *jid_name(char *jid, int *len) {
  int n;
  for (n = 0; jid[n] && jid[n] != '@'; n++) {
  }
  *len = n;
  return jid;
}


x86 assembly (clang, -O0):
<jid_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     1142 <jid_name+0x42>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x40,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1152 <jid_name+0x52>
jmp    1165 <jid_name+0x65>
jmp    1157 <jid_name+0x57>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <jid_name+0x13>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jid_name>:
mov    %rdi,%rax
xor    %ecx,%ecx
testb  $0xbf,(%rax,%rcx,1)
je     111a <jid_name+0x1a>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rcx
testb  $0xbf,(%rax,%rcx,1)
jne    1110 <jid_name+0x10>
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define i8* @jid_name(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %25, %2
%7 = load i8*, i8** %3
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %6
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 64
br label %22
22: ; preds = %14, %6
%23 = phi i1 [ false, %6 ], [ %21, %14 ]
br i1 %23, label %24, label %28
24: ; preds = %22
br label %25
25: ; preds = %24
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %6
28: ; preds = %22
%29 = load i32, i32* %5
%30 = load i32*, i32** %4
store i32 %29, i32* %30
%31 = load i8*, i8** %3
ret i8* %31
}

LLVM IR (-O2):
define i8* @jid_name(i8* returned %0, i32* nocapture writeonly %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %8, %7 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
switch i8 %6, label %7 [
i8 0, label %9
i8 64, label %9
]
7: ; preds = %3
%8 = add nuw i64 %4, 1
br label %3
9: ; preds = %3, %3
%10 = trunc i64 %4 to i32
store i32 %10, i32* %1
ret i8* %0
}
int(ars_d_set_tcpopt_mss)(struct ars_packet *pkt, int layer, char *f, char *v) {
  return 0;
}


x86 assembly (clang, -O0):
<ars_d_set_tcpopt_mss>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ars_packet = type opaque
define i32 @ars_d_set_tcpopt_mss(%struct.ars_packet* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca %struct.ars_packet*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.ars_packet* %0, %struct.ars_packet** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret i32 0
}

LLVM IR (-O2):
%struct.ars_packet = type opaque
define i32 @ars_d_set_tcpopt_mss(%struct.ars_packet* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;

/* Variables and functions */
int /*<<< orphan*/ GMP_RNDN;
int /*<<< orphan*/ mpfr_set_d(int /*<<< orphan*/, double, int /*<<< orphan*/);
double sollya_mpfr_get_d(int /*<<< orphan*/, int /*<<< orphan*/);
void mpfr_to_double(double *dh, mpfr_t op) {
  *dh = sollya_mpfr_get_d(op, GMP_RNDN);
  mpfr_set_d(op, *dh, GMP_RNDN);
}


x86 assembly (clang, -O0):
<mpfr_to_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
call   1040 <sollya_mpfr_get_d@plt>
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
call   1030 <mpfr_set_d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpfr_to_double>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
mov    0x2eaf(%rip),%r15
mov    (%r15),%esi
mov    %ebx,%edi
call   1040 <sollya_mpfr_get_d@plt>
movsd  %xmm0,(%r14)
mov    (%r15),%esi
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <mpfr_set_d@plt>

LLVM IR (-O0):
@GMP_RNDN = global i32 0
define void @mpfr_to_double(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* @GMP_RNDN
%7 = call double @sollya_mpfr_get_d(i32 %5, i32 %6)
%8 = load double*, double** %3
store double %7, double* %8
%9 = load i32, i32* %4
%10 = load double*, double** %3
%11 = load double, double* %10
%12 = load i32, i32* @GMP_RNDN
%13 = call i32 @mpfr_set_d(i32 %9, double %11, i32 %12)
ret void
}

LLVM IR (-O2):
@GMP_RNDN = global i32 0
define void @mpfr_to_double(double* nocapture writeonly %0, i32 %1) {
%3 = load i32, i32* @GMP_RNDN
%4 = tail call double @sollya_mpfr_get_d(i32 %1, i32 %3)
store double %4, double* %0
%5 = load i32, i32* @GMP_RNDN
%6 = tail call i32 @mpfr_set_d(i32 %1, double %4, i32 %5)
ret void
}
/* Type definitions */
typedef scalar_t__ int_fast64_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_int_fast64_t(int_fast64_t const k1,
                                              int_fast64_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_int_fast64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_int_fast64_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int_fast64_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int_fast64_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmplt_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmplt_sd(__m128d A, __m128d B) { return _mm_cmplt_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_cmplt_sd>:
jmp    1030 <_mm_cmplt_sd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmplt_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmplt_sd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M112_f(char *s) {
  debug("M112_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M112_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M112_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M112_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M112_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M112_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M112_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
unsigned long *malloc(int);
unsigned long *ulptr(unsigned long value) {
  unsigned long *p = malloc(sizeof(unsigned long));
  *p = value;
  return p;
}


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

x86 assembly (clang, -O2):
<ulptr>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rbx,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i64* @ulptr(i64 %0) {
%2 = tail call i64* @malloc(i32 8)
store i64 %0, i64* %2
ret i64* %2
}
double f16(double x) {
  double t = x - (-0.0);
  return t + (-0.0);
}


x86 assembly (clang, -O0):
<f16>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed9(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f16>:
xorpd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f16(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, -0.000000e+00
store double %5, double* %3
%6 = load double, double* %3
%7 = fadd double %6, -0.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f16(double %0) {
%2 = fadd double %0, 0.000000e+00
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ i;
typedef int /*<<< orphan*/ f;
typedef int /*<<< orphan*/ d;
typedef int /*<<< orphan*/ c;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char c;
  double d;
  float f;
  int i;
  printf("char: %d\n", sizeof(c));
  printf("double: %d\n", sizeof(d));
  printf("float: %d\n", sizeof(f));
  printf("int: %d\n", sizeof(i));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee1(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"char: %d\0A\00"
@.str.1 = [12 x i8] c"double: %d\0A\00"
@.str.2 = [11 x i8] c"float: %d\0A\00"
@.str.3 = [9 x i8] c"int: %d\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca double
%3 = alloca float
%4 = alloca i32
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 8)
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 4)
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"char: %d\0A\00"
@.str.1 = [12 x i8] c"double: %d\0A\00"
@.str.2 = [11 x i8] c"float: %d\0A\00"
@.str.3 = [9 x i8] c"int: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 8)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 4)
ret i32 0
}
void free_uchar(unsigned char *val) {}


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

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

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

LLVM IR (-O2):
define void @free_uchar(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *find_spaces(char *ptr) {
  while (*ptr) {
    if (*ptr == ' ' || *ptr == '\t') {
      return (ptr);
    }
    ptr++;
  }
  return (NULL);
}


x86 assembly (clang, -O0):
<find_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1153 <find_spaces+0x53>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1135 <find_spaces+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    1142 <find_spaces+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <find_spaces+0x5b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <find_spaces+0x8>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_spaces>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1127 <find_spaces+0x27>
cmp    $0x9,%cl
je     1129 <find_spaces+0x29>
cmp    $0x20,%cl
je     1129 <find_spaces+0x29>
add    $0x1,%rax
jmp    1110 <find_spaces+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @find_spaces(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %20, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %23
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 32
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 9
br i1 %17, label %18, label %20
18: ; preds = %13, %8
%19 = load i8*, i8** %3
store i8* %19, i8** %2
br label %24
20: ; preds = %13
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %4
23: ; preds = %4
store i8* null, i8** %2
br label %24
24: ; preds = %23, %18
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
define i8* @find_spaces(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %8
i8 32, label %7
i8 9, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
br label %8
8: ; preds = %2, %7
%9 = phi i8* [ %3, %7 ], [ null, %2 ]
ret i8* %9
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int fatbitsfromclusters(int32_t nclusters) {
  return nclusters < 4085 ? 12 : nclusters < 65525 ? 16 : 32;
}


x86 assembly (clang, -O0):
<fatbitsfromclusters>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xff5,-0x4(%rbp)
jge    1121 <fatbitsfromclusters+0x21>
mov    $0xc,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <fatbitsfromclusters+0x3a>
mov    -0x4(%rbp),%edx
mov    $0x20,%eax
mov    $0x10,%ecx
cmp    $0xfff5,%edx
cmovl  %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatbitsfromclusters>:
xor    %ecx,%ecx
cmp    $0xfff5,%edi
setge  %cl
shl    $0x4,%ecx
add    $0x10,%ecx
cmp    $0xff5,%edi
mov    $0xc,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fatbitsfromclusters(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 4085
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 65525
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 16, i32 32
br label %11
11: ; preds = %6, %5
%12 = phi i32 [ 12, %5 ], [ %10, %6 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @fatbitsfromclusters(i32 %0) {
%2 = icmp slt i32 %0, 4085
%3 = icmp slt i32 %0, 65525
%4 = select i1 %3, i32 16, i32 32
%5 = select i1 %2, i32 12, i32 %4
ret i32 %5
}
/* Type definitions */
struct floc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fatal(struct floc *, int /*<<< orphan*/);
int /*<<< orphan*/ gettext(char *);
void *malloc(unsigned int);
void *xmalloc(unsigned int size) {
  void *result = malloc(size ? size : 1);
  if (result == 0)
    fatal(((struct floc *)0), gettext("virtual memory exhausted"));
  return result;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1150 <xmalloc+0x20>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    115d <xmalloc+0x2d>
mov    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115d <xmalloc+0x2d>
mov    -0x14(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    118b <xmalloc+0x5b>
lea    0xe85(%rip),%rdi
call   1030 <gettext@plt>
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edi
call   1050 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
test   %edi,%edi
mov    $0x1,%eax
cmove  %eax,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115d <xmalloc+0x2d>
lea    0xeb1(%rip),%rdi
call   1030 <gettext@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1050 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.floc = type { i32 }
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %2
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %6
%10 = phi i32 [ %7, %6 ], [ 1, %8 ]
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = call i32 @gettext(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @fatal(%struct.floc* null, i32 %15)
br label %17
17: ; preds = %14, %9
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
%struct.floc = type { i32 }
@.str = [25 x i8] c"virtual memory exhausted\00"
define noalias i8* @xmalloc(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 1, i32 %0
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @gettext(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @fatal(%struct.floc* null, i32 %7)
br label %9
9: ; preds = %6, %1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int x, y, z;
  scanf("%d,%d,%d", &x, &y, &z);
  printf("用户输入的三个数之和为:%d\n", x + y + x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
add    -0x4(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x14(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
add    %esi,%esi
add    0xc(%rsp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d,%d,%d\00"
@.str.1 = [38 x i8] c"\E7\94\A8\E6\88\B7\E8\BE\93\E5\85\A5\E7\9A\84\E4\B8\89\E4\B8\AA\E6\95\B0\E4\B9\8B\E5\92\8C\E4\B8\BA:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
%8 = load i32, i32* %1
%9 = add nsw i32 %7, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d,%d,%d\00"
@.str.1 = [38 x i8] c"\E7\94\A8\E6\88\B7\E8\BE\93\E5\85\A5\E7\9A\84\E4\B8\89\E4\B8\AA\E6\95\B0\E4\B9\8B\E5\92\8C\E4\B8\BA:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = shl i32 %8, 1
%11 = add i32 %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xac() {
  Assert_real((iscntrl(172) == 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_iscntrl.c",
              865, ("iscntrl should be 0 for 0xac"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xac>:
push   %rax
mov    $0xac,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x361,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xac\00"
define void @t_iscntrl_0xac() {
%1 = call i64 @iscntrl(i32 172)
%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 865, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xac\00"
define void @t_iscntrl_0xac() {
%1 = tail call i64 @iscntrl(i32 172)
%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 865, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double log(double);
double rndu();
double rndlogistic(void) {
  double u;
  u = rndu();
  return log(u / (1 - u));
}


x86 assembly (clang, -O0):
<rndlogistic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rndu@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rndlogistic>:
push   %rax
xor    %eax,%eax
call   1030 <rndu@plt>
movsd  0xed0(%rip),%xmm1
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
pop    %rax
jmp    1040 <log@plt>

LLVM IR (-O0):
define double @rndlogistic() {
%1 = alloca double
%2 = call double (...) @rndu()
store double %2, double* %1
%3 = load double, double* %1
%4 = load double, double* %1
%5 = fsub double 1.000000e+00, %4
%6 = fdiv double %3, %5
%7 = call double @log(double %6)
ret double %7
}

LLVM IR (-O2):
define double @rndlogistic() {
%1 = tail call double (...) @rndu()
%2 = fsub double 1.000000e+00, %1
%3 = fdiv double %1, %2
%4 = tail call double @log(double %3)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct binder_io {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ *bio_get(struct binder_io *, int);
uint32_t bio_get_uint32(struct binder_io *bio) {
  uint32_t *ptr = bio_get(bio, sizeof(*ptr));
  return ptr ? *ptr : 0;
}


x86 assembly (clang, -O0):
<bio_get_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <bio_get@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1147 <bio_get_uint32+0x37>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1151 <bio_get_uint32+0x41>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1151 <bio_get_uint32+0x41>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bio_get_uint32>:
push   %rax
mov    $0x4,%esi
call   1030 <bio_get@plt>
test   %rax,%rax
je     1124 <bio_get_uint32+0x14>
mov    (%rax),%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.binder_io = type { i32 }
define i32 @bio_get_uint32(%struct.binder_io* %0) {
%2 = alloca %struct.binder_io*
%3 = alloca i32*
store %struct.binder_io* %0, %struct.binder_io** %2
%4 = load %struct.binder_io*, %struct.binder_io** %2
%5 = call i32* @bio_get(%struct.binder_io* %4, i32 4)
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32*, i32** %3
%10 = load i32, i32* %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.binder_io = type { i32 }
define i32 @bio_get_uint32(%struct.binder_io* %0) {
%2 = tail call i32* @bio_get(%struct.binder_io* %0, i32 4)
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = load i32, i32* %2
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
void initMatrix(int g1[][30]) {
  int i, j;
  for (i = 0; i < 30; i++)
    for (j = 0; j < 30; j++)
      g1[i][j] = 0;
}


x86 assembly (clang, -O0):
<initMatrix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1e,-0xc(%rbp)
jge    1165 <initMatrix+0x65>
movl   $0x0,-0x10(%rbp)
cmpl   $0x1e,-0x10(%rbp)
jge    1152 <initMatrix+0x52>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <initMatrix+0x20>
jmp    1157 <initMatrix+0x57>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <initMatrix+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initMatrix>:
push   %rax
mov    $0xe10,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @initMatrix([30 x i32]* nocapture writeonly %0) {
%2 = bitcast [30 x i32]* %0 to i8*
ret void
}
/* Variables and functions */
int answer();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("answer : %d\n", answer());
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"answer : %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @answer()
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"answer : %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @answer()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void bug(n) int n;
{
  printf("Please tell jim@rand.org that fatal bug %d happened.\n", n);
  exit(1);
}


x86 assembly (clang, -O0):
<bug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<bug>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"Please tell jim@rand.org that fatal bug %d happened.\0A\00"
define void @bug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [54 x i8] c"Please tell jim@rand.org that fatal bug %d happened.\0A\00"
define void @bug(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %0)
tail call void @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x14() {
  Assert_real((isdigit(20) == 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_isdigit.c",
              105, ("isdigit should be 0 for 0x14"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x14>:
push   %rax
mov    $0x14,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x69,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x14\00"
define void @t_isdigit_0x14() {
%1 = call i64 @isdigit(i32 20)
%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 105, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x14\00"
define void @t_isdigit_0x14() {
%1 = tail call i64 @isdigit(i32 20)
%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 105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int xmlUCSIsOldItalic(int code) {
  return (((code >= 0x10300) && (code <= 0x1032F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsOldItalic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x10300,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsOldItalic+0x26>
cmpl   $0x1032f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsOldItalic>:
add    $0xfffefd00,%edi
xor    %eax,%eax
cmp    $0x30,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsOldItalic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 66304
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 66351
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsOldItalic(i32 %0) {
%2 = add i32 %0, -66304
%3 = icmp ult i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
int ft_islower(int c) {
  if (c >= 'a' && c <= 'z')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1127 <ft_islower+0x27>
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <ft_islower+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <ft_islower+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void register_memory(void *host_p, size_t size) {}


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

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

LLVM IR (-O0):
define void @register_memory(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @register_memory(i8* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x28() {
  Assert_real((isascii(40)),
              "/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",
              205, ("isascii should be 1 for ("));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x28>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xcd,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for (\00"
define void @t_isascii_0x28() {
%1 = call i32 @isascii(i32 40)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for (\00"
define void @t_isascii_0x28() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void byteorder(void *dst, const void *src, size_t size) {
  memcpy(dst, src, size);
}


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

x86 assembly (clang, -O2):
<byteorder>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @byteorder(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_self();
char *strsignal(int);
void chld_handler(int sig) {
  pthread_t curr_thread;
  curr_thread = pthread_self();
  printf("\t Handling signal %d (%s) by thread at %p\n", sig, strsignal(sig),
         &curr_thread);
}


x86 assembly (clang, -O0):
<chld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <strsignal@plt>
mov    -0xc(%rbp),%esi
mov    %rax,%rdx
lea    0xea0(%rip),%rdi
lea    -0x8(%rbp),%rcx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chld_handler>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <pthread_self@plt>
mov    %eax,0xc(%rsp)
mov    %ebx,%edi
call   1040 <strsignal@plt>
lea    0xeb0(%rip),%rdi
lea    0xc(%rsp),%rcx
mov    %ebx,%esi
mov    %rax,%rdx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"\09 Handling signal %d (%s) by thread at %p\0A\00"
define void @chld_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @pthread_self()
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i8* @strsignal(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %7, i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"\09 Handling signal %d (%s) by thread at %p\0A\00"
define void @chld_handler(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 (...) @pthread_self()
store i32 %4, i32* %2
%5 = tail call i8* @strsignal(i32 %0)
%6 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %5, i32* %2)
ret void
}
void g_slist_length() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_length() {
ret void
}
/* Variables and functions */
int SIGUSR1;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ ttyreset(int /*<<< orphan*/);
int /*<<< orphan*/ usr1Callback();
void sigcatch(int sig) {
  if (sig == SIGUSR1) {
    usr1Callback();
  } else {
    ttyreset(0);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<sigcatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%eax
jne    1159 <sigcatch+0x29>
mov    $0x0,%al
call   1030 <usr1Callback@plt>
jmp    1167 <sigcatch+0x37>
xor    %edi,%edi
call   1040 <ttyreset@plt>
xor    %edi,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigcatch>:
push   %rax
mov    0x2eb0(%rip),%rax
cmp    %edi,(%rax)
jne    1144 <sigcatch+0x14>
xor    %eax,%eax
pop    %rcx
jmp    1030 <usr1Callback@plt>
xor    %edi,%edi
call   1040 <ttyreset@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define void @sigcatch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGUSR1
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @usr1Callback()
br label %11
8: ; preds = %1
%9 = call i32 @ttyreset(i32 0)
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %6
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define void @sigcatch(i32 %0) {
%2 = load i32, i32* @SIGUSR1
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @usr1Callback()
ret void
6: ; preds = %1
%7 = tail call i32 @ttyreset(i32 0)
%8 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printRed();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printRed();
  printf("\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @printRed()
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @printRed()
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}