xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_sys_cfg_max_sta_num_usage(void) {
  printf("\nUsage : sys_cfg_max_sta_num [STA_NUM]\n");
  printf("\nIf STA_NUM is provided, a 'set' is performed, else a 'get' is "
         "performed.");
  printf("\nSTA_NUM should be greater than or equal to zero and less than or "
         "equal to %d\n",
         10);
  return;
}


x86 assembly (clang, -O0):
<print_sys_cfg_max_sta_num_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3b(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sys_cfg_max_sta_num_usage>:
push   %rax
lea    0xf71(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf08(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"\0AUsage : sys_cfg_max_sta_num [STA_NUM]\0A\00"
@.str.1 = [74 x i8] c"\0AIf STA_NUM is provided, a 'set' is performed, else a 'get' is performed.\00"
@.str.2 = [79 x i8] c"\0ASTA_NUM should be greater than or equal to zero and less than or equal to %d\0A\00"
define void @print_sys_cfg_max_sta_num_usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.2, i64 0, i64 0), i32 10)
ret void
}

LLVM IR (-O2):
@.str.1 = [74 x i8] c"\0AIf STA_NUM is provided, a 'set' is performed, else a 'get' is performed.\00"
@.str.2 = [79 x i8] c"\0ASTA_NUM should be greater than or equal to zero and less than or equal to %d\0A\00"
@str = [39 x i8] c"\0AUsage : sys_cfg_max_sta_num [STA_NUM]\00"
define void @print_sys_cfg_max_sta_num_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @.str.2, i64 0, i64 0), i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
void std_string_str(const void *restrict self, const char *restrict format,
                    FILE *restrict stream) {
  (void)format;
  if (self)
    fputs((const char *)self, stream);
}


x86 assembly (clang, -O0):
<std_string_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <std_string_str+0x2c>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <fputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_string_str>:
test   %rdi,%rdi
je     111d <std_string_str+0xd>
mov    %rdx,%rsi
jmp    1030 <fputs@plt>
ret

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

