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

/* Variables and functions */
int setreuid(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((__weak__, __always___)) int softboundmpx_setreuid(uid_t ruid,
                                                                 uid_t euid) {
  return setreuid(ruid, euid);
}


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

x86 assembly (clang, -O2):
<softboundmpx_setreuid>:
jmp    1030 <setreuid@plt>

LLVM IR (-O0):
define weak i32 @softboundmpx_setreuid(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* %4
%7 = call i32 @setreuid(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define weak i32 @softboundmpx_setreuid(i32 %0, i32 %1) {
%3 = tail call i32 @setreuid(i32 %0, i32 %1)
ret i32 %3
}
int collated_compare(a, b) const void *a;
const void *b;
{
  const char *const s1 = *(const char *const *const)a;
  const char *const s2 = *(const char *const *const)b;
  if (s1 == s2)
    return 0;
  if (s1 == 0)
    return 1;
  if (s2 == 0)
    return -1;
  return strcmp(s1, s2);
}


x86 assembly (clang, -O0):
<collated_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    1150 <collated_compare+0x40>
movl   $0x0,-0x4(%rbp)
jmp    118e <collated_compare+0x7e>
cmpq   $0x0,-0x20(%rbp)
jne    1167 <collated_compare+0x57>
movl   $0x1,-0x4(%rbp)
jmp    118e <collated_compare+0x7e>
cmpq   $0x0,-0x28(%rbp)
jne    117e <collated_compare+0x6e>
movl   $0xffffffff,-0x4(%rbp)
jmp    118e <collated_compare+0x7e>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<collated_compare>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
cmp    %rsi,%rdi
je     112a <collated_compare+0x1a>
test   %rdi,%rdi
je     112d <collated_compare+0x1d>
test   %rsi,%rsi
je     1133 <collated_compare+0x23>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @collated_compare(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i8**
%13 = load i8*, i8** %12
store i8* %13, i8** %7
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = icmp eq i8* %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 0, i32* %3
br label %30
18: ; preds = %2
%19 = load i8*, i8** %6
%20 = icmp eq i8* %19, null
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 1, i32* %3
br label %30
22: ; preds = %18
%23 = load i8*, i8** %7
%24 = icmp eq i8* %23, null
br i1 %24, label %25, label %26
25: ; preds = %22
store i32 -1, i32* %3
br label %30
26: ; preds = %22
%27 = load i8*, i8** %6
%28 = load i8*, i8** %7
%29 = call i32 @strcmp(i8* %27, i8* %28)
store i32 %29, i32* %3
br label %30
30: ; preds = %26, %25, %21, %17
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @collated_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = icmp eq i8* %4, %6
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = icmp eq i8* %4, null
br i1 %9, label %14, label %10
10: ; preds = %8
%11 = icmp eq i8* %6, null
br i1 %11, label %14, label %12
12: ; preds = %10
%13 = tail call i32 @strcmp(i8* %4, i8* %6)
br label %14
14: ; preds = %10, %8, %2, %12
%15 = phi i32 [ %13, %12 ], [ 0, %2 ], [ 1, %8 ], [ -1, %10 ]
ret i32 %15
}
/* Variables and functions */
int ispalindromeS(char *);
int /*<<< orphan*/ sprintf(char *, char *, long);
int ispalindromeN(long n) {
  char buffer[24];
  sprintf(buffer, "%ld", n);
  return ispalindromeS(buffer);
}


x86 assembly (clang, -O0):
<ispalindromeN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <ispalindromeS@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispalindromeN>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rdx
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <ispalindromeS@plt>
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i32 @ispalindromeN(i64 %0) {
%2 = alloca [24 x i8]
%3 = getelementptr inbounds [24 x i8], [24 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
%5 = call i32 @ispalindromeS(i8* %3)
ret i32 %5
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
bool isSubstring(char *s1, char *s2) {
  if (strcmp(s1, s2) == 0) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<isSubstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1143 <isSubstring+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <isSubstring+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @isSubstring(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
unsigned int hash_str(char const *, int /*<<< orphan*/, int);
unsigned int hash_knr1(const char *s) { return hash_str(s, 0, 1); }


x86 assembly (clang, -O0):
<hash_knr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <hash_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_knr1>:
xor    %esi,%esi
mov    $0x1,%edx
jmp    1030 <hash_str@plt>

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

LLVM IR (-O2):
define i32 @hash_knr1(i8* %0) {
%2 = tail call i32 @hash_str(i8* %0, i32 0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void print_status(int status, void *p) {
  printf("Status: %d, MSG=%s\n", status, (char *)p);
}


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

x86 assembly (clang, -O2):
<print_status>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Status: %d, MSG=%s\0A\00"
define void @print_status(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 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Status: %d, MSG=%s\0A\00"
define void @print_status(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
/* Variables and functions */
float bounce_out(float, float, float);
float bounce_in(float step, float max_steps, float max_val) {
  return max_val - bounce_out(max_steps - step, max_steps, max_val);
}


x86 assembly (clang, -O0):
<bounce_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <bounce_out@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
subss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bounce_in>:
push   %rax
movss  %xmm2,0x4(%rsp)
movaps %xmm1,%xmm3
subss  %xmm0,%xmm3
movaps %xmm3,%xmm0
call   1030 <bounce_out@plt>
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @bounce_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %5
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %5
%12 = load float, float* %6
%13 = call float @bounce_out(float %10, float %11, float %12)
%14 = fsub float %7, %13
ret float %14
}

LLVM IR (-O2):
define float @bounce_in(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @bounce_out(float %4, float %1, float %2)
%6 = fsub float %2, %5
ret float %6
}
/* Variables and functions */
int f13(int *);
int f14(int *p) { return f13(p); }


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

x86 assembly (clang, -O2):
<f14>:
jmp    1030 <f13@plt>

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

LLVM IR (-O2):
define i32 @f14(i32* %0) {
%2 = tail call i32 @f13(i32* %0)
ret i32 %2
}
int qsort_cmp__LONG(const void *x, const void *y) {
  if (*((long long *)x) > *((long long *)y))
    return (-1);
  else
    return (*((long long *)x) < *((long long *)y));
}


x86 assembly (clang, -O0):
<qsort_cmp__LONG>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jle    112c <qsort_cmp__LONG+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <qsort_cmp__LONG+0x45>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_cmp__LONG>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @qsort_cmp__LONG(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** %4
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i64*
%11 = load i64, i64* %10
%12 = icmp sgt i64 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %23
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to i64*
%17 = load i64, i64* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %19
%21 = icmp slt i64 %17, %20
%22 = zext i1 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %14, %13
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @qsort_cmp__LONG(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp slt i64 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int count_factors(unsigned long long num, int prime) {
  int cnt = 0;
  while (num % prime == 0) {
    num = num / prime;
    cnt++;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<count_factors>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
jne    1148 <count_factors+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <count_factors+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_factors>:
movslq %esi,%r8
mov    %rdi,%rax
or     %r8,%rax
shr    $0x20,%rax
je     1119 <count_factors+0x19>
mov    %rdi,%rax
xor    %edx,%edx
div    %r8
jmp    111f <count_factors+0x1f>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
xor    %ecx,%ecx
test   %rdx,%rdx
je     1140 <count_factors+0x40>
jmp    1182 <count_factors+0x82>
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rax
xor    %edx,%edx
div    %r8
add    $0x1,%ecx
test   %rdx,%rdx
jne    1182 <count_factors+0x82>
mov    %rdi,%rax
or     %r8,%rax
shr    $0x20,%rax
je     1160 <count_factors+0x60>
mov    %rdi,%rax
xor    %edx,%edx
div    %r8
mov    %rax,%rdi
jmp    1168 <count_factors+0x68>
nopl   0x0(%rax)
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %eax,%edi
mov    %rdi,%rax
or     %r8,%rax
shr    $0x20,%rax
jne    1130 <count_factors+0x30>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
add    $0x1,%ecx
test   %rdx,%rdx
je     1140 <count_factors+0x40>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @count_factors(i64 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = urem i64 %0, %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %2, %6
%7 = phi i32 [ %10, %6 ], [ 0, %2 ]
%8 = phi i64 [ %9, %6 ], [ %0, %2 ]
%9 = udiv i64 %8, %3
%10 = add nuw nsw i32 %7, 1
%11 = urem i64 %9, %3
%12 = icmp eq i64 %11, 0
br i1 %12, label %6, label %13
13: ; preds = %6, %2
%14 = phi i32 [ 0, %2 ], [ %10, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ move(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ stdscr;
int /*<<< orphan*/ wclear(int /*<<< orphan*/);
void clearscreen(void) {
  wclear(stdscr);
  move(0, 0);
  refresh();
}


x86 assembly (clang, -O0):
<clearscreen>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1040 <wclear@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <move@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearscreen>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1040 <wclear@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <move@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <refresh@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @clearscreen() {
%1 = load i32, i32* @stdscr
%2 = call i32 @wclear(i32 %1)
%3 = call i32 @move(i32 0, i32 0)
%4 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @clearscreen() {
%1 = load i32, i32* @stdscr
%2 = tail call i32 @wclear(i32 %1)
%3 = tail call i32 @move(i32 0, i32 0)
%4 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
int factorial(int);
int nPr(int n, int r) {
  if (r >= 0 && n >= r)
    return factorial(n) / (factorial(n - r));
  else
    return 0;
}


x86 assembly (clang, -O0):
<nPr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     115a <nPr+0x4a>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     115a <nPr+0x4a>
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1161 <nPr+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nPr>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
test   %esi,%esi
js     1134 <nPr+0x24>
mov    %edi,%ebx
sub    %esi,%ebx
jl     1134 <nPr+0x24>
call   1030 <factorial@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @nPr(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 0
%4 = icmp slt i32 %0, %1
%5 = or i1 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = tail call i32 @factorial(i32 %0)
%8 = sub nsw i32 %0, %1
%9 = tail call i32 @factorial(i32 %8)
%10 = sdiv i32 %7, %9
br label %11
11: ; preds = %2, %6
%12 = phi i32 [ %10, %6 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
int libc_strlen(char *);
char *libc_strndup(char *, int);
char *libc_substr(char *str, int begin, int len) {
  if (begin <= -1) {
    begin = libc_strlen(str) + begin;
  }
  return libc_strndup(str + begin, len);
}


x86 assembly (clang, -O0):
<libc_substr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jg     114b <libc_substr+0x2b>
mov    -0x8(%rbp),%rdi
call   1040 <libc_strlen@plt>
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%esi
call   1030 <libc_strndup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libc_substr>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
test   %esi,%esi
jns    113a <libc_substr+0x1a>
mov    %rbx,%rdi
call   1040 <libc_strlen@plt>
add    %eax,%ebp
movslq %ebp,%rax
add    %rax,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <libc_strndup@plt>

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

LLVM IR (-O2):
define i8* @libc_substr(i8* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = tail call i32 @libc_strlen(i8* %0)
%7 = add nsw i32 %6, %1
br label %8
8: ; preds = %5, %3
%9 = phi i32 [ %7, %5 ], [ %1, %3 ]
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = tail call i8* @libc_strndup(i8* %11, i32 %2)
ret i8* %12
}
void setup(void) {}


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

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

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

LLVM IR (-O2):
define void @setup() {
ret void
}
int fun234() { return 234; }


x86 assembly (clang, -O0):
<fun234>:
push   %rbp
mov    %rsp,%rbp
mov    $0xea,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun234() {
ret i32 234
}

LLVM IR (-O2):
define i32 @fun234() {
ret i32 234
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHorizLine(int gridLength) {
  for (int i = 0; i < 2 * gridLength + 1; i++) {
    printf("—");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printHorizLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1150 <printHorizLine+0x40>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printHorizLine+0x12>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHorizLine>:
push   %rbp
push   %rbx
push   %rax
lea    (%rdi,%rdi,1),%ebp
add    $0x1,%ebp
test   %ebp,%ebp
jle    114d <printHorizLine+0x2d>
lea    0xecc(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1140 <printHorizLine+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\E2\80\94\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printHorizLine(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = mul nsw i32 2, %6
%8 = add nsw i32 %7, 1
%9 = icmp slt i32 %5, %8
br i1 %9, label %10, label %15
10: ; preds = %4
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\E2\80\94\00"
define void @printHorizLine(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %7, %1
%6 = tail call i32 @putchar(i32 10)
ret void
7: ; preds = %1, %7
%8 = phi i32 [ %10, %7 ], [ 0, %1 ]
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %3
br i1 %11, label %5, label %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void conf_default_message_callback(const char *s) {
  printf("#\n# ");
  printf("%s", s);
  printf("\n#\n");
}


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

x86 assembly (clang, -O2):
<conf_default_message_callback>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebe(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"#\0A# \00"
@.str.1 = [3 x i8] c"%s\00"
@str = [3 x i8] c"\0A#\00"
define void @conf_default_message_callback(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
void gdk_screen_get_system_colormap() {}


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

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

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

LLVM IR (-O2):
define void @gdk_screen_get_system_colormap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int test_assert(int x) {
  assert(x <= 4);
  return x;
}


x86 assembly (clang, -O0):
<test_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_assert>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x5,%ebx
setl   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_assert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 4
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_assert(i32 returned %0) {
%2 = icmp slt i32 %0, 5
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 %0
}
/* Variables and functions */
char *lxqt_backlight_backend_get_driver();
char *get_driver() { return lxqt_backlight_backend_get_driver(); }


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

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

LLVM IR (-O0):
define i8* @get_driver() {
%1 = call i8* (...) @lxqt_backlight_backend_get_driver()
ret i8* %1
}

LLVM IR (-O2):
define i8* @get_driver() {
%1 = tail call i8* (...) @lxqt_backlight_backend_get_driver()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ ALGOCTRL_init();
int /*<<< orphan*/ CLIENT_init();
int /*<<< orphan*/ CTRL_init();
int /*<<< orphan*/ DIAG_init();
int /*<<< orphan*/ IMGDATATL_init();
int /*<<< orphan*/ IMGPROVIDER_init();
int /*<<< orphan*/ SCHED_init();
int /*<<< orphan*/ SCHED_run();
int /*<<< orphan*/ SERVER_init();
int main(void) {
  SCHED_init();
  CLIENT_init();
  SERVER_init();
  ALGOCTRL_init();
  DIAG_init();
  IMGPROVIDER_init();
  CTRL_init();
  IMGDATATL_init();
  SCHED_run();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   10b0 <SCHED_init@plt>
mov    $0x0,%al
call   1070 <CLIENT_init@plt>
mov    $0x0,%al
call   1030 <SERVER_init@plt>
mov    $0x0,%al
call   1050 <ALGOCTRL_init@plt>
mov    $0x0,%al
call   1080 <DIAG_init@plt>
mov    $0x0,%al
call   1040 <IMGPROVIDER_init@plt>
mov    $0x0,%al
call   1090 <CTRL_init@plt>
mov    $0x0,%al
call   10a0 <IMGDATATL_init@plt>
mov    $0x0,%al
call   1060 <SCHED_run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   10b0 <SCHED_init@plt>
xor    %eax,%eax
call   1070 <CLIENT_init@plt>
xor    %eax,%eax
call   1030 <SERVER_init@plt>
xor    %eax,%eax
call   1050 <ALGOCTRL_init@plt>
xor    %eax,%eax
call   1080 <DIAG_init@plt>
xor    %eax,%eax
call   1040 <IMGPROVIDER_init@plt>
xor    %eax,%eax
call   1090 <CTRL_init@plt>
xor    %eax,%eax
call   10a0 <IMGDATATL_init@plt>
xor    %eax,%eax
call   1060 <SCHED_run@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @SCHED_init()
%3 = call i32 (...) @CLIENT_init()
%4 = call i32 (...) @SERVER_init()
%5 = call i32 (...) @ALGOCTRL_init()
%6 = call i32 (...) @DIAG_init()
%7 = call i32 (...) @IMGPROVIDER_init()
%8 = call i32 (...) @CTRL_init()
%9 = call i32 (...) @IMGDATATL_init()
%10 = call i32 (...) @SCHED_run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @SCHED_init()
%2 = tail call i32 (...) @CLIENT_init()
%3 = tail call i32 (...) @SERVER_init()
%4 = tail call i32 (...) @ALGOCTRL_init()
%5 = tail call i32 (...) @DIAG_init()
%6 = tail call i32 (...) @IMGPROVIDER_init()
%7 = tail call i32 (...) @CTRL_init()
%8 = tail call i32 (...) @IMGDATATL_init()
%9 = tail call i32 (...) @SCHED_run()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double r;
  scanf("%lf", &r);
  printf("A=%.4lf\n", r * 3.14159 * r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeb9(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm1
movsd  0xec3(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [9 x i8] c"A=%.4lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%4 = load double, double* %2
%5 = fmul double %4, 3.141590e+00
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [9 x i8] c"A=%.4lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fmul double %4, 3.141590e+00
%6 = fmul double %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %6)
ret i32 0
}
void ft_swap(int *a, int *b) {
  int copya;
  copya = *a;
  *a = *b;
  *b = copya;
}


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

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

LLVM IR (-O0):
define void @ft_swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @ft_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void fc116(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    goto a;
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
a:;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc116(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %20
11: ; No predecessors!
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %11, %1
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc116(i32 %0) {
ret void
}
void reverseString(char *s, int start, int end) {
  while (start < end) {
    char tmp = s[start];
    s[start] = s[end];
    s[end] = tmp;
    start++;
    end--;
  }
}


x86 assembly (clang, -O0):
<reverseString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <reverseString+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <reverseString+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseString>:
cmp    %edx,%esi
jge    1131 <reverseString+0x31>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
movzbl -0x1(%rdi,%rax,1),%esi
movzbl (%rdi,%rcx,1),%edx
mov    %dl,-0x1(%rdi,%rax,1)
mov    %sil,(%rdi,%rcx,1)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <reverseString+0x10>
ret

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

LLVM IR (-O2):
define void @reverseString(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 %9
%14 = load i8, i8* %13
store i8 %14, i8* %11
store i8 %12, i8* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Type definitions */
struct deque {
  int dummy;
};

/* Variables and functions */
void *deque_pop_first(struct deque **);
void deque_free(struct deque **deque, void (*payload_free)(void *)) {
  void *temp;
  while ((temp = deque_pop_first(deque)) != NULL) {
    if (payload_free) {
      payload_free(temp);
    }
  }
}


x86 assembly (clang, -O0):
<deque_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <deque_pop_first@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1151 <deque_free+0x41>
cmpq   $0x0,-0x10(%rbp)
je     114c <deque_free+0x3c>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdi
call   *%rax
jmp    1120 <deque_free+0x10>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deque_free>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
jmp    1123 <deque_free+0x13>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <deque_pop_first@plt>
test   %rax,%rax
je     1139 <deque_free+0x29>
test   %rbx,%rbx
je     1120 <deque_free+0x10>
mov    %rax,%rdi
call   *%rbx
jmp    1120 <deque_free+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.deque = type { i32 }
define void @deque_free(%struct.deque** %0, void (i8*)* %1) {
%3 = alloca %struct.deque**
%4 = alloca void (i8*)*
%5 = alloca i8*
store %struct.deque** %0, %struct.deque*** %3
store void (i8*)* %1, void (i8*)** %4
br label %6
6: ; preds = %16, %2
%7 = load %struct.deque**, %struct.deque*** %3
%8 = call i8* @deque_pop_first(%struct.deque** %7)
store i8* %8, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load void (i8*)*, void (i8*)** %4
%12 = icmp ne void (i8*)* %11, null
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load void (i8*)*, void (i8*)** %4
%15 = load i8*, i8** %5
br label %16
16: ; preds = %13, %10
br label %6
17: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.deque = type { i32 }
define void @deque_free(%struct.deque** %0, void (i8*)* %1) {
%3 = tail call i8* @deque_pop_first(%struct.deque** %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = icmp eq void (i8*)* %1, null
br label %7
7: ; preds = %5, %10
%8 = phi i8* [ %3, %5 ], [ %11, %10 ]
br i1 %6, label %10, label %9
9: ; preds = %7
tail call void %1(i8* %8)
br label %10
10: ; preds = %9, %7
%11 = tail call i8* @deque_pop_first(%struct.deque** %0)
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %7
13: ; preds = %10, %2
ret void
}
/* Variables and functions */
size_t os_get_executable_path(char *, size_t);
size_t lovrFilesystemGetExecutablePath(char *buffer, size_t size) {
  return os_get_executable_path(buffer, size);
}


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

x86 assembly (clang, -O2):
<lovrFilesystemGetExecutablePath>:
jmp    1030 <os_get_executable_path@plt>

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

LLVM IR (-O2):
define i64 @lovrFilesystemGetExecutablePath(i8* %0, i64 %1) {
%3 = tail call i64 @os_get_executable_path(i8* %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void logln(char *msg) { printf("|%s\n", msg); }


x86 assembly (clang, -O0):
<logln>:
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):
<logln>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"|%s\0A\00"
define void @logln(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isalpha(int);
scalar_t__ islower(int);
int tolower(int c) { return (!isalpha(c) || islower(c)) ? c : (c + 32); }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%eax
je     114e <tolower+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1159 <tolower+0x39>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1162 <tolower+0x42>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
test   %eax,%eax
je     113e <tolower+0x1e>
mov    %ebx,%edi
call   1030 <islower@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmovne %ebx,%ecx
mov    %ecx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @isalpha(i32 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @islower(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6, %1
%11 = load i32, i32* %2
br label %15
12: ; preds = %6
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 32
br label %15
15: ; preds = %12, %10
%16 = phi i32 [ %11, %10 ], [ %14, %12 ]
ret i32 %16
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i32 @isalpha(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i64 @islower(i32 %0)
%6 = icmp eq i64 %5, 0
%7 = add nsw i32 %0, 32
%8 = select i1 %6, i32 %7, i32 %0
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ %0, %1 ], [ %8, %4 ]
ret i32 %10
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
char *inet_ntoa(struct in_addr);
int /*<<< orphan*/ perror(char *);
char *std_inet_ntoa(struct in_addr in) {
  char *in_str;
  if ((in_str = inet_ntoa(in)) == NULL) {
    perror("inet_ntoa");
    exit(1);
  }
  return in_str;
}


x86 assembly (clang, -O0):
<std_inet_ntoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <inet_ntoa@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1167 <std_inet_ntoa+0x37>
lea    0xea8(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_inet_ntoa>:
push   %rax
call   1030 <inet_ntoa@plt>
test   %rax,%rax
je     113d <std_inet_ntoa+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@.str = [10 x i8] c"inet_ntoa\00"
define i8* @std_inet_ntoa(i32 %0) {
%2 = alloca %struct.in_addr
%3 = alloca i8*
%4 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i32 0, i32 0
store i32 %0, i32* %4
%5 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i8* @inet_ntoa(i32 %6)
store i8* %7, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [10 x i8] c"inet_ntoa\00"
define i8* @std_inet_ntoa(i32 %0) {
%2 = tail call i8* @inet_ntoa(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
long double longdouble_ignoring_unsignedlong(long double x, unsigned long y) {
  return x;
}


x86 assembly (clang, -O0):
<longdouble_ignoring_unsignedlong>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<longdouble_ignoring_unsignedlong>:
fldt   0x8(%rsp)
ret

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

LLVM IR (-O2):
define x86_fp80 @longdouble_ignoring_unsignedlong(x86_fp80 returned %0, i64 %1) {
ret x86_fp80 %0
}
int maximum1(int a, int b, int c) {
  return ((a > b) ? ((a > c) ? a : c) : ((b > c) ? b : c));
}


x86 assembly (clang, -O0):
<maximum1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1141 <maximum1+0x41>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1130 <maximum1+0x30>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <maximum1+0x36>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1164 <maximum1+0x64>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1158 <maximum1+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115e <maximum1+0x5e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximum1>:
mov    %edx,%eax
cmp    %edx,%edi
cmovg  %edi,%eax
cmp    %esi,%eax
cmovle %esi,%eax
ret

LLVM IR (-O0):
define i32 @maximum1(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 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load i32, i32* %6
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i32, i32* %4
br label %18
16: ; preds = %10
%17 = load i32, i32* %6
br label %18
18: ; preds = %16, %14
%19 = phi i32 [ %15, %14 ], [ %17, %16 ]
br label %30
20: ; preds = %3
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load i32, i32* %5
br label %28
26: ; preds = %20
%27 = load i32, i32* %6
br label %28
28: ; preds = %26, %24
%29 = phi i32 [ %25, %24 ], [ %27, %26 ]
br label %30
30: ; preds = %28, %18
%31 = phi i32 [ %19, %18 ], [ %29, %28 ]
ret i32 %31
}

LLVM IR (-O2):
define i32 @maximum1(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %2
%5 = select i1 %4, i32 %0, i32 %2
%6 = icmp sgt i32 %5, %1
%7 = select i1 %6, i32 %5, i32 %1
ret i32 %7
}