xunge/DecIR huggingface dataset:
unsigned long ADCIntStatus(unsigned long ulBase, unsigned long ulIntFlags) {
  unsigned long ulStatus;
  ;

  ;
  ulStatus = (*((volatile unsigned long *)(ulBase + 0x00000000))) & ulIntFlags;
  return ulStatus;
}


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

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

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

LLVM IR (-O2):
define i64 @ADCIntStatus(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, %1
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void rewriteLine(void) { printf("\r\33[K"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0D\1B[K\00"
define void @rewriteLine() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned char *sha384_file(unsigned char *, int /*<<< orphan*/ *);
unsigned char *hash_file_sha384(unsigned char *out, FILE *fp) {
  return sha384_file(out, fp);
}


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

x86 assembly (clang, -O2):
<hash_file_sha384>:
jmp    1030 <sha384_file@plt>

LLVM IR (-O0):
define i8* @hash_file_sha384(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 i8* @sha384_file(i8* %5, i32* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @hash_file_sha384(i8* %0, i32* %1) {
%3 = tail call i8* @sha384_file(i8* %0, i32* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ goSouthEast(int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int latitude = 32;
  int longitude = -64;
  goSouthEast(&latitude, &longitude);
  printf("Avast! Now at: [%i, %i]\n", latitude, longitude);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x20,0x4(%rsp)
movl   $0xffffffc0,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <goSouthEast@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Avast! Now at: [%i, %i]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 32, i32* %2
store i32 -64, i32* %3
%4 = call i32 @goSouthEast(i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Avast! Now at: [%i, %i]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 32, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 -64, i32* %2
%5 = call i32 @goSouthEast(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
long int longint_ignoring_signedlongint(long int x, signed long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @longint_ignoring_signedlongint(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @longint_ignoring_signedlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ dump(int);
int /*<<< orphan*/ printf(char *);
void hash2(void) {
  printf("\tHash left 2 bytes - ");
  dump(2);
  printf("\n");
}


x86 assembly (clang, -O0):
<hash2>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <dump@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash2>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1050 <dump@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"\09Hash left 2 bytes - \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @hash2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @dump(i32 2)
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\09Hash left 2 bytes - \00"
define void @hash2() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @dump(i32 2)
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int getgroups(int, int /*<<< orphan*/ *);
int test(void) {
  gid_t grouplist[20];
  int gidsetsize;
  int result;
  gidsetsize = 20;
  result = getgroups(gidsetsize, grouplist);
  return result;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x14,-0x54(%rbp)
mov    -0x54(%rbp),%edi
lea    -0x50(%rbp),%rsi
call   1030 <getgroups@plt>
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
sub    $0x58,%rsp
mov    %rsp,%rsi
mov    $0x14,%edi
call   1030 <getgroups@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca [20 x i32]
%2 = alloca i32
%3 = alloca i32
store i32 20, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%6 = call i32 @getgroups(i32 %4, i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @test() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%4 = call i32 @getgroups(i32 20, i32* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ generate_delta_coefficients(double *, double *, int, double);
void get_delta_transfer_function(double b[], double b_out[], int b_size,
                                 double a[], double a_out[], int a_size,
                                 double delta) {
  generate_delta_coefficients(b, b_out, b_size, delta);
  generate_delta_coefficients(a, a_out, a_size, delta);
}


x86 assembly (clang, -O0):
<get_delta_transfer_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsd  -0x38(%rbp),%xmm0
call   1030 <generate_delta_coefficients@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%edx
movsd  -0x38(%rbp),%xmm0
call   1030 <generate_delta_coefficients@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_delta_transfer_function>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %r9d,%r14d
mov    %r8,%rbx
mov    %rcx,%rbp
call   1030 <generate_delta_coefficients@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <generate_delta_coefficients@plt>

LLVM IR (-O0):
define void @get_delta_transfer_function(double* %0, double* %1, i32 %2, double* %3, double* %4, i32 %5, double %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca double
store double* %0, double** %8
store double* %1, double** %9
store i32 %2, i32* %10
store double* %3, double** %11
store double* %4, double** %12
store i32 %5, i32* %13
store double %6, double* %14
%15 = load double*, double** %8
%16 = load double*, double** %9
%17 = load i32, i32* %10
%18 = load double, double* %14
%19 = call i32 @generate_delta_coefficients(double* %15, double* %16, i32 %17, double %18)
%20 = load double*, double** %11
%21 = load double*, double** %12
%22 = load i32, i32* %13
%23 = load double, double* %14
%24 = call i32 @generate_delta_coefficients(double* %20, double* %21, i32 %22, double %23)
ret void
}

LLVM IR (-O2):
define void @get_delta_transfer_function(double* %0, double* %1, i32 %2, double* %3, double* %4, i32 %5, double %6) {
%8 = tail call i32 @generate_delta_coefficients(double* %0, double* %1, i32 %2, double %6)
%9 = tail call i32 @generate_delta_coefficients(double* %3, double* %4, i32 %5, double %6)
ret void
}
int get_key_state_by_name(const char *name) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @get_key_state_by_name(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_version() { printf("dhcplease (DHCP Lease Parser) 1.0.0\n"); }


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"dhcplease (DHCP Lease Parser) 1.0.0\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"dhcplease (DHCP Lease Parser) 1.0.0\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *paranoia_calloc(size_t num, size_t size) { return calloc(num, size); }


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

x86 assembly (clang, -O2):
<paranoia_calloc>:
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @paranoia_calloc(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 = call i8* @calloc(i64 %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @paranoia_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ rewind();
char initfs(char isrootfs) {
  if (isrootfs) {
    rewind();
    puts("losfs: initfs: [FYI] Reinitializing Root Filesystem\n");
    fputs("#l#\n/:\n");
    fputs("config.los\n");
  }
}


x86 assembly (clang, -O0):
<initfs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     1173 <initfs+0x43>
mov    $0x0,%al
call   1040 <rewind@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1050 <fputs@plt>
lea    0xecf(%rip),%rdi
call   1050 <fputs@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initfs>:
test   %dil,%dil
je     1165 <initfs+0x35>
push   %rax
xor    %eax,%eax
call   1040 <rewind@plt>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
lea    0xee5(%rip),%rdi
call   1050 <fputs@plt>
lea    0xee1(%rip),%rdi
call   1050 <fputs@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [53 x i8] c"losfs: initfs: [FYI] Reinitializing Root Filesystem\0A\00"
@.str.1 = [8 x i8] c"#l#\0A/:\0A\00"
@.str.2 = [12 x i8] c"config.los\0A\00"
define signext i8 @initfs(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = call i32 (...) @rewind()
%8 = call i32 @puts(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @fputs(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %6, %1
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
@.str = [53 x i8] c"losfs: initfs: [FYI] Reinitializing Root Filesystem\0A\00"
@.str.1 = [8 x i8] c"#l#\0A/:\0A\00"
@.str.2 = [12 x i8] c"config.los\0A\00"
define signext i8 @initfs(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 (...) @rewind()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %3, %1
ret i8 undef
}
int func1(int x) {
  static char buffer[100];
  return 3;
}


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

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

LLVM IR (-O0):
@func1.buffer = internal global [100 x i8] zeroinitializer
define i32 @func1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 3
}

LLVM IR (-O2):
define i32 @func1(i32 %0) {
ret i32 3
}
void setGPIOMonster() {}


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

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

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

LLVM IR (-O2):
define void @setGPIOMonster() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void merge_sort(int list[], int left, int right) {
  int mid;
  if (left < right) {
    mid = (left + right) / 2;
    merge_sort(list, left, mid);
    merge_sort(list, mid + 1, right);
    merge(list, left, mid, right);
  }
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <merge_sort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
cmp    %edx,%esi
jge    1172 <merge_sort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1040 <merge_sort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1040 <merge_sort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <merge@plt>
ret

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

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @merge_sort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @merge_sort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ test_computed_goto();
int /*<<< orphan*/ test_do();
int /*<<< orphan*/ test_for();
int /*<<< orphan*/ test_goto();
int /*<<< orphan*/ test_if();
int /*<<< orphan*/ test_label();
int /*<<< orphan*/ test_logor();
int /*<<< orphan*/ test_switch();
int /*<<< orphan*/ test_while();
void testmain() {
  print("control flow");
  test_if();
  test_for();
  test_while();
  test_do();
  test_switch();
  test_goto();
  test_label();
  test_computed_goto();
  test_logor();
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
lea    0xe55(%rip),%rdi
call   1050 <print@plt>
mov    $0x0,%al
call   1070 <test_if@plt>
mov    $0x0,%al
call   1040 <test_for@plt>
mov    $0x0,%al
call   1090 <test_while@plt>
mov    $0x0,%al
call   10c0 <test_do@plt>
mov    $0x0,%al
call   10a0 <test_switch@plt>
mov    $0x0,%al
call   1060 <test_goto@plt>
mov    $0x0,%al
call   1030 <test_label@plt>
mov    $0x0,%al
call   1080 <test_computed_goto@plt>
mov    $0x0,%al
call   10b0 <test_logor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rax
lea    0xe58(%rip),%rdi
call   1050 <print@plt>
xor    %eax,%eax
call   1070 <test_if@plt>
xor    %eax,%eax
call   1040 <test_for@plt>
xor    %eax,%eax
call   1090 <test_while@plt>
xor    %eax,%eax
call   10c0 <test_do@plt>
xor    %eax,%eax
call   10a0 <test_switch@plt>
xor    %eax,%eax
call   1060 <test_goto@plt>
xor    %eax,%eax
call   1030 <test_label@plt>
xor    %eax,%eax
call   1080 <test_computed_goto@plt>
xor    %eax,%eax
pop    %rcx
jmp    10b0 <test_logor@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"control flow\00"
define void @testmain() {
%1 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_if()
%3 = call i32 (...) @test_for()
%4 = call i32 (...) @test_while()
%5 = call i32 (...) @test_do()
%6 = call i32 (...) @test_switch()
%7 = call i32 (...) @test_goto()
%8 = call i32 (...) @test_label()
%9 = call i32 (...) @test_computed_goto()
%10 = call i32 (...) @test_logor()
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"control flow\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test_if()
%3 = tail call i32 (...) @test_for()
%4 = tail call i32 (...) @test_while()
%5 = tail call i32 (...) @test_do()
%6 = tail call i32 (...) @test_switch()
%7 = tail call i32 (...) @test_goto()
%8 = tail call i32 (...) @test_label()
%9 = tail call i32 (...) @test_computed_goto()
%10 = tail call i32 (...) @test_logor()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dev_write(int /*<<< orphan*/, unsigned char *, int);
void clear(void) {
  int i;
  unsigned char s[] = " ";
  for (i = 0; i < (80 * 24); ++i)
    dev_write(0, s, 1);
}


x86 assembly (clang, -O0):
<clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%ax
mov    %ax,-0x6(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x780,-0x4(%rbp)
jge    1155 <clear+0x45>
lea    -0x6(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <dev_write@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112a <clear+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear>:
push   %rbp
push   %rbx
push   %rax
movw   $0x20,0x6(%rsp)
mov    $0x780,%ebp
lea    0x6(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <dev_write@plt>
add    $0xffffffff,%ebp
jne    1130 <clear+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.clear.s = [2 x i8] c" \00"
define void @clear() {
%1 = alloca i32
%2 = alloca [2 x i8]
%3 = bitcast [2 x i8]* %2 to i8*
store i32 0, i32* %1
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 1920
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%9 = call i32 @dev_write(i32 0, i8* %8, i32 1)
br label %10
10: ; preds = %7
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @clear() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
store i16 32, i16* %1
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = call i32 @dev_write(i32 0, i8* %2, i32 1)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 1920
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clut_update();
int /*<<< orphan*/ wait_for_key(int);
int /*<<< orphan*/ wait_ms(int);
void increase_level(int *component) {
  int i;
  for (i = 0; i < 0x10100; i += 0x101) {
    wait_ms(20);
    *component = i;
    clut_update();
  }
  wait_for_key(10);
  *component = 0;
  clut_update();
}


x86 assembly (clang, -O0):
<increase_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10100,-0xc(%rbp)
jge    117a <increase_level+0x4a>
mov    $0x14,%edi
call   1040 <wait_ms@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1050 <clut_update@plt>
mov    -0xc(%rbp),%eax
add    $0x101,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <increase_level+0x13>
mov    $0xa,%edi
call   1030 <wait_for_key@plt>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    $0x0,%al
call   1050 <clut_update@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<increase_level>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xfffffeff,%ebp
nopl   0x0(%rax,%rax,1)
add    $0x101,%ebp
mov    $0x14,%edi
call   1040 <wait_ms@plt>
mov    %ebp,(%rbx)
xor    %eax,%eax
call   1050 <clut_update@plt>
cmp    $0xffff,%ebp
jb     1140 <increase_level+0x10>
mov    $0xa,%edi
call   1030 <wait_for_key@plt>
movl   $0x0,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <clut_update@plt>

LLVM IR (-O0):
define void @increase_level(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 65792
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = call i32 @wait_ms(i32 20)
%9 = load i32, i32* %3
%10 = load i32*, i32** %2
store i32 %9, i32* %10
%11 = call i32 (...) @clut_update()
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 257
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = call i32 @wait_for_key(i32 10)
%17 = load i32*, i32** %2
store i32 0, i32* %17
%18 = call i32 (...) @clut_update()
ret void
}

LLVM IR (-O2):
define void @increase_level(i32* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = tail call i32 @wait_ms(i32 20)
store i32 %3, i32* %0
%5 = tail call i32 (...) @clut_update()
%6 = add nuw nsw i32 %3, 257
%7 = icmp ult i32 %3, 65535
br i1 %7, label %2, label %8
8: ; preds = %2
%9 = tail call i32 @wait_for_key(i32 10)
store i32 0, i32* %0
%10 = tail call i32 (...) @clut_update()
ret void
}
unsigned xrop3_106_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk1 = D ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_106_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_106_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
and    %ecx,%eax
xor    $0xff,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_106_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
ret i32 %28
}

LLVM IR (-O2):
define i32 @xrop3_106_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = and i32 %6, %4
%8 = xor i32 %7, 255
ret i32 %8
}
void proc_root_init(void) {}


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

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

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

LLVM IR (-O2):
define void @proc_root_init() {
ret void
}
/* Variables and functions */
double fabs(double);
int /*<<< orphan*/ log_fail();
int /*<<< orphan*/ log_pass();
double sqrt(int);
int main() {
  double val = sqrt(2);
  if (((fabs(val - 1.414) < 0.001) ? 1 : 0))
    log_pass();
  else
    log_fail();
  return -1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
call   1050 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xead(%rip),%xmm0
subsd  %xmm0,%xmm1
movaps 0xeaa(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe8e(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    118b <main+0x5b>
mov    $0x1,%al
test   $0x1,%al
jne    119a <main+0x6a>
jmp    11a6 <main+0x76>
xor    %eax,%eax
test   $0x1,%al
jne    119a <main+0x6a>
jmp    11a6 <main+0x76>
mov    $0x0,%al
call   1030 <log_pass@plt>
jmp    11ad <main+0x7d>
mov    $0x0,%al
call   1040 <log_fail@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1050 <sqrt@plt>
addsd  0xebd(%rip),%xmm0
andpd  0xec5(%rip),%xmm0
movsd  0xeb5(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
jbe    1162 <main+0x32>
call   1030 <log_pass@plt>
jmp    1167 <main+0x37>
call   1040 <log_fail@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double @sqrt(i32 2)
store double %3, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 1.414000e+00
%6 = call double @llvm.fabs.f64(double %5)
%7 = fcmp olt double %6, 1.000000e-03
br i1 %7, label %8, label %9
8: ; preds = %0
br i1 true, label %10, label %12
9: ; preds = %0
br i1 false, label %10, label %12
10: ; preds = %9, %8
%11 = call i32 (...) @log_pass()
br label %14
12: ; preds = %9, %8
%13 = call i32 (...) @log_fail()
br label %14
14: ; preds = %12, %10
ret i32 -1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @sqrt(i32 2)
%2 = fadd double %1, -1.414000e+00
%3 = tail call double @llvm.fabs.f64(double %2)
%4 = fcmp olt double %3, 1.000000e-03
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 (...) @log_pass()
br label %9
7: ; preds = %0
%8 = tail call i32 (...) @log_fail()
br label %9
9: ; preds = %7, %5
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ errAbort(char *, char, char, char);
char *sqlEatChar(char *s, char c) {
  if (*s++ != c)
    errAbort("Expecting %c got %c (%d) in database", c, s[-1], s[-1]);
  return s;
}


x86 assembly (clang, -O0):
<sqlEatChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
je     1164 <sqlEatChar+0x54>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x1(%rax),%cl
mov    -0x8(%rbp),%rax
lea    0xeab(%rip),%rdi
movsbl %dl,%esi
movsbl %cl,%edx
movsbl -0x1(%rax),%ecx
call   1030 <errAbort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlEatChar>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
cmp    %sil,%al
je     1130 <sqlEatChar+0x20>
movsbl %sil,%esi
movsbl %al,%ecx
lea    0xed7(%rip),%rdi
mov    %ecx,%edx
call   1030 <errAbort@plt>
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Expecting %c got %c (%d) in database\00"
define i8* @sqlEatChar(i8* %0, i8 signext %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, i32 1
store i8* %6, i8** %3
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %8, %10
br i1 %11, label %12, label %21
12: ; preds = %2
%13 = load i8, i8* %4
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 -1
%16 = load i8, i8* %15
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 -1
%19 = load i8, i8* %18
%20 = call i32 @errAbort(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8 signext %13, i8 signext %16, i8 signext %19)
br label %21
21: ; preds = %12, %2
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
@.str = [37 x i8] c"Expecting %c got %c (%d) in database\00"
define i8* @sqlEatChar(i8* %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @errAbort(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8 signext %1, i8 signext %3, i8 signext %3)
br label %7
7: ; preds = %5, %2
%8 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %8
}
/* Type definitions */
struct util_dl_library {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dlclose(void *);
void util_dl_close(struct util_dl_library *library) {
  dlclose((void *)library);
}


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

x86 assembly (clang, -O2):
<util_dl_close>:
jmp    1030 <dlclose@plt>

LLVM IR (-O0):
%struct.util_dl_library = type { i32 }
define void @util_dl_close(%struct.util_dl_library* %0) {
%2 = alloca %struct.util_dl_library*
store %struct.util_dl_library* %0, %struct.util_dl_library** %2
%3 = load %struct.util_dl_library*, %struct.util_dl_library** %2
%4 = bitcast %struct.util_dl_library* %3 to i8*
%5 = call i32 @dlclose(i8* %4)
ret void
}

LLVM IR (-O2):
%struct.util_dl_library = type { i32 }
define void @util_dl_close(%struct.util_dl_library* %0) {
%2 = bitcast %struct.util_dl_library* %0 to i8*
%3 = tail call i32 @dlclose(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *const, void const *const, int);
void Vector_ToFloatPtr(const void *const vector, float *const floatPtr,
                       const size_t length) {
  memcpy(floatPtr, vector, sizeof(float) * length);
}


x86 assembly (clang, -O0):
<Vector_ToFloatPtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vector_ToFloatPtr>:
mov    %rdi,%rax
shl    $0x2,%edx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @Vector_ToFloatPtr(i8* %0, float* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca float*
%6 = alloca i64
store i8* %0, i8** %4
store float* %1, float** %5
store i64 %2, i64* %6
%7 = load float*, float** %5
%8 = load i8*, i8** %4
%9 = load i64, i64* %6
%10 = mul i64 4, %9
%11 = trunc i64 %10 to i32
%12 = call i32 @memcpy(float* %7, i8* %8, i32 %11)
ret void
}

LLVM IR (-O2):
define void @Vector_ToFloatPtr(i8* %0, float* %1, i64 %2) {
%4 = trunc i64 %2 to i32
%5 = shl i32 %4, 2
%6 = tail call i32 @memcpy(float* %1, i8* %0, i32 %5)
ret void
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ g_time3();
int /*<<< orphan*/ g_write(char *, int /*<<< orphan*/);
int /*<<< orphan*/ g_writeln(char *);
int send_init_response_message();
int process_message_init(struct stream *s) {
  {
    if (10 < 5) {
      g_write("xrdp-chansrv [%10.10u]: ", g_time3());
      g_writeln("process_message_init:");
    }
  };
  return send_init_response_message();
}


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

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

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @process_message_init(%struct.stream* %0) {
%2 = alloca %struct.stream*
store %struct.stream* %0, %struct.stream** %2
%3 = call i32 (...) @send_init_response_message()
ret i32 %3
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @process_message_init(%struct.stream* nocapture readnone %0) {
%2 = tail call i32 (...) @send_init_response_message()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ram_set_address(int);
int /*<<< orphan*/ ram_write(int /*<<< orphan*/);
void clear_d5() {
  int i;
  ram_set_address(0x35e8);
  for (i = 0; i < 8; i++) {
    ram_write(0);
  }
}


x86 assembly (clang, -O0):
<clear_d5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x35e8,%edi
call   1040 <ram_set_address@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    1158 <clear_d5+0x38>
xor    %edi,%edi
call   1030 <ram_write@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <clear_d5+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_d5>:
push   %rax
mov    $0x35e8,%edi
call   1040 <ram_set_address@plt>
xor    %edi,%edi
call   1030 <ram_write@plt>
xor    %edi,%edi
call   1030 <ram_write@plt>
xor    %edi,%edi
call   1030 <ram_write@plt>
xor    %edi,%edi
call   1030 <ram_write@plt>
xor    %edi,%edi
call   1030 <ram_write@plt>
xor    %edi,%edi
call   1030 <ram_write@plt>
xor    %edi,%edi
call   1030 <ram_write@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <ram_write@plt>

LLVM IR (-O0):
define void @clear_d5() {
%1 = alloca i32
%2 = call i32 @ram_set_address(i32 13800)
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 8
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @ram_write(i32 0)
br label %8
8: ; preds = %6
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %3
11: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @clear_d5() {
%1 = tail call i32 @ram_set_address(i32 13800)
%2 = tail call i32 @ram_write(i32 0)
%3 = tail call i32 @ram_write(i32 0)
%4 = tail call i32 @ram_write(i32 0)
%5 = tail call i32 @ram_write(i32 0)
%6 = tail call i32 @ram_write(i32 0)
%7 = tail call i32 @ram_write(i32 0)
%8 = tail call i32 @ram_write(i32 0)
%9 = tail call i32 @ram_write(i32 0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t mpu_region_size(uint32_t size) {
  uint32_t regionSize = 32;
  uint32_t ret = 4;
  while (ret < 31) {
    if (size <= regionSize) {
      break;
    } else {
      ret++;
    }
    regionSize <<= 1;
  }
  return (ret << 1);
}


x86 assembly (clang, -O0):
<mpu_region_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
cmpl   $0x1f,-0xc(%rbp)
jge    1147 <mpu_region_size+0x47>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1130 <mpu_region_size+0x30>
jmp    1147 <mpu_region_size+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <mpu_region_size+0x15>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpu_region_size>:
mov    $0x8,%eax
cmp    $0x21,%edi
jl     1131 <mpu_region_size+0x31>
mov    $0x20,%ecx
mov    $0x4,%edx
mov    $0x8,%eax
nopl   0x0(%rax)
add    $0x2,%eax
cmp    $0x1d,%edx
ja     1131 <mpu_region_size+0x31>
add    $0x1,%edx
add    %ecx,%ecx
cmp    %edi,%ecx
jl     1120 <mpu_region_size+0x20>
ret

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

LLVM IR (-O2):
define i32 @mpu_region_size(i32 %0) {
%2 = icmp sgt i32 %0, 32
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 4, %1 ]
%5 = phi i32 [ %7, %3 ], [ 32, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = shl i32 %5, 1
%8 = icmp ult i32 %4, 30
%9 = icmp slt i32 %7, %0
%10 = select i1 %8, i1 %9, i1 false
br i1 %10, label %3, label %11
11: ; preds = %3
%12 = shl nuw nsw i32 %6, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 8, %1 ], [ %12, %11 ]
ret i32 %14
}
void ecm_nss_ipv4_exit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ecm_nss_ipv4_exit() {
ret void
}
/* Variables and functions */
void stripnl(char *ps) {
  for (; ps != NULL && *ps != '\0'; ps++) {
    if (*ps != '\n')
      continue;
    *ps = '\0';
    break;
  }
  return;
}


x86 assembly (clang, -O0):
<stripnl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <stripnl+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1138 <stripnl+0x38>
jmp    116a <stripnl+0x6a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     114d <stripnl+0x4d>
jmp    1159 <stripnl+0x59>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    116a <stripnl+0x6a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <stripnl+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stripnl>:
test   %rdi,%rdi
je     1124 <stripnl+0x24>
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rdi),%eax
test   %al,%al
je     1124 <stripnl+0x24>
cmp    $0xa,%al
je     1121 <stripnl+0x21>
add    $0x1,%rdi
jmp    1110 <stripnl+0x10>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @stripnl(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %7
%4 = phi i8* [ %8, %7 ], [ %0, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 10, label %6
]
6: ; preds = %3
store i8 0, i8* %4
br label %9
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
9: ; preds = %3, %1, %6
ret void
}
unsigned char check_range_reg_out(int start, int end) { return 1; }


x86 assembly (clang, -O0):
<check_range_reg_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @check_range_reg_out(i32 %0, i32 %1) {
ret i8 1
}
/* Variables and functions */
int /*<<< orphan*/ four1(int, int, int, int);
int /*<<< orphan*/ four2(int, int, int, int);
int /*<<< orphan*/ one1(int);
int /*<<< orphan*/ one2(int);
int /*<<< orphan*/ three1(int, int, int);
int /*<<< orphan*/ three2(int, int, int);
int /*<<< orphan*/ two1(int, int);
int /*<<< orphan*/ two2(int, int);
main() {
  one1(1);
  one2(2);
  two1(1, 2);
  two2(3, 4);
  three1(1, 2, 3);
  three2(4, 5, 6);
  four1(1, 2, 3, 4);
  four2(5, 6, 7, 8);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <one1@plt>
mov    $0x2,%edi
call   1080 <one2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1060 <two1@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   10a0 <two2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1070 <three1@plt>
mov    $0x4,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1030 <three2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1050 <four1@plt>
mov    $0x5,%edi
mov    $0x6,%esi
mov    $0x7,%edx
mov    $0x8,%ecx
call   1090 <four2@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <one1@plt>
mov    $0x2,%edi
call   1080 <one2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1060 <two1@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   10a0 <two2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1070 <three1@plt>
mov    $0x4,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1030 <three2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1050 <four1@plt>
mov    $0x5,%edi
mov    $0x6,%esi
mov    $0x7,%edx
mov    $0x8,%ecx
call   1090 <four2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @one1(i32 1)
%2 = call i32 @one2(i32 2)
%3 = call i32 @two1(i32 1, i32 2)
%4 = call i32 @two2(i32 3, i32 4)
%5 = call i32 @three1(i32 1, i32 2, i32 3)
%6 = call i32 @three2(i32 4, i32 5, i32 6)
%7 = call i32 @four1(i32 1, i32 2, i32 3, i32 4)
%8 = call i32 @four2(i32 5, i32 6, i32 7, i32 8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @one1(i32 1)
%2 = tail call i32 @one2(i32 2)
%3 = tail call i32 @two1(i32 1, i32 2)
%4 = tail call i32 @two2(i32 3, i32 4)
%5 = tail call i32 @three1(i32 1, i32 2, i32 3)
%6 = tail call i32 @three2(i32 4, i32 5, i32 6)
%7 = tail call i32 @four1(i32 1, i32 2, i32 3, i32 4)
%8 = tail call i32 @four2(i32 5, i32 6, i32 7, i32 8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double stdlib_strided_dnannsumkbn(int /*<<< orphan*/ const, double const *,
                                  int /*<<< orphan*/ const,
                                  int /*<<< orphan*/ *);
double stdlib_strided_dnannsum(const int64_t N, const double *X,
                               const int64_t stride, int64_t *n) {
  return stdlib_strided_dnannsumkbn(N, X, stride, n);
}


x86 assembly (clang, -O0):
<stdlib_strided_dnannsum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <stdlib_strided_dnannsumkbn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_strided_dnannsum>:
jmp    1030 <stdlib_strided_dnannsumkbn@plt>

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

LLVM IR (-O2):
define double @stdlib_strided_dnannsum(i32 %0, double* %1, i32 %2, i32* %3) {
%5 = tail call double @stdlib_strided_dnannsumkbn(i32 %0, double* %1, i32 %2, i32* %3)
ret double %5
}
int kf_global_key(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @kf_global_key() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int queens(int);
int main() {
  printf("%d\n", queens(8));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <queens@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @queens(i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}