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

/* Variables and functions */
void f_scalar_stack_5(double a, int64_t b, double c, int64_t d, int e,
                      int64_t f, float g, double h, long double i) {}


x86 assembly (clang, -O0):
<f_scalar_stack_5>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %edx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movss  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
fstpt  -0x40(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f_scalar_stack_5(double %0, i32 %1, double %2, i32 %3, i32 %4, i32 %5, float %6, double %7, x86_fp80 %8) {
%10 = alloca double
%11 = alloca i32
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca float
%17 = alloca double
%18 = alloca x86_fp80
store double %0, double* %10
store i32 %1, i32* %11
store double %2, double* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store float %6, float* %16
store double %7, double* %17
store x86_fp80 %8, x86_fp80* %18
ret void
}

LLVM IR (-O2):
define void @f_scalar_stack_5(double %0, i32 %1, double %2, i32 %3, i32 %4, i32 %5, float %6, double %7, x86_fp80 %8) {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int syscall(int, char *, struct stat *);
int stat(char *filename, struct stat *sPtr) {
  return syscall(29, filename, sPtr);
}


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

x86 assembly (clang, -O2):
<stat>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1d,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @syscall(i32 29, i8* %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = tail call i32 @syscall(i32 29, i8* %0, %struct.stat* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_storel_epi64(int /*<<< orphan*/ *, int /*<<< orphan*/);
void t2(__m128i *p, __m128i a) { _mm_storel_epi64(p, a); }


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

x86 assembly (clang, -O2):
<t2>:
jmp    1030 <_mm_storel_epi64@plt>

LLVM IR (-O0):
define void @t2(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 @_mm_storel_epi64(i32* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @t2(i32* %0, i32 %1) {
%3 = tail call i32 @_mm_storel_epi64(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int hash_isexist_file(char const *);
int vendor_check_file_exist(const char *filepath) {
  return hash_isexist_file(filepath);
}


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

x86 assembly (clang, -O2):
<vendor_check_file_exist>:
jmp    1030 <hash_isexist_file@plt>

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

LLVM IR (-O2):
define i32 @vendor_check_file_exist(i8* %0) {
%2 = tail call i32 @hash_isexist_file(i8* %0)
ret i32 %2
}
/* Type definitions */
struct cpufreq_policy {
  int dummy;
};

/* Variables and functions */
struct cpufreq_policy *proc_get_policy(unsigned int cpu) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.cpufreq_policy = type { i32 }
define %struct.cpufreq_policy* @proc_get_policy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret %struct.cpufreq_policy* null
}

LLVM IR (-O2):
%struct.cpufreq_policy = type { i32 }
define noalias %struct.cpufreq_policy* @proc_get_policy(i32 %0) {
ret %struct.cpufreq_policy* null
}
/* Variables and functions */
int /*<<< orphan*/ checkf(int, int);
int main(void) {
  checkf(0, 0);
  checkf(0, 1);
  checkf(1, 1);
  checkf(1, 0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @checkf(i32 0, i32 0)
%2 = tail call i32 @checkf(i32 0, i32 1)
%3 = tail call i32 @checkf(i32 1, i32 1)
%4 = tail call i32 @checkf(i32 1, i32 0)
ret i32 0
}
int d_eq_rm2(double a1, double *a2) { return !(((a1) == (*a2))); }


x86 assembly (clang, -O0):
<d_eq_rm2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_eq_rm2>:
cmpneqsd (%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @d_eq_rm2(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 = load double, double* %6
%8 = fcmp oeq double %5, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @d_eq_rm2(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp une double %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int isEmojiSequence(const unsigned char *characters, size_t count) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @isEmojiSequence(i8* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int T;
  scanf("%d", &T);
  for (int caseIndex = 1; caseIndex <= T; caseIndex++) {
    printf("Case #%d: ___\n", caseIndex);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     116f <main+0x4f>
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    1163 <main+0x43>
xor    %ebx,%ebx
lea    0xebe(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    0x4(%rsp),%ebx
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [15 x i8] c"Case #%d: ___\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %7, %0
ret i32 0
7: ; preds = %0, %7
%8 = phi i32 [ %10, %7 ], [ 1, %0 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = add nuw nsw i32 %8, 1
%11 = load i32, i32* %1
%12 = icmp slt i32 %8, %11
br i1 %12, label %7, label %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage:\n"
         "action: LOCK/LOCKWAIT/UNLOCK/TESTLOCK\n"
         "type: READ/WRITE\n"
         "whence: SET/CUR/END\n"
         "mode: CLOSE/DUP/REOPEN\n"
         "filelock path action type offset whence len mode\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [155 x i8] c"Usage:\0Aaction: LOCK/LOCKWAIT/UNLOCK/TESTLOCK\0Atype: READ/WRITE\0Awhence: SET/CUR/END\0Amode: CLOSE/DUP/REOPEN\0Afilelock path action type offset whence len mode\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [154 x i8] c"Usage:\0Aaction: LOCK/LOCKWAIT/UNLOCK/TESTLOCK\0Atype: READ/WRITE\0Awhence: SET/CUR/END\0Amode: CLOSE/DUP/REOPEN\0Afilelock path action type offset whence len mode\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([154 x i8], [154 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
int security_ipc_getinfo(int id, int cmd) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @security_ipc_getinfo(i32 %0, i32 %1) {
ret i32 0
}
int count_cr(char source[], int posn, int length) {
  int c = 0;
  int i = posn;
  int cond = 1;
  do {
    if (source[i] == 13) {
      c++;
    } else {
      cond = 0;
    }
    i++;
  } while ((i < length) && cond);
  return c;
}


x86 assembly (clang, -O0):
<count_cr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xd,%eax
jne    1145 <count_cr+0x45>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <count_cr+0x4c>
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x1d(%rbp)
jge    1170 <count_cr+0x70>
cmpl   $0x0,-0x1c(%rbp)
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1122 <count_cr+0x22>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_cr>:
movslq %esi,%rcx
movslq %edx,%r8
add    $0x1,%rcx
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%esi
movzbl -0x1(%rdi,%rcx,1),%edx
xor    %eax,%eax
cmp    $0xd,%dl
sete   %al
add    %esi,%eax
cmp    %r8,%rcx
jge    112f <count_cr+0x2f>
add    $0x1,%rcx
cmp    $0xd,%dl
je     1110 <count_cr+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_cr(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = sext i32 %2 to i64
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ %14, %6 ], [ %4, %3 ]
%8 = phi i32 [ %13, %6 ], [ 0, %3 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 13
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %8, %12
%14 = add nsw i64 %7, 1
%15 = icmp slt i64 %14, %5
%16 = select i1 %15, i1 %11, i1 false
br i1 %16, label %6, label %17
17: ; preds = %6
ret i32 %13
}
/* Variables and functions */
double cos(double);
double sin(double);
void trans_polar2rect(double *toTrans) {
  double a = toTrans[0];
  double b = toTrans[1];
  toTrans[0] = a * cos(b);
  toTrans[1] = a * sin(b);
}


x86 assembly (clang, -O0):
<trans_polar2rect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trans_polar2rect>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1040 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x8(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @trans_polar2rect(double* %0) {
%2 = alloca double*
%3 = alloca double
%4 = alloca double
store double* %0, double** %2
%5 = load double*, double** %2
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
store double %7, double* %3
%8 = load double*, double** %2
%9 = getelementptr inbounds double, double* %8, i64 1
%10 = load double, double* %9
store double %10, double* %4
%11 = load double, double* %3
%12 = load double, double* %4
%13 = call double @cos(double %12)
%14 = fmul double %11, %13
%15 = load double*, double** %2
%16 = getelementptr inbounds double, double* %15, i64 0
store double %14, double* %16
%17 = load double, double* %3
%18 = load double, double* %4
%19 = call double @sin(double %18)
%20 = fmul double %17, %19
%21 = load double*, double** %2
%22 = getelementptr inbounds double, double* %21, i64 1
store double %20, double* %22
ret void
}

LLVM IR (-O2):
define void @trans_polar2rect(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = tail call double @cos(double %4)
%6 = fmul double %2, %5
store double %6, double* %0
%7 = tail call double @sin(double %4)
%8 = fmul double %2, %7
store double %8, double* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, int /*<<< orphan*/ *, int);
void _write_decimal(uint8_t value) {
  value += '0';
  write(STDOUT_FILENO, &value, sizeof(value));
}


x86 assembly (clang, -O0):
<_write_decimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write_decimal>:
push   %rax
add    $0x30,%edi
mov    %edi,0x4(%rsp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @_write_decimal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 48
store i32 %4, i32* %2
%5 = load i32, i32* @STDOUT_FILENO
%6 = call i32 @write(i32 %5, i32* %2, i32 4)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @_write_decimal(i32 %0) {
%2 = alloca i32
%3 = add nsw i32 %0, 48
store i32 %3, i32* %2
%4 = load i32, i32* @STDOUT_FILENO
%5 = call i32 @write(i32 %4, i32* %2, i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpgt_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_setzero_si128();
int /*<<< orphan*/ _mm_unpacklo_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i
_MM_CVTEPI32_EPI64(__m128i a) {
  __m128i zero = _mm_setzero_si128();
  __m128i sign = _mm_cmpgt_epi32(zero, a);
  return _mm_unpacklo_epi32(a, sign);
}


x86 assembly (clang, -O0):
<_MM_CVTEPI32_EPI64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <_mm_setzero_si128@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <_mm_cmpgt_epi32@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <_mm_unpacklo_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MM_CVTEPI32_EPI64>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <_mm_setzero_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <_mm_cmpgt_epi32@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1050 <_mm_unpacklo_epi32@plt>

LLVM IR (-O0):
define i32 @_MM_CVTEPI32_EPI64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (...) @_mm_setzero_si128()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @_mm_cmpgt_epi32(i32 %6, i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %4
%11 = call i32 @_mm_unpacklo_epi32(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @_MM_CVTEPI32_EPI64(i32 %0) {
%2 = tail call i32 (...) @_mm_setzero_si128()
%3 = tail call i32 @_mm_cmpgt_epi32(i32 %2, i32 %0)
%4 = tail call i32 @_mm_unpacklo_epi32(i32 %0, i32 %3)
ret i32 %4
}
const char *gcd_hupper_get_description(void) {
  return "Determine the PID of the gcd process. "
         "Send it SIGHUP (may require root privileges). "
         "If a sleep value is specified, the process sleeps. "
         "If a repeat count is specified, then the task repeats "
         "that number of times. "
         "The repeat count is given by the -n or --repeat option, "
         "otherwise it defaults to 1. "
         "A repeat count of zero repeats forever. "
         "The sleep value is given by the -p or --sleep option, "
         "otherwise it defaults to 1. "
         "Sleep is specified in milliseconds.";
}


x86 assembly (clang, -O0):
<gcd_hupper_get_description>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd_hupper_get_description>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [453 x i8] c"Determine the PID of the gcd process. Send it SIGHUP (may require root privileges). If a sleep value is specified, the process sleeps. If a repeat count is specified, then the task repeats that number of times. The repeat count is given by the -n or --repeat option, otherwise it defaults to 1. A repeat count of zero repeats forever. The sleep value is given by the -p or --sleep option, otherwise it defaults to 1. Sleep is specified in milliseconds.\00"
define i8* @gcd_hupper_get_description() {
ret i8* getelementptr inbounds ([453 x i8], [453 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [453 x i8] c"Determine the PID of the gcd process. Send it SIGHUP (may require root privileges). If a sleep value is specified, the process sleeps. If a repeat count is specified, then the task repeats that number of times. The repeat count is given by the -n or --repeat option, otherwise it defaults to 1. A repeat count of zero repeats forever. The sleep value is given by the -p or --sleep option, otherwise it defaults to 1. Sleep is specified in milliseconds.\00"
define i8* @gcd_hupper_get_description() {
ret i8* getelementptr inbounds ([453 x i8], [453 x i8]* @.str, i64 0, i64 0)
}
int test_imm_C5uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xC5 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C5uint64_lowword_mem>:
testb  $0xc5,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C5uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 197
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void h() {
  int a1, __attribute__((blah)) a2;
  int b1, __attribute__((blah)) * b2;
  int c1, *__attribute__((blah)) c2;
  int *__attribute__((blah)) d1;
  int(__attribute__((blah)) e1);
  int(__attribute__((blah)) h1), (__attribute__((blah)) h2);
}


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

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

LLVM IR (-O0):
define void @h() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
ret void
}

LLVM IR (-O2):
define void @h() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello world");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Atom;

/* Variables and functions */
int /*<<< orphan*/ False;
int /*<<< orphan*/ XInternAtom(int /*<<< orphan*/ *, char *,
                               int /*<<< orphan*/);
Atom getwmfunc(Display *dpy) {
  return XInternAtom(dpy, "_WINDOWMAKER_WM_FUNCTION", False);
}


x86 assembly (clang, -O0):
<getwmfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
lea    0xed0(%rip),%rsi
call   1030 <XInternAtom@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getwmfunc>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
lea    0xee0(%rip),%rsi
jmp    1030 <XInternAtom@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"_WINDOWMAKER_WM_FUNCTION\00"
@False = global i32 0
define i32 @getwmfunc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @False
%5 = call i32 @XInternAtom(i32* %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [25 x i8] c"_WINDOWMAKER_WM_FUNCTION\00"
@False = global i32 0
define i32 @getwmfunc(i32* %0) {
%2 = load i32, i32* @False
%3 = tail call i32 @XInternAtom(i32* %0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %3
}
void av_buffer_create() {}


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

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

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

LLVM IR (-O2):
define void @av_buffer_create() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LC_MESSAGES;
char const *setlocale(int /*<<< orphan*/, int /*<<< orphan*/ *);
const char *plugin_api_info_locale_cb(void *data, const char *info_name,
                                      const char *arguments) {
  (void)data;
  (void)info_name;
  (void)arguments;
  return setlocale(LC_MESSAGES, NULL);
}


x86 assembly (clang, -O0):
<plugin_api_info_locale_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setlocale@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_api_info_locale_cb>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <setlocale@plt>

LLVM IR (-O0):
@LC_MESSAGES = global i32 0
define i8* @plugin_api_info_locale_cb(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = load i32, i32* @LC_MESSAGES
%11 = call i8* @setlocale(i32 %10, i32* null)
ret i8* %11
}

LLVM IR (-O2):
@LC_MESSAGES = global i32 0
define i8* @plugin_api_info_locale_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @LC_MESSAGES
%5 = tail call i8* @setlocale(i32 %4, i32* null)
ret i8* %5
}
int test_imm_90int64_lowword_mem(long long *val) {
  return ((*val) & (0x90 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_90int64_lowword_mem>:
testb  $0x90,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_90int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 144
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *malloc(size_t);
void *alloc(size_t size) {
  void *buffer = malloc(size);
  if (!buffer)
    abort();
  return buffer;
}


x86 assembly (clang, -O0):
<alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <alloc+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     112d <alloc+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ flow1(int);
void *THREAD_C_main(void *arg) {
  flow1(200000);
  return NULL;
}


x86 assembly (clang, -O0):
<THREAD_C_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x30d40,%edi
call   1030 <flow1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @THREAD_C_main(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @flow1(i32 200000)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @THREAD_C_main(i8* nocapture readnone %0) {
%2 = tail call i32 @flow1(i32 200000)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void thread_join() { exit(1); }


x86 assembly (clang, -O0):
<thread_join>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<thread_join>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @thread_join() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @thread_join() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
int t(int a) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @t(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ SCSI_Glitch_Ctl_RestoreConfig();
void SCSI_Glitch_Ctl_Wakeup(void) { SCSI_Glitch_Ctl_RestoreConfig(); }


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

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

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

LLVM IR (-O2):
define void @SCSI_Glitch_Ctl_Wakeup() {
%1 = tail call i32 (...) @SCSI_Glitch_Ctl_RestoreConfig()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ZType_finalize(void *);
void ZGenericType_finalize(void *self) { ZType_finalize(self); }


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

x86 assembly (clang, -O2):
<ZGenericType_finalize>:
jmp    1030 <ZType_finalize@plt>

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

LLVM IR (-O2):
define void @ZGenericType_finalize(i8* %0) {
%2 = tail call i32 @ZType_finalize(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ archdep_startup_log_error(char *, char const *);
void init_cmdline_options_fail(const char *module) {
  archdep_startup_log_error("Cannot initialize %s command-line options.\n",
                            module);
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"Cannot initialize %s command-line options.\0A\00"
define void @init_cmdline_options_fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @archdep_startup_log_error(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Cannot initialize %s command-line options.\0A\00"
define void @init_cmdline_options_fail(i8* %0) {
%2 = tail call i32 @archdep_startup_log_error(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void mz_free(void *p) { free(p); }


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

x86 assembly (clang, -O2):
<mz_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @mz_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_212() {
  Assert_real((isqrt(212) == 14),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1065, ("Integer square root of 212 should be 14"));
}


x86 assembly (clang, -O0):
<t_sqrt_212>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd4,%edi
call   1030 <isqrt@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x429,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_212>:
push   %rax
mov    $0xd4,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x429,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 212 should be 14\00"
define void @t_sqrt_212() {
%1 = call i32 @isqrt(i32 212)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1065, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 212 should be 14\00"
define void @t_sqrt_212() {
%1 = tail call i32 @isqrt(i32 212)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1065, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fC() { printf("Press c\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Press c\00"
define void @fC() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
char __attribute__((no)) vchr() { return (char)42; }


x86 assembly (clang, -O0):
<vchr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vchr>:
mov    $0x2a,%al
ret

LLVM IR (-O0):
define signext i8 @vchr() {
ret i8 42
}

LLVM IR (-O2):
define signext i8 @vchr() {
ret i8 42
}
/* Variables and functions */
float __nv_roundf(float);
float roundf(float __a) { return __nv_roundf(__a); }


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

x86 assembly (clang, -O2):
<roundf>:
jmp    1030 <__nv_roundf@plt>

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

LLVM IR (-O2):
define float @roundf(float %0) {
%2 = tail call float @__nv_roundf(float %0)
ret float %2
}
/* Variables and functions */
int irc_privmsg(int, char const *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int irc_ping(int fd, const char *nick, int ts) {
  char str_buffer[512] = {0};
  snprintf(str_buffer, sizeof str_buffer, "\001PING %d\001", ts);
  return irc_privmsg(fd, nick, str_buffer);
}


x86 assembly (clang, -O0):
<irc_ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x220(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1040 <memset@plt>
lea    -0x220(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    $0x200,%esi
lea    0xe92(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x220(%rbp),%rdx
call   1050 <irc_privmsg@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_ping>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%ebp
mov    %rsp,%r15
mov    $0x200,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0xea3(%rip),%rdx
mov    %r15,%rdi
mov    $0x200,%esi
mov    %ebx,%ecx
call   1030 <snprintf@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <irc_privmsg@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"\01PING %d\01\00"
define i32 @irc_ping(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [512 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = bitcast [512 x i8]* %7 to i8*
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%10 = load i32, i32* %6
%11 = call i32 @snprintf(i8* %9, i32 512, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %4
%13 = load i8*, i8** %5
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%15 = call i32 @irc_privmsg(i32 %12, i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [10 x i8] c"\01PING %d\01\00"
define i32 @irc_ping(i32 %0, i8* %1, i32 %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 512, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = call i32 @irc_privmsg(i32 %0, i8* %1, i8* %5)
ret i32 %7
}
/* Variables and functions */
int EOF;
int getchar();
void clear_stdin(void) {
  int c;
  do {
    c = getchar();
  } while (c != '\n' && c != EOF);
}


x86 assembly (clang, -O0):
<clear_stdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1143 <clear_stdin+0x33>
mov    -0x4(%rbp),%eax
mov    0x2ead(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1118 <clear_stdin+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_stdin>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
je     1130 <clear_stdin+0x20>
cmp    (%rbx),%eax
jne    1120 <clear_stdin+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @clear_stdin() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i32, i32* %1
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br label %11
11: ; preds = %7, %4
%12 = phi i1 [ false, %4 ], [ %10, %7 ]
br i1 %12, label %2, label %13
13: ; preds = %11
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @clear_stdin() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = icmp ne i32 %2, 10
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  const char *sc;
  for (sc = s; *sc != '\0'; ++sc)
    ;
  return (size_t)(sc - s);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1136 <strlen+0x36>
jmp    1125 <strlen+0x25>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void log_info(char *str) { printf("[NOTE] %s\n", str); }


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

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

LLVM IR (-O2):
@.str = [11 x i8] c"[NOTE] %s\0A\00"
define void @log_info(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int sweep_get_standard_target(int n, double *c) {
  int fail, ptos[2];
  ptos[0] = 0;
  ptos[1] = 1;
  fail = _ada_use_c2phc4c(619, ptos, &n, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_get_standard_target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x18(%rbp)
lea    -0x1c(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    $0x26b,%edi
lea    -0x4(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_get_standard_target>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %edi,0xc(%rsp)
movabs $0x100000000,%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    $0x26b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @sweep_get_standard_target(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
%6 = alloca [2 x i32]
store i32 %0, i32* %3
store double* %1, double** %4
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 0, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 1, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%10 = load double*, double** %4
%11 = call i32 @_ada_use_c2phc4c(i32 619, i32* %9, i32* %3, double* %10, i32 0)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @sweep_get_standard_target(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca [2 x i32]
store i32 %0, i32* %3
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 0, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 1, i32* %7
%8 = call i32 @_ada_use_c2phc4c(i32 619, i32* %6, i32* %3, double* %1, i32 0)
ret i32 %8
}