xunge/DecIR huggingface dataset:
/* Variables and functions */
char *strrchr(char *, char);
char *_chomp(char *sz) {
  do {
    char *p = strrchr(sz, '\n');
    if (p != NULL) {
      *p = '\0';
      continue;
    }
    p = strrchr(sz, '\r');
    if (p != NULL) {
      *p = '\0';
      continue;
    }
    break;
  } while (1);
  return sz;
}


x86 assembly (clang, -O0):
<_chomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1145 <_chomp+0x35>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    1173 <_chomp+0x63>
mov    -0x8(%rbp),%rdi
mov    $0xd,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116e <_chomp+0x5e>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    1173 <_chomp+0x63>
jmp    1182 <_chomp+0x72>
mov    $0x1,%al
test   $0x1,%al
jne    111c <_chomp+0xc>
jmp    1182 <_chomp+0x72>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_chomp>:
push   %rbx
mov    %rdi,%rbx
jmp    1123 <_chomp+0x13>
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
jne    1120 <_chomp+0x10>
mov    %rbx,%rdi
mov    $0xd,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
jne    1120 <_chomp+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_chomp(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
br label %4
4: ; preds = %19, %1
%5 = load i8*, i8** %2
%6 = call i8* @strrchr(i8* %5, i8 signext 10)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = load i8*, i8** %3
store i8 0, i8* %10
br label %19
11: ; preds = %4
%12 = load i8*, i8** %2
%13 = call i8* @strrchr(i8* %12, i8 signext 13)
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = load i8*, i8** %3
store i8 0, i8* %17
br label %19
18: ; preds = %11
br label %20
19: ; preds = %16, %9
br i1 true, label %4, label %20
20: ; preds = %19, %18
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @_chomp(i8* returned %0) {
br label %2
2: ; preds = %8, %1
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 10)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 13)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %5, %2
%9 = phi i8* [ %3, %2 ], [ %6, %5 ]
store i8 0, i8* %9
br label %2
10: ; preds = %5
ret i8* %0
}
double Fraction_of_Day(int hr, int mi, int se) {
  double ret = (hr + (mi + se / 60.0) / 60.0) / 24.0;
  return (ret);
}


