xunge/DecIR huggingface dataset:
__attribute__((visibility("default"))) const char *utf8proc_version(void) {
  return "2"
         "."
         "2"
         "."
         "0"
         "";
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"2.2.0\00"
define i8* @utf8proc_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"2.2.0\00"
define i8* @utf8proc_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int blc_read_iface_file_int(char const *, char *, int *);
int blc_get_brightness(const char *iface, int *err) {
  return blc_read_iface_file_int(iface, "brightness", err);
}


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

x86 assembly (clang, -O2):
<blc_get_brightness>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <blc_read_iface_file_int@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"brightness\00"
define i32 @blc_get_brightness(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 @blc_read_iface_file_int(i8* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [11 x i8] c"brightness\00"
define i32 @blc_get_brightness(i8* %0, i32* %1) {
%3 = tail call i32 @blc_read_iface_file_int(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 %3
}
/* Variables and functions */
int getOrigin(int /*<<< orphan*/);
int /*<<< orphan*/ initPersonOnFloor(int /*<<< orphan*/, int);
void bobCall(void) {
  int tmp;
  {
    {
      tmp = getOrigin(0);
      initPersonOnFloor(0, tmp);
    }
    return;
  }
}


x86 assembly (clang, -O0):
<bobCall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <getOrigin@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
xor    %edi,%edi
call   1040 <initPersonOnFloor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bobCall>:
push   %rax
xor    %edi,%edi
call   1030 <getOrigin@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <initPersonOnFloor@plt>

LLVM IR (-O0):
define void @bobCall() {
%1 = alloca i32
%2 = call i32 @getOrigin(i32 0)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @initPersonOnFloor(i32 0, i32 %3)
ret void
}

LLVM IR (-O2):
define void @bobCall() {
%1 = tail call i32 @getOrigin(i32 0)
%2 = tail call i32 @initPersonOnFloor(i32 0, i32 %1)
ret void
}
double a(double orig_price) { return 0.90 * orig_price; }


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 9.000000e-01, %3
ret double %4
}

LLVM IR (-O2):
define double @a(double %0) {
%2 = fmul double %0, 9.000000e-01
ret double %2
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char **);
int main(void) {
  char *input;
  scanf("%ms", &input);
  printf("%s", input);
  free(input);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ms\00"
@.str.1 = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1)
%4 = load i8*, i8** %1
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
long div_long(long arg1, long arg2) { return arg1 / arg2; }


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

x86 assembly (clang, -O2):
<div_long>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <div_long+0x15>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i64 @div_long(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 = load i64, i64* %4
%7 = sdiv i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @div_long(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
ret i64 %3
}
int foo(void) {
  int y;
  volatile int x;
  x = 5;
  x = 5;
  x = 5;
  y = 3;
  return x + y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x3,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x5,-0x4(%rsp)
movl   $0x5,-0x4(%rsp)
movl   $0x5,-0x4(%rsp)
mov    -0x4(%rsp),%eax
add    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
store volatile i32 5, i32* %2
store volatile i32 5, i32* %2
store volatile i32 5, i32* %2
store i32 3, i32* %1
%3 = load volatile i32, i32* %2
%4 = load i32, i32* %1
%5 = add nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 5, i32* %1
store volatile i32 5, i32* %1
store volatile i32 5, i32* %1
%3 = load volatile i32, i32* %1
%4 = add nsw i32 %3, 3
ret i32 %4
}
int kern_read(unsigned long memaddr, void *buffaddr, unsigned int size) {
  return 0;
}


x86 assembly (clang, -O0):
<kern_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @kern_read(i64 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
int os_read(void *data, void *buffer, int len, int *rc) { return -1; }


x86 assembly (clang, -O0):
<os_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @os_read(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32* nocapture readnone %3) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ rtxPrintIncrIndent();
int /*<<< orphan*/ rtxPrintIndent();
void rtxPrintOpenBrace(const char *name) {
  rtxPrintIndent();
  printf("%s {\n", name);
  rtxPrintIncrIndent();
}


x86 assembly (clang, -O0):
<rtxPrintOpenBrace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rtxPrintIndent@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <rtxPrintIncrIndent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtxPrintOpenBrace>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rtxPrintIndent@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <rtxPrintIncrIndent@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s {\0A\00"
define void @rtxPrintOpenBrace(i8* %0) {
%2 = tail call i32 (...) @rtxPrintIndent()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @rtxPrintIncrIndent()
ret void
}
unsigned int foo(long long a, long long b) {
  unsigned int res;
  a &= ~0U;
  b &= ~0U;
  if (__builtin_mul_overflow(a, b, &res))
    res = 0x123U;
  return res;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0xffffffff,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
movabs $0xffffffff,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
imul   -0x10(%rbp),%rdx
seto   %al
mov    %edx,%ecx
mov    %ecx,%esi
cmp    %rsi,%rdx
setne  %dl
or     %dl,%al
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    1158 <foo+0x58>
jmp    115f <foo+0x5f>
movl   $0x123,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%ecx
mov    %esi,%edx
mov    %rcx,%rax
imul   %rdx,%rax
mov    %rax,%rsi
shr    $0x20,%rsi
mov    $0x123,%esi
cmovne %esi,%eax
imul   %rdx,%rcx
cmovo  %esi,%eax
ret

LLVM IR (-O0):
define i32 @foo(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = and i64 %6, 4294967295
store i64 %7, i64* %3
%8 = load i64, i64* %4
%9 = and i64 %8, 4294967295
store i64 %9, i64* %4
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %10, i64 %11)
%13 = extractvalue { i64, i1 } %12, 1
%14 = extractvalue { i64, i1 } %12, 0
%15 = trunc i64 %14 to i32
%16 = zext i32 %15 to i64
%17 = icmp ne i64 %14, %16
%18 = or i1 %13, %17
store i32 %15, i32* %5
br i1 %18, label %19, label %20
19: ; preds = %2
store i32 291, i32* %5
br label %20
20: ; preds = %19, %2
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @foo(i64 %0, i64 %1) {
%3 = and i64 %0, 4294967295
%4 = and i64 %1, 4294967295
%5 = tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %3, i64 %4)
%6 = extractvalue { i64, i1 } %5, 1
%7 = extractvalue { i64, i1 } %5, 0
%8 = trunc i64 %7 to i32
%9 = icmp ugt i64 %7, 4294967295
%10 = or i1 %6, %9
%11 = select i1 %10, i32 291, i32 %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char, ...);
int main(void) {
  unsigned char a, b, c;
  a = 22;
  b = 284;
  c = 2930;
  printf("sizeof(uchar): %d\n", sizeof(unsigned char));
  printf("a: %d, b: %d, c: %d\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x16,-0x5(%rbp)
movb   $0x1c,-0x6(%rbp)
movb   $0x72,-0x7(%rbp)
lea    0xece(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x5(%rbp),%al
movzbl -0x6(%rbp),%edx
movzbl -0x7(%rbp),%ecx
lea    0xec3(%rip),%rdi
movzbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x16,%esi
mov    $0x1c,%edx
mov    $0x72,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"sizeof(uchar): %d\0A\00"
@.str.1 = [21 x i8] c"a: %d, b: %d, c: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i32 0, i32* %1
store i8 22, i8* %2
store i8 28, i8* %3
store i8 114, i8* %4
%5 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8 zeroext 1)
%6 = load i8, i8* %2
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %6, i32 %8, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"sizeof(uchar): %d\0A\00"
@.str.1 = [21 x i8] c"a: %d, b: %d, c: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8 zeroext 1)
%2 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8 zeroext 22, i32 28, i32 114)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ emit_cmovne_imm(int, int);
int /*<<< orphan*/ emit_or(int, int, int);
int /*<<< orphan*/ emit_test(int, int);
void emit_set_nz64_32(int rsh, int rsl, int rt) {
  emit_or(rsh, rsl, rt);
  emit_test(rt, rt);
  emit_cmovne_imm(1, rt);
}


x86 assembly (clang, -O0):
<emit_set_nz64_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <emit_or@plt>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <emit_test@plt>
mov    -0xc(%rbp),%esi
mov    $0x1,%edi
call   1040 <emit_cmovne_imm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_set_nz64_32>:
push   %rbx
mov    %edx,%ebx
call   1030 <emit_or@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <emit_test@plt>
mov    $0x1,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <emit_cmovne_imm@plt>

LLVM IR (-O0):
define void @emit_set_nz64_32(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @emit_or(i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %6
%12 = load i32, i32* %6
%13 = call i32 @emit_test(i32 %11, i32 %12)
%14 = load i32, i32* %6
%15 = call i32 @emit_cmovne_imm(i32 1, i32 %14)
ret void
}

LLVM IR (-O2):
define void @emit_set_nz64_32(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @emit_or(i32 %0, i32 %1, i32 %2)
%5 = tail call i32 @emit_test(i32 %2, i32 %2)
%6 = tail call i32 @emit_cmovne_imm(i32 1, i32 %2)
ret void
}
/* Variables and functions */
void *cpu_arm_init(char *);
int /*<<< orphan*/ set_property_ptr(void *, char *, void *);
void *cortex_m3_init(void *dev, void *init_data) {
  void *cpu = cpu_arm_init("cortex-m3");
  set_property_ptr(dev, "cpu_instance", cpu);
  return dev;
}


x86 assembly (clang, -O0):
<cortex_m3_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1040 <cpu_arm_init@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xebb(%rip),%rsi
call   1030 <set_property_ptr@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cortex_m3_init>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <cpu_arm_init@plt>
lea    0xed3(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1030 <set_property_ptr@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"cortex-m3\00"
@.str.1 = [13 x i8] c"cpu_instance\00"
define i8* @cortex_m3_init(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i8* @cpu_arm_init(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %5
%7 = load i8*, i8** %3
%8 = load i8*, i8** %5
%9 = call i32 @set_property_ptr(i8* %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [10 x i8] c"cortex-m3\00"
@.str.1 = [13 x i8] c"cpu_instance\00"
define i8* @cortex_m3_init(i8* returned %0, i8* nocapture readnone %1) {
%3 = tail call i8* @cpu_arm_init(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @set_property_ptr(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i8* %0
}
/* Type definitions */
typedef union fc_sockaddr {
  int dummy;
} fc_sockaddr;
struct genlist {
  int dummy;
};
struct fc_sockaddr_list {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_front(struct genlist const *);
union fc_sockaddr *
fc_sockaddr_list_front(const struct fc_sockaddr_list *tthis) {
  return (union fc_sockaddr *)genlist_front((const struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<fc_sockaddr_list_front>:
jmp    1030 <genlist_front@plt>

LLVM IR (-O0):
%union.fc_sockaddr = type { i32 }
%struct.fc_sockaddr_list = type { i32 }
%struct.genlist = type { i32 }
define %union.fc_sockaddr* @fc_sockaddr_list_front(%struct.fc_sockaddr_list* %0) {
%2 = alloca %struct.fc_sockaddr_list*
store %struct.fc_sockaddr_list* %0, %struct.fc_sockaddr_list** %2
%3 = load %struct.fc_sockaddr_list*, %struct.fc_sockaddr_list** %2
%4 = bitcast %struct.fc_sockaddr_list* %3 to %struct.genlist*
%5 = call i64 @genlist_front(%struct.genlist* %4)
%6 = inttoptr i64 %5 to %union.fc_sockaddr*
ret %union.fc_sockaddr* %6
}

LLVM IR (-O2):
%union.fc_sockaddr = type { i32 }
%struct.fc_sockaddr_list = type { i32 }
%struct.genlist = type { i32 }
define %union.fc_sockaddr* @fc_sockaddr_list_front(%struct.fc_sockaddr_list* %0) {
%2 = bitcast %struct.fc_sockaddr_list* %0 to %struct.genlist*
%3 = tail call i64 @genlist_front(%struct.genlist* %2)
%4 = inttoptr i64 %3 to %union.fc_sockaddr*
ret %union.fc_sockaddr* %4
}
/* Variables and functions */
int strtoul(char const *, char **, int);
int str2hex(const char *str) {
  char *e;
  return strtoul(str, &e, 16);
}


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

x86 assembly (clang, -O2):
<str2hex>:
push   %rax
mov    %rsp,%rsi
mov    $0x10,%edx
call   1030 <strtoul@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @str2hex(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strtoul(i8* %4, i8** %3, i32 16)
ret i32 %5
}

LLVM IR (-O2):
define i32 @str2hex(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @strtoul(i8* %0, i8** %2, i32 16)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
void *__list_alloc(size_t size) {
  void *ptr;
  ptr = malloc(size);
  assert(ptr != NULL);
  if (ptr)
    return ptr;
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<__list_alloc>:
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)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
je     1170 <__list_alloc+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<__list_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
test   %rbx,%rbx
je     1151 <__list_alloc+0x21>
mov    %rbx,%rax
pop    %rbx
ret
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i8* @__list_alloc(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 ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %3
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
14: ; preds = %1
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define noalias i8* @__list_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
br i1 %3, label %6, label %7
6: ; preds = %1
ret i8* %2
7: ; preds = %1
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
}
/* Type definitions */
struct passwd {
  int dummy;
};

/* Variables and functions */
struct passwd *getpwnam(const char *name) {
  return (struct passwd *)NULL;
}


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

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

LLVM IR (-O0):
%struct.passwd = type { i32 }
define %struct.passwd* @getpwnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret %struct.passwd* null
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define noalias %struct.passwd* @getpwnam(i8* nocapture readnone %0) {
ret %struct.passwd* null
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XCreateWindowEvent;

/* Variables and functions */
unsigned long get_XCreateWindowEvent_serial(void *_p) {
  return (unsigned long)((XCreateWindowEvent *)_p)->serial;
}


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

x86 assembly (clang, -O2):
<get_XCreateWindowEvent_serial>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XCreateWindowEvent_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XCreateWindowEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
double Tween_QuinticInEasing(double k) { return k * k * k * k * k; }


x86 assembly (clang, -O0):
<Tween_QuinticInEasing>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tween_QuinticInEasing>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Tween_QuinticInEasing(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = load double, double* %2
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @Tween_QuinticInEasing(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
%4 = fmul double %3, %0
%5 = fmul double %4, %0
ret double %5
}
void noloop(char *a) {
  do {
    a++;
  } while (0);
}


x86 assembly (clang, -O0):
<noloop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @noloop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %2
br label %6
6: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @noloop(i8* nocapture %0) {
ret void
}
int fun113() { return 113; }


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

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

LLVM IR (-O0):
define i32 @fun113() {
ret i32 113
}

LLVM IR (-O2):
define i32 @fun113() {
ret i32 113
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  puts("http://www.fabaoji.cn");
  printf("fabaoji\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"http://www.fabaoji.cn\00"
@str = [8 x i8] c"fabaoji\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ v4lconvert_hm12_to_rgb(unsigned char const *,
                                          unsigned char *, int, int,
                                          int /*<<< orphan*/);
void v4lconvert_hm12_to_bgr24(const unsigned char *src, unsigned char *dest,
                              int width, int height) {
  v4lconvert_hm12_to_rgb(src, dest, width, height, 0);
}


x86 assembly (clang, -O0):
<v4lconvert_hm12_to_bgr24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <v4lconvert_hm12_to_rgb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4lconvert_hm12_to_bgr24>:
xor    %r8d,%r8d
jmp    1030 <v4lconvert_hm12_to_rgb@plt>

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

LLVM IR (-O2):
define void @v4lconvert_hm12_to_bgr24(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @v4lconvert_hm12_to_rgb(i8* %0, i8* %1, i32 %2, i32 %3, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XGetICValues() {
  printf("XGetICValues called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"XGetICValues called\00"
define i32 @XGetICValues() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ loglike_posterior_theta_finalize();
void fitfun_finalize() { loglike_posterior_theta_finalize(); }


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

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

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

LLVM IR (-O2):
define void @fitfun_finalize() {
%1 = tail call i32 (...) @loglike_posterior_theta_finalize()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int main() {
  int a = 1;
  int c = 55 || (a = 0);
  if (a) {
    __VERIFIER_error();
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114a <main+0x3a>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
movl   $0x1,-0x4(%rbp)
jmp    1151 <main+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_error@plt>
mov    $0x1,%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 1, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @__VERIFIER_error()
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_error()
ret i32 1
}
double scalar_product(const double *restrict a, const double *restrict b) {
  return (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]);
}


x86 assembly (clang, -O0):
<scalar_product>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalar_product>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @scalar_product(double* noalias %0, double* noalias %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @scalar_product(double* noalias nocapture %0, double* noalias nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ SYS_unlink;
int syscall(int /*<<< orphan*/, char const *);
int unlink(const char *pathname) { return syscall(SYS_unlink, pathname); }


x86 assembly (clang, -O0):
<unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlink>:
mov    %rdi,%rsi
mov    0x2ede(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_unlink = global i32 0
define i32 @unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @SYS_unlink
%4 = load i8*, i8** %2
%5 = call i32 @syscall(i32 %3, i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@SYS_unlink = global i32 0
define i32 @unlink(i8* %0) {
%2 = load i32, i32* @SYS_unlink
%3 = tail call i32 @syscall(i32 %2, i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0x80() {
  Assert_real((isascii(128) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              645, ("isascii should be 0 for 0x80"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0x80\00"
define void @t_isascii_0x80() {
%1 = tail call i64 @isascii(i32 128)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 645, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint16_t;
typedef int /*<<< orphan*/ in;

/* Variables and functions */
uint16_t FROM_BE16(uint16_t in) {
  unsigned char *pin = (unsigned char *)&in;
  uint16_t out;
  int i;
  for (i = 0, out = 0; i < sizeof(in); ++i)
    out = (out << 8) + pin[i];
  return out;
}


x86 assembly (clang, -O0):
<FROM_BE16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x18(%rbp),%rax
cmp    $0x4,%rax
jae    1150 <FROM_BE16+0x50>
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111d <FROM_BE16+0x1d>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @FROM_BE16(i32 %0) {
%2 = call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, void const *, int);
int __sv_cmp_f(const void *a, const void *b) {
  float a2, b2;
  memcpy(&a2, a, sizeof(float));
  memcpy(&b2, b, sizeof(float));
  return a2 < b2 ? -1 : a2 > b2 ? 1 : 0;
}


x86 assembly (clang, -O0):
<__sv_cmp_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1164 <__sv_cmp_f+0x54>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    117e <__sv_cmp_f+0x6e>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
xor    %eax,%eax
mov    $0x1,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sv_cmp_f>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xc(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__sv_cmp_f(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca float
%6 = alloca float
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @memcpy(float* %5, i8* %7, i32 4)
%9 = load i8*, i8** %4
%10 = call i32 @memcpy(float* %6, i8* %9, i32 4)
%11 = load float, float* %5
%12 = load float, float* %6
%13 = fcmp olt float %11, %12
br i1 %13, label %14, label %15
14: ; preds = %2
br label %21
15: ; preds = %2
%16 = load float, float* %5
%17 = load float, float* %6
%18 = fcmp ogt float %16, %17
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 1, i32 0
br label %21
21: ; preds = %15, %14
%22 = phi i32 [ -1, %14 ], [ %20, %15 ]
ret i32 %22
}

LLVM IR (-O2):
define i32 @__sv_cmp_f(i8* %0, i8* %1) {
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %3 to i8*
%6 = bitcast float* %4 to i8*
%7 = call i32 @memcpy(float* %3, i8* %0, i32 4)
%8 = call i32 @memcpy(float* %4, i8* %1, i32 4)
%9 = load float, float* %3
%10 = load float, float* %4
%11 = fcmp olt float %9, %10
%12 = fcmp ogt float %9, %10
%13 = zext i1 %12 to i32
%14 = select i1 %11, i32 -1, i32 %13
ret i32 %14
}
int absVal(int x) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @absVal(i32 %0) {
ret i32 2
}
void caller_2_2_2_2_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_2_2_2_1_1_2() {
ret void
}
/* Variables and functions */
int stringArrayLen(const char *options[]) {
  int count = 0;
  while (options[count] != NULL)
    count++;
  return count;
}


x86 assembly (clang, -O0):
<stringArrayLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1130 <stringArrayLen+0x30>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <stringArrayLen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringArrayLen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <stringArrayLen+0x10>
ret

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

LLVM IR (-O2):
define i32 @stringArrayLen(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
void *valloc(unsigned long);
void *anp_sys_malloc(unsigned long size, int type, int flags) {
  return valloc(size);
}


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

x86 assembly (clang, -O2):
<anp_sys_malloc>:
jmp    1030 <valloc@plt>

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

LLVM IR (-O2):
define noalias i8* @anp_sys_malloc(i64 %0, i32 %1, i32 %2) {
%4 = tail call i8* @valloc(i64 %0)
ret i8* %4
}
int netsnmp_generic_row_count(void *table) {}


x86 assembly (clang, -O0):
<netsnmp_generic_row_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @netsnmp_generic_row_count(i8* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
struct bufferevent {
  int dummy;
};
typedef int /*<<< orphan*/ bufferevent_event_cb;
typedef int /*<<< orphan*/ bufferevent_data_cb;

/* Variables and functions */
void bufferevent_setcb(struct bufferevent *bufev, bufferevent_data_cb readcb,
                       bufferevent_data_cb writecb,
                       bufferevent_event_cb eventcb, void *cbarg) {
  (void)bufev;
  (void)readcb;
  (void)writecb;
  (void)eventcb;
  (void)cbarg;
}


x86 assembly (clang, -O0):
<bufferevent_setcb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bufferevent = type { i32 }
define void @bufferevent_setcb(%struct.bufferevent* %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca %struct.bufferevent*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store %struct.bufferevent* %0, %struct.bufferevent** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load %struct.bufferevent*, %struct.bufferevent** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i8*, i8** %10
ret void
}

LLVM IR (-O2):
%struct.bufferevent = type { i32 }
define void @bufferevent_setcb(%struct.bufferevent* nocapture %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4) {
ret void
}
char *get_hello(void) { return "Hello World\n"; }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define i8* @get_hello() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World\0A\00"
define i8* @get_hello() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int iswlower(int /*<<< orphan*/);
int __iswlower_l(wint_t c, locale_t l) { return iswlower(c); }


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

x86 assembly (clang, -O2):
<__iswlower_l>:
jmp    1030 <iswlower@plt>

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

LLVM IR (-O2):
define i32 @__iswlower_l(i32 %0, i32 %1) {
%3 = tail call i32 @iswlower(i32 %0)
ret i32 %3
}
/* Variables and functions */
void multikey2(unsigned char **, size_t);
void mkqsort_bs(unsigned char **strings, size_t n) {
  return multikey2(strings, n);
}


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

x86 assembly (clang, -O2):
<mkqsort_bs>:
jmp    1030 <multikey2@plt>

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

LLVM IR (-O2):
define void @mkqsort_bs(i8** %0, i64 %1) {
tail call void @multikey2(i8** %0, i64 %1)
ret void
}