LLVM IR (-O2):
define void @std_string_str(i8* noalias %0, i8* noalias nocapture readnone %1, i32* noalias nocapture %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @fputs(i8* %0, i32* %2)
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int os_clock(int /*<<< orphan*/ *);
int /*<<< orphan*/ os_freakout();
clock_t clock(void) {
  clock_t ans;
  if (os_clock(&ans) == -1)
    os_freakout();
  return ans;
}


x86 assembly (clang, -O0):
<clock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <os_clock@plt>
cmp    $0xffffffff,%eax
jne    1141 <clock+0x21>
mov    $0x0,%al
call   1040 <os_freakout@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <os_clock@plt>
cmp    $0xffffffff,%eax
jne    1137 <clock+0x17>
xor    %eax,%eax
call   1040 <os_freakout@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clock() {
%1 = alloca i32
%2 = call i32 @os_clock(i32* %1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @os_freakout()
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @clock() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @os_clock(i32* %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @os_freakout()
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int const);
void displayNums2(const int *numbers) {
  int i;
  for (i = 0; i < 4; i++, numbers++) {
    printf("Nums[%i] = %i\n", i, *numbers);
  }
}


x86 assembly (clang, -O0):
<displayNums2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    115c <displayNums2+0x4c>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <displayNums2+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayNums2>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%edx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x4(%rbx),%edx
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x8(%rbx),%edx
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    0xc(%rbx),%edx
mov    %r14,%rdi
mov    $0x3,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Nums[%i] = %i\0A\00"
define void @displayNums2(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, 4
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i32 1
store i32* %16, i32** %2
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Nums[%i] = %i\0A\00"
define void @displayNums2(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 %2)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 %5)
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 %8)
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 %11)
ret void
}
void foo(float mat[]) {
  float *p = &mat[16];
  *--p = 0;
  *--p = 0;
  *--p = 0;
  *--p = 0;
  *--p = 0;
  *--p = 0;
  *--p = 0;
  *--p = 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xorps  %xmm0,%xmm0
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
ret

LLVM IR (-O0):
define void @foo(float* %0) {
%2 = alloca float*
%3 = alloca float*
store float* %0, float** %2
%4 = load float*, float** %2
%5 = getelementptr inbounds float, float* %4, i64 16
store float* %5, float** %3
%6 = load float*, float** %3
%7 = getelementptr inbounds float, float* %6, i32 -1
store float* %7, float** %3
store float 0.000000e+00, float* %7
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i32 -1
store float* %9, float** %3
store float 0.000000e+00, float* %9
%10 = load float*, float** %3
%11 = getelementptr inbounds float, float* %10, i32 -1
store float* %11, float** %3
store float 0.000000e+00, float* %11
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i32 -1
store float* %13, float** %3
store float 0.000000e+00, float* %13
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i32 -1
store float* %15, float** %3
store float 0.000000e+00, float* %15
%16 = load float*, float** %3
%17 = getelementptr inbounds float, float* %16, i32 -1
store float* %17, float** %3
store float 0.000000e+00, float* %17
%18 = load float*, float** %3
%19 = getelementptr inbounds float, float* %18, i32 -1
store float* %19, float** %3
store float 0.000000e+00, float* %19
%20 = load float*, float** %3
%21 = getelementptr inbounds float, float* %20, i32 -1
store float* %21, float** %3
store float 0.000000e+00, float* %21
ret void
}

LLVM IR (-O2):
define void @foo(float* nocapture writeonly %0) {
%2 = getelementptr inbounds float, float* %0, i64 8
%3 = bitcast float* %2 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_hello() {
  printf("%s\n", "Hello, world.");
  return;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [14 x i8] c"Hello, world.\00"
define void @print_hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [14 x i8] c"Hello, world.\00"
define void @print_hello() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int get_size(float *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  float arr[20];
  printf("Bytes in array: %lu\n", sizeof(arr));
  printf("Bytes returned by get_size: %lu\n", get_size(arr));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
lea    0xed5(%rip),%rdi
mov    $0x50,%esi
call   1040 <printf@plt>
mov    %rsp,%rdi
call   1030 <get_size@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Bytes in array: %lu\0A\00"
@.str.1 = [33 x i8] c"Bytes returned by get_size: %lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x float]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 80)
%4 = getelementptr inbounds [20 x float], [20 x float]* %2, i64 0, i64 0
%5 = call i32 @get_size(float* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Bytes in array: %lu\0A\00"
@.str.1 = [33 x i8] c"Bytes returned by get_size: %lu\0A\00"
define i32 @main() {
%1 = alloca [20 x float]
%2 = bitcast [20 x float]* %1 to i8*
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 80)
%4 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 0
%5 = call i32 @get_size(float* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
unsigned short CFSwapInt16(unsigned short);
unsigned short shortValueFrom(unsigned char *bstr) {
  unsigned short retValue;
  retValue = CFSwapInt16(*((unsigned short *)bstr));
  return retValue;
}


x86 assembly (clang, -O0):
<shortValueFrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edi
call   1030 <CFSwapInt16@plt>
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shortValueFrom>:
movzwl (%rdi),%edi
jmp    1030 <CFSwapInt16@plt>

LLVM IR (-O0):
define zeroext i16 @shortValueFrom(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i16*
%6 = load i16, i16* %5
%7 = call zeroext i16 @CFSwapInt16(i16 zeroext %6)
store i16 %7, i16* %3
%8 = load i16, i16* %3
ret i16 %8
}

LLVM IR (-O2):
define zeroext i16 @shortValueFrom(i8* nocapture %0) {
%2 = bitcast i8* %0 to i16*
%3 = load i16, i16* %2
%4 = tail call zeroext i16 @CFSwapInt16(i16 zeroext %3)
ret i16 %4
}
void random_range_seed(s) long s;
{
  extern void srand48();
  srand48(s);
}


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

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

LLVM IR (-O0):
define void @random_range_seed(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @random_range_seed(i64 %0) {
tail call void (i64, ...) bitcast (void (...)* @srand48 to void (i64, ...)*)(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ input_display_controls();
void cmd_display_controls(int argc, const char **argv) {
  input_display_controls();
}


x86 assembly (clang, -O0):
<cmd_display_controls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <input_display_controls@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cmd_display_controls(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @input_display_controls()
ret void
}

LLVM IR (-O2):
define void @cmd_display_controls(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @input_display_controls()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int sysconf(int /*<<< orphan*/);
size_t get_page_size() {
  int pagesize = sysconf(_SC_PAGESIZE);
  return pagesize;
}


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

x86 assembly (clang, -O2):
<get_page_size>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
define i64 @get_page_size() {
%1 = alloca i32
%2 = load i32, i32* @_SC_PAGESIZE
%3 = call i32 @sysconf(i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
ret i64 %5
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
define i64 @get_page_size() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i32 @sysconf(i32 %1)
%3 = sext i32 %2 to i64
ret i64 %3
}
unsigned long Timer() {
  return ~(*(volatile unsigned int *)((volatile void *)(0xffd80000 + (12))));
}


x86 assembly (clang, -O0):
<Timer>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffd8000c,%eax
mov    (%rax),%eax
xor    $0xffffffff,%eax
mov    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Timer>:
mov    $0xffd8000c,%eax
mov    (%rax),%ecx
mov    $0xffffffff,%eax
xor    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @Timer() {
%1 = load volatile i32, i32* inttoptr (i64 4292345868 to i32*)
%2 = xor i32 %1, -1
%3 = zext i32 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @Timer() {
%1 = load volatile i32, i32* inttoptr (i64 4292345868 to i32*)
%2 = xor i32 %1, -1
%3 = zext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ HidInit();
void USBThermoInit(void) { HidInit(); }


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

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

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

LLVM IR (-O2):
define void @USBThermoInit() {
%1 = tail call i32 (...) @HidInit()
ret void
}
unsigned m(unsigned a, unsigned b) {
  if (a == 0)
    return 0;
  else
    return a & b;
}


x86 assembly (clang, -O0):
<m>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <m+0x20>
movl   $0x0,-0x4(%rbp)
jmp    1129 <m+0x29>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m>:
mov    %esi,%eax
and    %edi,%eax
test   %edi,%edi
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @m(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 eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = and i32 %10, %11
store i32 %12, i32* %3
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @m(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = and i32 %1, %0
%5 = select i1 %3, i32 0, i32 %4
ret i32 %5
}
void RTStrFormatTypeDeregister(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrFormatTypeDeregister() {
ret void
}
/* Variables and functions */
scalar_t__ power(float, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float a;
  scanf("%f", &a);
  printf("%d\n%d\n", (int)power(a, 2), (int)power(a, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <power@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <power@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <power@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
mov    $0x3,%edi
call   1030 <power@plt>
lea    0xe93(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = call i64 @power(float %4, i32 2)
%6 = trunc i64 %5 to i32
%7 = load float, float* %2
%8 = call i64 @power(float %7, i32 3)
%9 = trunc i64 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = call i64 @power(float %4, i32 2)
%6 = trunc i64 %5 to i32
%7 = load float, float* %1
%8 = call i64 @power(float %7, i32 3)
%9 = trunc i64 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %9)
ret i32 0
}
double f1(double x) { return __builtin_atan(x); }


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

x86 assembly (clang, -O2):
<f1>:
jmp    1030 <atan@plt>

LLVM IR (-O0):
define double @f1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @atan(double %3)
ret double %4
}

LLVM IR (-O2):
define double @f1(double %0) {
%2 = tail call double @atan(double %0)
ret double %2
}
void rop3_0_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = 0;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_0_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movb   $0x0,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_0_1_0>:
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_0_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
store i8 0, i8* %7
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = and i32 %9, %12
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = and i32 %16, %18
%20 = or i32 %13, %19
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %4
store i8 %21, i8* %22
ret void
}

LLVM IR (-O2):
define void @rop3_0_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
store i8 %5, i8* %0
ret void
}
int test_imm_32int8_reg(signed char val) {
  return ((val) & (-0x32 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_32int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffce,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_32int8_reg>:
test   $0xce,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_32int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -50
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_32int8_reg(i8 signext %0) {
%2 = and i8 %0, -50
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ sort3(int *, int *, int *);
int main() {
  int v1 = 10;
  int v2 = 5;
  int v3 = 1;
  sort3(&v1, &v2, &v3);
  printf("v1=%d, v2=%d, v3=%d\n", v1, v2, v3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <sort3@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0xa,0x14(%rsp)
movl   $0x5,0x10(%rsp)
movl   $0x1,0xc(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <sort3@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"v1=%d, v2=%d, v3=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 10, i32* %1
store i32 5, i32* %2
store i32 1, i32* %3
%4 = call i32 @sort3(i32* %1, i32* %2, i32* %3)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"v1=%d, v2=%d, v3=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%5 = bitcast i32* %2 to i8*
store i32 5, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 1, i32* %3
%7 = call i32 @sort3(i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
double compute_d1F1_dz_1d(int, double, int);
scalar_t__ fabs(double);
double bingham_dF_1d(double z) {
  int iter = (((int)fabs(z) * 10) > (10) ? ((int)fabs(z) * 10) : (10));
  return compute_d1F1_dz_1d(1, z, iter);
}


x86 assembly (clang, -O0):
<bingham_dF_1d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
imul   $0xa,%eax,%eax
cmp    $0xa,%eax
jle    1158 <bingham_dF_1d+0x38>
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1165 <bingham_dF_1d+0x45>
mov    $0xa,%eax
mov    %eax,-0x10(%rbp)
jmp    1165 <bingham_dF_1d+0x45>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%esi
mov    $0x1,%edi
call   1040 <compute_d1F1_dz_1d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bingham_dF_1d>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    $0xa,%esi
cmp    $0xb,%eax
jl     1149 <bingham_dF_1d+0x29>
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%esi
mov    $0x1,%edi
movsd  (%rsp),%xmm0
pop    %rax
jmp    1040 <compute_d1F1_dz_1d@plt>

LLVM IR (-O0):
define double @bingham_dF_1d(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = call i64 @fabs(double %4)
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 10
%8 = icmp sgt i32 %7, 10
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load double, double* %2
%11 = call i64 @fabs(double %10)
%12 = trunc i64 %11 to i32
%13 = mul nsw i32 %12, 10
br label %15
14: ; preds = %1
br label %15
15: ; preds = %14, %9
%16 = phi i32 [ %13, %9 ], [ 10, %14 ]
store i32 %16, i32* %3
%17 = load double, double* %2
%18 = load i32, i32* %3
%19 = call double @compute_d1F1_dz_1d(i32 1, double %17, i32 %18)
ret double %19
}

LLVM IR (-O2):
define double @bingham_dF_1d(double %0) {
%2 = tail call i64 @fabs(double %0)
%3 = trunc i64 %2 to i32
%4 = mul nsw i32 %3, 10
%5 = icmp sgt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = tail call i64 @fabs(double %0)
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %8, 10
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 10, %1 ]
%12 = tail call double @compute_d1F1_dz_1d(i32 1, double %0, i32 %11)
ret double %12
}
/* Variables and functions */
bool isPowerOfFour(int num) {
  return (num > 0) && ((num & (num - 1)) == 0) && ((num & 0xaaaaaaaa) == 0);
}


x86 assembly (clang, -O0):
<isPowerOfFour>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1140 <isPowerOfFour+0x40>
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1140 <isPowerOfFour+0x40>
mov    -0x4(%rbp),%eax
and    $0xaaaaaaaa,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPowerOfFour>:
test   %edi,%edi
setg   %al
lea    -0x1(%rdi),%ecx
test   %ecx,%edi
sete   %cl
test   $0xaaaaaaaa,%edi
sete   %dl
and    %al,%dl
and    %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @isPowerOfFour(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = and i32 %6, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %5
%12 = load i32, i32* %2
%13 = and i32 %12, -1431655766
%14 = icmp eq i32 %13, 0
br label %15
15: ; preds = %11, %5, %1
%16 = phi i1 [ false, %5 ], [ false, %1 ], [ %14, %11 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @isPowerOfFour(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = tail call i32 @llvm.ctpop.i32(i32 %0)
%4 = icmp ult i32 %3, 2
%5 = and i1 %2, %4
%6 = and i32 %0, -1431655766
%7 = icmp eq i32 %6, 0
%8 = and i1 %7, %5
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ kotlinclib_print_byte(char);
int /*<<< orphan*/ kotlinclib_println();
void kotlinclib_println_byte(char message) {
  kotlinclib_print_byte(message);
  kotlinclib_println();
}


x86 assembly (clang, -O0):
<kotlinclib_println_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <kotlinclib_print_byte@plt>
mov    $0x0,%al
call   1030 <kotlinclib_println@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kotlinclib_println_byte>:
push   %rax
call   1040 <kotlinclib_print_byte@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <kotlinclib_println@plt>

LLVM IR (-O0):
define void @kotlinclib_println_byte(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @kotlinclib_print_byte(i8 signext %3)
%5 = call i32 (...) @kotlinclib_println()
ret void
}

LLVM IR (-O2):
define void @kotlinclib_println_byte(i8 signext %0) {
%2 = tail call i32 @kotlinclib_print_byte(i8 signext %0)
%3 = tail call i32 (...) @kotlinclib_println()
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int mapcon_coefficients_and_exponents_of_map(int dim, int ind, int nvr,
                                             double *cff, int *exp) {
  int a[3], fail;
  a[0] = dim;
  a[1] = ind;
  a[2] = nvr;
  fail = _ada_use_c2phc(438, a, exp, cff);
  return fail;
}


x86 assembly (clang, -O0):
<mapcon_coefficients_and_exponents_of_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    -0x2c(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1b6,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapcon_coefficients_and_exponents_of_map>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x1b6,%edi
mov    %r8,%rdx
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @mapcon_coefficients_and_exponents_of_map(i32 %0, i32 %1, i32 %2, double* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32*
%11 = alloca [3 x i32]
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double* %3, double** %9
store i32* %4, i32** %10
%13 = load i32, i32* %6
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
store i32 %13, i32* %14
%15 = load i32, i32* %7
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 1
store i32 %15, i32* %16
%17 = load i32, i32* %8
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 2
store i32 %17, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%20 = load i32*, i32** %10
%21 = load double*, double** %9
%22 = call i32 @_ada_use_c2phc(i32 438, i32* %19, i32* %20, double* %21)
store i32 %22, i32* %12
%23 = load i32, i32* %12
ret i32 %23
}

LLVM IR (-O2):
define i32 @mapcon_coefficients_and_exponents_of_map(i32 %0, i32 %1, i32 %2, double* %3, i32* %4) {
%6 = alloca [3 x i32]
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %1, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %2, i32* %10
%11 = call i32 @_ada_use_c2phc(i32 438, i32* %8, i32* %4, double* %3)
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_join(int /*<<< orphan*/, void **);
void *join_thread(pthread_t thr) {
  void *ret;
  pthread_join(thr, &ret);
  return ret;
}


x86 assembly (clang, -O0):
<join_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <pthread_join@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_thread>:
push   %rax
mov    %rsp,%rsi
call   1030 <pthread_join@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @join_thread(i32 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @pthread_join(i32 %0, i8** %2)
%5 = load i8*, i8** %2
ret i8* %5
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ die(char *);
void *sfm_calloc(size_t nmemb, size_t size) {
  void *ptr;
  if ((ptr = calloc(nmemb, size)) == NULL)
    die("sfm is out of memory!");
  return ptr;
}


x86 assembly (clang, -O0):
<sfm_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1157 <sfm_calloc+0x37>
lea    0xeae(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfm_calloc>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <sfm_calloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"sfm is out of memory!\00"
define i8* @sfm_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
@.str = [22 x i8] c"sfm is out of memory!\00"
define noalias i8* @sfm_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ Get_Word(int /*<<< orphan*/ *, int /*<<< orphan*/);
int32_t Abs_Get_Word(int32_t address) { return Get_Word(NULL, address); }


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

x86 assembly (clang, -O2):
<Abs_Get_Word>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <Get_Word@plt>

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

LLVM IR (-O2):
define i32 @Abs_Get_Word(i32 %0) {
%2 = tail call i32 @Get_Word(i32* null, i32 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ temprature_sens_read();
float esp32_temperature() {
  return (float)temprature_sens_read() * (125.0 + 40.0) / 255.0 - 40.0;
}


x86 assembly (clang, -O0):
<esp32_temperature>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <temprature_sens_read@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xebc(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<esp32_temperature>:
push   %rax
xor    %eax,%eax
call   1030 <temprature_sens_read@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xed7(%rip),%xmm0
divsd  0xed7(%rip),%xmm0
addsd  0xed7(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @esp32_temperature() {
%1 = call i64 (...) @temprature_sens_read()
%2 = sitofp i64 %1 to float
%3 = fpext float %2 to double
%4 = fmul double %3, 1.650000e+02
%5 = fdiv double %4, 2.550000e+02
%6 = fsub double %5, 4.000000e+01
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @esp32_temperature() {
%1 = tail call i64 (...) @temprature_sens_read()
%2 = sitofp i64 %1 to float
%3 = fpext float %2 to double
%4 = fmul double %3, 1.650000e+02
%5 = fdiv double %4, 2.550000e+02
%6 = fadd double %5, -4.000000e+01
%7 = fptrunc double %6 to float
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ proc();
int /*<<< orphan*/ system(char *);
main() {
  char buffer[1024];
  proc();
  system("ls");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"ls\00"
define i32 @main() {
%1 = tail call i32 (...) @proc()
%2 = tail call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int len(int *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int a[20] = {0};
  printf("Length Of the array is:%d\n", len(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
lea    -0x60(%rbp),%rdi
call   1030 <len@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <len@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Length Of the array is:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i32]
store i32 0, i32* %1
%3 = bitcast [20 x i32]* %2 to i8*
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%5 = call i32 @len(i32* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Length Of the array is:%d\0A\00"
define i32 @main() {
%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 @len(i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gettimeofday_op(int, int /*<<< orphan*/);
void start_timer() { gettimeofday_op(1, 0); }


x86 assembly (clang, -O0):
<start_timer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <gettimeofday_op@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_timer>:
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <gettimeofday_op@plt>

LLVM IR (-O0):
define void @start_timer() {
%1 = call i32 @gettimeofday_op(i32 1, i32 0)
ret void
}

LLVM IR (-O2):
define void @start_timer() {
%1 = tail call i32 @gettimeofday_op(i32 1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ c(double, double, double);
double fmin(int /*<<< orphan*/, int /*<<< orphan*/);
double pu(double x, double y) {
  return fmin(c(x + 0.38, y + 0.33, 0.03), c(x + 0.13, y + 0.33, 0.03));
}


x86 assembly (clang, -O0):
<pu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xede(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xec1(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xeac(%rip),%xmm2
call   1040 <c@plt>
mov    %eax,-0x14(%rbp)
movsd  0xeac(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xe82(%rip),%xmm2
call   1040 <c@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1030 <fmin@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pu>:
push   %rbx
sub    $0x10,%rsp
movapd %xmm0,%xmm2
movsd  %xmm0,0x8(%rsp)
movsd  0xec9(%rip),%xmm0
addsd  %xmm2,%xmm0
addsd  0xec5(%rip),%xmm1
movsd  %xmm1,(%rsp)
movsd  0xec0(%rip),%xmm2
call   1040 <c@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
addsd  0xeb3(%rip),%xmm0
movsd  (%rsp),%xmm1
movsd  0xe9e(%rip),%xmm2
call   1040 <c@plt>
mov    %ebx,%edi
mov    %eax,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <fmin@plt>

LLVM IR (-O0):
define double @pu(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 = fadd double %5, 3.800000e-01
%7 = load double, double* %4
%8 = fadd double %7, 3.300000e-01
%9 = call i32 @c(double %6, double %8, double 3.000000e-02)
%10 = load double, double* %3
%11 = fadd double %10, 1.300000e-01
%12 = load double, double* %4
%13 = fadd double %12, 3.300000e-01
%14 = call i32 @c(double %11, double %13, double 3.000000e-02)
%15 = call double @fmin(i32 %9, i32 %14)
ret double %15
}

LLVM IR (-O2):
define double @pu(double %0, double %1) {
%3 = fadd double %0, 3.800000e-01
%4 = fadd double %1, 3.300000e-01
%5 = tail call i32 @c(double %3, double %4, double 3.000000e-02)
%6 = fadd double %0, 1.300000e-01
%7 = tail call i32 @c(double %6, double %4, double 3.000000e-02)
%8 = tail call double @fmin(i32 %5, i32 %7)
ret double %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int same_screen;
};
typedef TYPE_1__ XPointerMovedEvent;

/* Variables and functions */
void set_XPointerMovedEvent_same_screen(void *_p, int _v) {
  ((XPointerMovedEvent *)_p)->same_screen = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XPointerMovedEvent_same_screen>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XPointerMovedEvent_same_screen(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}