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

/* Variables and functions */
uint32_t next_power_of_two(uint32_t size) {
  size--;
  size |= size >> 1;
  size |= size >> 2;
  size |= size >> 4;
  size |= size >> 8;
  size |= size >> 16;
  size++;
  return size;
}


x86 assembly (clang, -O0):
<next_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_power_of_two>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
sar    %ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @next_power_of_two(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = ashr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = ashr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = ashr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = ashr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @next_power_of_two(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
%4 = or i32 %3, %2
%5 = ashr i32 %4, 2
%6 = or i32 %5, %4
%7 = ashr i32 %6, 4
%8 = or i32 %7, %6
%9 = ashr i32 %8, 8
%10 = or i32 %9, %8
%11 = ashr i32 %10, 16
%12 = or i32 %11, %10
%13 = add nsw i32 %12, 1
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int C, P, F;
  scanf("%d%d%d", &C, &P, &F);
  if (C * F <= P)
    printf("S\n");
  else
    printf("N\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1168 <main+0x48>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1174 <main+0x54>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
imul   0x14(%rsp),%eax
cmp    0x10(%rsp),%eax
lea    0xeb4(%rip),%rax
lea    0xeaf(%rip),%rdi
cmovg  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@str = [2 x i8] c"N\00"
@str.3 = [2 x i8] c"S\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, %8
%11 = load i32, i32* %2
%12 = icmp sgt i32 %10, %11
%13 = select i1 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0)
%14 = call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void default_free(void *ptr, void *user_data __attribute__((unused))) {
  free(ptr);
}


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

x86 assembly (clang, -O2):
<default_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @default_free(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
void UART3_ER_intr(void) {}


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

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

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

LLVM IR (-O2):
define void @UART3_ER_intr() {
ret void
}
/* Variables and functions */
scalar_t__ isalnum(int /*<<< orphan*/);
int blankline(char *str) {
  char *p = str;
  while (*p)
    if (isalnum(*p++))
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<blankline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <blankline+0x53>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
je     115e <blankline+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    116a <blankline+0x5a>
jmp    1124 <blankline+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blankline>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
test   %edi,%edi
je     1139 <blankline+0x29>
add    $0x1,%rbx
call   1030 <isalnum@plt>
test   %rax,%rax
je     1120 <blankline+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @blankline(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = sext i8 %4 to i32
%9 = tail call i64 @isalnum(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %2, label %11
11: ; preds = %2, %6
%12 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ emit_core(int, int /*<<< orphan*/);
void emit(int op) { emit_core(op, 0); }


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

x86 assembly (clang, -O2):
<emit>:
xor    %esi,%esi
jmp    1030 <emit_core@plt>

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

LLVM IR (-O2):
define void @emit(i32 %0) {
%2 = tail call i32 @emit_core(i32 %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_clear_FIFO_(unsigned char volatile *);
void serial_setup(volatile unsigned char *UART, unsigned char bitrate_const) {
  UART[0x0C] = 0x83;
  UART[0x00] = bitrate_const;
  UART[0x0C] = 0x03;
  serial_clear_FIFO_(UART);
  UART[0x04] = 0x01;
}


x86 assembly (clang, -O0):
<serial_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x83,0xc(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x3,0xc(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <serial_clear_FIFO_@plt>
mov    -0x8(%rbp),%rax
movb   $0x1,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_setup>:
push   %rbx
mov    %rdi,%rbx
movb   $0x83,0xc(%rdi)
mov    %sil,(%rdi)
movb   $0x3,0xc(%rdi)
call   1030 <serial_clear_FIFO_@plt>
movb   $0x1,0x4(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @serial_setup(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 12
store volatile i8 -125, i8* %6
%7 = load i8, i8* %4
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store volatile i8 %7, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 12
store volatile i8 3, i8* %11
%12 = load i8*, i8** %3
%13 = call i32 @serial_clear_FIFO_(i8* %12)
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 4
store volatile i8 1, i8* %15
ret void
}

LLVM IR (-O2):
define void @serial_setup(i8* %0, i8 zeroext %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 12
store volatile i8 -125, i8* %3
store volatile i8 %1, i8* %0
store volatile i8 3, i8* %3
%4 = tail call i32 @serial_clear_FIFO_(i8* %0)
%5 = getelementptr inbounds i8, i8* %0, i64 4
store volatile i8 1, i8* %5
ret void
}
/* Variables and functions */
int is_avx2_supported();
int is_avx_supported();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("AVX supported: %d\n", is_avx_supported());
  printf("AVX2 supported: %d\n", is_avx2_supported());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <is_avx_supported@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <is_avx2_supported@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"AVX supported: %d\0A\00"
@.str.1 = [20 x i8] c"AVX2 supported: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @is_avx_supported()
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @is_avx2_supported()
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"AVX supported: %d\0A\00"
@.str.1 = [20 x i8] c"AVX2 supported: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @is_avx_supported()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @is_avx2_supported()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int platform_copyfile(char const *, char const *);
int io_copyfile(const char *src, const char *dest) {
  return platform_copyfile(src, dest);
}


x86 assembly (clang, -O0):
<io_copyfile>:
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 <platform_copyfile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_copyfile>:
jmp    1030 <platform_copyfile@plt>

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

LLVM IR (-O2):
define i32 @io_copyfile(i8* %0, i8* %1) {
%3 = tail call i32 @platform_copyfile(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(void) {
  char sex[20] = "Man";
  printf("%s\n", sex);
  strcpy(sex, "Women");
  printf("%s\n", sex);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movaps 0xed2(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0xed3(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xec2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.sex = [20 x i8] c"Man\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"Women\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = bitcast [20 x i8]* %2 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.sex = [20 x i8] c"Man\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"Women\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
const char *fpp_config_get_default_plugin_version(void) { return "1.0.0.0"; }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"1.0.0.0\00"
define i8* @fpp_config_get_default_plugin_version() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int time_interval(int);
void run(int num) {
  int ti = time_interval(num);
  printf("Elapsed time: %dms\n", ti);
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <time_interval@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
push   %rax
call   1040 <time_interval@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Elapsed time: %dms\0A\00"
define void @run(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @time_interval(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Elapsed time: %dms\0A\00"
define void @run(i32 %0) {
%2 = tail call i32 @time_interval(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
main() {
  while (getchar() != EOF)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%rax
je     113b <main+0x2b>
jmp    111f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    (%rbx),%rax
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@EOF = global i64 0
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %1
5: ; preds = %1
ret i32 0
}
void f1() {
  printf("\n%s: \n", __func__);
  printf("lib call f1()\n");
  printf("new change\n");
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
lea    0xecf(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"\0A%s: \0A\00"
@__func__.f1 = [3 x i8] c"f1\00"
@.str.1 = [15 x i8] c"lib call f1()\0A\00"
@.str.2 = [12 x i8] c"new change\0A\00"
define void @f1() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__func__.f1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\0A%s: \0A\00"
@__func__.f1 = [3 x i8] c"f1\00"
@str = [14 x i8] c"lib call f1()\00"
@str.3 = [11 x i8] c"new change\00"
define void @f1() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__func__.f1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
struct universe {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ civ_spawncivs(struct universe *);
scalar_t__ spawn_constellations(struct universe *);
int universe_genesis(struct universe *univ) {
  if (spawn_constellations(univ))
    return -1;
  civ_spawncivs(univ);
  return 0;
}


x86 assembly (clang, -O0):
<universe_genesis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <spawn_constellations@plt>
cmp    $0x0,%rax
je     114b <universe_genesis+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <universe_genesis+0x3b>
mov    -0x10(%rbp),%rdi
call   1030 <civ_spawncivs@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<universe_genesis>:
push   %rbx
mov    %rdi,%rbx
call   1040 <spawn_constellations@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1138 <universe_genesis+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <civ_spawncivs@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.universe = type { i32 }
define i32 @universe_genesis(%struct.universe* %0) {
%2 = alloca i32
%3 = alloca %struct.universe*
store %struct.universe* %0, %struct.universe** %3
%4 = load %struct.universe*, %struct.universe** %3
%5 = call i64 @spawn_constellations(%struct.universe* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %11
8: ; preds = %1
%9 = load %struct.universe*, %struct.universe** %3
%10 = call i32 @civ_spawncivs(%struct.universe* %9)
store i32 0, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.universe = type { i32 }
define i32 @universe_genesis(%struct.universe* %0) {
%2 = tail call i64 @spawn_constellations(%struct.universe* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @civ_spawncivs(%struct.universe* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ c40_printf(char *, ...);
int /*<<< orphan*/ putstr(char *);
int /*<<< orphan*/ xtoa(unsigned long, char *);
void print_reg(unsigned long lower, unsigned long upper) {
  char buf[9];
  c40_printf("0x");
  xtoa(upper, buf);
  buf[2] = '\0';
  putstr(buf);
  c40_printf(" %x = %f", lower, upper);
}


x86 assembly (clang, -O0):
<print_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1050 <c40_printf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x19(%rbp),%rsi
call   1040 <xtoa@plt>
movb   $0x0,-0x17(%rbp)
lea    -0x19(%rbp),%rdi
call   1030 <putstr@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1050 <c40_printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_reg>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xeba(%rip),%rdi
xor    %eax,%eax
call   1050 <c40_printf@plt>
lea    0x7(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <xtoa@plt>
movb   $0x0,0x9(%rsp)
mov    %r15,%rdi
call   1030 <putstr@plt>
lea    0xe92(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <c40_printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"0x\00"
@.str.1 = [9 x i8] c" %x = %f\00"
define void @print_reg(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca [9 x i8]
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = call i32 (i8*, ...) @c40_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = load i64, i64* %4
%8 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%9 = call i32 @xtoa(i64 %7, i8* %8)
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 2
store i8 0, i8* %10
%11 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%12 = call i32 @putstr(i8* %11)
%13 = load i64, i64* %3
%14 = load i64, i64* %4
%15 = call i32 (i8*, ...) @c40_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %13, i64 %14)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"0x\00"
@.str.1 = [9 x i8] c" %x = %f\00"
define void @print_reg(i64 %0, i64 %1) {
%3 = alloca [9 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @c40_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @xtoa(i64 %1, i8* %4)
%7 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 2
store i8 0, i8* %7
%8 = call i32 @putstr(i8* %4)
%9 = call i32 (i8*, ...) @c40_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %0, i64 %1)
ret void
}
/* Variables and functions */
int STC31xx_Write(int, int, unsigned char *);
int STC31xx_WriteByte8(int RegAddress, unsigned char Value) {
  int res;
  unsigned char data[2];
  data[0] = Value;
  res = STC31xx_Write(1, RegAddress, data);
  return (res);
}


x86 assembly (clang, -O0):
<STC31xx_WriteByte8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0xe(%rbp)
mov    -0x4(%rbp),%esi
lea    -0xe(%rbp),%rdx
mov    $0x1,%edi
call   1030 <STC31xx_Write@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STC31xx_WriteByte8>:
push   %rax
mov    %edi,%eax
mov    %sil,0x6(%rsp)
lea    0x6(%rsp),%rdx
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <STC31xx_Write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @STC31xx_WriteByte8(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i32
%6 = alloca [2 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%7 = load i8, i8* %4
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i32, i32* %3
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%11 = call i32 @STC31xx_Write(i32 1, i32 %9, i8* %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @STC31xx_WriteByte8(i32 %0, i8 zeroext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %1, i8* %4
%5 = call i32 @STC31xx_Write(i32 1, i32 %0, i8* %4)
ret i32 %5
}
int test8(int y) {
  int x;
  if (y)
    x = 1;
  else
    x = 0;
  return x;
}


x86 assembly (clang, -O0):
<test8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111d <test8+0x1d>
movl   $0x1,-0x8(%rbp)
jmp    1124 <test8+0x24>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test8>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @test8(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ __get_cpuid(int, unsigned int *, unsigned int *, unsigned int *,
                       unsigned int *);
int sr_crc32c_hw_enabled(void) {
  unsigned int ax, bx, cx, dx;
  if (__get_cpuid(1, &ax, &bx, &cx, &dx) == 0)
    return 0;
  return (cx & (1 << 20)) != 0;
}


x86 assembly (clang, -O0):
<sr_crc32c_hw_enabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <__get_cpuid@plt>
cmp    $0x0,%rax
jne    1148 <sr_crc32c_hw_enabled+0x38>
movl   $0x0,-0x4(%rbp)
jmp    115e <sr_crc32c_hw_enabled+0x4e>
mov    -0x10(%rbp),%eax
and    $0x100000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr_crc32c_hw_enabled>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x1,%edi
call   1030 <__get_cpuid@plt>
mov    0x8(%rsp),%edx
shr    $0x14,%edx
and    $0x1,%edx
xor    %ecx,%ecx
test   %rax,%rax
cmovne %edx,%ecx
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @sr_crc32c_hw_enabled() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i64 @__get_cpuid(i32 1, i32* %2, i32* %3, i32* %4, i32* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 0, i32* %1
br label %14
9: ; preds = %0
%10 = load i32, i32* %4
%11 = and i32 %10, 1048576
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
store i32 %13, i32* %1
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @sr_crc32c_hw_enabled() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i64 @__get_cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = icmp eq i64 %9, 0
%11 = load i32, i32* %3
%12 = lshr i32 %11, 20
%13 = and i32 %12, 1
%14 = select i1 %10, i32 0, i32 %13
ret i32 %14
}
/* Variables and functions */
scalar_t__ random_rand();
double random_double_range(const double min, const double max) {
  return ((max - min) *
              (((double)random_rand()) / (double)(unsigned int)0xFFFFFFFF) +
          min);
}


x86 assembly (clang, -O0):
<random_double_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <random_rand@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sd %rax,%xmm2
movsd  0xeb6(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_double_range>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %eax,%eax
call   1030 <random_rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  0xec5(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @random_double_range(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fsub double %5, %6
%8 = call i64 (...) @random_rand()
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 0x41EFFFFFFFE00000
%11 = load double, double* %3
%12 = call double @llvm.fmuladd.f64(double %7, double %10, double %11)
ret double %12
}

LLVM IR (-O2):
define double @random_double_range(double %0, double %1) {
%3 = fsub double %1, %0
%4 = tail call i64 (...) @random_rand()
%5 = sitofp i64 %4 to double
%6 = fdiv double %5, 0x41EFFFFFFFE00000
%7 = tail call double @llvm.fmuladd.f64(double %3, double %6, double %0)
ret double %7
}
int IsSection(char *line) { return line[0] == '['; }


x86 assembly (clang, -O0):
<IsSection>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsSection>:
xor    %eax,%eax
cmpb   $0x5b,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @IsSection(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 91
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @IsSection(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 91
%4 = zext i1 %3 to i32
ret i32 %4
}
void testDL2LD() {
  double a = 3;
  double b = 2;
  a = b;
  b = a;
  double *pa = &a;
  double *pb = &b;
}


x86 assembly (clang, -O0):
<testDL2LD>:
push   %rbp
mov    %rsp,%rbp
movsd  0xefc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xee7(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testDL2LD() {
%1 = alloca double
%2 = alloca double
%3 = alloca double*
%4 = alloca double*
store double 3.000000e+00, double* %1
store double 2.000000e+00, double* %2
%5 = load double, double* %2
store double %5, double* %1
%6 = load double, double* %1
store double %6, double* %2
store double* %1, double** %3
store double* %2, double** %4
ret void
}

LLVM IR (-O2):
define void @testDL2LD() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int a, x, max = __VERIFIER_nondet_int();
  if (max > 0) {
    a = 0;
    x = 1;
    while (x <= max) {
      if (__VERIFIER_nondet_int())
        a = a + 1;
      else
        a = a - 1;
      x = x + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1187 <main+0x77>
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1182 <main+0x72>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     116b <main+0x5b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1174 <main+0x64>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <main+0x31>
jmp    1187 <main+0x77>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    112c <main+0x1c>
mov    %eax,%ebx
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 1
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ 1, %0 ]
%5 = tail call i32 (...) @__VERIFIER_nondet_int()
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %4, %1
br i1 %7, label %8, label %3
8: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void failTest(int value) {
  printf("FAIL: test27\n");
  exit(1);
}


x86 assembly (clang, -O0):
<failTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<failTest>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"FAIL: test27\0A\00"
define void @failTest(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [13 x i8] c"FAIL: test27\00"
define void @failTest(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int existFile(char *fileName) {
  FILE *fLoc = fopen(fileName, "r");
  if (fLoc == NULL)
    return 0;
  fclose(fLoc);
  return 1;
}


x86 assembly (clang, -O0):
<existFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <existFile+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1167 <existFile+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<existFile>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <existFile+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @existFile(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
double max(double one, double two) { return one > two ? one : two; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <max+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <max+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @max(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @max(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
char *hmac512hex(bitstr, bitcnt, key, keylen)
unsigned char *bitstr;
unsigned long bitcnt;
unsigned char *key;
unsigned int keylen;
{ return ((char *)hmaccomp(512, 2, bitstr, bitcnt, key, keylen)); }


x86 assembly (clang, -O0):
<hmac512hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    $0x200,%edi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <hmaccomp@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmac512hex>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0x200,%edi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <hmaccomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @hmac512hex(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 (i32, i32, i8*, i64, i8*, i32, ...) bitcast (i32 (...)* @hmaccomp to i32 (i32, i32, i8*, i64, i8*, i32, ...)*)(i32 512, i32 2, i8* %9, i64 %10, i8* %11, i32 %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @hmac512hex(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 (i32, i32, i8*, i64, i8*, i32, ...) bitcast (i32 (...)* @hmaccomp to i32 (i32, i32, i8*, i64, i8*, i32, ...)*)(i32 512, i32 2, i8* %0, i64 %1, i8* %2, i32 %3)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
void __deregister_frame_info(const void *begin) {}


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

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

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

LLVM IR (-O2):
define void @__deregister_frame_info(i8* nocapture %0) {
ret void
}
int get_screen_offset(int row, int col) {
  if (row < 0 || row >= 25 || col < 0 || col >= 80)
    return -1;
  else
    return (row * 80 + col) * 2;
}


x86 assembly (clang, -O0):
<get_screen_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1132 <get_screen_offset+0x32>
cmpl   $0x19,-0x8(%rbp)
jge    1132 <get_screen_offset+0x32>
cmpl   $0x0,-0xc(%rbp)
jl     1132 <get_screen_offset+0x32>
cmpl   $0x50,-0xc(%rbp)
jl     113e <get_screen_offset+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    114b <get_screen_offset+0x4b>
imul   $0x50,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_screen_offset>:
lea    (%rdi,%rdi,4),%eax
shl    $0x4,%eax
add    %esi,%eax
add    %eax,%eax
cmp    $0x50,%esi
mov    $0xffffffff,%ecx
cmovae %ecx,%eax
cmp    $0x19,%edi
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_screen_offset(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, 24
%4 = icmp ugt i32 %1, 79
%5 = or i1 %3, %4
%6 = mul nsw i32 %0, 80
%7 = add nsw i32 %6, %1
%8 = shl nsw i32 %7, 1
%9 = select i1 %5, i32 -1, i32 %8
ret i32 %9
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t h265hvcc_get_profile_space(const uint8_t *p) { return p[1] >> 6; }


x86 assembly (clang, -O0):
<h265hvcc_get_profile_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
sar    $0x6,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265hvcc_get_profile_space>:
mov    0x4(%rdi),%eax
sar    $0x6,%eax
ret

LLVM IR (-O0):
define i32 @h265hvcc_get_profile_space(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = ashr i32 %5, 6
ret i32 %6
}

LLVM IR (-O2):
define i32 @h265hvcc_get_profile_space(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = ashr i32 %3, 6
ret i32 %4
}
/* Type definitions */
struct vmwos_dirent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_getdents;
int syscall(int /*<<< orphan*/, unsigned int, struct vmwos_dirent *,
            unsigned int);
int getdents(unsigned int fd, struct vmwos_dirent *dirp, unsigned int count) {
  return syscall(SYS_getdents, fd, dirp, count);
}


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

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

LLVM IR (-O0):
%struct.vmwos_dirent = type { i32 }
@SYS_getdents = global i32 0
define i32 @getdents(i32 %0, %struct.vmwos_dirent* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.vmwos_dirent*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.vmwos_dirent* %1, %struct.vmwos_dirent** %5
store i32 %2, i32* %6
%7 = load i32, i32* @SYS_getdents
%8 = load i32, i32* %4
%9 = load %struct.vmwos_dirent*, %struct.vmwos_dirent** %5
%10 = load i32, i32* %6
%11 = call i32 @syscall(i32 %7, i32 %8, %struct.vmwos_dirent* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.vmwos_dirent = type { i32 }
@SYS_getdents = global i32 0
define i32 @getdents(i32 %0, %struct.vmwos_dirent* %1, i32 %2) {
%4 = load i32, i32* @SYS_getdents
%5 = tail call i32 @syscall(i32 %4, i32 %0, %struct.vmwos_dirent* %1, i32 %2)
ret i32 %5
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
extern int TakeSSizeT(ssize_t x) {
  if (x == -42)
    return 14;
  return 0;
}


x86 assembly (clang, -O0):
<TakeSSizeT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffffd6,-0x8(%rbp)
jne    111d <TakeSSizeT+0x1d>
movl   $0xe,-0x4(%rbp)
jmp    1124 <TakeSSizeT+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TakeSSizeT>:
xor    %ecx,%ecx
cmp    $0xffffffd6,%edi
mov    $0xe,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @TakeSSizeT(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, -42
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 14, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @TakeSSizeT(i32 %0) {
%2 = icmp eq i32 %0, -42
%3 = select i1 %2, i32 14, i32 0
ret i32 %3
}
char *pathnameRsafe(char sInputLine[]) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @pathnameRsafe(i8* nocapture readnone %0) {
ret i8* undef
}