xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ sig_action(int, int /*<<< orphan*/ *, void *, char *,
                              char *);
void sigsegv_action(int number, siginfo_t *info, void *data) {
  sig_action(number, info, data, "Segmentation Fault",
             "Your application crashed due an invalid memory access.");
}


x86 assembly (clang, -O0):
<sigsegv_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xecb(%rip),%rcx
lea    0xed7(%rip),%r8
call   1030 <sig_action@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigsegv_action>:
lea    0xee9(%rip),%rcx
lea    0xef5(%rip),%r8
jmp    1030 <sig_action@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Segmentation Fault\00"
@.str.1 = [55 x i8] c"Your application crashed due an invalid memory access.\00"
define void @sigsegv_action(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load i8*, i8** %6
%10 = call i32 @sig_action(i32 %7, i32* %8, i8* %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Segmentation Fault\00"
@.str.1 = [55 x i8] c"Your application crashed due an invalid memory access.\00"
define void @sigsegv_action(i32 %0, i32* %1, i8* %2) {
%4 = tail call i32 @sig_action(i32 %0, i32* %1, i8* %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void assignGlobal(void) {
  extern int i;
  i = 0x5A;
}


x86 assembly (clang, -O0):
<assignGlobal>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
movl   $0x5a,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<assignGlobal>:
mov    0x2ee1(%rip),%rax
movl   $0x5a,(%rax)
ret

LLVM IR (-O0):
@i = external global i32
define void @assignGlobal() {
store i32 90, i32* @i
ret void
}

LLVM IR (-O2):
@i = external global i32
define void @assignGlobal() {
store i32 90, i32* @i
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
yyTerm(char *f) { printf("%s", f); }


x86 assembly (clang, -O0):
<yyTerm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @yyTerm(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
int __XALT_my_hostname_parser_xalt_1_5(const char *my_hostname) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @__XALT_my_hostname_parser_xalt_1_5(i8* nocapture readnone %0) {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello! \a\a\a\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"Hello! \07\07\07\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
char __ocl_clz_char(char src) {
  char bit = ((char)1) << (8 - 1);
  int n;
  for (n = 0; n < 8; n++, bit >>= 1) {
    if (src & bit)
      break;
  }
  return n;
}


x86 assembly (clang, -O0):
<__ocl_clz_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x80,-0x2(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1154 <__ocl_clz_char+0x54>
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1137 <__ocl_clz_char+0x37>
jmp    1154 <__ocl_clz_char+0x54>
jmp    113c <__ocl_clz_char+0x3c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x2(%rbp)
jmp    1115 <__ocl_clz_char+0x15>
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_clz_char>:
test   %dil,%dil
js     113a <__ocl_clz_char+0x3a>
mov    $0x1,%al
cmp    $0x3f,%dil
ja     1139 <__ocl_clz_char+0x39>
mov    $0x2,%al
cmp    $0x1f,%dil
ja     1139 <__ocl_clz_char+0x39>
mov    $0x3,%al
cmp    $0xf,%dil
ja     1139 <__ocl_clz_char+0x39>
mov    $0x4,%al
cmp    $0x7,%dil
ja     1139 <__ocl_clz_char+0x39>
mov    $0x5,%al
cmp    $0x3,%dil
ja     1139 <__ocl_clz_char+0x39>
mov    $0x6,%al
cmp    $0x1,%dil
ja     1139 <__ocl_clz_char+0x39>
mov    $0x7,%al
adc    $0x0,%al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @__ocl_clz_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %2
store i8 -128, i8* %3
store i32 0, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = and i32 %10, %12
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %8
br label %24
16: ; preds = %8
br label %17
17: ; preds = %16
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = ashr i32 %21, 1
%23 = trunc i32 %22 to i8
store i8 %23, i8* %3
br label %5
24: ; preds = %15, %5
%25 = load i32, i32* %4
%26 = trunc i32 %25 to i8
ret i8 %26
}

LLVM IR (-O2):
define signext i8 @__ocl_clz_char(i8 signext %0) {
%2 = icmp sgt i8 %0, -1
br i1 %2, label %3, label %18
3: ; preds = %1
%4 = icmp ult i8 %0, 64
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = icmp ult i8 %0, 32
br i1 %6, label %7, label %18
7: ; preds = %5
%8 = icmp ult i8 %0, 16
br i1 %8, label %9, label %18
9: ; preds = %7
%10 = icmp ult i8 %0, 8
br i1 %10, label %11, label %18
11: ; preds = %9
%12 = icmp ult i8 %0, 4
br i1 %12, label %13, label %18
13: ; preds = %11
%14 = icmp ult i8 %0, 2
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = icmp eq i8 %0, 0
%17 = select i1 %16, i8 8, i8 7
br label %18
18: ; preds = %15, %13, %11, %9, %7, %5, %3, %1
%19 = phi i8 [ 0, %1 ], [ 1, %3 ], [ 2, %5 ], [ 3, %7 ], [ 4, %9 ], [ 5, %11 ], [ 6, %13 ], [ %17, %15 ]
ret i8 %19
}
void init(int bucket[512 * 4]) {
  int radixID, i;
loop1_outer:
  for (radixID = 0; radixID < 512 * 4; ++radixID)
    bucket[radixID] = 0;
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x800,-0xc(%rbp)
jge    1139 <init+0x39>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <init+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    $0x2000,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @init(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_ivector(int *v, int nl, int nh) { free((char *)(v + nl)); }


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

x86 assembly (clang, -O2):
<free_ivector>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_ivector(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = bitcast i32* %10 to i8*
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @free_ivector(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = bitcast i32* %5 to i8*
%7 = tail call i32 @free(i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fault(int);
int _kill(int pid, int sig) {
  fault(0b11111110);
  return -1;
}


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

x86 assembly (clang, -O2):
<_kill>:
push   %rax
mov    $0xfe,%edi
call   1030 <fault@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_kill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @fault(i32 254)
ret i32 -1
}

LLVM IR (-O2):
define i32 @_kill(i32 %0, i32 %1) {
%3 = tail call i32 @fault(i32 254)
ret i32 -1
}
/* Variables and functions */
int close(int);
int outside_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<outside_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @outside_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void EndSyntaxMappings(void) {}


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

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

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

LLVM IR (-O2):
define void @EndSyntaxMappings() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exception_is_valid_char(char);
int exception_is_separator(char c) { return !exception_is_valid_char(c); }


x86 assembly (clang, -O0):
<exception_is_separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <exception_is_valid_char@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exception_is_separator>:
push   %rax
call   1030 <exception_is_valid_char@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @exception_is_separator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @exception_is_valid_char(i8 signext %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @exception_is_separator(i8 signext %0) {
%2 = tail call i32 @exception_is_valid_char(i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int atoi(char *str) {
  int res = 0;
  int i;
  char *p = str;
  while (*p) {
    char c = *p;
    if (c >= '0' && c <= '9') {
      res = res * 10 + c - '0';
    } else {
      return 0;
    }
    p++;
  }
  return res;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1179 <atoi+0x79>
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x21(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x30,%eax
jl     115c <atoi+0x5c>
movsbl -0x21(%rbp),%eax
cmp    $0x39,%eax
jg     115c <atoi+0x5c>
imul   $0xa,-0x14(%rbp),%eax
movsbl -0x21(%rbp),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
jmp    1168 <atoi+0x68>
movl   $0x0,-0x4(%rbp)
jmp    117f <atoi+0x7f>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1117 <atoi+0x17>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi),%ecx
test   %ecx,%ecx
je     112e <atoi+0x2e>
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
cmp    $0xa,%dl
jb     1110 <atoi+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i32 [ 0, %1 ], [ %13, %7 ]
%4 = phi i8* [ %0, %1 ], [ %14, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %2
%8 = add i8 %5, -48
%9 = icmp ult i8 %8, 10
%10 = sext i8 %5 to i32
%11 = mul nsw i32 %3, 10
%12 = add i32 %11, -48
%13 = add i32 %12, %10
%14 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %2, label %15
15: ; preds = %2, %7
%16 = phi i32 [ 0, %7 ], [ %3, %2 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ normalDistRand(double, double *);
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ srand48(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  srand48(time(NULL));
  double x[2];
  normalDistRand(0.1, x);
  printf("%f,%f\n", x[0], x[1]);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1060 <srand48@plt>
lea    -0x20(%rbp),%rdi
movsd  0xe8e(%rip),%xmm0
call   1050 <normalDistRand@plt>
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1060 <srand48@plt>
movsd  0xea6(%rip),%xmm0
mov    %rsp,%rdi
call   1050 <normalDistRand@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%f,%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x double]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @time(i32* null)
%8 = call i32 @srand48(i32 %7)
%9 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%10 = call i32 @normalDistRand(double 1.000000e-01, double* %9)
%11 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%12 = load double, double* %11
%13 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
%14 = load double, double* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %12, double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f,%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x double]
%4 = tail call i32 @time(i32* null)
%5 = tail call i32 @srand48(i32 %4)
%6 = bitcast [2 x double]* %3 to i8*
%7 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%8 = call i32 @normalDistRand(double 1.000000e-01, double* %7)
%9 = load double, double* %7
%10 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%11 = load double, double* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %9, double %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setlocale(int, char *);
void uninivar_setlocale(void) {
  int category;
  char *locale;
  (void)setlocale(category, locale);
}


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

x86 assembly (clang, -O2):
<uninivar_setlocale>:
jmp    1030 <setlocale@plt>

LLVM IR (-O0):
define void @uninivar_setlocale() {
%1 = alloca i32
%2 = alloca i8*
%3 = load i32, i32* %1
%4 = load i8*, i8** %2
%5 = call i32 @setlocale(i32 %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @uninivar_setlocale() {
%1 = tail call i32 @setlocale(i32 undef, i8* undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char const);
void puts(const char *str) {
  while (*str) {
    putchar(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <puts+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
char *strcat(char *dest, const char *src) { return dest; }


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

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

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

LLVM IR (-O2):
define i8* @strcat(i8* readnone returned %0, i8* nocapture readnone %1) {
ret i8* %0
}
/* Variables and functions */
size_t next_pow2(size_t);
size_t next_size(size_t n, size_t min) {
  n = next_pow2(n);
  return n < min ? min : n * 3 / 2;
}


x86 assembly (clang, -O0):
<next_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <next_pow2@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1148 <next_size+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1155 <next_size+0x45>
imul   $0x3,-0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_size>:
push   %rbx
mov    %rsi,%rbx
call   1030 <next_pow2@plt>
lea    (%rax,%rax,2),%rcx
shr    %rcx
cmp    %rbx,%rax
cmovb  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @next_size(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 = call i64 @next_pow2(i64 %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %16
12: ; preds = %2
%13 = load i64, i64* %3
%14 = mul i64 %13, 3
%15 = udiv i64 %14, 2
br label %16
16: ; preds = %12, %10
%17 = phi i64 [ %11, %10 ], [ %15, %12 ]
ret i64 %17
}

LLVM IR (-O2):
define i64 @next_size(i64 %0, i64 %1) {
%3 = tail call i64 @next_pow2(i64 %0)
%4 = icmp ult i64 %3, %1
%5 = mul i64 %3, 3
%6 = lshr i64 %5, 1
%7 = select i1 %4, i64 %1, i64 %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ run_inits();
int main(int argc, char **argv) {
  run_inits();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <run_inits@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run_inits()
ret i32 0
}
int len(const char *c) {
  const char *s = c;
  while (*s)
    ++s;
  return (s - c);
}


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

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

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

LLVM IR (-O2):
define i32 @len(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
int str_len(char *s) {
  int i;
  i = 0;
  while (s[i] != '\0') {
    i++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<str_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <str_len+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <str_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @str_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
int abs(int val) { return val >= 0 ? val : -val; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111c <abs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %6, %5 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
_Bool f1() { return t() && t1(); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <t@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1(%rbp)
je     114f <f1+0x2f>
mov    $0x0,%al
call   1040 <t1@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <t@plt>
test   %eax,%eax
je     113a <f1+0x1a>
xor    %eax,%eax
call   1040 <t1@plt>
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i1 @f1() {
%1 = call i32 (...) @t()
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @t1()
%5 = icmp ne i32 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @f1() {
%1 = tail call i32 (...) @t()
%2 = icmp eq i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (...) @t1()
%5 = icmp ne i32 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
ret i1 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __cpu_to_le16(int /*<<< orphan*/);
void set16_le(uint16_t *p, uint16_t n) { *p = __cpu_to_le16(n); }


x86 assembly (clang, -O0):
<set16_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set16_le>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @set16_le(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @__cpu_to_le16(i32 %1)
store i32 %3, i32* %0
ret void
}
int test_imm_4Cuint16_mem(unsigned short *val) {
  return ((*val) & (-0x4C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Cuint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffffb4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Cuint16_mem>:
movzwl (%rdi),%eax
test   $0xffb4,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Cuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -76
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDevLPMConfig(uint32_t ui32Base, uint32_t ui32Config) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x00000362))) = ui32Config;
}


x86 assembly (clang, -O0):
<USBDevLPMConfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x362,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDevLPMConfig>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x40050000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
mov    %ebx,0x362(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @USBDevLPMConfig(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1074069504
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 866
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %9, i32* %13
ret void
}

LLVM IR (-O2):
define void @USBDevLPMConfig(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074069504
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 866
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %1, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
int /*<<< orphan*/ SendNU16(unsigned short *, unsigned short);
void GUI_BcolorConDots(unsigned short int *dot, unsigned short int dot_cnt) {
  SendChar((0XEE) & 0xFF);
  SendChar((0x69) & 0xFF);
  SendNU16((unsigned short int *)dot, dot_cnt * 2);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<GUI_BcolorConDots>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x69,%edi
call   1030 <SendChar@plt>
mov    -0x8(%rbp),%rdi
movzwl -0xa(%rbp),%eax
shl    $0x1,%eax
movzwl %ax,%esi
call   1040 <SendNU16@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GUI_BcolorConDots>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x69,%edi
call   1030 <SendChar@plt>
add    %ebx,%ebx
movzwl %bx,%esi
mov    %r14,%rdi
call   1040 <SendNU16@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @GUI_BcolorConDots(i16* %0, i16 zeroext %1) {
%3 = alloca i16*
%4 = alloca i16
store i16* %0, i16** %3
store i16 %1, i16* %4
%5 = call i32 @SendChar(i32 238)
%6 = call i32 @SendChar(i32 105)
%7 = load i16*, i16** %3
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = mul nsw i32 %9, 2
%11 = trunc i32 %10 to i16
%12 = call i32 @SendNU16(i16* %7, i16 zeroext %11)
%13 = call i32 @SendChar(i32 255)
%14 = call i32 @SendChar(i32 252)
%15 = call i32 @SendChar(i32 255)
%16 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @GUI_BcolorConDots(i16* %0, i16 zeroext %1) {
%3 = tail call i32 @SendChar(i32 238)
%4 = tail call i32 @SendChar(i32 105)
%5 = shl i16 %1, 1
%6 = tail call i32 @SendNU16(i16* %0, i16 zeroext %5)
%7 = tail call i32 @SendChar(i32 255)
%8 = tail call i32 @SendChar(i32 252)
%9 = tail call i32 @SendChar(i32 255)
%10 = tail call i32 @SendChar(i32 255)
ret void
}
/* Variables and functions */
int atoi(char *);
int fannkuchredux(int);
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  int n = argc > 1 ? atoi(argv[1]) : 7;
  printf("Pfannkuchen(%d) = %d\n", n, fannkuchredux(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1165 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    1172 <main+0x42>
mov    $0x7,%eax
mov    %eax,-0x18(%rbp)
jmp    1172 <main+0x42>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <fannkuchredux@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x7,%ebx
cmp    $0x2,%edi
jl     1146 <main+0x16>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    %ebx,%edi
call   1040 <fannkuchredux@plt>
lea    0xeac(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Pfannkuchen(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %9
%16 = phi i32 [ %13, %9 ], [ 7, %14 ]
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = load i32, i32* %6
%19 = call i32 @fannkuchredux(i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Pfannkuchen(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 7, %2 ]
%10 = tail call i32 @fannkuchredux(i32 %9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
scalar_t__ fgetpos;
int main(int argc, char **argv) {
  void *p;
  (void)argc;
  (void)argv;
  p = (void *)(fgetpos);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecf(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@fgetpos = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* @fgetpos
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %6
ret i32 0
}

LLVM IR (-O2):
@fgetpos = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void FPUHalfPrecisionModeSet(uint32_t ui32Mode) {
  (*((volatile uint32_t *)(0xE000EF3C))) =
      ((*((volatile uint32_t *)(0xE000EF3C))) & ~(0x04000000)) | ui32Mode;
}


x86 assembly (clang, -O0):
<FPUHalfPrecisionModeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xe000ef3c,%eax
mov    (%rax),%ecx
and    $0xfbffffff,%ecx
or     -0x4(%rbp),%ecx
mov    $0xe000ef3c,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FPUHalfPrecisionModeSet>:
mov    $0xe000ef3c,%eax
mov    $0xfbffffff,%ecx
and    (%rax),%ecx
or     %edi,%ecx
mov    %ecx,(%rax)
ret

LLVM IR (-O0):
define void @FPUHalfPrecisionModeSet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load volatile i32, i32* inttoptr (i64 3758157628 to i32*)
%4 = and i32 %3, -67108865
%5 = load i32, i32* %2
%6 = or i32 %4, %5
store volatile i32 %6, i32* inttoptr (i64 3758157628 to i32*)
ret void
}

LLVM IR (-O2):
define void @FPUHalfPrecisionModeSet(i32 %0) {
%2 = load volatile i32, i32* inttoptr (i64 3758157628 to i32*)
%3 = and i32 %2, -67108865
%4 = or i32 %3, %0
store volatile i32 %4, i32* inttoptr (i64 3758157628 to i32*)
ret void
}
/* Type definitions */
typedef int __u16;

/* Variables and functions */
__u16 mdio_phy_id_devad(int phy_id) { return phy_id & 0x001f; }


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

x86 assembly (clang, -O2):
<mdio_phy_id_devad>:
mov    %edi,%eax
and    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @mdio_phy_id_devad(i32 %0) {
%2 = and i32 %0, 31
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ printf(char *, char *);
void handleData1(char *data, int len) {
  char buff[8];
  bzero(buff, 8);
  memcpy(buff, data, len);
  printf("# vulnserver_cov: Handledata1: %s\n", buff);
}


x86 assembly (clang, -O0):
<handleData1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x14(%rbp),%rdi
mov    $0x8,%esi
call   1050 <bzero@plt>
lea    -0x14(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <memcpy@plt>
lea    -0x14(%rbp),%rsi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleData1>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x8(%rsp),%r14
mov    %r14,%rdi
mov    $0x8,%esi
call   1050 <bzero@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
lea    0xe9d(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"# vulnserver_cov: Handledata1: %s\0A\00"
define void @handleData1(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [8 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%7 = call i32 @bzero(i8* %6, i32 8)
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @memcpy(i8* %8, i8* %9, i32 %10)
%12 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"# vulnserver_cov: Handledata1: %s\0A\00"
define void @handleData1(i8* %0, i32 %1) {
%3 = alloca [8 x i8]
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%5 = call i32 @bzero(i8* %4, i32 8)
%6 = call i32 @memcpy(i8* %4, i8* %0, i32 %1)
%7 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
size_t lookup_auto_min_capacity(void *context) { return 16; }


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

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

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

LLVM IR (-O2):
define i64 @lookup_auto_min_capacity(i8* nocapture readnone %0) {
ret i64 16
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void proginfo(void) {
  fprintf(stderr, "\ntooLAME version 0.2g (http://toolame.sourceforge.net)\n");
  fprintf(stderr, "MPEG Audio Layer II encoder\n\n");
}


x86 assembly (clang, -O0):
<proginfo>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xeff(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<proginfo>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf09(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"\0AtooLAME version 0.2g (http://toolame.sourceforge.net)\0A\00"
@.str.1 = [30 x i8] c"MPEG Audio Layer II encoder\0A\0A\00"
define void @proginfo() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"\0AtooLAME version 0.2g (http://toolame.sourceforge.net)\0A\00"
@.str.1 = [30 x i8] c"MPEG Audio Layer II encoder\0A\0A\00"
define void @proginfo() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int address_taken() {
  int **x;
  int *y;
  int i = 7;
  y = &i;
  x = &y;
  return **x;
}


x86 assembly (clang, -O0):
<address_taken>:
push   %rbp
mov    %rsp,%rbp
movl   $0x7,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @address_taken() {
%1 = alloca i32**
%2 = alloca i32*
%3 = alloca i32
store i32 7, i32* %3
store i32* %3, i32** %2
store i32** %2, i32*** %1
%4 = load i32**, i32*** %1
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @address_taken() {
ret i32 7
}
extern __attribute__((__gnu___)) double _Complex __attribute__((__const__))
conj(double _Complex _Z) {
  return __extension__ ~_Z;
}


x86 assembly (clang, -O0):
<conj>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm1
movaps 0xee6(%rip),%xmm2
movsd  -0x18(%rbp),%xmm0
pxor   %xmm2,%xmm0
movsd  %xmm1,-0x10(%rbp)
movlpd %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<conj>:
xorps  0xef9(%rip),%xmm1
ret

LLVM IR (-O0):
define { double, double } @conj(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca { double, double }
%5 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %0, double* %5
%6 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %1, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%8 = load double, double* %7
%9 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%10 = load double, double* %9
%11 = fneg double %10
%12 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%13 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %8, double* %12
store double %11, double* %13
%14 = load { double, double }, { double, double }* %3
ret { double, double } %14
}

LLVM IR (-O2):
define { double, double } @conj(double %0, double %1) {
%3 = fneg double %1
%4 = insertvalue { double, double } poison, double %0, 0
%5 = insertvalue { double, double } %4, double %3, 1
ret { double, double } %5
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float generate_random_float() {
  float r = (float)rand() / (float)RAND_MAX;
  return r;
}


x86 assembly (clang, -O0):
<generate_random_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ebd(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_random_float>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @generate_random_float() {
%1 = alloca float
%2 = call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to float
%6 = fdiv float %3, %5
store float %6, float* %1
%7 = load float, float* %1
ret float %7
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @generate_random_float() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}