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

/* Variables and functions */
int pthread_getaffinity_np(pthread_t thread, size_t size, cpu_set_t *set) {
  ;
  char *p = (char *)set;
  while (size--)
    *p++ = 0;
  return 0;
}


x86 assembly (clang, -O0):
<pthread_getaffinity_np>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     1147 <pthread_getaffinity_np+0x47>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movb   $0x0,(%rax)
jmp    1117 <pthread_getaffinity_np+0x17>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_getaffinity_np>:
test   %rsi,%rsi
je     1127 <pthread_getaffinity_np+0x17>
push   %rax
mov    %rdx,%rdi
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @pthread_getaffinity_np(i32 %0, i64 %1, i32* nocapture writeonly %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = bitcast i32* %2 to i8*
br label %7
7: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_io_get_gpio_dir_addr(void *port) {
  return cfg_processor_get_hex_int_attr(port, "dir");
}


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

x86 assembly (clang, -O2):
<cfg_io_get_gpio_dir_addr>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_hex_int_attr@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"dir\00"
define i32 @cfg_io_get_gpio_dir_addr(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ foo1();
scalar_t__ foo2();
int main(void) {
  if (foo1() != foo2())
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <foo1@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <foo2@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     1178 <main+0x38>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <foo1@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <foo2@plt>
cmp    %rax,%rbx
jne    115e <main+0x1e>
xor    %edi,%edi
call   1060 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @foo1()
%3 = call i64 (...) @foo2()
%4 = icmp ne i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @foo1()
%2 = tail call i64 (...) @foo2()
%3 = icmp eq i64 %1, %2
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Print a random permutation of arguments.\n");
  printf(
      "Usage: shuffle [-h|-v|-n|-1|-e] [-p <number>] [-r <file>] arguments\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Print a random permutation of arguments.\0A\00"
@.str.1 = [69 x i8] c"Usage: shuffle [-h|-v|-n|-1|-e] [-p <number>] [-r <file>] arguments\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"Print a random permutation of arguments.\00"
@str.2 = [68 x i8] c"Usage: shuffle [-h|-v|-n|-1|-e] [-p <number>] [-r <file>] arguments\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
double drand48();
int32_t ran_num(double prob, int32_t n) {
  int32_t i, r;
  for (i = r = 0; i < n; i++) {
    if (drand48() < prob)
      r++;
  }
  return r;
}


x86 assembly (clang, -O0):
<ran_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    117a <ran_num+0x6a>
mov    $0x0,%al
call   1030 <drand48@plt>
movaps %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1164 <ran_num+0x54>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1169 <ran_num+0x59>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1131 <ran_num+0x21>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ran_num>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
jle    1150 <ran_num+0x40>
mov    %rdi,%r14
xor    %ebx,%ebx
movsd  %xmm0,(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <drand48@plt>
xor    %eax,%eax
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
add    %rax,%rbx
add    $0xffffffffffffffff,%r14
jne    1130 <ran_num+0x20>
jmp    1152 <ran_num+0x42>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @ran_num(double %0, i64 %1) {
%3 = alloca double
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store double %0, double* %3
store i64 %1, i64* %4
store i64 0, i64* %6
store i64 0, i64* %5
br label %7
7: ; preds = %19, %2
%8 = load i64, i64* %5
%9 = load i64, i64* %4
%10 = icmp slt i64 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = call double (...) @drand48()
%13 = load double, double* %3
%14 = fcmp olt double %12, %13
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i64, i64* %6
%17 = add nsw i64 %16, 1
store i64 %17, i64* %6
br label %18
18: ; preds = %15, %11
br label %19
19: ; preds = %18
%20 = load i64, i64* %5
%21 = add nsw i64 %20, 1
store i64 %21, i64* %5
br label %7
22: ; preds = %7
%23 = load i64, i64* %6
ret i64 %23
}

LLVM IR (-O2):
define i64 @ran_num(double %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = phi i64 [ %11, %4 ], [ 0, %2 ]
%7 = tail call double (...) @drand48()
%8 = fcmp olt double %7, %0
%9 = zext i1 %8 to i64
%10 = add nuw nsw i64 %5, %9
%11 = add nuw nsw i64 %6, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = phi i64 [ 0, %2 ], [ %10, %4 ]
ret i64 %14
}
/* Variables and functions */
char toupper(char);
char *WpeStringToUpper(char *s) {
  char *s2;
  for (s2 = s; *s2; s2++) {
    *s2 = toupper(*s2);
  }
  return (s);
}


x86 assembly (clang, -O0):
<WpeStringToUpper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <WpeStringToUpper+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <WpeStringToUpper+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WpeStringToUpper>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <WpeStringToUpper+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <WpeStringToUpper+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @WpeStringToUpper(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 = %14, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = call signext i8 @toupper(i8 signext %11)
%13 = load i8*, i8** %3
store i8 %12, i8* %13
br label %14
14: ; preds = %9
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %5
17: ; preds = %5
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @WpeStringToUpper(i8* returned %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 signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%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 i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ iswalpha(int /*<<< orphan*/);
void uninitvar_iswalpha(void) {
  wint_t i;
  (void)iswalpha(i);
}


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

x86 assembly (clang, -O2):
<uninitvar_iswalpha>:
jmp    1030 <iswalpha@plt>

LLVM IR (-O0):
define void @uninitvar_iswalpha() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @iswalpha(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_iswalpha() {
%1 = tail call i32 @iswalpha(i32 undef)
ret void
}
void delay(unsigned int ms) {
  while (ms--) {
    unsigned int j = 568;
    while (j--)
      ;
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1140 <delay+0x40>
movl   $0x238,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     113b <delay+0x3b>
jmp    1122 <delay+0x22>
jmp    1107 <delay+0x7>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @delay(i32 %0) {
ret void
}
int main() {
  int *a;
  int *b;
  int *c, d, e;
  int *f, *g, *h;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned char *strcpy(unsigned char *str1, unsigned char *str2) {
  unsigned char *tmp = str1;
  while (*str2) {
    *str1++ = *str2++;
  }
  *str1 = '\0';
  return tmp;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1148 <strcpy+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
double fcn(double *x, int *fid) {
  extern double gofcn(double, int);
  return gofcn(*x, *fid);
}


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

x86 assembly (clang, -O2):
<fcn>:
movsd  (%rdi),%xmm0
mov    (%rsi),%edi
jmp    1030 <gofcn@plt>

LLVM IR (-O0):
define double @fcn(double* %0, i32* %1) {
%3 = alloca double*
%4 = alloca i32*
store double* %0, double** %3
store i32* %1, i32** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call double @gofcn(double %6, i32 %8)
ret double %9
}

LLVM IR (-O2):
define double @fcn(double* nocapture %0, i32* nocapture %1) {
%3 = load double, double* %0
%4 = load i32, i32* %1
%5 = tail call double @gofcn(double %3, i32 %4)
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *fp, int argc, char **argv) {
  fprintf(fp,
          "Usage: %s [options]\n\n"
          "Options:\n"
          "-d | --device name   Video device name [/dev/video]\n"
          "-h | --help          Print this message\n"
          "-m | --mmap          Use memory mapped buffers\n"
          "-r | --read          Use read() calls\n"
          "-u | --userp         Use application allocated buffers\n"
          "",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [263 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video]\0A-h | --help Print this message\0A-m | --mmap Use memory mapped buffers\0A-r | --read Use read() calls\0A-u | --userp Use application allocated buffers\0A\00"
define void @usage(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 i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([263 x i8], [263 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [263 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video]\0A-h | --help Print this message\0A-m | --mmap Use memory mapped buffers\0A-r | --read Use read() calls\0A-u | --userp Use application allocated buffers\0A\00"
define void @usage(i32* nocapture %0, i32 %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([263 x i8], [263 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int rename(char const *, char const *);
int fdevent_rename(const char *oldpath, const char *newpath) {
  return rename(oldpath, newpath);
}


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

x86 assembly (clang, -O2):
<fdevent_rename>:
jmp    1030 <rename@plt>

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

LLVM IR (-O2):
define i32 @fdevent_rename(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @rename(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f1(unsigned int a) {
  if (a != 28) {
    if (4 / a == 5)
      link_error();
  }
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1c,-0x4(%rbp)
je     1144 <f1+0x34>
mov    $0x4,%eax
xor    %edx,%edx
divl   -0x4(%rbp)
cmp    $0x5,%eax
jne    113f <f1+0x2f>
mov    $0x0,%al
call   1030 <link_error@plt>
jmp    1144 <f1+0x34>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 28
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = udiv i32 4, %6
%8 = icmp eq i32 %7, 5
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 (...) @link_error()
br label %11
11: ; preds = %9, %5
br label %12
12: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
define void @f1(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void STEST901(char *s) {
  printf("C901:(%20s):(ABCDEFGHIJ0123456789):Call by ref from variable\n", s);
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"C901:(%20s):(ABCDEFGHIJ0123456789):Call by ref from variable\0A\00"
define void @STEST901(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [62 x i8] c"C901:(%20s):(ABCDEFGHIJ0123456789):Call by ref from variable\0A\00"
define void @STEST901(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int initialize_sampler(int dim) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(42, &dim, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_sampler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2a,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_sampler>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x2a,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @initialize_sampler(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 42, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @initialize_sampler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 42, i32* %2, i32* undef, double* undef)
ret i32 %3
}
void *threadfunc(void *p) {
  (void)p;
  return 0;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @threadfunc(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_sqrt_d(double *, double);
double xil_fpo_sqrt_d(double a) {
  double res_d;
  xip_fpo_sqrt_d(&res_d, a);
  return res_d;
}


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

x86 assembly (clang, -O2):
<xil_fpo_sqrt_d>:
push   %rax
mov    %rsp,%rdi
call   1030 <xip_fpo_sqrt_d@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @xil_fpo_sqrt_d(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @xip_fpo_sqrt_d(double* %2, double %0)
%5 = load double, double* %2
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ cgc_strlen(char const *);
int /*<<< orphan*/ modem_output(void *, int /*<<< orphan*/);
void send_string(const char *str) {
  modem_output((void *)str, cgc_strlen(str));
}


x86 assembly (clang, -O0):
<send_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cgc_strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <modem_output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <cgc_strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <modem_output@plt>

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

LLVM IR (-O2):
define void @send_string(i8* %0) {
%2 = tail call i32 @cgc_strlen(i8* %0)
%3 = tail call i32 @modem_output(i8* %0, i32 %2)
ret void
}
unsigned int fi(unsigned int n) {
  if (n == 0)
    return 0;
  else if (n == 1)
    return 1;
  else
    return fi(n - 2) + fi(n - 1);
}


x86 assembly (clang, -O0):
<fi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fi+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fi+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fi+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fi+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fi@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fi@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fi>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <fi+0x22>
nopl   0x0(%rax)
lea    -0x2(%rbx),%edi
call   1030 <fi@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
jae    1120 <fi+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fi(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add i32 %4, -2
%8 = tail call i32 @fi(i32 %7)
%9 = add i32 %4, -1
%10 = add i32 %8, %3
br label %2
11: ; preds = %2
%12 = add i32 %4, %3
ret i32 %12
}
void bf_set(unsigned char *data, int index) {
  int byte_index = (int)(index / 8);
  unsigned char bit_mask = 0x01 << (index % 8);
  data[byte_index] |= bit_mask;
}


x86 assembly (clang, -O0):
<bf_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_set>:
mov    %esi,%ecx
lea    0x7(%rcx),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
and    $0x7,%cl
mov    $0x1,%edx
shl    %cl,%edx
cltq
or     %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @bf_set(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 8
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = srem i32 %9, 8
%11 = shl i32 1, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %6
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %20, %14
%22 = trunc i32 %21 to i8
store i8 %22, i8* %18
ret void
}

LLVM IR (-O2):
define void @bf_set(i8* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 8
%4 = and i32 %1, 7
%5 = shl nuw nsw i32 1, %4
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = trunc i32 %5 to i8
%10 = or i8 %8, %9
store i8 %10, i8* %7
ret void
}
void i915_pmu_gt_parked(struct drm_i915_private *i915) {}


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

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

LLVM IR (-O0):
%struct.drm_i915_private = type opaque
define void @i915_pmu_gt_parked(%struct.drm_i915_private* %0) {
%2 = alloca %struct.drm_i915_private*
store %struct.drm_i915_private* %0, %struct.drm_i915_private** %2
ret void
}

LLVM IR (-O2):
%struct.drm_i915_private = type opaque
define void @i915_pmu_gt_parked(%struct.drm_i915_private* nocapture %0) {
ret void
}
/* Variables and functions */
bool nrf52_errata_79(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_79() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t QEIVelocityGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x0000001C))));
}


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

x86 assembly (clang, -O2):
<QEIVelocityGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x1c(%rax),%rax
ret

LLVM IR (-O0):
define i64 @QEIVelocityGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 28
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @QEIVelocityGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 28
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int);
int errfn(const char *pathname, int theerr) {
  fprintf(stderr, "error accessing %s: %s\n", pathname, strerror(theerr));
  return 0;
}


x86 assembly (clang, -O0):
<errfn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <strerror@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errfn>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
mov    %esi,%edi
call   1040 <strerror@plt>
lea    0xec3(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"error accessing %s: %s\0A\00"
define i32 @errfn(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8* @strerror(i32 %7)
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %8)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"error accessing %s: %s\0A\00"
define i32 @errfn(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i8* @strerror(i32 %1)
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
ret i32 0
}
/* Variables and functions */
float ArcTan(int, int);
float RadianAngle(int x1, int y1, int x2, int y2) {
  return ArcTan(x2 - x1, y2 - y1);
}


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

x86 assembly (clang, -O2):
<RadianAngle>:
sub    %edi,%edx
sub    %esi,%ecx
mov    %edx,%edi
mov    %ecx,%esi
jmp    1030 <ArcTan@plt>

LLVM IR (-O0):
define float @RadianAngle(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
%12 = load i32, i32* %8
%13 = load i32, i32* %6
%14 = sub nsw i32 %12, %13
%15 = call float @ArcTan(i32 %11, i32 %14)
ret float %15
}

LLVM IR (-O2):
define float @RadianAngle(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %2, %0
%6 = sub nsw i32 %3, %1
%7 = tail call float @ArcTan(i32 %5, i32 %6)
ret float %7
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t equal(signed char b, signed char c) {
  uint8_t ub = b;
  uint8_t uc = c;
  uint8_t x = ub ^ uc;
  uint32_t y = x;
  y -= 1;
  y >>= 31;
  return y;
}


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
xor    %esi,%edi
lea    -0x1(%rdi),%eax
sar    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @equal(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
store i32 %10, i32* %5
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = xor i32 %13, %14
store i32 %15, i32* %7
%16 = load i32, i32* %7
store i32 %16, i32* %8
%17 = load i32, i32* %8
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = ashr i32 %19, 31
store i32 %20, i32* %8
%21 = load i32, i32* %8
ret i32 %21
}

LLVM IR (-O2):
define i32 @equal(i8 signext %0, i8 signext %1) {
%3 = xor i8 %1, %0
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, -1
%6 = ashr i32 %5, 31
ret i32 %6
}
unsigned Cyc_Sexp_nibble(unsigned i, unsigned x) {
  unsigned _T0;
_TL57:
  if (i > 0U)
    goto _TL55;
  else {
    goto _TL56;
  }
_TL55:
  x = x >> 4;
  i = i + -1;
  goto _TL57;
_TL56:
  _T0 = x & 15U;
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Sexp_nibble>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    1119 <Cyc_Sexp_nibble+0x19>
jmp    111e <Cyc_Sexp_nibble+0x1e>
jmp    1135 <Cyc_Sexp_nibble+0x35>
mov    -0x8(%rbp),%eax
shr    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    110a <Cyc_Sexp_nibble+0xa>
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Sexp_nibble>:
mov    %esi,%eax
test   %edi,%edi
je     1131 <Cyc_Sexp_nibble+0x31>
lea    -0x1(%rdi),%ecx
mov    %edi,%edx
and    $0x7,%edx
je     1135 <Cyc_Sexp_nibble+0x35>
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
shr    $0x4,%eax
add    $0x1,%esi
cmp    %esi,%edx
jne    1120 <Cyc_Sexp_nibble+0x20>
sub    %esi,%edi
cmp    $0x7,%ecx
jae    1140 <Cyc_Sexp_nibble+0x40>
and    $0xf,%eax
ret
cmp    $0x7,%ecx
jb     1131 <Cyc_Sexp_nibble+0x31>
nopw   0x0(%rax,%rax,1)
add    $0xfffffff8,%edi
jne    1140 <Cyc_Sexp_nibble+0x40>
xor    %eax,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @Cyc_Sexp_nibble(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %6
6: ; preds = %11, %2
%7 = load i32, i32* %3
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %11
10: ; preds = %6
br label %16
11: ; preds = %9
%12 = load i32, i32* %4
%13 = lshr i32 %12, 4
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = add i32 %14, -1
store i32 %15, i32* %3
br label %6
16: ; preds = %10
%17 = load i32, i32* %4
%18 = and i32 %17, 15
store i32 %18, i32* %5
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @Cyc_Sexp_nibble(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %24, label %4
4: ; preds = %2
%5 = add i32 %0, -1
%6 = and i32 %0, 7
%7 = icmp eq i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %4, %8
%9 = phi i32 [ %13, %8 ], [ %0, %4 ]
%10 = phi i32 [ %12, %8 ], [ %1, %4 ]
%11 = phi i32 [ %14, %8 ], [ 0, %4 ]
%12 = lshr i32 %10, 4
%13 = add i32 %9, -1
%14 = add i32 %11, 1
%15 = icmp eq i32 %14, %6
br i1 %15, label %16, label %8
16: ; preds = %8, %4
%17 = phi i32 [ undef, %4 ], [ %12, %8 ]
%18 = phi i32 [ %0, %4 ], [ %13, %8 ]
%19 = icmp ult i32 %5, 7
br i1 %19, label %24, label %20
20: ; preds = %16, %20
%21 = phi i32 [ %22, %20 ], [ %18, %16 ]
%22 = add i32 %21, -8
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %20
24: ; preds = %16, %20, %2
%25 = phi i32 [ %1, %2 ], [ %17, %16 ], [ 0, %20 ]
%26 = and i32 %25, 15
ret i32 %26
}
/* Variables and functions */
int atanf(float);
int sqrtf(int);
float asinf(float x) { return 2. * atanf(x / (1. + sqrtf(1. - x * x))); }


x86 assembly (clang, -O0):
<asinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb7(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrtf@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  0xe99(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <atanf@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe74(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinf>:
push   %rax
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec6(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <sqrtf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xeaa(%rip),%xmm0
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
call   1030 <atanf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @asinf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = fpext float %7 to double
%9 = fsub double 1.000000e+00, %8
%10 = fptosi double %9 to i32
%11 = call i32 @sqrtf(i32 %10)
%12 = sitofp i32 %11 to double
%13 = fadd double 1.000000e+00, %12
%14 = fdiv double %4, %13
%15 = fptrunc double %14 to float
%16 = call i32 @atanf(float %15)
%17 = sitofp i32 %16 to double
%18 = fmul double 2.000000e+00, %17
%19 = fptrunc double %18 to float
ret float %19
}

LLVM IR (-O2):
define float @asinf(float %0) {
%2 = fpext float %0 to double
%3 = fmul float %0, %0
%4 = fpext float %3 to double
%5 = fsub double 1.000000e+00, %4
%6 = fptosi double %5 to i32
%7 = tail call i32 @sqrtf(i32 %6)
%8 = sitofp i32 %7 to double
%9 = fadd double %8, 1.000000e+00
%10 = fdiv double %2, %9
%11 = fptrunc double %10 to float
%12 = tail call i32 @atanf(float %11)
%13 = sitofp i32 %12 to double
%14 = fmul double %13, 2.000000e+00
%15 = fptrunc double %14 to float
ret float %15
}
/* Type definitions */
struct kref {
  int dummy;
};

/* Variables and functions */
int atomic_dec_and_test(int *);
void stub1(struct kref *);
int kref_put(struct kref *kref, void (*release)(struct kref *kref)) {
  int tmp;
  int *__cil_tmp4;
  {
    {
      __cil_tmp4 = (int *)kref;
      tmp = atomic_dec_and_test(__cil_tmp4);
    }
    if (tmp) {
      { (*release)(kref); }
      return (1);
    } else {
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
<kref_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <atomic_dec_and_test@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1154 <kref_put+0x44>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
movl   $0x1,-0x4(%rbp)
jmp    1160 <kref_put+0x50>
jmp    1159 <kref_put+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kref_put>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <atomic_dec_and_test@plt>
test   %eax,%eax
je     1130 <kref_put+0x20>
mov    %rbx,%rdi
call   *%r14
mov    $0x1,%eax
jmp    1132 <kref_put+0x22>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.kref = type { i32 }
define i32 @kref_put(%struct.kref* %0, void (%struct.kref*)* %1) {
%3 = alloca i32
%4 = alloca %struct.kref*
%5 = alloca void (%struct.kref*)*
%6 = alloca i32
%7 = alloca i32*
store %struct.kref* %0, %struct.kref** %4
store void (%struct.kref*)* %1, void (%struct.kref*)** %5
%8 = load %struct.kref*, %struct.kref** %4
%9 = bitcast %struct.kref* %8 to i32*
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = call i32 @atomic_dec_and_test(i32* %10)
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load void (%struct.kref*)*, void (%struct.kref*)** %5
%16 = load %struct.kref*, %struct.kref** %4
store i32 1, i32* %3
br label %19
17: ; preds = %2
br label %18
18: ; preds = %17
store i32 0, i32* %3
br label %19
19: ; preds = %18, %14
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.kref = type { i32 }
define i32 @kref_put(%struct.kref* %0, void (%struct.kref*)* nocapture %1) {
%3 = getelementptr %struct.kref, %struct.kref* %0, i64 0, i32 0
%4 = tail call i32 @atomic_dec_and_test(i32* %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %2
tail call void %1(%struct.kref* %0)
br label %7
7: ; preds = %2, %6
%8 = phi i32 [ 1, %6 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int getchar();
void clear_stdbuf() {
  int c;
  while ((c = getchar()) != '\n')
    ;
}


x86 assembly (clang, -O0):
<clear_stdbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xa,%eax
je     1130 <clear_stdbuf+0x20>
jmp    1118 <clear_stdbuf+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_stdbuf>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
jne    1120 <clear_stdbuf+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @clear_stdbuf() {
%1 = alloca i32
br label %2
2: ; preds = %5, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @clear_stdbuf() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = icmp eq i32 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ printf(char *, double, double);
double sin(double);
int main(int argc, char *argv[]) {
  double r, s;
  r = atof(argv[1]);
  s = sin(r);
  printf("Hello, World! sin(%g)=%g=\n", r, s);
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%rsp)
call   1050 <sin@plt>
movaps %xmm0,%xmm1
lea    0xeb2(%rip),%rdi
movsd  (%rsp),%xmm0
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Hello, World! sin(%g)=%g=\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call double @atof(i8* %10)
store double %11, double* %6
%12 = load double, double* %6
%13 = call double @sin(double %12)
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), double %14, double %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Hello, World! sin(%g)=%g=\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call double @atof(i8* %4)
%6 = tail call double @sin(double %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), double %5, double %6)
ret i32 0
}
struct _Locale_name_hint *_Locale_get_time_hint(struct _Locale_time *time
                                                __attribute__((__unused__))) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct._Locale_name_hint = type opaque
%struct._Locale_time = type opaque
define %struct._Locale_name_hint* @_Locale_get_time_hint(%struct._Locale_time* %0) {
%2 = alloca %struct._Locale_time*
store %struct._Locale_time* %0, %struct._Locale_time** %2
ret %struct._Locale_name_hint* null
}

LLVM IR (-O2):
%struct._Locale_name_hint = type opaque
%struct._Locale_time = type opaque
define noalias %struct._Locale_name_hint* @_Locale_get_time_hint(%struct._Locale_time* nocapture readnone %0) {
ret %struct._Locale_name_hint* null
}