xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void ICPrintMamaPapa(int mamaValue, int papaValue) {
  char *parentsValue;
  char *mamaString = "Mama";
  char *papaString = "Papa";
  if (mamaValue > papaValue) {
    parentsValue = mamaString;
  } else {
    parentsValue = papaString;
  }
  printf("%s\n", parentsValue);
}


x86 assembly (clang, -O0):
<ICPrintMamaPapa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xed5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    114d <ICPrintMamaPapa+0x3d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1155 <ICPrintMamaPapa+0x45>
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ICPrintMamaPapa>:
cmp    %esi,%edi
lea    0xee7(%rip),%rax
lea    0xee5(%rip),%rsi
cmovg  %rax,%rsi
lea    0xedf(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"Mama\00"
@.str.1 = [5 x i8] c"Papa\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @ICPrintMamaPapa(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_word(char *);
int is_palindrome_iter(char *);
int is_palindrome_rec(char *);
int /*<<< orphan*/ print_res(int, int, char *);
int main(void) {
  char input[100];
  int res1, res2;
  get_word(input);
  res1 = is_palindrome_iter(input);
  res2 = is_palindrome_rec(input);
  print_res(res1, res2, input);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1060 <get_word@plt>
lea    -0x70(%rbp),%rdi
call   1040 <is_palindrome_iter@plt>
mov    %eax,-0x74(%rbp)
lea    -0x70(%rbp),%rdi
call   1050 <is_palindrome_rec@plt>
mov    %eax,-0x78(%rbp)
mov    -0x74(%rbp),%edi
mov    -0x78(%rbp),%esi
lea    -0x70(%rbp),%rdx
call   1030 <print_res@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x68,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <get_word@plt>
mov    %rbx,%rdi
call   1040 <is_palindrome_iter@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <is_palindrome_rec@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %rbx,%rdx
call   1030 <print_res@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @get_word(i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @is_palindrome_iter(i8* %7)
store i32 %8, i32* %3
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = call i32 @is_palindrome_rec(i8* %9)
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%14 = call i32 @print_res(i32 %11, i32 %12, i8* %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @get_word(i8* %2)
%4 = call i32 @is_palindrome_iter(i8* %2)
%5 = call i32 @is_palindrome_rec(i8* %2)
%6 = call i32 @print_res(i32 %4, i32 %5, i8* %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ eMalloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *eCopyString(char *s) {
  char *t;
  t = (char *)eMalloc(strlen(s) + 1);
  strcpy(t, s);
  return t;
}


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

x86 assembly (clang, -O2):
<eCopyString>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <eMalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @eCopyString(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @eMalloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int support_vsprintf(char *, char const *, int /*<<< orphan*/);
int vsnprintf(char *str, size_t size, const char *format, va_list arg_ptr) {
  return support_vsprintf(str, format, arg_ptr);
}


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

x86 assembly (clang, -O2):
<vsnprintf>:
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <support_vsprintf@plt>

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

LLVM IR (-O2):
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 @support_vsprintf(i8* %0, i8* %2, i32 %3)
ret i32 %5
}
int arm_cpu_run(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @arm_cpu_run() {
ret i32 0
}
unsigned long count_line_summ(unsigned long insumm, char const *str) {
  char unsigned const *s = (unsigned const char *)str;
  for (; *s; s++)
    insumm += *s;
  return insumm;
}


x86 assembly (clang, -O0):
<count_line_summ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1141 <count_line_summ+0x41>
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <count_line_summ+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_line_summ>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <count_line_summ+0x21>
add    $0x1,%rsi
nopl   (%rax)
movzbl %cl,%ecx
add    %rcx,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <count_line_summ+0x10>
ret

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

LLVM IR (-O2):
define i64 @count_line_summ(i64 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i8* [ %11, %5 ], [ %1, %2 ]
%8 = phi i64 [ %10, %5 ], [ %0, %2 ]
%9 = zext i8 %6 to i64
%10 = add i64 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i64 [ %0, %2 ], [ %10, %5 ]
ret i64 %15
}
int efx_init_debugfs_port(struct efx_nic *efx) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.efx_nic = type opaque
define i32 @efx_init_debugfs_port(%struct.efx_nic* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int);
int /*<<< orphan*/ output_byte(int);
void emit_fmul(int r) {
  assem_debug("fmul st%d\n", r);
  output_byte(0xd8);
  output_byte(0xc8 + r);
}


x86 assembly (clang, -O0):
<emit_fmul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd8,%edi
call   1040 <output_byte@plt>
mov    -0x4(%rbp),%edi
add    $0xc8,%edi
call   1040 <output_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fmul>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <assem_debug@plt>
mov    $0xd8,%edi
call   1040 <output_byte@plt>
add    $0xc8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <output_byte@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"fmul st%d\0A\00"
define void @emit_fmul(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @assem_debug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @output_byte(i32 216)
%6 = load i32, i32* %2
%7 = add nsw i32 200, %6
%8 = call i32 @output_byte(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"fmul st%d\0A\00"
define void @emit_fmul(i32 %0) {
%2 = tail call i32 @assem_debug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @output_byte(i32 216)
%4 = add nsw i32 %0, 200
%5 = tail call i32 @output_byte(i32 %4)
ret void
}
void ff_hevc_put_hevc_bi_w_pel_pixels6_8_sse4() {}


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

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

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

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

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ cutItemString(char *, char *, char, int, int);
int cutItemToInt(char *in, char sep, int num) {
  char tmp[64];
  cutItemString(in, tmp, sep, num, sizeof(tmp));
  return atoi(tmp);
}


x86 assembly (clang, -O0):
<cutItemToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x9(%rbp),%al
mov    -0x10(%rbp),%ecx
mov    $0x40,%r8d
movsbl %al,%edx
call   1030 <cutItemString@plt>
lea    -0x50(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutItemToInt>:
push   %rbx
sub    $0x40,%rsp
mov    %edx,%ecx
mov    %esi,%edx
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x40,%r8d
call   1030 <cutItemString@plt>
mov    %rbx,%rdi
call   1040 <atoi@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cutItemToInt(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i32
%7 = alloca [64 x i8]
store i8* %0, i8** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%10 = load i8, i8* %5
%11 = load i32, i32* %6
%12 = call i32 @cutItemString(i8* %8, i8* %9, i8 signext %10, i32 %11, i32 64)
%13 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%14 = call i32 @atoi(i8* %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @cutItemToInt(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca [64 x i8]
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%6 = call i32 @cutItemString(i8* %0, i8* %5, i8 signext %1, i32 %2, i32 64)
%7 = call i32 @atoi(i8* %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double x, y;
  scanf("%lf%lf", &x, &y);
  printf("%.2lf %.2lf %.2lf", x, y, x + y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
addsd  -0x10(%rbp),%xmm2
lea    0xeb0(%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    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [18 x i8] c"%.2lf %.2lf %.2lf\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fadd double %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %6, double %7, double %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __assert_func(char *, int, char *, char *);
void force_error() {
  __assert_func("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/epicsdeb/rtems/refs/heads/"
                "master/testsuites/sptests/spfatal10/testcase.h",
                23, "Init", "forced");
}


x86 assembly (clang, -O0):
<force_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x17,%esi
lea    0xf7c(%rip),%rdx
lea    0xf7a(%rip),%rcx
call   1030 <__assert_func@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<force_error>:
lea    0xee9(%rip),%rdi
lea    0xf85(%rip),%rdx
lea    0xf83(%rip),%rcx
mov    $0x17,%esi
jmp    1030 <__assert_func@plt>

LLVM IR (-O0):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/epicsdeb/rtems/refs/heads/master/testsuites/sptests/spfatal10/testcase.h\00"
@.str.1 = [5 x i8] c"Init\00"
@.str.2 = [7 x i8] c"forced\00"
define void @force_error() {
%1 = call i32 @__assert_func(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/epicsdeb/rtems/refs/heads/master/testsuites/sptests/spfatal10/testcase.h\00"
@.str.1 = [5 x i8] c"Init\00"
@.str.2 = [7 x i8] c"forced\00"
define void @force_error() {
%1 = tail call i32 @__assert_func(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
void print_array(const char **strarray, int n) {
  for (int i = 0; i < n; i++) {
    printf("%d: %s\n", i, strarray[i]);
  }
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <print_array+0x4b>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <print_array+0x37>
mov    %rdi,%r14
mov    %esi,%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 <print_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d: %s\0A\00"
define void @print_array(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 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 test_imm_5Aint32_reg(int val) { return ((val) & (0x5A << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_5Aint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x5a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Aint32_reg>:
test   $0x5a,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_5Aint32_reg(i32 %0) {
%2 = and i32 %0, 90
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
float i1(float);
float f1(float f) { return i1(f); }


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

x86 assembly (clang, -O2):
<f1>:
jmp    1030 <i1@plt>

LLVM IR (-O0):
define float @f1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @i1(float %3)
ret float %4
}

LLVM IR (-O2):
define float @f1(float %0) {
%2 = tail call float @i1(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[], char *envp[]) {
  printf("hello world\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int init_rcce(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @init_rcce() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void strcpy_Bad() {
  char src[5] = "test";
  char dst[4];
  strcpy(dst, src);
}


x86 assembly (clang, -O0):
<strcpy_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xedd(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x9(%rbp),%rdi
lea    -0x5(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_Bad>:
sub    $0x18,%rsp
movb   $0x0,0x10(%rsp)
movl   $0x74736574,0xc(%rsp)
74
lea    0x14(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <strcpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.strcpy_Bad.src = [5 x i8] c"test\00"
define void @strcpy_Bad() {
%1 = alloca [5 x i8]
%2 = alloca [4 x i8]
%3 = bitcast [5 x i8]* %1 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%6 = call i32 @strcpy(i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@__const.strcpy_Bad.src = [5 x i8] c"test\00"
define void @strcpy_Bad() {
%1 = alloca [5 x i8]
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
float sqrtf(int /*<<< orphan*/);
int /*<<< orphan*/ stdlib_strided_snanvarianceyc(int /*<<< orphan*/ const,
                                                 float const, float const *,
                                                 int /*<<< orphan*/ const);
float stdlib_strided_snanstdevyc(const int64_t N, const float correction,
                                 const float *X, const int64_t stride) {
  return sqrtf(stdlib_strided_snanvarianceyc(N, correction, X, stride));
}


x86 assembly (clang, -O0):
<stdlib_strided_snanstdevyc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
movss  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <stdlib_strided_snanvarianceyc@plt>
mov    %eax,%edi
call   1030 <sqrtf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @stdlib_strided_snanstdevyc(i32 %0, float %1, float* %2, i32 %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca float*
%8 = alloca i32
store i32 %0, i32* %5
store float %1, float* %6
store float* %2, float** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load float, float* %6
%11 = load float*, float** %7
%12 = load i32, i32* %8
%13 = call i32 @stdlib_strided_snanvarianceyc(i32 %9, float %10, float* %11, i32 %12)
%14 = call float @sqrtf(i32 %13)
ret float %14
}

LLVM IR (-O2):
define float @stdlib_strided_snanstdevyc(i32 %0, float %1, float* %2, i32 %3) {
%5 = tail call i32 @stdlib_strided_snanvarianceyc(i32 %0, float %1, float* %2, i32 %3)
%6 = tail call float @sqrtf(i32 %5)
ret float %6
}
int write(int i, char *c, int len) {
  long __res, dummy;
  __asm__ __volatile__("int $0x80"
                       : "=a"(__res), "=&b"(dummy)
                       : "0"(4), "1"((long)(i)), "c"((long)(c)),
                         "d"((long)(len)));
  return (int)__res;
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movslq -0xc(%rbp),%rbx
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
mov    $0x4,%eax
int    $0x80
mov    %rax,-0x28(%rbp)
mov    %rbx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
push   %rbx
mov    %rsi,%rcx
movslq %edi,%rbx
movslq %edx,%rdx
mov    $0x4,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = load i8*, i8** %5
%12 = ptrtoint i8* %11 to i64
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = call { i64, i64 } asm sideeffect "int $$0x80", "={ax},=&{bx},0,1,{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i64 4, i64 %10, i64 %12, i64 %14)
%16 = extractvalue { i64, i64 } %15, 0
%17 = extractvalue { i64, i64 } %15, 1
store i64 %16, i64* %7
store i64 %17, i64* %8
%18 = load i64, i64* %7
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = ptrtoint i8* %1 to i64
%6 = sext i32 %2 to i64
%7 = tail call { i64, i64 } asm sideeffect "int $$0x80", "={ax},=&{bx},0,1,{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i64 4, i64 %4, i64 %5, i64 %6)
%8 = extractvalue { i64, i64 } %7, 0
%9 = trunc i64 %8 to i32
ret i32 %9
}
void handle_dabt(void) { return; }


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

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

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

LLVM IR (-O2):
define void @handle_dabt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ im_a_dummy();
void testFuncMCDC1(unsigned char decision1, unsigned char decision2) {
  if (decision1 && ((decision2 || decision1) || (!decision1 || decision2))) {
    im_a_dummy();
  }
}


x86 assembly (clang, -O0):
<testFuncMCDC1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
je     1169 <testFuncMCDC1+0x59>
movzbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    1162 <testFuncMCDC1+0x52>
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    1162 <testFuncMCDC1+0x52>
cmpb   $0x0,-0x1(%rbp)
je     1162 <testFuncMCDC1+0x52>
movzbl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1169 <testFuncMCDC1+0x59>
mov    $0x0,%al
call   1030 <im_a_dummy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFuncMCDC1>:
test   %edi,%edi
je     111b <testFuncMCDC1+0xb>
xor    %eax,%eax
jmp    1030 <im_a_dummy@plt>
ret

LLVM IR (-O0):
define void @testFuncMCDC1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %2
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %23, label %12
12: ; preds = %8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %23, label %16
16: ; preds = %12
%17 = load i8, i8* %3
%18 = icmp ne i8 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19, %16, %12, %8
%24 = call i32 (...) @im_a_dummy()
br label %25
25: ; preds = %23, %19, %2
ret void
}

LLVM IR (-O2):
define void @testFuncMCDC1(i8 zeroext %0, i8 zeroext %1) {
%3 = icmp eq i8 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @im_a_dummy()
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version() { printf("chdir version 1.0\nHitlion King\n"); }


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"chdir version 1.0\0AHitlion King\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"chdir version 1.0\0AHitlion King\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
int getFortyTwo() { return 42; }


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

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

LLVM IR (-O0):
define i32 @getFortyTwo() {
ret i32 42
}

LLVM IR (-O2):
define i32 @getFortyTwo() {
ret i32 42
}
void gtk_tree_view_get_selection() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_selection() {
ret void
}
/* Variables and functions */
char *strchr(char *, char);
void character_to_null(char *string, char character) {
  char *position;
  while ((position = strchr(string, character)) != NULL) {
    *position = '\0';
  }
}


x86 assembly (clang, -O0):
<character_to_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1149 <character_to_null+0x39>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
jmp    1122 <character_to_null+0x12>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<character_to_null>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strchr@plt>
test   %rax,%rax
je     1142 <character_to_null+0x32>
movsbl %bpl,%ebp
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1130 <character_to_null+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @character_to_null(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
store i8* %0, i8** %3
store i8 %1, i8* %4
br label %6
6: ; preds = %11, %2
%7 = load i8*, i8** %3
%8 = load i8, i8* %4
%9 = call i8* @strchr(i8* %7, i8 signext %8)
store i8* %9, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = load i8*, i8** %5
store i8 0, i8* %12
br label %6
13: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @character_to_null(i8* %0, i8 signext %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %7, %5 ], [ %3, %2 ]
store i8 0, i8* %6
%7 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %1)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %5
9: ; preds = %5, %2
ret void
}
unsigned int SDBMHash(const char *str) {
  unsigned int hash = 0;
  while (*str) {
    hash = (*str++) + (hash << 6) + (hash << 16) - hash;
  }
  return (hash & 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<SDBMHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <SDBMHash+0x49>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <SDBMHash+0xf>
mov    -0xc(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDBMHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <SDBMHash+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
imul   $0x1003f,%eax,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <SDBMHash+0x10>
and    $0x7fffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @SDBMHash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i32
%10 = mul i32 %6, 65599
%11 = add i32 %10, %9
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %11, 2147483647
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printer_disable_steppers();
int M84_f(char *s) {
  printer_disable_steppers();
  return 1;
}


x86 assembly (clang, -O0):
<M84_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <printer_disable_steppers@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M84_f>:
push   %rax
xor    %eax,%eax
call   1030 <printer_disable_steppers@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @M84_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @printer_disable_steppers()
ret i32 1
}

LLVM IR (-O2):
define i32 @M84_f(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @printer_disable_steppers()
ret i32 1
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *faddExt(char *filename, char *extension) {
  char *result = malloc(strlen(filename) + strlen(extension) + 1);
  strcpy(result, filename);
  strcat(result, extension);
  return result;
}


x86 assembly (clang, -O0):
<faddExt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<faddExt>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @faddExt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %7, %9
%11 = add nsw i64 %10, 1
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %5
%17 = load i8*, i8** %4
%18 = call i32 @strcat(i8* %16, i8* %17)
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @faddExt(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 1
%6 = add i64 %5, %4
%7 = tail call i8* @malloc(i64 %6)
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
%9 = tail call i32 @strcat(i8* %7, i8* %1)
ret i8* %7
}
void sysfs_rename_dir(struct kobject *k, const char *new_name) { ; }


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
define void @sysfs_rename_dir(%struct.kobject* %0, i8* %1) {
%3 = alloca %struct.kobject*
%4 = alloca i8*
store %struct.kobject* %0, %struct.kobject** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.kobject = type opaque
define void @sysfs_rename_dir(%struct.kobject* nocapture %0, i8* nocapture %1) {
ret void
}
unsigned int unsignedint_ignoring_unsignedchar(unsigned int x,
                                               unsigned char y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedint_ignoring_unsignedchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedint_ignoring_unsignedchar>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @unsignedint_ignoring_unsignedchar(i32 returned %0, i8 zeroext %1) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ __inc_remove_counter();
int __renameat(int, char const *, int, char const *);
int renameat(int oldfd, const char *old, int newfd, const char *new) {
  int res = __renameat(oldfd, old, newfd, new);
  if (res == 0) {
    __inc_remove_counter();
  }
  return res;
}


x86 assembly (clang, -O0):
<renameat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <__renameat@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    115d <renameat+0x3d>
mov    $0x0,%al
call   1040 <__inc_remove_counter@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renameat>:
push   %rbx
call   1030 <__renameat@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1133 <renameat+0x13>
xor    %eax,%eax
call   1040 <__inc_remove_counter@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @renameat(i32 %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @__renameat(i32 %0, i8* %1, i32 %2, i8* %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 (...) @__inc_remove_counter()
br label %9
9: ; preds = %7, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) { printf("Usage: df [OPTION]... [FILE]...\n"); }


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Usage: df [OPTION]... [FILE]...\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"Usage: df [OPTION]... [FILE]...\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
void ft_add_test_case(char **data, char *s1, char *s2) {
  data[0] = s1;
  data[1] = s2;
}


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

x86 assembly (clang, -O2):
<ft_add_test_case>:
mov    %rsi,(%rdi)
mov    %rdx,0x8(%rdi)
ret

LLVM IR (-O0):
define void @ft_add_test_case(i8** %0, i8* %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 0
store i8* %7, i8** %9
%10 = load i8*, i8** %6
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 1
store i8* %10, i8** %12
ret void
}

LLVM IR (-O2):
define void @ft_add_test_case(i8** nocapture writeonly %0, i8* %1, i8* %2) {
store i8* %1, i8** %0
%4 = getelementptr inbounds i8*, i8** %0, i64 1
store i8* %2, i8** %4
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned long now_ms() {
  struct timespec t;
  clock_gettime(CLOCK_REALTIME, &t);
  unsigned long sec = t.tv_sec * 1000;
  unsigned long msec = (t.tv_nsec + 500000) / 1000000;
  return sec + msec;
}


x86 assembly (clang, -O0):
<now_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,-0x8(%rbp),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7a120,%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
cltq
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now_ms>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
movslq (%rsp),%rax
mov    $0x7a120,%ecx
add    0x4(%rsp),%ecx
imul   $0x3e8,%rax,%rdx
movslq %ecx,%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x32,%rax
add    %ecx,%eax
cltq
add    %rdx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define i64 @now_ms() {
%1 = alloca %struct.timespec
%2 = alloca i64
%3 = alloca i64
%4 = load i32, i32* @CLOCK_REALTIME
%5 = call i32 @clock_gettime(i32 %4, %struct.timespec* %1)
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = sext i32 %8 to i64
store i64 %9, i64* %2
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 500000
%13 = sdiv i32 %12, 1000000
%14 = sext i32 %13 to i64
store i64 %14, i64* %3
%15 = load i64, i64* %2
%16 = load i64, i64* %3
%17 = add i64 %15, %16
ret i64 %17
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define i64 @now_ms() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 500000
%12 = sdiv i32 %11, 1000000
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, %8
ret i64 %14
}
int isGreaterThan10(int value) { return (value > 10); }


x86 assembly (clang, -O0):
<isGreaterThan10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isGreaterThan10>:
xor    %eax,%eax
cmp    $0xb,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @isGreaterThan10(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isGreaterThan10(i32 %0) {
%2 = icmp sgt i32 %0, 10
%3 = zext i1 %2 to i32
ret i32 %3
}