xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ sched_getscheduler(int);
int main() {
  sched_getscheduler(0);
  sched_getscheduler((pid_t)-1);
  sched_getscheduler(999999);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sched_getscheduler(i32 0)
%2 = tail call i32 @sched_getscheduler(i32 -1)
%3 = tail call i32 @sched_getscheduler(i32 999999)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cstrcat(char *, char *);
int main() {
  char *s1;
  char *s2;
  cstrcat(s1, s2);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @cstrcat(i8* undef, i8* undef)
ret i32 0
}
void Et_shutdown(struct usb_spca50x *spca50x) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @Et_shutdown(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
void Log0(const char *prompt) { puts(prompt); }


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

x86 assembly (clang, -O2):
<Log0>:
jmp    1030 <puts@plt>

LLVM IR (-O0):
define void @Log0(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @puts(i8* %3)
ret void
}

LLVM IR (-O2):
define void @Log0(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void die(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(2);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
scalar_t__ isdigit(char);
int /*<<< orphan*/ printf2(char *, char *);
void GenPrintLabel(char *Label) {
  {
    if (isdigit(*Label))
      printf2("$L%s", Label);
    else
      printf2("%s", Label);
  }
}


x86 assembly (clang, -O0):
<GenPrintLabel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isdigit@plt>
cmp    $0x0,%rax
je     1157 <GenPrintLabel+0x37>
mov    -0x8(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf2@plt>
jmp    1167 <GenPrintLabel+0x47>
mov    -0x8(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPrintLabel>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1040 <isdigit@plt>
test   %rax,%rax
lea    0xecc(%rip),%rax
lea    0xec3(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf2@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"$L%s\00"
@.str.1 = [3 x i8] c"%s\00"
define void @GenPrintLabel(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = call i64 @isdigit(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @printf2(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %13
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i32 @printf2(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"$L%s\00"
@.str.1 = [3 x i8] c"%s\00"
define void @GenPrintLabel(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @printf2(i8* %5, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello there!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello there!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void latex_output_table_footer(FILE *output_stream) {
  fprintf(output_stream, "\n\\hline\n\\end{tabular}\n");
}


x86 assembly (clang, -O0):
<latex_output_table_footer>:
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):
<latex_output_table_footer>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [23 x i8] c"\0A\\hline\0A\\end{tabular}\0A\00"
define void @latex_output_table_footer(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 22, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void faz_command() {
  printf("faz"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"faz\00"
define void @faz_command() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
int qsort_cmp__FILE_COUNT_INT(const void *x, const void *y) {
  if (*((int *)x) > *((int *)y))
    return (-1);
  else
    return (*((int *)x) < *((int *)y));
}


x86 assembly (clang, -O0):
<qsort_cmp__FILE_COUNT_INT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <qsort_cmp__FILE_COUNT_INT+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <qsort_cmp__FILE_COUNT_INT+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_cmp__FILE_COUNT_INT>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @qsort_cmp__FILE_COUNT_INT(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ ubsan_report_overflow(void *, void *, void *, char *,
                                         char *);
void __ubsan_handle_mul_overflow(void *data_raw, void *lhs_raw, void *rhs_raw) {
  ubsan_report_overflow(data_raw, lhs_raw, rhs_raw, "mul", "*");
}


x86 assembly (clang, -O0):
<__ubsan_handle_mul_overflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rcx
lea    0xec6(%rip),%r8
call   1030 <ubsan_report_overflow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ubsan_handle_mul_overflow>:
lea    0xee9(%rip),%rcx
lea    0xee6(%rip),%r8
jmp    1030 <ubsan_report_overflow@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"mul\00"
@.str.1 = [2 x i8] c"*\00"
define void @__ubsan_handle_mul_overflow(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** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @ubsan_report_overflow(i8* %7, i8* %8, i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"mul\00"
@.str.1 = [2 x i8] c"*\00"
define void @__ubsan_handle_mul_overflow(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @ubsan_report_overflow(i8* %0, i8* %1, i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int os_create_anonymous_file(int /*<<< orphan*/);
int memfile_create(off_t size) { return os_create_anonymous_file(size); }


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

x86 assembly (clang, -O2):
<memfile_create>:
jmp    1030 <os_create_anonymous_file@plt>

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

LLVM IR (-O2):
define i32 @memfile_create(i32 %0) {
%2 = tail call i32 @os_create_anonymous_file(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ del;

/* Variables and functions */
int write(int, char const *, int);
int cdel(int fd) {
  const char del[] = "\b \b";
  return write(fd, del, sizeof(del) - 1);
}


x86 assembly (clang, -O0):
<cdel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdel>:
push   %rax
movl   $0x82008,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.cdel.del = [4 x i8] c"\08 \08\00"
define i32 @cdel(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = bitcast [4 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%7 = call i32 @write(i32 %5, i8* %6, i32 3)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cdel(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 532488, i32* %2
%4 = call i32 @write(i32 %0, i8* %3, i32 3)
ret i32 %4
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int fstat(int, struct stat *);
int /*<<< orphan*/ perror(char *);
int get_fd_size(int fd) {
  struct stat statfd;
  int err = fstat(fd, &statfd);
  if (err == -1) {
    perror("fstat");
    exit(-1);
  }
  return statfd.st_size;
}


x86 assembly (clang, -O0):
<get_fd_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <fstat@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    116a <get_fd_size+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_fd_size>:
push   %rax
mov    %rsp,%rsi
call   1050 <fstat@plt>
cmp    $0xffffffff,%eax
je     1143 <get_fd_size+0x13>
mov    (%rsp),%eax
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [6 x i8] c"fstat\00"
define i32 @get_fd_size(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%11 = load i32, i32* %10
ret i32 %11
}
void f(int K, int L, int N, int M, float a[K][L]) {}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f(i32 %0, i32 %1, i32 %2, i32 %3, float* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca float*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store float* %4, float** %10
%11 = load i32, i32* %6
%12 = zext i32 %11 to i64
%13 = load i32, i32* %7
%14 = zext i32 %13 to i64
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32 %1, i32 %2, i32 %3, float* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_NormalizeVec3_init(void) {
  _hmt_register_covercase("HMM_NormalizeVec3", "2");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_NormalizeVec3_init>:
lea    0xee9(%rip),%rdi
lea    0xef4(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"HMM_NormalizeVec3\00"
@.str.1 = [2 x i8] c"2\00"
define void @_hmt_covercase_HMM_NormalizeVec3_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"HMM_NormalizeVec3\00"
@.str.1 = [2 x i8] c"2\00"
define void @_hmt_covercase_HMM_NormalizeVec3_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void clear_one(int keys[8], int i) { keys[i] = 0; }


x86 assembly (clang, -O0):
<clear_one>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_one>:
movslq %esi,%rax
movl   $0x0,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @clear_one(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
store i32 0, i32* %8
ret void
}

LLVM IR (-O2):
define void @clear_one(i32* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
store i32 0, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Write_LCD(int, char *, int);
void Enable_Backlight(int fd) {
  char cmd[] = {254, 66, 253};
  Write_LCD(fd, cmd, 3);
}


x86 assembly (clang, -O0):
<Enable_Backlight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xed6(%rip),%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x7(%rbp),%rsi
mov    $0x3,%edx
call   1030 <Write_LCD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Enable_Backlight>:
push   %rax
movb   $0xfd,0x6(%rsp)
movw   $0x42fe,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x3,%edx
call   1030 <Write_LCD@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.Enable_Backlight.cmd = [3 x i8] c"\FEB\FD"
define void @Enable_Backlight(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i8]
store i32 %0, i32* %2
%4 = bitcast [3 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%7 = call i32 @Write_LCD(i32 %5, i8* %6, i32 3)
ret void
}

LLVM IR (-O2):
@__const.Enable_Backlight.cmd = [3 x i8] c"\FEB\FD"
define void @Enable_Backlight(i32 %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 @Write_LCD(i32 %0, i8* %3, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x8e() {
  Assert_real((isupper(142) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              715, ("isupper should be 0 for 0x8e"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x8e\00"
define void @t_isupper_0x8e() {
%1 = tail call i64 @isupper(i32 142)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 715, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *info(void) { return "Module tester v0.1"; }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Module tester v0.1\00"
define i8* @info() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [19 x i8] c"Module tester v0.1\00"
define i8* @info() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ conn_sslcons_close();
int /*<<< orphan*/ conn_sslserv_close();
int /*<<< orphan*/ conn_tun_close();
int /*<<< orphan*/ conn_udpcon_close();
void conn_closesocks() {
  conn_tun_close();
  conn_udpcon_close();
  conn_sslserv_close();
  conn_sslcons_close();
}


x86 assembly (clang, -O0):
<conn_closesocks>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <conn_tun_close@plt>
mov    $0x0,%al
call   1030 <conn_udpcon_close@plt>
mov    $0x0,%al
call   1050 <conn_sslserv_close@plt>
mov    $0x0,%al
call   1040 <conn_sslcons_close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<conn_closesocks>:
push   %rax
xor    %eax,%eax
call   1060 <conn_tun_close@plt>
xor    %eax,%eax
call   1030 <conn_udpcon_close@plt>
xor    %eax,%eax
call   1050 <conn_sslserv_close@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <conn_sslcons_close@plt>

LLVM IR (-O0):
define void @conn_closesocks() {
%1 = call i32 (...) @conn_tun_close()
%2 = call i32 (...) @conn_udpcon_close()
%3 = call i32 (...) @conn_sslserv_close()
%4 = call i32 (...) @conn_sslcons_close()
ret void
}

LLVM IR (-O2):
define void @conn_closesocks() {
%1 = tail call i32 (...) @conn_tun_close()
%2 = tail call i32 (...) @conn_udpcon_close()
%3 = tail call i32 (...) @conn_sslserv_close()
%4 = tail call i32 (...) @conn_sslcons_close()
ret void
}
int f2(int a, int b, int c, int d) { return (b & c) ^ ((a & d) | (b & c)); }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%edx
and    -0xc(%rbp),%edx
or     %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %esi,%eax
and    %edx,%eax
and    %ecx,%edi
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = and i32 %9, %10
%12 = load i32, i32* %5
%13 = load i32, i32* %8
%14 = and i32 %12, %13
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = and i32 %15, %16
%18 = or i32 %14, %17
%19 = xor i32 %11, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %2, %1
%6 = and i32 %3, %0
%7 = xor i32 %5, -1
%8 = and i32 %6, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int sum(int, int);
int main() {
  int x, y;
  scanf("%d", &x);
  scanf("%d", &y);
  printf("Number 1 is %d\nNumber 2 is %d\nSum is %d", x, y, sum(x, y));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xedf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xecf(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <sum@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeeb(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    (%rsp),%ebp
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <sum@plt>
lea    0xe97(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [40 x i8] c"Number 1 is %d\0ANumber 2 is %d\0ASum is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @sum(i32 %8, i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [40 x i8] c"Number 1 is %d\0ANumber 2 is %d\0ASum is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @sum(i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}
/* Variables and functions */
double *m_new(int, int);
int /*<<< orphan*/ memcpy(double *, double *, int);
double *m_dup(double *A, int nrow, int ncol) {
  double *B = m_new(nrow, ncol);
  memcpy(B, A, nrow * ncol * sizeof(double));
  return B;
}


x86 assembly (clang, -O0):
<m_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <m_new@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_dup>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
mov    %edx,%esi
call   1040 <m_new@plt>
mov    %rax,%r15
imul   %ebx,%ebp
shl    $0x3,%ebp
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double* @m_dup(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call double* @m_new(i32 %8, i32 %9)
store double* %10, double** %7
%11 = load double*, double** %7
%12 = load double*, double** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = mul nsw i32 %13, %14
%16 = sext i32 %15 to i64
%17 = mul i64 %16, 8
%18 = trunc i64 %17 to i32
%19 = call i32 @memcpy(double* %11, double* %12, i32 %18)
%20 = load double*, double** %7
ret double* %20
}

LLVM IR (-O2):
define double* @m_dup(double* %0, i32 %1, i32 %2) {
%4 = tail call double* @m_new(i32 %1, i32 %2)
%5 = shl i32 %1, 3
%6 = mul i32 %5, %2
%7 = tail call i32 @memcpy(double* %4, double* %0, i32 %6)
ret double* %4
}
/* Variables and functions */
int Cudd_Random();
int rand_int(int a) { return (Cudd_Random() % (a + 1)); }


x86 assembly (clang, -O0):
<rand_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Cudd_Random@plt>
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_int>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <Cudd_Random@plt>
add    $0x1,%ebx
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @Cudd_Random()
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = srem i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @rand_int(i32 %0) {
%2 = tail call i32 (...) @Cudd_Random()
%3 = add nsw i32 %0, 1
%4 = srem i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ puts(char *);
char *str_rev(char *, char *);
int main() {
  char s[101], str[101];
  gets(s);
  puts(str_rev(str, s));
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1050 <gets@plt>
lea    -0xe0(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1030 <str_rev@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
lea    -0xe0(%rbp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <str_rev@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [101 x i8]
%3 = alloca [101 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%8 = call i8* @str_rev(i8* %6, i8* %7)
%9 = call i32 @puts(i8* %8)
%10 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%11 = call i32 @puts(i8* %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [101 x i8]
%2 = alloca [101 x i8]
%3 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %3)
%6 = call i8* @str_rev(i8* %4, i8* %3)
%7 = call i32 @puts(i8* dereferenceable(1) %6)
%8 = call i32 @puts(i8* %4)
ret i32 0
}
float foo(void) { return 0.0f; }


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

x86 assembly (clang, -O2):
<foo>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @foo() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @foo() {
ret float 0.000000e+00
}
R0AX1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if (r0 <= (((signed char *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movsbl -0x5(%rbp),%eax
movslq -0x10(%rbp),%rdx
mov    $0xa98ac7,%ecx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jg     1143 <R0AX1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <R0AX1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0AX1>:
movsbl %dil,%edx
movslq %ecx,%rax
movsbl 0xa98ac7(%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%edx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @R0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = shl i32 %0, 24
%8 = ashr exact i32 %7, 24
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i8, i8* inttoptr (i64 11111111 to i8*), i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %8, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int lw_sock_send_str_ex(int *, char *);
int lw_sock_send_str(int *sock, char *str) {
  int result = 0;
  result = lw_sock_send_str_ex(sock, str);
  return result;
}


x86 assembly (clang, -O0):
<lw_sock_send_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <lw_sock_send_str_ex@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw_sock_send_str>:
jmp    1030 <lw_sock_send_str_ex@plt>

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

LLVM IR (-O2):
define i32 @lw_sock_send_str(i32* %0, i8* %1) {
%3 = tail call i32 @lw_sock_send_str_ex(i32* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
char *PathFindFileNameA(char *);
int /*<<< orphan*/ PathRemoveBackslashA(char *);
void PathRemoveFileSpecA(char *path) {
  PathRemoveBackslashA(path);
  char *filename = PathFindFileNameA(path);
  if (filename && filename > path) {
    *(filename - 1) = 0;
  }
}


x86 assembly (clang, -O0):
<PathRemoveFileSpecA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <PathRemoveBackslashA@plt>
mov    -0x8(%rbp),%rdi
call   1030 <PathFindFileNameA@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1163 <PathRemoveFileSpecA+0x43>
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    1163 <PathRemoveFileSpecA+0x43>
mov    -0x10(%rbp),%rax
movb   $0x0,-0x1(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PathRemoveFileSpecA>:
push   %rbx
mov    %rdi,%rbx
call   1040 <PathRemoveBackslashA@plt>
mov    %rbx,%rdi
call   1030 <PathFindFileNameA@plt>
cmp    %rbx,%rax
jbe    113a <PathRemoveFileSpecA+0x1a>
movb   $0x0,-0x1(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @PathRemoveFileSpecA(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @PathRemoveBackslashA(i8* %4)
%6 = load i8*, i8** %2
%7 = call i8* @PathFindFileNameA(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %17
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = icmp ugt i8* %11, %12
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 -1
store i8 0, i8* %16
br label %17
17: ; preds = %14, %10, %1
ret void
}

LLVM IR (-O2):
define void @PathRemoveFileSpecA(i8* %0) {
%2 = tail call i32 @PathRemoveBackslashA(i8* %0)
%3 = tail call i8* @PathFindFileNameA(i8* %0)
%4 = icmp ugt i8* %3, %0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %3, i64 -1
store i8 0, i8* %6
br label %7
7: ; preds = %5, %1
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int quot;
  int rem;
};
typedef TYPE_1__ div_t;

/* Variables and functions */
div_t div(int numer, int denom) {
  div_t r;
  r.quot = numer / denom;
  r.rem = numer % denom;
  return r;
}


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
define i64 @div(i32 %0, i32 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = sdiv i32 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = srem i32 %10, %11
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i32 %12, i32* %13
%14 = bitcast %struct.TYPE_3__* %3 to i64*
%15 = load i64, i64* %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = srem i32 %0, %1
%5 = zext i32 %4 to i64
%6 = shl nuw i64 %5, 32
%7 = zext i32 %3 to i64
%8 = or i64 %6, %7
ret i64 %8
}
unsigned long c4u4(ucarray)
unsigned char *ucarray;
{
  return ucarray[0] + ((unsigned long)ucarray[1] << 8) +
         ((unsigned long)ucarray[2] << 16) + ((unsigned long)ucarray[3] << 24);
}


x86 assembly (clang, -O0):
<c4u4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%rcx
add    %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @c4u4(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i64
%11 = shl i64 %10, 8
%12 = add i64 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i64
%17 = shl i64 %16, 16
%18 = add i64 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = zext i8 %21 to i64
%23 = shl i64 %22, 24
%24 = add i64 %18, %23
ret i64 %24
}

LLVM IR (-O2):
define i64 @c4u4(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = shl nuw nsw i64 %6, 8
%8 = or i64 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i64
%12 = shl nuw nsw i64 %11, 16
%13 = or i64 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i64
%17 = shl nuw nsw i64 %16, 24
%18 = or i64 %13, %17
ret i64 %18
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_diff_length_3() {
  char *x = "aBc";
  char *y = "abcde";
  clang_analyzer_eval(strncasecmp(x, y, 5) < 0);
}


x86 assembly (clang, -O0):
<strncasecmp_diff_length_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_diff_length_3>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"aBc\00"
@.str.1 = [6 x i8] c"abcde\00"
define void @strncasecmp_diff_length_3() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncasecmp(i8* %3, i8* %4, i32 5)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"aBc\00"
@.str.1 = [6 x i8] c"abcde\00"
define void @strncasecmp_diff_length_3() {
%1 = tail call i64 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
void end_screen(void) {}


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

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

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

LLVM IR (-O2):
define void @end_screen() {
ret void
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = (input[0UL] + 914778474UL) ^ 0xffffffffce5d000bUL;
    local1 = 0UL;
    while (local1 < 0UL) {
      state[local1] |= (state[local1] & 31UL) << 4UL;
      state[local1] |= (state[0UL] & 15UL) << 2UL;
      local1++;
    }
    output[0UL] = state[0UL] | 102528858UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x3686696a,%rax
xor    $0xffffffffce5d000b,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1180 <RandomFunc+0x80>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp,%rax,8),%rcx
and    $0x1f,%rcx
shl    $0x4,%rcx
mov    -0x20(%rbp),%rax
or     -0x18(%rbp,%rax,8),%rcx
mov    %rcx,-0x18(%rbp,%rax,8)
mov    -0x18(%rbp),%rcx
and    $0xf,%rcx
shl    $0x2,%rcx
mov    -0x20(%rbp),%rax
or     -0x18(%rbp,%rax,8),%rcx
mov    %rcx,-0x18(%rbp,%rax,8)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <RandomFunc+0x2b>
mov    -0x18(%rbp),%rcx
or     $0x61c775a,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0x3686696a,%eax
add    (%rdi),%rax
or     $0x61c775a,%rax
xor    $0xffffffffc8410001,%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, 914778474
%11 = xor i64 %10, -832765941
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %6
br label %13
13: ; preds = %16, %2
%14 = load i64, i64* %6
%15 = icmp ult i64 %14, 0
br i1 %15, label %16, label %36
16: ; preds = %13
%17 = load i64, i64* %6
%18 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %17
%19 = load i64, i64* %18
%20 = and i64 %19, 31
%21 = shl i64 %20, 4
%22 = load i64, i64* %6
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %22
%24 = load i64, i64* %23
%25 = or i64 %24, %21
store i64 %25, i64* %23
%26 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%27 = load i64, i64* %26
%28 = and i64 %27, 15
%29 = shl i64 %28, 2
%30 = load i64, i64* %6
%31 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %30
%32 = load i64, i64* %31
%33 = or i64 %32, %29
store i64 %33, i64* %31
%34 = load i64, i64* %6
%35 = add i64 %34, 1
store i64 %35, i64* %6
br label %13
36: ; preds = %13
%37 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%38 = load i64, i64* %37
%39 = or i64 %38, 102528858
%40 = load i64*, i64** %4
%41 = getelementptr inbounds i64, i64* %40, i64 0
store i64 %39, i64* %41
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, 914778474
%5 = or i64 %4, 102528858
%6 = xor i64 %5, -935264255
store i64 %6, i64* %1
ret void
}