xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ indigoFree(int);
int indigoLoadMolecule(int);
int indigoReadString(char const *);
__attribute__((visibility("default"))) int
indigoLoadMoleculeFromString(const char *string) {
  int source = indigoReadString(string);
  int result;
  if (source <= 0)
    return -1;
  result = indigoLoadMolecule(source);
  indigoFree(source);
  return result;
}


x86 assembly (clang, -O0):
<indigoLoadMoleculeFromString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <indigoReadString@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115e <indigoLoadMoleculeFromString+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <indigoLoadMoleculeFromString+0x47>
mov    -0x14(%rbp),%edi
call   1030 <indigoLoadMolecule@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <indigoFree@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indigoLoadMoleculeFromString>:
push   %rbp
push   %rbx
push   %rax
call   1050 <indigoReadString@plt>
test   %eax,%eax
jle    1152 <indigoLoadMoleculeFromString+0x22>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <indigoLoadMolecule@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <indigoFree@plt>
mov    %ebp,%eax
jmp    1157 <indigoLoadMoleculeFromString+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @indigoLoadMoleculeFromString(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @indigoReadString(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @indigoLoadMolecule(i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = call i32 @indigoFree(i32 %14)
%16 = load i32, i32* %5
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @indigoLoadMoleculeFromString(i8* %0) {
%2 = tail call i32 @indigoReadString(i8* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @indigoLoadMolecule(i32 %2)
%6 = tail call i32 @indigoFree(i32 %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ array_5();
int /*<<< orphan*/ puts(char *);
int main() {
  array_5();
  puts("\n\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @array_5()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void secondExtern(void) {}


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

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

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

LLVM IR (-O2):
define void @secondExtern() {
ret void
}
/* Variables and functions */
int pow(int, int);
int myNaN() { return (pow(2, (sizeof(int) * 8)) + 2); }


x86 assembly (clang, -O0):
<myNaN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x20,%esi
call   1030 <pow@plt>
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myNaN>:
push   %rax
mov    $0x2,%edi
mov    $0x20,%esi
call   1030 <pow@plt>
add    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @myNaN() {
%1 = call i32 @pow(i32 2, i32 32)
%2 = add nsw i32 %1, 2
ret i32 %2
}

LLVM IR (-O2):
define i32 @myNaN() {
%1 = tail call i32 @pow(i32 2, i32 32)
%2 = add nsw i32 %1, 2
ret i32 %2
}
void OCSP_ONEREQ_free(void) {}


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

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

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

LLVM IR (-O2):
define void @OCSP_ONEREQ_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char *, int, char *);
void version() {
  extern char rcsid[];
  fatal("%s\nPatch level: %d\n", rcsid, 12, ((char *)0));
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    0x2ed6(%rip),%rsi
mov    $0xc,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <fatal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
mov    0x2eda(%rip),%rsi
mov    $0xc,%edx
xor    %ecx,%ecx
jmp    1030 <fatal@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"%s\0APatch level: %d\0A\00"
@rcsid = external global [0 x i8]
define void @version() {
%1 = call i32 @fatal(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([0 x i8], [0 x i8]* @rcsid, i64 0, i64 0), i32 12, i8* null)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"%s\0APatch level: %d\0A\00"
@rcsid = external global [0 x i8]
define void @version() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([0 x i8], [0 x i8]* @rcsid, i64 0, i64 0), i32 12, i8* null)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ pthread_sigmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ *);
int /*<<< orphan*/ sigdelset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigfillset(int /*<<< orphan*/ *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void sys_sigblock(void) {
  sigset_t sigset;
  sigfillset(&sigset);
  sigdelset(&sigset, SIGSEGV);
  pthread_sigmask(SIG_SETMASK, &sigset, NULL);
  signal(SIGCHLD, SIG_IGN);
}


x86 assembly (clang, -O0):
<sys_sigblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigfillset@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1060 <sigdelset@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <pthread_sigmask@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
mov    0x2e47(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_sigblock>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigfillset@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1060 <sigdelset@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1050 <pthread_sigmask@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
mov    0x2e4a(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGSEGV = global i32 0
@SIG_SETMASK = global i32 0
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define void @sys_sigblock() {
%1 = alloca i32
%2 = call i32 @sigfillset(i32* %1)
%3 = load i32, i32* @SIGSEGV
%4 = call i32 @sigdelset(i32* %1, i32 %3)
%5 = load i32, i32* @SIG_SETMASK
%6 = call i32 @pthread_sigmask(i32 %5, i32* %1, i32* null)
%7 = load i32, i32* @SIGCHLD
%8 = load i32, i32* @SIG_IGN
%9 = call i32 @signal(i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
@SIG_SETMASK = global i32 0
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define void @sys_sigblock() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigfillset(i32* %1)
%4 = load i32, i32* @SIGSEGV
%5 = call i32 @sigdelset(i32* %1, i32 %4)
%6 = load i32, i32* @SIG_SETMASK
%7 = call i32 @pthread_sigmask(i32 %6, i32* %1, i32* null)
%8 = load i32, i32* @SIGCHLD
%9 = load i32, i32* @SIG_IGN
%10 = call i32 @signal(i32 %8, i32 %9)
ret void
}
int host_read(int fd, char *buffer, int size) {
  int ret;
  touch_buffer(buffer, size);
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, "
                       "0x10"
                       "\n"
                       ".byte "
                       "0x01"
                       ", 0x00\n"
                       ".byte 0x00, 0x00, 0x00\n"
                       ".byte 0x00\n"
                       : "=a"(ret)
                       : "a"(fd), "b"(buffer), "c"(size));
  return ret;
}


x86 assembly (clang, -O0):
<host_read>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    $0x0,%al
call   1030 <touch_buffer@plt>
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rbx
mov    -0x1c(%rbp),%ecx
(bad)
add    %dl,(%rax)
add    %eax,(%rax)
add    %al,(%rax)
add    %al,(%rax)
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<host_read>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1030 <touch_buffer@plt>
mov    %r14d,%eax
mov    %ebp,%ecx
(bad)
add    %dl,(%rax)
add    %eax,(%rax)
add    %al,(%rax)
add    %al,(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @host_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @touch_buffer to i32 (i8*, i32, ...)*)(i8* %8, i32 %9)
%11 = load i32, i32* %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x10\0A.byte 0x01, 0x00\0A.byte 0x00, 0x00, 0x00\0A.byte 0x00\0A", "={ax},{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %11, i8* %12, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @host_read(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @touch_buffer to i32 (i8*, i32, ...)*)(i8* %1, i32 %2)
%5 = tail call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x10\0A.byte 0x01, 0x00\0A.byte 0x00, 0x00, 0x00\0A.byte 0x00\0A", "={ax},{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1, i32 %2)
ret i32 %5
}
int inner(int a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @inner(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ volatile *mem_get_reg32(int);
volatile uint32_t *afio_get_MAPR2() { return mem_get_reg32(0x40010000 + 0x1C); }


x86 assembly (clang, -O0):
<afio_get_MAPR2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4001001c,%edi
call   1030 <mem_get_reg32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<afio_get_MAPR2>:
mov    $0x4001001c,%edi
jmp    1030 <mem_get_reg32@plt>

LLVM IR (-O0):
define i32* @afio_get_MAPR2() {
%1 = call i32* @mem_get_reg32(i32 1073807388)
ret i32* %1
}

LLVM IR (-O2):
define i32* @afio_get_MAPR2() {
%1 = tail call i32* @mem_get_reg32(i32 1073807388)
ret i32* %1
}
int get_hostwake_state(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_hostwake_state() {
ret i32 0
}
/* Variables and functions */
int Fin_Cmnd(int /*<<< orphan*/, char, unsigned char *);
int Fin_LED(int red, int green, int blue) {
  unsigned char IoBuffer[9];
  int res;
  IoBuffer[2] = (char)red;
  IoBuffer[3] = (char)green;
  IoBuffer[4] = (char)blue;
  res = Fin_Cmnd(0, 'O', IoBuffer);
  return (res);
}


x86 assembly (clang, -O0):
<Fin_LED>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x13(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x12(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0x11(%rbp)
lea    -0x15(%rbp),%rdx
xor    %edi,%edi
mov    $0x4f,%esi
call   1030 <Fin_Cmnd@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fin_LED>:
sub    $0x18,%rsp
mov    %dil,0x11(%rsp)
mov    %sil,0x12(%rsp)
mov    %dl,0x13(%rsp)
lea    0xf(%rsp),%rdx
xor    %edi,%edi
mov    $0x4f,%esi
call   1030 <Fin_Cmnd@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @Fin_LED(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [9 x i8]
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds [9 x i8], [9 x i8]* %7, i64 0, i64 2
store i8 %10, i8* %11
%12 = load i32, i32* %5
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [9 x i8], [9 x i8]* %7, i64 0, i64 3
store i8 %13, i8* %14
%15 = load i32, i32* %6
%16 = trunc i32 %15 to i8
%17 = getelementptr inbounds [9 x i8], [9 x i8]* %7, i64 0, i64 4
store i8 %16, i8* %17
%18 = getelementptr inbounds [9 x i8], [9 x i8]* %7, i64 0, i64 0
%19 = call i32 @Fin_Cmnd(i32 0, i8 signext 79, i8* %18)
store i32 %19, i32* %8
%20 = load i32, i32* %8
ret i32 %20
}

LLVM IR (-O2):
define i32 @Fin_LED(i32 %0, i32 %1, i32 %2) {
%4 = alloca [9 x i8]
%5 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%6 = trunc i32 %0 to i8
%7 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 2
store i8 %6, i8* %7
%8 = trunc i32 %1 to i8
%9 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 3
store i8 %8, i8* %9
%10 = trunc i32 %2 to i8
%11 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 4
store i8 %10, i8* %11
%12 = call i32 @Fin_Cmnd(i32 0, i8 signext 79, i8* %5)
ret i32 %12
}
/* Variables and functions */
scalar_t__ is(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int i;
  for (i = 1000; i < 10000; i++) {
    if (is(i))
      printf("%d ", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3e8,-0x14(%rbp)
cmpl   $0x2710,-0x14(%rbp)
jge    117e <main+0x5e>
mov    -0x14(%rbp),%edi
call   1040 <is@plt>
cmp    $0x0,%rax
je     116b <main+0x4b>
mov    -0x14(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x50>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x3e8,%ebx
lea    0xed0(%rip),%r14
jmp    114b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x2710,%ebx
je     1163 <main+0x43>
mov    %ebx,%edi
call   1040 <is@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %9
%4 = phi i32 [ 1000, %2 ], [ %10, %9 ]
%5 = tail call i64 @is(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %9
9: ; preds = %3, %7
%10 = add nuw nsw i32 %4, 1
%11 = icmp eq i32 %10, 10000
br i1 %11, label %12, label %3
12: ; preds = %9
ret i32 0
}
int shup16(x)
register short *x;
{
  int i;
  register short *p;
  p = x + 2;
  x += 3;
  for (i = 0; i < 14 - 2; i++)
    *p++ = *x++;
  *p = 0;
  return 0;
}


x86 assembly (clang, -O0):
<shup16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xc,-0xc(%rbp)
jge    1163 <shup16+0x63>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x2,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <shup16+0x27>
mov    -0x18(%rbp),%rax
movw   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shup16>:
movups 0x6(%rdi),%xmm0
movups %xmm0,0x4(%rdi)
mov    0x16(%rdi),%rax
mov    %rax,0x14(%rdi)
movw   $0x0,0x1c(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @shup16(i16* nocapture %0) {
%2 = getelementptr i16, i16* %0, i64 2
%3 = bitcast i16* %2 to i8*
%4 = getelementptr i16, i16* %0, i64 3
%5 = bitcast i16* %4 to i8*
%6 = getelementptr i16, i16* %0, i64 14
store i16 0, i16* %6
ret i32 0
}
/* Type definitions */
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int memcmp(struct in6_addr const *, struct in6_addr const *, int);
int in6_addr_compare(const struct in6_addr *a1, const struct in6_addr *a2) {
  return memcmp(a1, a2, sizeof(struct in6_addr));
}


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

x86 assembly (clang, -O2):
<in6_addr_compare>:
mov    $0x4,%edx
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
define i32 @in6_addr_compare(%struct.in6_addr* %0, %struct.in6_addr* %1) {
%3 = tail call i32 @memcmp(%struct.in6_addr* %0, %struct.in6_addr* %1, i32 4)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void C2Mod1Function2() { printf("Expected message: C2Mod1Function2.\n"); }


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

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

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

LLVM IR (-O2):
@str = [35 x i8] c"Expected message: C2Mod1Function2.\00"
define void @C2Mod1Function2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret void
}
int BitCountLL(unsigned long long x) { return __builtin_popcountll(x); }


x86 assembly (clang, -O0):
<BitCountLL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BitCountLL>:
mov    %rdi,%rax
shr    %rax
movabs $0x5555555555555555,%rcx
55 55 55
and    %rax,%rcx
sub    %rcx,%rdi
movabs $0x3333333333333333,%rax
33 33 33
mov    %rdi,%rcx
and    %rax,%rcx
shr    $0x2,%rdi
and    %rdi,%rax
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rax,%rcx
movabs $0xf0f0f0f0f0f0f0f,%rdx
0f 0f 0f
and    %rcx,%rdx
movabs $0x101010101010101,%rax
01 01 01
imul   %rdx,%rax
shr    $0x38,%rax
ret

LLVM IR (-O0):
define i32 @BitCountLL(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctpop.i64(i64 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @BitCountLL(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void do_final_viewing(void) { int i = 0; }


x86 assembly (clang, -O0):
<do_final_viewing>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @do_final_viewing() {
ret void
}
int carp(char *x) {
  int p = 1;
  int i;
  for (;;) {
    if (*x) {
      *x = *x % 64;
      p *= *x++;
    } else
      break;
  }
  return p;
}


x86 assembly (clang, -O0):
<carp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1151 <carp+0x51>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %dl,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <carp+0x56>
jmp    115b <carp+0x5b>
jmp    110f <carp+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<carp>:
mov    (%rdi),%cl
test   %cl,%cl
je     1134 <carp+0x34>
add    $0x1,%rdi
mov    $0x1,%eax
nop
mov    %ecx,%edx
sar    $0x7,%dl
shr    $0x2,%dl
add    %cl,%dl
and    $0xc0,%dl
sub    %dl,%cl
movsbl %cl,%ecx
mov    %cl,-0x1(%rdi)
imul   %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <carp+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @carp(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 1, %1 ]
%8 = srem i8 %5, 64
%9 = sext i8 %8 to i32
store i8 %8, i8* %6
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = mul nsw i32 %7, %9
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 1, %1 ], [ %11, %4 ]
ret i32 %15
}
int intcmp(const void *a, const void *b) {
  const int *c = (const int *)a;
  const int *d = (const int *)b;
  if (*c < *d)
    return -1;
  if (*c == *d)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<intcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    113a <intcmp+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <intcmp+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    1158 <intcmp+0x58>
movl   $0x0,-0x4(%rbp)
jmp    115f <intcmp+0x5f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @intcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = icmp ne i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
char is_leap_year(int year) {
  if (year % 4 != 0)
    return 0;
  if (year % 400 == 0)
    return 1;
  if (year % 100 == 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1124 <is_leap_year+0x24>
movb   $0x0,-0x1(%rbp)
jmp    1162 <is_leap_year+0x62>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1141 <is_leap_year+0x41>
movb   $0x1,-0x1(%rbp)
jmp    1162 <is_leap_year+0x62>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115e <is_leap_year+0x5e>
movb   $0x0,-0x1(%rbp)
jmp    1162 <is_leap_year+0x62>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year>:
test   $0x3,%dil
je     1109 <is_leap_year+0x9>
xor    %eax,%eax
ret
imul   $0xc28f5c29,%edi,%eax
add    $0x51eb850,%eax
mov    %eax,%ecx
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
jb     112d <is_leap_year+0x2d>
ror    $0x2,%eax
cmp    $0x28f5c29,%eax
setae  %al
ret
mov    $0x1,%al
ret

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

LLVM IR (-O2):
define signext i8 @is_leap_year(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = srem i32 %0, 400
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = srem i32 %0, 100
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i8
br label %11
11: ; preds = %7, %4, %1
%12 = phi i8 [ 0, %1 ], [ 1, %4 ], [ %10, %7 ]
ret i8 %12
}
unsigned int hash(unsigned char *str) {
  unsigned int hash = 5381;
  int c;
  while (c = *str++)
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     1141 <hash+0x41>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <hash+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <hash+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%8 = zext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 33
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
void rl_clear_message(void) {}


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

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

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

LLVM IR (-O2):
define void @rl_clear_message() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_strdel(char **);
int error_handling(char **stock) {
  if (stock)
    ft_strdel(stock);
  return (-1);
}


x86 assembly (clang, -O0):
<error_handling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <error_handling+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <ft_strdel@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_handling>:
test   %rdi,%rdi
je     111f <error_handling+0xf>
push   %rax
call   1030 <ft_strdel@plt>
add    $0x8,%rsp
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @error_handling(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = call i32 @ft_strdel(i8** %6)
br label %8
8: ; preds = %5, %1
ret i32 -1
}

LLVM IR (-O2):
define i32 @error_handling(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @ft_strdel(i8** %0)
br label %5
5: ; preds = %3, %1
ret i32 -1
}
/* Variables and functions */
scalar_t__ calloc(unsigned int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
double *create_1D_array(unsigned n1) {
  double *matrix = (double *)calloc(n1, sizeof(double));
  if (matrix == NULL) {
    fprintf(stderr, "memory issue in create_1D_array\n");
    exit(1);
  }
  return matrix;
}


x86 assembly (clang, -O0):
<create_1D_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1176 <create_1D_array+0x46>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_1D_array>:
push   %rax
mov    $0x8,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1142 <create_1D_array+0x12>
pop    %rcx
ret
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"memory issue in create_1D_array\0A\00"
define double* @create_1D_array(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 8)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = load double*, double** %3
%8 = icmp eq double* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load double*, double** %3
ret double* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"memory issue in create_1D_array\0A\00"
define double* @create_1D_array(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 8)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to double*
ret double* %9
}
/* Type definitions */
struct timeb {
  int time;
  scalar_t__ millitm;
};

/* Variables and functions */
int /*<<< orphan*/ ftime(struct timeb *);
int FUZ_GetMilliStart() {
  struct timeb tb;
  int nCount;
  ftime(&tb);
  nCount = (int)(tb.millitm + (tb.time & 0xfffff) * 1000);
  return nCount;
}


x86 assembly (clang, -O0):
<FUZ_GetMilliStart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
call   1030 <ftime@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
and    $0xfffff,%ecx
imul   $0x3e8,%ecx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FUZ_GetMilliStart>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
call   1030 <ftime@plt>
mov    $0xfffff,%eax
and    0x8(%rsp),%eax
imul   $0x3e8,%eax,%eax
add    0x10(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeb = type { i32, i64 }
define i32 @FUZ_GetMilliStart() {
%1 = alloca %struct.timeb
%2 = alloca i32
%3 = call i32 @ftime(%struct.timeb* %1)
%4 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = and i32 %7, 1048575
%9 = mul nsw i32 %8, 1000
%10 = sext i32 %9 to i64
%11 = add nsw i64 %5, %10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.timeb = type { i32, i64 }
define i32 @FUZ_GetMilliStart() {
%1 = alloca %struct.timeb
%2 = bitcast %struct.timeb* %1 to i8*
%3 = call i32 @ftime(%struct.timeb* %1)
%4 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = and i32 %7, 1048575
%9 = mul nuw nsw i32 %8, 1000
%10 = trunc i64 %5 to i32
%11 = add i32 %9, %10
ret i32 %11
}
int fun655() { return 655; }


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

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

LLVM IR (-O0):
define i32 @fun655() {
ret i32 655
}

LLVM IR (-O2):
define i32 @fun655() {
ret i32 655
}
/* Variables and functions */
size_t __set_it_remove(void *it) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @__set_it_remove(i8* nocapture readnone %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int t, x, y;
  x = 2;
  y = 3;
  printf("x: %d, y: %d\n", x, y);
  do {
    t = x;
    x = y;
    y = t;
  } while (0);
  printf("x: %d, y: %d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"x: %d, y: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 3, i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SYS_getrandom;
int syscall(int /*<<< orphan*/, void *, size_t, unsigned int);
int getrandom(void *buf, size_t buflen, unsigned int flags) {
  return syscall(SYS_getrandom, buf, buflen, flags);
}


x86 assembly (clang, -O0):
<getrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getrandom>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@SYS_getrandom = global i32 0
define i32 @getrandom(i8* %0, i64 %1, i32 %2) {
%4 = load i32, i32* @SYS_getrandom
%5 = tail call i32 @syscall(i32 %4, i8* %0, i64 %1, i32 %2)
ret i32 %5
}
void delay() {
  volatile unsigned int j;
  for (j = 0; j < (120000); j++)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x1d4c0,%eax
jae    112c <delay+0x2c>
jmp    111e <delay+0x1e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <delay+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
movl   $0x0,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x1d4bf,%eax
ja     1130 <delay+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x1d4c0,%eax
jb     1120 <delay+0x20>
ret

LLVM IR (-O0):
define void @delay() {
%1 = alloca i32
store volatile i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load volatile i32, i32* %1
%4 = icmp ult i32 %3, 120000
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load volatile i32, i32* %1
%8 = add i32 %7, 1
store volatile i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @delay() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = load volatile i32, i32* %1
%4 = icmp ult i32 %3, 120000
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = load volatile i32, i32* %1
%7 = add i32 %6, 1
store volatile i32 %7, i32* %1
%8 = load volatile i32, i32* %1
%9 = icmp ult i32 %8, 120000
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret void
}
int bcm2835_close(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @bcm2835_close() {
ret i32 1
}

LLVM IR (-O2):
define i32 @bcm2835_close() {
ret i32 1
}
void calc_co(double a, double *k, double t1, double t2, double x, double h) {
  *k = h * x / (a * (t2 - t1));
}


x86 assembly (clang, -O0):
<calc_co>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_co>:
mulsd  %xmm4,%xmm3
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
divsd  %xmm2,%xmm3
movsd  %xmm3,(%rdi)
ret

LLVM IR (-O0):
define void @calc_co(double %0, double* %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double* %1, double** %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %12
%14 = load double, double* %11
%15 = fmul double %13, %14
%16 = load double, double* %7
%17 = load double, double* %10
%18 = load double, double* %9
%19 = fsub double %17, %18
%20 = fmul double %16, %19
%21 = fdiv double %15, %20
%22 = load double*, double** %8
store double %21, double* %22
ret void
}

LLVM IR (-O2):
define void @calc_co(double %0, double* nocapture writeonly %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %4, %5
%8 = fsub double %3, %2
%9 = fmul double %8, %0
%10 = fdiv double %7, %9
store double %10, double* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sqlite3FreeX(void *);
void *sqlite3Realloc(void *, int);
void sqlite3ReallocOrFree(void **pp, int n) {
  void *p = sqlite3Realloc(*pp, n);
  if (!p) {
    sqlite3FreeX(*pp);
  }
  *pp = p;
}


x86 assembly (clang, -O0):
<sqlite3ReallocOrFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0xc(%rbp),%esi
call   1040 <sqlite3Realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1159 <sqlite3ReallocOrFree+0x39>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <sqlite3FreeX@plt>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3ReallocOrFree>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
call   1040 <sqlite3Realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <sqlite3ReallocOrFree+0x1f>
mov    (%r14),%rdi
call   1030 <sqlite3FreeX@plt>
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @sqlite3ReallocOrFree(i8** nocapture %0, i32 %1) {
%3 = load i8*, i8** %0
%4 = tail call i8* @sqlite3Realloc(i8* %3, i32 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %0
%8 = tail call i32 @sqlite3FreeX(i8* %7)
br label %9
9: ; preds = %6, %2
store i8* %4, i8** %0
ret void
}
void rq_sched_info_dequeued(struct rq *rq, unsigned long long delta) {}


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

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

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

LLVM IR (-O2):
%struct.rq = type opaque
define void @rq_sched_info_dequeued(%struct.rq* nocapture %0, i64 %1) {
ret void
}