xunge/DecIR huggingface dataset:
unsigned dns_k_permutor_powof(unsigned n) {
  unsigned m, i = 0;
  for (m = 1; m < n; m <<= 1, i++)
    ;
  ;
  return i;
}


x86 assembly (clang, -O0):
<dns_k_permutor_powof>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    113d <dns_k_permutor_powof+0x3d>
jmp    1126 <dns_k_permutor_powof+0x26>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <dns_k_permutor_powof+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_k_permutor_powof>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     1119 <dns_k_permutor_powof+0x19>
mov    $0x1,%ecx
xor    %eax,%eax
xchg   %ax,%ax
add    %ecx,%ecx
add    $0x1,%eax
cmp    %edi,%ecx
jb     1110 <dns_k_permutor_powof+0x10>
ret

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

LLVM IR (-O2):
define i32 @dns_k_permutor_powof(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ 1, %1 ]
%6 = shl i32 %5, 1
%7 = add i32 %4, 1
%8 = icmp ult i32 %6, %0
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_prebuf_disable() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_prebuf_disable"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"NOT IMPLEMENTED:pa_memblockq_prebuf_disable\0A\00"
define i32 @pa_memblockq_prebuf_disable() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_memblockq_prebuf_disable\00"
define i32 @pa_memblockq_prebuf_disable() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_win_wchnstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_win_wchnstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_win_wchnstr+0x2a>
jmp    1170 <cmd_win_wchnstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_win_wchnstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_win_wchnstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_win_wchnstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
unsigned char *findPathKey(unsigned char *path) {
  unsigned char *iter = path;
  while (0 != *iter) {
    iter++;
    if ('\\' == *iter)
      iter += 2;
    if ('/' == *iter)
      break;
  }
  return iter;
}


x86 assembly (clang, -O0):
<findPathKey>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     116b <findPathKey+0x6b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
mov    $0x5c,%eax
cmp    %ecx,%eax
jne    114d <findPathKey+0x4d>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
mov    $0x2f,%eax
cmp    %ecx,%eax
jne    1166 <findPathKey+0x66>
jmp    116b <findPathKey+0x6b>
jmp    1110 <findPathKey+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findPathKey>:
mov    (%rdi),%cl
jmp    1123 <findPathKey+0x23>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1(%rdi),%rax
mov    %dl,%cl
movzbl 0x1(%rdi,%rcx,2),%ecx
mov    %rax,%rdi
cmp    $0x2f,%cl
je     1138 <findPathKey+0x38>
test   %cl,%cl
je     1139 <findPathKey+0x39>
xor    %ecx,%ecx
cmpb   $0x5c,0x1(%rdi)
sete   %dl
jne    1110 <findPathKey+0x10>
lea    0x3(%rdi),%rax
jmp    1114 <findPathKey+0x14>
ret
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @findPathKey(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 = %26, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = icmp ne i32 0, %8
br i1 %9, label %10, label %27
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = icmp eq i32 92, %15
br i1 %16, label %17, label %20
17: ; preds = %10
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 2
store i8* %19, i8** %3
br label %20
20: ; preds = %17, %10
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = icmp eq i32 47, %23
br i1 %24, label %25, label %26
25: ; preds = %20
br label %27
26: ; preds = %20
br label %5
27: ; preds = %25, %5
%28 = load i8*, i8** %3
ret i8* %28
}

