xunge/DecIR huggingface dataset:
int movsbl_2(void) {
  int res;
  __asm__ __volatile__("movl $0x12345678, %%eax\n\t"
                       "movb $0x99, %%al\n\t"
                       "movsbl %%al,%%eax\n\t"
                       "mov %%eax, %0"
                       : "=r"(res)
                       :
                       : "eax");
  return res;
}


x86 assembly (clang, -O0):
<movsbl_2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12345678,%eax
mov    $0x99,%al
movsbl %al,%eax
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<movsbl_2>:
mov    $0x12345678,%eax
mov    $0x99,%al
movsbl %al,%eax
mov    %eax,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @movsbl_2() {
%1 = alloca i32
%2 = call i32 asm sideeffect "movl $$0x12345678, %eax\0A\09movb $$0x99, %al\0A\09movsbl %al,%eax\0A\09mov %eax, $0", "=r,~{eax},~{dirflag},~{fpsr},~{flags}"()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @movsbl_2() {
%1 = tail call i32 asm sideeffect "movl $$0x12345678, %eax\0A\09movb $$0x99, %al\0A\09movsbl %al,%eax\0A\09mov %eax, $0", "=r,~{eax},~{dirflag},~{fpsr},~{flags}"()
ret i32 %1
}
/* Variables and functions */
int tcflow(int fd, int action) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tcflow(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int main(int argv, char *argc[]) {
  (void)argv;
  (void)argc;
  fprintf(stdout, "Hello, world!\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)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [15 x i8] c"Hello, world!\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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = load i32, i32* @stdout
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned long arrayLength(unsigned long val, int tag) {
  unsigned long *ptr = val - tag;
  return *ptr;
}


x86 assembly (clang, -O0):
<arrayLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrayLength>:
movslq %esi,%rax
sub    %rax,%rdi
mov    (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @arrayLength(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64*
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = sub i64 %6, %8
%10 = inttoptr i64 %9 to i64*
store i64* %10, i64** %5
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @arrayLength(i64 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = sub i64 %0, %3
%5 = inttoptr i64 %4 to i64*
%6 = load i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int length(char *);
int length_r(char *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  char s[100];
  gets(s);
  printf("Dolzhina: %d i %d\n", length(s), length_r(s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x70(%rbp),%rdi
call   1030 <length@plt>
mov    %eax,-0x74(%rbp)
lea    -0x70(%rbp),%rdi
call   1060 <length_r@plt>
mov    -0x74(%rbp),%esi
mov    %eax,%edx
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x68,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <length@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <length_r@plt>
lea    0xe96(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Dolzhina: %d i %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @length(i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @length_r(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Dolzhina: %d i %d\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @length(i8* %2)
%5 = call i32 @length_r(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}
/* Variables and functions */
scalar_t__ hypot(double, double);
__attribute__((const)) unsigned long lhypot(long x, long y) {
  return (unsigned long)hypot((double)x, (double)y);
}


x86 assembly (clang, -O0):
<lhypot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
call   1030 <hypot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lhypot>:
cvtsi2sd %rdi,%xmm0
cvtsi2sd %rsi,%xmm1
jmp    1030 <hypot@plt>

LLVM IR (-O0):
define i64 @lhypot(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = load i64, i64* %4
%8 = sitofp i64 %7 to double
%9 = call i64 @hypot(double %6, double %8)
ret i64 %9
}

LLVM IR (-O2):
define i64 @lhypot(i64 %0, i64 %1) {
%3 = sitofp i64 %0 to double
%4 = sitofp i64 %1 to double
%5 = tail call i64 @hypot(double %3, double %4)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ cmdLineLog(int, char *);
void new_log(int level, const char *msg, void *usrptr) {
  cmdLineLog(level, (char *)msg);
}


x86 assembly (clang, -O0):
<new_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <cmdLineLog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_log>:
jmp    1030 <cmdLineLog@plt>

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

LLVM IR (-O2):
define void @new_log(i32 %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @cmdLineLog(i32 %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ automaticArrayInit();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ staticArrayInit();
int main(void) {
  printf("First call to each function");
  staticArrayInit();
  automaticArrayInit();
  printf("\n\nSecond call to each function:\n");
  staticArrayInit();
  automaticArrayInit();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <staticArrayInit@plt>
xor    %eax,%eax
call   1060 <automaticArrayInit@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <staticArrayInit@plt>
xor    %eax,%eax
call   1060 <automaticArrayInit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"First call to each function\00"
@.str.1 = [33 x i8] c"\0A\0ASecond call to each function:\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @staticArrayInit()
%4 = call i32 (...) @automaticArrayInit()
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @staticArrayInit()
%7 = call i32 (...) @automaticArrayInit()
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"First call to each function\00"
@str = [32 x i8] c"\0A\0ASecond call to each function:\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @staticArrayInit()
%3 = tail call i32 (...) @automaticArrayInit()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @staticArrayInit()
%6 = tail call i32 (...) @automaticArrayInit()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ printf(char *, int);
void *mymalloc(size_t size) {
  void *p = malloc(size);
  if ((p == NULL) && (size != 0)) {
    printf("Heap memory exhausted: failed to alloc &%08X bytes\n", (int)size);
    exit(0);
  };
  return p;
}


x86 assembly (clang, -O0):
<mymalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1178 <mymalloc+0x48>
cmpq   $0x0,-0x8(%rbp)
je     1178 <mymalloc+0x48>
mov    -0x8(%rbp),%rax
mov    %eax,%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rbx,%rbx
je     1143 <mymalloc+0x13>
test   %rax,%rax
je     1145 <mymalloc+0x15>
pop    %rbx
ret
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"Heap memory exhausted: failed to alloc &%08X bytes\0A\00"
define i8* @mymalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i64, i64* %2
%13 = trunc i64 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %8, %1
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [52 x i8] c"Heap memory exhausted: failed to alloc &%08X bytes\0A\00"
define noalias i8* @mymalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = trunc i64 %0 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  struct {
    int a;
    int *b;
    int c;
  } a = {.c = 1};
  assert(sizeof a == 24);
  assert(a.c == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, i32*, i32 }
@__const.main.a = %struct.anon { i32 0, i32* null, i32 1 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
store i32 0, i32* %1
%3 = bitcast %struct.anon* %2 to i8*
%4 = call i32 @assert(i32 1)
%5 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 2
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
int power(int x, int y) {
  int res;
  if (y < 0) {
    return (-1);
  }
  if (x < 0) {
    return (-1);
  } else if (y == 0) {
    return (1);
  } else {
    res = x * power(x, y - 1);
  }
  return (res);
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1134 <power+0x24>
movl   $0xffffffff,-0x4(%rbp)
jmp    118a <power+0x7a>
cmpl   $0x0,-0x8(%rbp)
jge    114a <power+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    118a <power+0x7a>
cmpl   $0x0,-0xc(%rbp)
jne    1160 <power+0x50>
movl   $0x1,-0x4(%rbp)
jmp    118a <power+0x7a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <power@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1184 <power+0x74>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
mov    %esi,%eax
or     %edi,%eax
js     113a <power+0x3a>
add    $0xffffffff,%esi
mov    $0x1,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0xffffffff,%esi
je     1136 <power+0x36>
imul   %edi,%eax
lea    -0x1(%rsi),%edx
or     %edi,%esi
mov    %edx,%esi
jns    1120 <power+0x20>
mov    $0xffffffff,%ecx
imul   %ecx,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @power(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp sgt i32 %3, -1
br i1 %4, label %5, label %18
5: ; preds = %2, %9
%6 = phi i32 [ %10, %9 ], [ %1, %2 ]
%7 = phi i32 [ %11, %9 ], [ 1, %2 ]
%8 = icmp eq i32 %6, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add nsw i32 %6, -1
%11 = mul nsw i32 %7, %0
%12 = or i32 %10, %0
%13 = icmp sgt i32 %12, -1
br i1 %13, label %5, label %14
14: ; preds = %5, %9
%15 = phi i32 [ %11, %9 ], [ %7, %5 ]
%16 = phi i32 [ -1, %9 ], [ 1, %5 ]
%17 = mul nsw i32 %16, %15
br label %18
18: ; preds = %14, %2
%19 = phi i32 [ %17, %14 ], [ -1, %2 ]
ret i32 %19
}
int strcmp(const char *a, const char *b) {
  for (;;) {
    char c1, c2;
    if ((c1 = *a++) != (c2 = *b++))
      return c1 - c2;
    if (c1 == 0)
      return 0;
  }
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl %al,%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    (%rcx),%cl
mov    %cl,-0x1a(%rbp)
movsbl %cl,%ecx
cmp    %ecx,%eax
je     1154 <strcmp+0x54>
movsbl -0x19(%rbp),%eax
movsbl -0x1a(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <strcmp+0x72>
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
jne    116d <strcmp+0x6d>
movl   $0x0,-0x4(%rbp)
jmp    1172 <strcmp+0x72>
jmp    110c <strcmp+0xc>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %r8d,%r8d
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%rdi,%rdx,1),%ecx
movsbl (%rsi,%rdx,1),%r9d
mov    %ecx,%r10d
sub    %r9d,%r10d
test   %cl,%cl
cmove  %r8d,%eax
cmp    %r9b,%cl
cmovne %r10d,%eax
jne    1136 <strcmp+0x36>
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <strcmp+0x10>
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %9, %3 ]
%5 = phi i8* [ %0, %2 ], [ %7, %3 ]
%6 = phi i32 [ undef, %2 ], [ %17, %3 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %5
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = load i8, i8* %4
%11 = icmp eq i8 %8, %10
%12 = sext i8 %8 to i32
%13 = sext i8 %10 to i32
%14 = sub nsw i32 %12, %13
%15 = icmp eq i8 %8, 0
%16 = select i1 %15, i32 0, i32 %6
%17 = select i1 %11, i32 %16, i32 %14
%18 = xor i1 %15, true
%19 = and i1 %11, %18
br i1 %19, label %3, label %20
20: ; preds = %3
ret i32 %17
}
void glmGenerateZeroVector3f(float v[3]) {
  v[0] = 0;
  v[1] = 0;
  v[2] = 0;
}


x86 assembly (clang, -O0):
<glmGenerateZeroVector3f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateZeroVector3f>:
movq   $0x0,(%rdi)
movl   $0x0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmGenerateZeroVector3f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 0.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0.000000e+00, float* %6
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 2
store float 0.000000e+00, float* %8
ret void
}

LLVM IR (-O2):
define void @glmGenerateZeroVector3f(float* nocapture writeonly %0) {
store float 0.000000e+00, float* %0
%2 = getelementptr inbounds float, float* %0, i64 1
store float 0.000000e+00, float* %2
%3 = getelementptr inbounds float, float* %0, i64 2
store float 0.000000e+00, float* %3
ret void
}
/* Variables and functions */
size_t st_strlen(const char *str) {
  const char *s;
  s = str;
  while (*s)
    ++s;
  return ((size_t)(s - str));
}


x86 assembly (clang, -O0):
<st_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     112e <st_strlen+0x2e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <st_strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <st_strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @st_strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Variables and functions */
scalar_t__ COND_MI();
int /*<<< orphan*/ EA_A7_PI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_smi_8_pi7(void) {
  m68ki_write_8(EA_A7_PI_8(), COND_MI() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_smi_8_pi7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_A7_PI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_MI@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_smi_8_pi7>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_A7_PI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_MI@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_smi_8_pi7() {
%1 = call i32 (...) @EA_A7_PI_8()
%2 = call i64 (...) @COND_MI()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_smi_8_pi7() {
%1 = tail call i32 (...) @EA_A7_PI_8()
%2 = tail call i64 (...) @COND_MI()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void flush_stdout() {
  int ier;
  ier = fflush(stdout);
}


x86 assembly (clang, -O0):
<flush_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush_stdout>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @flush_stdout() {
%1 = alloca i32
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
store i32 %3, i32* %1
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @flush_stdout() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
ret void
}
void quit_io() {}


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

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

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

LLVM IR (-O2):
define void @quit_io() {
ret void
}
/* Variables and functions */
int indice_de_colonne(char);
int char_colonne_valide(char colonne) {
  return indice_de_colonne(colonne) >= 0 && indice_de_colonne(colonne) < 8;
}


x86 assembly (clang, -O0):
<char_colonne_valide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <indice_de_colonne@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jl     1149 <char_colonne_valide+0x39>
movsbl -0x1(%rbp),%edi
call   1030 <indice_de_colonne@plt>
cmp    $0x8,%eax
setl   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_colonne_valide>:
push   %rbx
mov    %edi,%ebx
call   1030 <indice_de_colonne@plt>
test   %eax,%eax
js     1130 <char_colonne_valide+0x20>
movsbl %bl,%edi
call   1030 <indice_de_colonne@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x8,%ecx
setl   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @char_colonne_valide(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @indice_de_colonne(i8 signext %3)
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32 @indice_de_colonne(i8 signext %7)
%9 = icmp slt i32 %8, 8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @char_colonne_valide(i8 signext %0) {
%2 = tail call i32 @indice_de_colonne(i8 signext %0)
%3 = icmp sgt i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @indice_de_colonne(i8 signext %0)
%6 = icmp slt i32 %5, 8
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
double log(double);
float sigmund_ftom(float f) {
  return (f > 0 ? 17.3123405046 * log(.12231220585 * f) : -1500);
}


x86 assembly (clang, -O0):
<sigmund_ftom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1161 <sigmund_ftom+0x51>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed1(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  0xeb5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1173 <sigmund_ftom+0x63>
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1173 <sigmund_ftom+0x63>
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmund_ftom>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1138 <sigmund_ftom+0x28>
cvtss2sd %xmm0,%xmm0
mulsd  0xee3(%rip),%xmm0
call   1030 <log@plt>
mulsd  0xede(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret
movss  0xec0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sigmund_ftom(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = fmul double 0x3FBF4FDA4C0701B6, %7
%9 = call double @log(double %8)
%10 = fmul double 0x40314FF58C1C7920, %9
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %5
%13 = phi double [ %10, %5 ], [ -1.500000e+03, %11 ]
%14 = fptrunc double %13 to float
ret float %14
}

LLVM IR (-O2):
define float @sigmund_ftom(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
br i1 %2, label %3, label %9
3: ; preds = %1
%4 = fpext float %0 to double
%5 = fmul double %4, 0x3FBF4FDA4C0701B6
%6 = tail call double @log(double %5)
%7 = fmul double %6, 0x40314FF58C1C7920
%8 = fptrunc double %7 to float
br label %9
9: ; preds = %1, %3
%10 = phi float [ %8, %3 ], [ -1.500000e+03, %1 ]
ret float %10
}
void gpioClockSetSys(int pin, int freq) { return; }


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

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

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

LLVM IR (-O2):
define void @gpioClockSetSys(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
struct protocol_header {
  int dummy;
};
struct data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_datalink_layer_proto(int, struct protocol_header *);
void dsp_pkt_dlproto(int fd, struct protocol_header *datalink_layerph,
                     struct protocol_header *network_layerph,
                     struct protocol_header *transport_layerph,
                     struct data *datagram) {
  print_datalink_layer_proto(fd, datalink_layerph);
}


x86 assembly (clang, -O0):
<dsp_pkt_dlproto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <print_datalink_layer_proto@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsp_pkt_dlproto>:
jmp    1030 <print_datalink_layer_proto@plt>

LLVM IR (-O0):
%struct.protocol_header = type { i32 }
%struct.data = type { i32 }
define void @dsp_pkt_dlproto(i32 %0, %struct.protocol_header* %1, %struct.protocol_header* %2, %struct.protocol_header* %3, %struct.data* %4) {
%6 = alloca i32
%7 = alloca %struct.protocol_header*
%8 = alloca %struct.protocol_header*
%9 = alloca %struct.protocol_header*
%10 = alloca %struct.data*
store i32 %0, i32* %6
store %struct.protocol_header* %1, %struct.protocol_header** %7
store %struct.protocol_header* %2, %struct.protocol_header** %8
store %struct.protocol_header* %3, %struct.protocol_header** %9
store %struct.data* %4, %struct.data** %10
%11 = load i32, i32* %6
%12 = load %struct.protocol_header*, %struct.protocol_header** %7
%13 = call i32 @print_datalink_layer_proto(i32 %11, %struct.protocol_header* %12)
ret void
}

LLVM IR (-O2):
%struct.protocol_header = type { i32 }
%struct.data = type { i32 }
define void @dsp_pkt_dlproto(i32 %0, %struct.protocol_header* %1, %struct.protocol_header* nocapture readnone %2, %struct.protocol_header* nocapture readnone %3, %struct.data* nocapture readnone %4) {
%6 = tail call i32 @print_datalink_layer_proto(i32 %0, %struct.protocol_header* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a;
  int *b = &a;
  if (1)
    *b = 3;
  assert(*b == 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x3,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32* %2, i32** %3
%4 = load i32*, i32** %3
store i32 3, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 3
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
void fn1(int *x, int *y) { *x = 0; }


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

x86 assembly (clang, -O2):
<fn1>:
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @fn1(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
store i32 0, i32* %5
ret void
}

LLVM IR (-O2):
define void @fn1(i32* nocapture writeonly %0, i32* nocapture readnone %1) {
store i32 0, i32* %0
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int read_standard_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(13, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<read_standard_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xd,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_standard_start_system>:
mov    $0xd,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @read_standard_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 13, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @read_standard_start_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 13, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ f1(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int main(int argc, char *argv[]) {
  char name[1024];
  sprintf(name, "%s.v1", "Out.txt");
  f1("In.txt", name);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
lea    0xec0(%rip),%rsi
lea    0xebf(%rip),%rdx
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <f1@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
lea    0xed1(%rip),%rsi
lea    0xed0(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <f1@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s.v1\00"
@.str.1 = [8 x i8] c"Out.txt\00"
@.str.2 = [7 x i8] c"In.txt\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [1024 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%9 = call i32 @f1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s.v1\00"
@.str.1 = [8 x i8] c"Out.txt\00"
@.str.2 = [7 x i8] c"In.txt\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @f1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}
void hw_longpress_check(void) {}


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

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

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

LLVM IR (-O2):
define void @hw_longpress_check() {
ret void
}
void nonzeroMemsetf64() {
  double arr[7] = {
      0x1.4444444444444p+69, 0x1.4444444444444p+69, 0x1.4444444444444p+69,
      0x1.4444444444444p+69, 0x1.4444444444444p+69, 0x1.4444444444444p+69,
      0x1.4444444444444p+69,
  };
}


x86 assembly (clang, -O0):
<nonzeroMemsetf64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
mov    $0x44,%esi
mov    $0x38,%edx
call   1030 <memset@plt>
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @nonzeroMemsetf64() {
%1 = alloca [7 x double]
%2 = bitcast [7 x double]* %1 to i8*
ret void
}

LLVM IR (-O2):
define void @nonzeroMemsetf64() {
ret void
}
int ft_numlen(unsigned long long n) {
  unsigned long long num;
  int len;
  len = 1;
  num = n;
  while ((num /= 10) >= 1)
    len++;
  return (len);
}


x86 assembly (clang, -O0):
<ft_numlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
cmp    $0x1,%rax
jb     1141 <ft_numlen+0x41>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <ft_numlen+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_numlen>:
mov    $0x1,%ecx
cmp    $0xa,%rdi
jb     1136 <ft_numlen+0x36>
mov    $0x1,%ecx
movabs $0xcccccccccccccccd,%rsi
cc cc cc
nopw   0x0(%rax,%rax,1)
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
add    $0x1,%ecx
cmp    $0x63,%rdi
mov    %rdx,%rdi
ja     1120 <ft_numlen+0x20>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ft_numlen(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %2
store i32 1, i32* %4
%5 = load i64, i64* %2
store i64 %5, i64* %3
br label %6
6: ; preds = %10, %1
%7 = load i64, i64* %3
%8 = udiv i64 %7, 10
store i64 %8, i64* %3
%9 = icmp uge i64 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1
store i32 %12, i32* %4
br label %6
13: ; preds = %6
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
define i32 @ft_numlen(i64 %0) {
%2 = icmp ult i64 %0, 10
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i64 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i64 %5, 100
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int fixup_db_avp(void **, int, int /*<<< orphan*/);
int fixup_db_delete_avp(void **param, int param_no) {
  return fixup_db_avp(param, param_no, 0);
}


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

x86 assembly (clang, -O2):
<fixup_db_delete_avp>:
xor    %edx,%edx
jmp    1030 <fixup_db_avp@plt>

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

LLVM IR (-O2):
define i32 @fixup_db_delete_avp(i8** %0, i32 %1) {
%3 = tail call i32 @fixup_db_avp(i8** %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void printdbls(double *dbls, int count) {
  int i;
  for (i = 0; i < count; i++) {
    printf("%e ", dbls[i]);
  }
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%e \00"
define void @printdbls(double* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = load double, double* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ slaruv_(int *, int *, float *);
void aa_cla_slaruv(int iseed[4], int n, float *X) { slaruv_(iseed, &n, X); }


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

x86 assembly (clang, -O2):
<aa_cla_slaruv>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <slaruv_@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @aa_cla_slaruv(i32* %0, i32 %1, float* %2) {
%4 = alloca i32
store i32 %1, i32* %4
%5 = call i32 @slaruv_(i32* %0, i32* %4, float* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcheck_register_alloc(char *, int, void *);
int /*<<< orphan*/ strcpy(char *, char const *);
int ht_constructor(void *target, const void *src, size_t size,
                   void *user_data) {
  memcheck_register_alloc(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/stefan-wolfsheimer/scheme-vm/refs/heads/"
      "master/src/test_util/test_hash_table.c",
      97, target);
  strcpy((char *)target, (const char *)src);
  return 0;
}


x86 assembly (clang, -O0):
<ht_constructor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rdi
mov    $0x61,%esi
call   1040 <memcheck_register_alloc@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_constructor>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    $0x61,%esi
mov    %rbx,%rdx
call   1040 <memcheck_register_alloc@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/stefan-wolfsheimer/scheme-vm/refs/heads/master/src/test_util/test_hash_table.c\00"
define i32 @ht_constructor(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = call i32 @memcheck_register_alloc(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 97, i8* %9)
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @strcpy(i8* %11, i8* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/stefan-wolfsheimer/scheme-vm/refs/heads/master/src/test_util/test_hash_table.c\00"
define i32 @ht_constructor(i8* %0, i8* %1, i64 %2, i8* nocapture readnone %3) {
%5 = tail call i32 @memcheck_register_alloc(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 97, i8* %0)
%6 = tail call i32 @strcpy(i8* %0, i8* %1)
ret i32 0
}
/* Type definitions */
struct stat {
  scalar_t__ st_ctime;
};

/* Variables and functions */
int /*<<< orphan*/ intret(int);
scalar_t__ stat(char const *, struct stat *);
void filetime(const char *file) {
  struct stat ft;
  if (stat(file, &ft) < 0)
    intret(0);
  intret((int)ft.st_ctime);
}


x86 assembly (clang, -O0):
<filetime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    114a <filetime+0x2a>
xor    %edi,%edi
call   1030 <intret@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1030 <intret@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filetime>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
jns    1135 <filetime+0x15>
xor    %edi,%edi
call   1030 <intret@plt>
mov    (%rsp),%edi
call   1030 <intret@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define void @filetime(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @intret(i32 0)
br label %9
9: ; preds = %7, %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = call i32 @intret(i32 %12)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define void @filetime(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @intret(i32 0)
br label %8
8: ; preds = %6, %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = call i32 @intret(i32 %11)
ret void
}