x86 assembly (clang, -O0):
<Fraction_of_Day>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm2
movsd  0xee4(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movsd  0xed4(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fraction_of_Day>:
cvtsi2sd %edi,%xmm1
cvtsi2sd %esi,%xmm2
cvtsi2sd %edx,%xmm0
movsd  0xeec(%rip),%xmm3
divsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
divsd  0xedc(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Fraction_of_Day(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to double
%12 = load i32, i32* %6
%13 = sitofp i32 %12 to double
%14 = fdiv double %13, 6.000000e+01
%15 = fadd double %11, %14
%16 = fdiv double %15, 6.000000e+01
%17 = fadd double %9, %16
%18 = fdiv double %17, 2.400000e+01
store double %18, double* %7
%19 = load double, double* %7
ret double %19
}

LLVM IR (-O2):
define double @Fraction_of_Day(i32 %0, i32 %1, i32 %2) {
%4 = sitofp i32 %0 to double
%5 = sitofp i32 %1 to double
%6 = sitofp i32 %2 to double
%7 = fdiv double %6, 6.000000e+01
%8 = fadd double %7, %5
%9 = fdiv double %8, 6.000000e+01
%10 = fadd double %9, %4
%11 = fdiv double %10, 2.400000e+01
ret double %11
}
int test_imm_CCuint16_mem(unsigned short *val) {
  return ((*val) & (0xCC << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_CCuint16_mem>:
testb  $0xcc,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_CCuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 204
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(char **);
scalar_t__ malloc(size_t);
char **scmatrix_vector(long nrl, long nrh) {
  long i;
  char **cvec;
  cvec = (char **)malloc((size_t)(nrh - nrl + 1) * sizeof(char *));
  assert(cvec);
  return cvec - nrl;
}


x86 assembly (clang, -O0):
<scmatrix_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scmatrix_vector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x8(,%rsi,8),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
shl    $0x3,%r14
sub    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8** @scmatrix_vector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8**
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = load i64, i64* %3
%9 = sub nsw i64 %7, %8
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 8
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8**
store i8** %13, i8*** %6
%14 = load i8**, i8*** %6
%15 = call i32 @assert(i8** %14)
%16 = load i8**, i8*** %6
%17 = load i64, i64* %3
%18 = sub i64 0, %17
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
ret i8** %19
}

LLVM IR (-O2):
define i8** @scmatrix_vector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = shl i64 %3, 3
%5 = add i64 %4, 8
%6 = tail call i64 @malloc(i64 %5)
%7 = inttoptr i64 %6 to i8**
%8 = tail call i32 @assert(i8** %7)
%9 = sub i64 0, %0
%10 = getelementptr inbounds i8*, i8** %7, i64 %9
ret i8** %10
}
void gtk_accel_map_load() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_map_load() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ ierr_exit(char *, char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void lsd_fatal_error(char *file, int line, char *mesg) {
  ierr_exit("ERROR: [%s::%d] %s: %s", file, line, mesg, strerror(errno));
}


x86 assembly (clang, -O0):
<lsd_fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x30(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    %eax,%r8d
lea    0xe94(%rip),%rdi
call   1030 <ierr_exit@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsd_fatal_error>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r14,%rcx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <ierr_exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"ERROR: [%s::%d] %s: %s\00"
@errno = global i32 0
define void @lsd_fatal_error(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = load i32, i32* @errno
%11 = call i32 @strerror(i32 %10)
%12 = call i32 @ierr_exit(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"ERROR: [%s::%d] %s: %s\00"
@errno = global i32 0
define void @lsd_fatal_error(i8* %0, i32 %1, i8* %2) {
%4 = load i32, i32* @errno
%5 = tail call i32 @strerror(i32 %4)
%6 = tail call i32 @ierr_exit(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2, i32 %5)
ret void
}
/* Variables and functions */
char *doasprintf(char *, char const *);
int /*<<< orphan*/ warn(char *);
char *json_fmt_newauthz(const char *domain) {
  char *p;
  p = doasprintf("{"
                 "\"resource\": \"new-authz\", "
                 "\"identifier\": "
                 "{\"type\": \"dns\", \"value\": \"%s\"}"
                 "}",
                 domain);
  if (NULL == p)
    warn("asprintf");
  return (p);
}


x86 assembly (clang, -O0):
<json_fmt_newauthz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <doasprintf@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1158 <json_fmt_newauthz+0x38>
lea    0xef5(%rip),%rdi
call   1030 <warn@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_fmt_newauthz>:
push   %rbx
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <doasprintf@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1144 <json_fmt_newauthz+0x24>
lea    0xf09(%rip),%rdi
call   1030 <warn@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [72 x i8] c"{\22resource\22: \22new-authz\22, \22identifier\22: {\22type\22: \22dns\22, \22value\22: \22%s\22}}\00"
@.str.1 = [9 x i8] c"asprintf\00"
define i8* @json_fmt_newauthz(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @doasprintf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* null, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @warn(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [72 x i8] c"{\22resource\22: \22new-authz\22, \22identifier\22: {\22type\22: \22dns\22, \22value\22: \22%s\22}}\00"
@.str.1 = [9 x i8] c"asprintf\00"
define i8* @json_fmt_newauthz(i8* %0) {
%2 = tail call i8* @doasprintf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @warn(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int test_imm_27int16_reg(short val) {
  return ((val) & (-0x27 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_27int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffffd9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_27int16_reg>:
test   $0xffd9,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_27int16_reg(i16 signext %0) {
%2 = and i16 %0, -39
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int check_end_with_colon_and_remove_it(char *pntword) {
  while (*pntword != '\0') {
    if (*pntword == ':') {
      *pntword = '\0';
      return 1;
      break;
    }
    pntword++;
    return 0;
  }
}


x86 assembly (clang, -O0):
<check_end_with_colon_and_remove_it>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <check_end_with_colon_and_remove_it+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    113b <check_end_with_colon_and_remove_it+0x3b>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    114e <check_end_with_colon_and_remove_it+0x4e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_end_with_colon_and_remove_it>:
xor    %eax,%eax
cmpb   $0x3a,(%rdi)
jne    110f <check_end_with_colon_and_remove_it+0xf>
movb   $0x0,(%rdi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @check_end_with_colon_and_remove_it(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 58
br i1 %3, label %4, label %5
4: ; preds = %1
store i8 0, i8* %0
br label %5
5: ; preds = %1, %4
%6 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_185() {
  Assert_real((isqrt(185) == 13),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              930, ("Integer square root of 185 should be 13"));
}


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

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

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

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 185 should be 13\00"
define void @t_sqrt_185() {
%1 = tail call i32 @isqrt(i32 185)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 930, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_Gets(int, int, int, unsigned char *);
char thermo_hex_to_temp(unsigned int);
char thermo_lo_threshold_get() {
  unsigned int val;
  char ret;
  I2C_Gets(0x94, 0x3, 2, (unsigned char *)&val);
  ret = thermo_hex_to_temp(val);
  if (ret == ((-55) - 1))
    return (128);
  else
    return ret;
}


x86 assembly (clang, -O0):
<thermo_lo_threshold_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rcx
mov    $0x94,%edi
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <I2C_Gets@plt>
mov    -0x8(%rbp),%edi
call   1040 <thermo_hex_to_temp@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0xffffffc8,%eax
jne    1161 <thermo_lo_threshold_get+0x41>
movb   $0x80,-0x1(%rbp)
jmp    1167 <thermo_lo_threshold_get+0x47>
mov    -0x9(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thermo_lo_threshold_get>:
push   %rax
lea    0x4(%rsp),%rcx
mov    $0x94,%edi
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <I2C_Gets@plt>
mov    0x4(%rsp),%edi
call   1040 <thermo_hex_to_temp@plt>
cmp    $0xc8,%al
movzbl %al,%ecx
mov    $0x80,%eax
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @thermo_lo_threshold_get() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i8
%4 = bitcast i32* %2 to i8*
%5 = call i32 @I2C_Gets(i32 148, i32 3, i32 2, i8* %4)
%6 = load i32, i32* %2
%7 = call signext i8 @thermo_hex_to_temp(i32 %6)
store i8 %7, i8* %3
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, -56
br i1 %10, label %11, label %12
11: ; preds = %0
store i8 -128, i8* %1
br label %14
12: ; preds = %0
%13 = load i8, i8* %3
store i8 %13, i8* %1
br label %14
14: ; preds = %12, %11
%15 = load i8, i8* %1
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @thermo_lo_threshold_get() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @I2C_Gets(i32 148, i32 3, i32 2, i8* %2)
%4 = load i32, i32* %1
%5 = call signext i8 @thermo_hex_to_temp(i32 %4)
%6 = icmp eq i8 %5, -56
%7 = select i1 %6, i8 -128, i8 %5
ret i8 %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t rotl64(const uint64_t x, int k) { return (x << k) | (x >> (64 - k)); }


x86 assembly (clang, -O0):
<rotl64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl64>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotl64(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 64, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotl64(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 64, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ s;

/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ dev_write(int, unsigned char *, int);
int /*<<< orphan*/ init();
void kmain(void) {
  unsigned char s[] = "abcdefghijklmnopqrstuvxwyz";
  init();
  clear();
  dev_write(1, s, sizeof(s));
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb8(%rip),%ax
mov    %ax,-0x8(%rbp)
mov    0xeb0(%rip),%al
mov    %al,-0x6(%rbp)
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <clear@plt>
lea    -0x20(%rbp),%rsi
mov    $0x1,%edi
mov    $0x1b,%edx
call   1030 <dev_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmain>:
sub    $0x28,%rsp
movups 0xed0(%rip),%xmm0
movups %xmm0,0xb(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <clear@plt>
mov    %rsp,%rsi
mov    $0x1,%edi
mov    $0x1b,%edx
call   1030 <dev_write@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.kmain.s = [27 x i8] c"abcdefghijklmnopqrstuvxwyz\00"
define void @kmain() {
%1 = alloca [27 x i8]
%2 = bitcast [27 x i8]* %1 to i8*
%3 = call i32 (...) @init()
%4 = call i32 (...) @clear()
%5 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 0
%6 = call i32 @dev_write(i32 1, i8* %5, i32 27)
ret void
}

LLVM IR (-O2):
@__const.kmain.s = [27 x i8] c"abcdefghijklmnopqrstuvxwyz\00"
define void @kmain() {
%1 = alloca [27 x i8]
%2 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @init()
%4 = tail call i32 (...) @clear()
%5 = call i32 @dev_write(i32 1, i8* %2, i32 27)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
int main(int argc, const char *argv[]) {
  for (int i = 0; i < argc; i++) {
    printf("The argument %i is %s\n", i, argv[i]);
  }
  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   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [23 x i8] c"The argument %i is %s\0A\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 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"The argument %i is %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
int quirk_amdiso(struct ohci_hcd *ohci) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ohci_hcd = type opaque
define i32 @quirk_amdiso(%struct.ohci_hcd* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegReadByte(int /*<<< orphan*/, int);
uint8_t wiznetGetSocketKeepAliveTime(uint8_t socket) {
  return wiznetRegReadByte(socket, (0x0000 + 0x002F));
}


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

x86 assembly (clang, -O2):
<wiznetGetSocketKeepAliveTime>:
mov    $0x2f,%esi
jmp    1030 <wiznetRegReadByte@plt>

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

LLVM IR (-O2):
define i32 @wiznetGetSocketKeepAliveTime(i32 %0) {
%2 = tail call i32 @wiznetRegReadByte(i32 %0, i32 47)
ret i32 %2
}
int _read(int file, char *ptr, int len) {
  (void)file;
  (void)ptr;
  (void)len;
  return -1;
}


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_read(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}
int initmultiplayersparms(int argc, char const *const argv[]) {
  argc = argc;
  argv = argv;
  return 0;
}


x86 assembly (clang, -O0):
<initmultiplayersparms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @initmultiplayersparms(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
store i32 %5, i32* %3
%6 = load i8**, i8*** %4
store i8** %6, i8*** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @initmultiplayersparms(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int more_mem(int n) { return (((n * 15) / 10) + 1); }


x86 assembly (clang, -O0):
<more_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0xf,-0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<more_mem>:
lea    (%rdi,%rdi,4),%eax
lea    (%rax,%rax,2),%eax
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
sar    $0x22,%rcx
shr    $0x3f,%rax
add    %ecx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @more_mem(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 15
%5 = sdiv i32 %4, 10
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @more_mem(i32 %0) {
%2 = mul nsw i32 %0, 15
%3 = sdiv i32 %2, 10
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
double cos(int);
double kern(int i) {
  if (1) {
    return 0.5 * (cos(i * 3.14159265358979323846 / 61) + 1.0);
  } else {
    return 1.;
  }
}


x86 assembly (clang, -O0):
<kern>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xef0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xedc(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xebc(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xea8(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kern>:
push   %rax
cvtsi2sd %edi,%xmm0
mulsd  0xee3(%rip),%xmm0
divsd  0xee3(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
addsd  0xeda(%rip),%xmm0
mulsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @kern(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 0x400921FB54442D18
%6 = fdiv double %5, 6.100000e+01
%7 = fptosi double %6 to i32
%8 = call double @cos(i32 %7)
%9 = fadd double %8, 1.000000e+00
%10 = fmul double 5.000000e-01, %9
ret double %10
}

LLVM IR (-O2):
define double @kern(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 0x400921FB54442D18
%4 = fdiv double %3, 6.100000e+01
%5 = fptosi double %4 to i32
%6 = tail call double @cos(i32 %5)
%7 = fadd double %6, 1.000000e+00
%8 = fmul double %7, 5.000000e-01
ret double %8
}
/* Variables and functions */
int is_null_or_empty(const char string[]) {
  return string == NULL || string[0] == '\0';
}


x86 assembly (clang, -O0):
<is_null_or_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <is_null_or_empty+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_null_or_empty>:
test   %rdi,%rdi
je     110e <is_null_or_empty+0xe>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_null_or_empty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br label %11
11: ; preds = %5, %1
%12 = phi i1 [ true, %1 ], [ %10, %5 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_null_or_empty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
void vlogical_imm_andminus1_int64_t(int64_t *dst, int count) {
  for (int i = 0; i < count; i++)
    dst[i] = dst[i] & -1;
}


x86 assembly (clang, -O0):
<vlogical_imm_andminus1_int64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1145 <vlogical_imm_andminus1_int64_t+0x45>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
and    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <vlogical_imm_andminus1_int64_t+0x12>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @vlogical_imm_andminus1_int64_t(i32* nocapture %0, i32 %1) {
ret void
}
void resetLetterSt(struct LetterEdge **letters) {
  letters[0] = ((void *)0);
  letters[1] = ((void *)0);
  letters[2] = ((void *)0);
  letters[3] = ((void *)0);
}


x86 assembly (clang, -O0):
<resetLetterSt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x10(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetLetterSt>:
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
%struct.LetterEdge = type opaque
define void @resetLetterSt(%struct.LetterEdge** %0) {
%2 = alloca %struct.LetterEdge**
store %struct.LetterEdge** %0, %struct.LetterEdge*** %2
%3 = load %struct.LetterEdge**, %struct.LetterEdge*** %2
%4 = getelementptr inbounds %struct.LetterEdge*, %struct.LetterEdge** %3, i64 0
store %struct.LetterEdge* null, %struct.LetterEdge** %4
%5 = load %struct.LetterEdge**, %struct.LetterEdge*** %2
%6 = getelementptr inbounds %struct.LetterEdge*, %struct.LetterEdge** %5, i64 1
store %struct.LetterEdge* null, %struct.LetterEdge** %6
%7 = load %struct.LetterEdge**, %struct.LetterEdge*** %2
%8 = getelementptr inbounds %struct.LetterEdge*, %struct.LetterEdge** %7, i64 2
store %struct.LetterEdge* null, %struct.LetterEdge** %8
%9 = load %struct.LetterEdge**, %struct.LetterEdge*** %2
%10 = getelementptr inbounds %struct.LetterEdge*, %struct.LetterEdge** %9, i64 3
store %struct.LetterEdge* null, %struct.LetterEdge** %10
ret void
}

LLVM IR (-O2):
%struct.LetterEdge = type opaque
define void @resetLetterSt(%struct.LetterEdge** nocapture writeonly %0) {
%2 = bitcast %struct.LetterEdge** %0 to i8*
ret void
}
void test_case_end() {}


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

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

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

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

/* Variables and functions */
struct page *alloc_pages_node(int /*<<< orphan*/, int, int /*<<< orphan*/);
int mapping_gfp_mask(struct address_space *);
__attribute__((always_)) struct page *
page_cache_alloc(struct address_space *x) {
  return alloc_pages_node(((0)), mapping_gfp_mask(x) | 0x20000u, 0);
}


x86 assembly (clang, -O0):
<page_cache_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mapping_gfp_mask@plt>
mov    %eax,%esi
or     $0x20000,%esi
xor    %edx,%edx
mov    %edx,%edi
call   1040 <alloc_pages_node@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<page_cache_alloc>:
push   %rax
call   1030 <mapping_gfp_mask@plt>
or     $0x20000,%eax
xor    %edi,%edi
mov    %eax,%esi
xor    %edx,%edx
pop    %rax
jmp    1040 <alloc_pages_node@plt>

LLVM IR (-O0):
%struct.page = type { i32 }
%struct.address_space = type { i32 }
define %struct.page* @page_cache_alloc(%struct.address_space* %0) {
%2 = alloca %struct.address_space*
store %struct.address_space* %0, %struct.address_space** %2
%3 = load %struct.address_space*, %struct.address_space** %2
%4 = call i32 @mapping_gfp_mask(%struct.address_space* %3)
%5 = or i32 %4, 131072
%6 = call %struct.page* @alloc_pages_node(i32 0, i32 %5, i32 0)
ret %struct.page* %6
}

LLVM IR (-O2):
%struct.page = type { i32 }
%struct.address_space = type { i32 }
define %struct.page* @page_cache_alloc(%struct.address_space* %0) {
%2 = tail call i32 @mapping_gfp_mask(%struct.address_space* %0)
%3 = or i32 %2, 131072
%4 = tail call %struct.page* @alloc_pages_node(i32 0, i32 %3, i32 0)
ret %struct.page* %4
}
void clearmem(start, cnt) char *start;
int cnt;
{
  while (cnt--)
    *start++ = '\0';
}


x86 assembly (clang, -O0):
<clearmem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1136 <clearmem+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    110b <clearmem+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearmem>:
test   %esi,%esi
je     1122 <clearmem+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @clearmem(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
void test() {
#pragma omp critical
  ;
}


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

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

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

LLVM IR (-O2):
define void @test() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kore_domain_closelogs();
void kore_accesslog_worker_init(void) { kore_domain_closelogs(); }


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

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

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

LLVM IR (-O2):
define void @kore_accesslog_worker_init() {
%1 = tail call i32 (...) @kore_domain_closelogs()
ret void
}
const char *_Locale_positive_sign(struct _Locale_monetary *__DUMMY_PAR) {
  return "";
}


x86 assembly (clang, -O0):
<_Locale_positive_sign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._Locale_monetary = type opaque
@.str = [1 x i8] zeroinitializer
define i8* @_Locale_positive_sign(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct._Locale_monetary = type opaque
@.str = [1 x i8] zeroinitializer
define i8* @_Locale_positive_sign(%struct._Locale_monetary* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
void month_size(int rows, int cols) {}


x86 assembly (clang, -O0):
<month_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @month_size(i32 %0, i32 %1) {
ret void
}
int axp_set_warning(int warn1, int warn2) {
  int ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<axp_set_warning>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @axp_set_warning(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @axp_set_warning(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void vid_write(const char *str) { printf("%s", str); }


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

x86 assembly (clang, -O2):
<vid_write>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @vid_write(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey = [49 x i8] c"SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey\00"
define void @SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @__func__.SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey = [49 x i8] c"SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey\00"
define void @SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @__func__.SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ str_indexof(char const *, char const *);
int str_contains(const char *haystack, const char *needle) {
  return str_indexof(haystack, needle) >= 0;
}


x86 assembly (clang, -O0):
<str_contains>:
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 <str_indexof@plt>
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_contains>:
push   %rax
call   1030 <str_indexof@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @str_contains(i8* %0, i8* %1) {
%3 = tail call i64 @str_indexof(i8* %0, i8* %1)
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
%6 = xor i32 %5, 1
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void insertExtSegAddr(FILE *fp) { fprintf(fp, ":020000021000EC\n"); }


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

x86 assembly (clang, -O2):
<insertExtSegAddr>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [17 x i8] c":020000021000EC\0A\00"
define void @insertExtSegAddr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c":020000021000EC\0A\00"
define void @insertExtSegAddr(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 16, i64 1, i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ strlen(char *);
scalar_t__ write(int, char *, int /*<<< orphan*/);
void putpopbulk(int socket, char *data) {
  ssize_t datalen = strlen(data);
  if (write(socket, data, datalen) < 0) {
    perror("write");
  }
}


x86 assembly (clang, -O0):
<putpopbulk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
cmp    $0x0,%rax
jge    1170 <putpopbulk+0x40>
lea    0xe95(%rip),%rdi
call   1050 <perror@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putpopbulk>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
test   %rax,%rax
js     1158 <putpopbulk+0x28>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xea1(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <perror@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"write\00"
define void @putpopbulk(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = call i64 @write(i32 %8, i8* %9, i32 %10)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"write\00"
define void @putpopbulk(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @write(i32 %0, i8* %1, i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int telechips_test_crc(unsigned char *, int);
int test_firmware_tcc(unsigned char *buf, int length) {
  return telechips_test_crc(buf, length);
}


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

x86 assembly (clang, -O2):
<test_firmware_tcc>:
jmp    1030 <telechips_test_crc@plt>

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

LLVM IR (-O2):
define i32 @test_firmware_tcc(i8* %0, i32 %1) {
%3 = tail call i32 @telechips_test_crc(i8* %0, i32 %1)
ret i32 %3
}