LLVM IR (-O2):
define i8* @findPathKey(i8* %0) {
%2 = load i8, i8* %0
br label %3
3: ; preds = %7, %1
%4 = phi i8 [ %13, %7 ], [ %2, %1 ]
%5 = phi i8* [ %12, %7 ], [ %0, %1 ]
%6 = icmp eq i8 %4, 0
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 92
%11 = getelementptr inbounds i8, i8* %5, i64 3
%12 = select i1 %10, i8* %11, i8* %8
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 47
br i1 %14, label %15, label %3
15: ; preds = %7, %3
%16 = phi i8* [ %12, %7 ], [ %5, %3 ]
ret i8* %16
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fputs(char const *, int /*<<< orphan*/ *);
int ILL_fprintf(void *dest, const char *s) {
  if (s != NULL)
    return fputs(s, (FILE *)dest);
  return 0;
}


x86 assembly (clang, -O0):
<ILL_fprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1140 <ILL_fprintf+0x30>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputs@plt>
mov    %eax,-0x4(%rbp)
jmp    1147 <ILL_fprintf+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ILL_fprintf>:
test   %rsi,%rsi
je     1123 <ILL_fprintf+0x13>
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <fputs@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ILL_fprintf(i8* nocapture %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = bitcast i8* %0 to i32*
%6 = tail call i32 @fputs(i8* %1, i32* %5)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ 0, %2 ]
ret i32 %8
}
unsigned long int unsignedlongint_ignoring_signedint(unsigned long int x,
                                                     signed int y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i64 @unsignedlongint_ignoring_signedint(i64 returned %0, i32 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ QuickSortR(void *, int /*<<< orphan*/, size_t, size_t,
                              int (*)(void const *, void const *));
void QuickSort(void *arr, size_t n_data, size_t data_size,
               int (*cmp)(const void *a, const void *b)) {
  QuickSortR(arr, 0, n_data - 1, data_size, cmp);
}


x86 assembly (clang, -O0):
<QuickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
sub    $0x1,%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
xor    %esi,%esi
call   1030 <QuickSortR@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuickSort>:
mov    %rcx,%r8
mov    %rdx,%rcx
lea    -0x1(%rsi),%rdx
xor    %esi,%esi
jmp    1030 <QuickSortR@plt>

LLVM IR (-O0):
define void @QuickSort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = sub i64 %10, 1
%12 = load i64, i64* %7
%13 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %8
%14 = call i32 @QuickSortR(i8* %9, i32 0, i64 %11, i64 %12, i32 (i8*, i8*)* %13)
ret void
}

LLVM IR (-O2):
define void @QuickSort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = add i64 %1, -1
%6 = tail call i32 @QuickSortR(i8* %0, i32 0, i64 %5, i64 %2, i32 (i8*, i8*)* %3)
ret void
}
/* Variables and functions */
int set_irq_wake(unsigned int, int);
__attribute__((always_)) int enable_irq_wake(unsigned int irq) {
  return set_irq_wake(irq, 1);
}


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

x86 assembly (clang, -O2):
<enable_irq_wake>:
mov    $0x1,%esi
jmp    1030 <set_irq_wake@plt>

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

LLVM IR (-O2):
define i32 @enable_irq_wake(i32 %0) {
%2 = tail call i32 @set_irq_wake(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void process_logo_only(char *distro[], unsigned short int num) {
  unsigned short int x = 0;
  for (x = 0; x < num; x++)
    printf("%s\n", distro[x]);
  return;
}


x86 assembly (clang, -O0):
<process_logo_only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movw   $0x0,-0xc(%rbp)
movw   $0x0,-0xc(%rbp)
movzwl -0xc(%rbp),%eax
movzwl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jge    1168 <process_logo_only+0x58>
mov    -0x8(%rbp),%rax
movzwl -0xc(%rbp),%ecx
mov    (%rax,%rcx,8),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xc(%rbp)
jmp    112f <process_logo_only+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_logo_only>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1145 <process_logo_only+0x35>
mov    %rdi,%r15
movzwl %si,%r12d
xor    %ebx,%ebx
lea    0xed4(%rip),%r14
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <process_logo_only+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @process_logo_only(i8** %0, i16 zeroext %1) {
%3 = alloca i8**
%4 = alloca i16
%5 = alloca i16
store i8** %0, i8*** %3
store i16 %1, i16* %4
store i16 0, i16* %5
store i16 0, i16* %5
br label %6
6: ; preds = %19, %2
%7 = load i16, i16* %5
%8 = zext i16 %7 to i32
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = icmp slt i32 %8, %10
br i1 %11, label %12, label %22
12: ; preds = %6
%13 = load i8**, i8*** %3
%14 = load i16, i16* %5
%15 = zext i16 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %12
%20 = load i16, i16* %5
%21 = add i16 %20, 1
store i16 %21, i16* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @process_logo_only(i8** nocapture %0, i16 zeroext %1) {
%3 = icmp eq i16 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i16 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_long(long);
void put_hack(void) {
  long i,
      hack[7 + 2] = {1009,       7,          0x00245645, 0x523a2042, 0x696f2076,
                     0x3f2e3f20, 0x28313939, 0x302c3139, 0x39322900};
  for (i = 0; i < 7 + 2; i++)
    put_long(hack[i]);
}


x86 assembly (clang, -O0):
<put_hack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x48,%edx
call   1030 <memcpy@plt>
movq   $0x0,-0x8(%rbp)
cmpq   $0x9,-0x8(%rbp)
jge    116f <put_hack+0x4f>
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rdi
call   1040 <put_long@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1145 <put_hack+0x25>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_hack>:
push   %rax
mov    $0x3f1,%edi
call   1030 <put_long@plt>
mov    $0x7,%edi
call   1030 <put_long@plt>
mov    $0x245645,%edi
call   1030 <put_long@plt>
mov    $0x523a2042,%edi
call   1030 <put_long@plt>
mov    $0x696f2076,%edi
call   1030 <put_long@plt>
mov    $0x3f2e3f20,%edi
call   1030 <put_long@plt>
mov    $0x28313939,%edi
call   1030 <put_long@plt>
mov    $0x302c3139,%edi
call   1030 <put_long@plt>
mov    $0x39322900,%edi
pop    %rax
jmp    1030 <put_long@plt>

LLVM IR (-O0):
@__const.put_hack.hack = [9 x i64] [i64 1009, i64 7, i64 2381381, i64 1379541058, i64 1768890486, i64 1059995424, i64 674314553, i64 808202553, i64 959588608]
define void @put_hack() {
%1 = alloca i64
%2 = alloca [9 x i64]
%3 = bitcast [9 x i64]* %2 to i8*
store i64 0, i64* %1
br label %4
4: ; preds = %12, %0
%5 = load i64, i64* %1
%6 = icmp slt i64 %5, 9
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i64, i64* %1
%9 = getelementptr inbounds [9 x i64], [9 x i64]* %2, i64 0, i64 %8
%10 = load i64, i64* %9
%11 = call i32 @put_long(i64 %10)
br label %12
12: ; preds = %7
%13 = load i64, i64* %1
%14 = add nsw i64 %13, 1
store i64 %14, i64* %1
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @put_hack() {
%1 = tail call i32 @put_long(i64 1009)
%2 = tail call i32 @put_long(i64 7)
%3 = tail call i32 @put_long(i64 2381381)
%4 = tail call i32 @put_long(i64 1379541058)
%5 = tail call i32 @put_long(i64 1768890486)
%6 = tail call i32 @put_long(i64 1059995424)
%7 = tail call i32 @put_long(i64 674314553)
%8 = tail call i32 @put_long(i64 808202553)
%9 = tail call i32 @put_long(i64 959588608)
ret void
}
void RTMemAllocTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemAllocTag() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ mktime(struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
time_t spx_now() {
  time_t timep;
  struct tm *p;
  time(&timep);
  p = localtime(&timep);
  timep = mktime(p);
  return timep;
}


x86 assembly (clang, -O0):
<spx_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <mktime@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spx_now>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rax,%rdi
call   1050 <mktime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @spx_now() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @mktime(%struct.tm* %5)
store i32 %6, i32* %1
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @spx_now() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call i32 @mktime(%struct.tm* %4)
ret i32 %5
}
int four2int(unsigned char *p) {
  return p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
}


x86 assembly (clang, -O0):
<four2int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<four2int>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @four2int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = add nsw i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 24
%24 = add nsw i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @four2int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Type definitions */
struct termios {
  int /*<<< orphan*/ c_ispeed;
};
typedef int /*<<< orphan*/ speed_t;

/* Variables and functions */
speed_t cfgetispeed(const struct termios *t) { return (t->c_ispeed); }


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

x86 assembly (clang, -O2):
<cfgetispeed>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
define i32 @cfgetispeed(%struct.termios* %0) {
%2 = alloca %struct.termios*
store %struct.termios* %0, %struct.termios** %2
%3 = load %struct.termios*, %struct.termios** %2
%4 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @cfgetispeed(%struct.termios* nocapture %0) {
%2 = getelementptr inbounds %struct.termios, %struct.termios* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
int f(long *v, long n, long c) {
  for (long i = 0; i < n; i++)
    if (v[i] > n / c * i)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1177 <f+0x77>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
cqto
idivq  -0x20(%rbp)
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
imul   -0x28(%rbp),%rcx
cmp    %rcx,%rax
jle    1161 <f+0x61>
movl   $0x0,-0x4(%rbp)
jmp    117e <f+0x7e>
jmp    1166 <f+0x66>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1118 <f+0x18>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %rsi,%rsi
jle    111e <f+0x1e>
mov    %rdx,%rcx
mov    %rsi,%rax
or     %rdx,%rax
shr    $0x20,%rax
je     1124 <f+0x24>
mov    %rsi,%rax
cqto
idiv   %rcx
jmp    112a <f+0x2a>
mov    $0x1,%eax
ret
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
xor    %ecx,%ecx
cmpq   $0x0,(%rdi)
jle    1135 <f+0x35>
mov    %ecx,%eax
ret
mov    $0x1,%r8d
xor    %ecx,%ecx
nopl   (%rax)
mov    %r8,%rdx
cmp    %r8,%rsi
je     1155 <f+0x55>
lea    0x1(%rdx),%r8
add    %rax,%rcx
cmp    %rcx,(%rdi,%rdx,8)
jle    1140 <f+0x40>
xor    %ecx,%ecx
cmp    %rsi,%rdx
setge  %cl
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i64* nocapture %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %1, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = sdiv i64 %1, %2
%7 = load i64, i64* %0
%8 = icmp sgt i64 %7, 0
br i1 %8, label %21, label %9
9: ; preds = %5, %12
%10 = phi i64 [ %17, %12 ], [ 1, %5 ]
%11 = icmp eq i64 %10, %1
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = getelementptr inbounds i64, i64* %0, i64 %10
%14 = load i64, i64* %13
%15 = mul nsw i64 %6, %10
%16 = icmp sgt i64 %14, %15
%17 = add nuw nsw i64 %10, 1
br i1 %16, label %18, label %9
18: ; preds = %9, %12
%19 = icmp sge i64 %10, %1
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %18, %5, %3
%22 = phi i32 [ 1, %3 ], [ 0, %5 ], [ %20, %18 ]
ret i32 %22
}
_Bool Double__LT_(double x, double y) { return x < y; }


x86 assembly (clang, -O0):
<Double__LT_>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Double__LT_>:
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define zeroext i1 @Double__LT_(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @Double__LT_(double %0, double %1) {
%3 = fcmp olt double %0, %1
ret i1 %3
}
void log_null(const char *message __attribute__((unused)),
              void *data __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @log_null(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_Get(int, int, unsigned char *);
void thermo_reset(void) {
  unsigned char val;
  I2C_Get(0x0, 0x6, &val);
}


x86 assembly (clang, -O0):
<thermo_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0x6,%esi
lea    -0x1(%rbp),%rdx
call   1030 <I2C_Get@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thermo_reset>:
push   %rax
lea    0x7(%rsp),%rdx
xor    %edi,%edi
mov    $0x6,%esi
call   1030 <I2C_Get@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @thermo_reset() {
%1 = alloca i8
%2 = call i32 @I2C_Get(i32 0, i32 6, i8* %1)
ret void
}

LLVM IR (-O2):
define void @thermo_reset() {
%1 = alloca i8
%2 = call i32 @I2C_Get(i32 0, i32 6, i8* %1)
ret void
}
/* Variables and functions */
int ttunlock(int /*<<< orphan*/);
int unlockall(char **lkfiles) {
  int err = 0, i;
  char **p = lkfiles;
  while (*p)
    if ((i = ttunlock(*p++)) != 0)
      err = i;
  return err;
}


x86 assembly (clang, -O0):
<unlockall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1169 <unlockall+0x59>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%rax
mov    %eax,%edi
call   1030 <ttunlock@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     1164 <unlockall+0x54>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112b <unlockall+0x1b>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlockall>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1148 <unlockall+0x38>
add    $0x8,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1030 <ttunlock@plt>
test   %eax,%eax
cmovne %eax,%ebp
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <unlockall+0x20>
jmp    114a <unlockall+0x3a>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @unlockall(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %14, %4 ], [ %2, %1 ]
%6 = phi i8** [ %8, %4 ], [ %0, %1 ]
%7 = phi i32 [ %13, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = ptrtoint i8* %5 to i64
%10 = trunc i64 %9 to i32
%11 = tail call i32 @ttunlock(i32 %10)
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i32 %7, i32 %11
%14 = load i8*, i8** %8
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %13, %4 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Usage() {
  fprintf(stderr, "Usage: leave [[+]hh[:]mm]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Usage: leave [[+]hh[:]mm]\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Usage: leave [[+]hh[:]mm]\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ logDebug(char *);
int pluginClose() {
  logDebug("The Sample plugin is closing ...");
  return 1;
}


x86 assembly (clang, -O0):
<pluginClose>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <logDebug@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pluginClose>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <logDebug@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"The Sample plugin is closing ...\00"
define i32 @pluginClose() {
%1 = call i32 @logDebug(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [33 x i8] c"The Sample plugin is closing ...\00"
define i32 @pluginClose() {
%1 = tail call i32 @logDebug(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
extern int g(int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @g(i32 returned %0) {
ret i32 %0
}
_Complex float cplx1(float r) { return r + 2.0fi; }


x86 assembly (clang, -O0):
<cplx1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x40000000,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cplx1>:
xorps  %xmm1,%xmm1
addss  %xmm0,%xmm1
movaps 0xef2(%rip),%xmm0
movss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define <2 x float> @cplx1(float %0) {
%2 = alloca { float, float }
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fadd float %4, 0.000000e+00
%6 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%7 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float %5, float* %6
store float 2.000000e+00, float* %7
%8 = bitcast { float, float }* %2 to <2 x float>*
%9 = load <2 x float>, <2 x float>* %8
ret <2 x float> %9
}

LLVM IR (-O2):
define <2 x float> @cplx1(float %0) {
%2 = fadd float %0, 0.000000e+00
%3 = insertelement <2 x float> <float poison, float 2.000000e+00>, float %2, i64 0
ret <2 x float> %3
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void kb_init(void) { outb(0x21, 0xFD); }


x86 assembly (clang, -O0):
<kb_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21,%edi
mov    $0xfd,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kb_init>:
mov    $0x21,%edi
mov    $0xfd,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @kb_init() {
%1 = call i32 @outb(i32 33, i32 253)
ret void
}

LLVM IR (-O2):
define void @kb_init() {
%1 = tail call i32 @outb(i32 33, i32 253)
ret void
}
/* Variables and functions */
int write_to_database(char *, char *, int);
int write_activity_to_database(char *insert, int cycle) {
  return write_to_database("activity", insert, cycle);
}


x86 assembly (clang, -O0):
<write_activity_to_database>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <write_to_database@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_activity_to_database>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <write_to_database@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"activity\00"
define i32 @write_activity_to_database(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @write_to_database(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [9 x i8] c"activity\00"
define i32 @write_activity_to_database(i8* %0, i32 %1) {
%3 = tail call i32 @write_to_database(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c;
  while (c = getchar() != EOF) {
    printf("%d", c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x8(%rbp)
test   $0x1,%al
jne    115b <main+0x3b>
jmp    116f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%rax
je     1159 <main+0x39>
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%rax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
%7 = zext i1 %6 to i32
store i32 %7, i32* %2
br i1 %6, label %8, label %11
8: ; preds = %3
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %3
11: ; preds = %3
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i64 (...) @getchar()
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int max_2_int(int, int);
int max_3_int(int a, int b, int c) { return max_2_int(max_2_int(a, b), c); }


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

x86 assembly (clang, -O2):
<max_3_int>:
push   %rbx
mov    %edx,%ebx
call   1030 <max_2_int@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <max_2_int@plt>

LLVM IR (-O0):
define i32 @max_3_int(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 = call i32 @max_2_int(i32 %7, i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @max_2_int(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @max_3_int(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @max_2_int(i32 %0, i32 %1)
%5 = tail call i32 @max_2_int(i32 %4, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ output_1();
void energenie_plug1() {
  output_1();
  output_1();
  output_1();
}


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

x86 assembly (clang, -O2):
<energenie_plug1>:
push   %rax
xor    %eax,%eax
call   1030 <output_1@plt>
xor    %eax,%eax
call   1030 <output_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <output_1@plt>

LLVM IR (-O0):
define void @energenie_plug1() {
%1 = call i32 (...) @output_1()
%2 = call i32 (...) @output_1()
%3 = call i32 (...) @output_1()
ret void
}

LLVM IR (-O2):
define void @energenie_plug1() {
%1 = tail call i32 (...) @output_1()
%2 = tail call i32 (...) @output_1()
%3 = tail call i32 (...) @output_1()
ret void
}
int test11(int a, int b, int c, int d) {
  int x = a != b;
  int y = c != d;
  return x != y;
}


x86 assembly (clang, -O0):
<test11>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test11>:
cmp    %esi,%edi
setne  %al
cmp    %ecx,%edx
setne  %cl
xor    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @test11(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp ne i32 %11, %12
%14 = zext i1 %13 to i32
store i32 %14, i32* %9
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = icmp ne i32 %15, %16
%18 = zext i1 %17 to i32
store i32 %18, i32* %10
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = icmp ne i32 %19, %20
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @test11(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ne i32 %0, %1
%6 = icmp ne i32 %2, %3
%7 = xor i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void neural_layer_avgpool_update(const struct Layer *l) { (void)l; }


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

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

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

LLVM IR (-O2):
%struct.Layer = type opaque
define void @neural_layer_avgpool_update(%struct.Layer* nocapture %0) {
ret void
}
void DymolaOnInterrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @DymolaOnInterrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ helpShow(int /*<<< orphan*/ *);
void IF_helpS(void) { helpShow(NULL); }


x86 assembly (clang, -O0):
<IF_helpS>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <helpShow@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_helpS>:
xor    %edi,%edi
jmp    1030 <helpShow@plt>

LLVM IR (-O0):
define void @IF_helpS() {
%1 = call i32 @helpShow(i32* null)
ret void
}

LLVM IR (-O2):
define void @IF_helpS() {
%1 = tail call i32 @helpShow(i32* null)
ret void
}
/* Variables and functions */
int wpAppend();
double *wpGet(int);
int wpAppendPos(double lat, double lon) {
  int i = wpAppend();
  if (i >= 0) {
    double *d = wpGet(i);
    d[0] = lat;
    d[1] = lon;
  }
  return i;
}


x86 assembly (clang, -O0):
<wpAppendPos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1040 <wpAppend@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     116d <wpAppendPos+0x4d>
mov    -0x14(%rbp),%edi
call   1030 <wpGet@plt>
mov    %rax,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpAppendPos>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <wpAppend@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1158 <wpAppendPos+0x38>
mov    %ebx,%edi
call   1030 <wpGet@plt>
movsd  (%rsp),%xmm0
movsd  %xmm0,(%rax)
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rax)
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @wpAppendPos(double %0, double %1) {
%3 = tail call i32 (...) @wpAppend()
%4 = icmp sgt i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call double* @wpGet(i32 %3)
store double %0, double* %6
%7 = getelementptr inbounds double, double* %6, i64 1
store double %1, double* %7
br label %8
8: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x;
  int unknown;
  if (unknown) {
    x = 5;
  } else {
    x = 7;
  }
  assert(x > 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1135 <main+0x25>
movl   $0x5,-0x8(%rbp)
jmp    113c <main+0x2c>
movl   $0x7,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 5, i32* %2
br label %8
7: ; preds = %0
store i32 7, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
int ft_isascii(int c) { return (c >= 0 && c < 128); }


x86 assembly (clang, -O0):
<ft_isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1123 <ft_isascii+0x23>
cmpl   $0x80,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isascii(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 %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 128
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_material_header(int, int);
void fgmvwrite_material_header_(int *nmats, int *data_type) {
  gmvwrite_material_header(*nmats, *data_type);
}


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

x86 assembly (clang, -O2):
<fgmvwrite_material_header_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <gmvwrite_material_header@plt>

LLVM IR (-O0):
define void @fgmvwrite_material_header_(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 = load i32, i32* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call i32 @gmvwrite_material_header(i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_material_header_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @gmvwrite_material_header(i32 %3, i32 %4)
ret void
}