xunge/DecIR huggingface dataset:
int len_ret(char character[]) {
  int i = 0;
  int c = 0;
  while (character[i] == '\0') {
    c++;
    i++;
  }
  return c;
}


x86 assembly (clang, -O0):
<len_ret>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1142 <len_ret+0x42>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <len_ret+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<len_ret>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
jne    111b <len_ret+0x1b>
xor    %eax,%eax
nopl   0x0(%rax)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
je     1110 <len_ret+0x10>
ret

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

LLVM IR (-O2):
define i32 @len_ret(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %12
4: ; preds = %1, %4
%5 = phi i64 [ %6, %4 ], [ 0, %1 ]
%6 = add nuw nsw i64 %5, 1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %4, label %10
10: ; preds = %4
%11 = trunc i64 %6 to i32
br label %12
12: ; preds = %10, %1
%13 = phi i32 [ 0, %1 ], [ %11, %10 ]
ret i32 %13
}
int puntoB_desordenado(float a[], float busca, int i, int n) {
  if (a[i] == busca)
    return i;
  else
    return puntoB_desordenado(a, busca, ++i, n);
}


x86 assembly (clang, -O0):
<puntoB_desordenado>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
ucomiss -0x14(%rbp),%xmm0
jne    114f <puntoB_desordenado+0x3f>
jp     114f <puntoB_desordenado+0x3f>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116c <puntoB_desordenado+0x5c>
mov    -0x10(%rbp),%rdi
movss  -0x14(%rbp),%xmm0
mov    -0x18(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
call   1030 <puntoB_desordenado@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puntoB_desordenado>:
movslq %esi,%rcx
lea    -0x1(%rcx),%eax
lea    (%rdi,%rcx,4),%rcx
nopw   0x0(%rax,%rax,1)
movss  (%rcx),%xmm1
add    $0x1,%eax
add    $0x4,%rcx
ucomiss %xmm0,%xmm1
jne    1110 <puntoB_desordenado+0x10>
jp     1110 <puntoB_desordenado+0x10>
ret

LLVM IR (-O0):
define i32 @puntoB_desordenado(float* %0, float %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca float
%8 = alloca i32
%9 = alloca i32
store float* %0, float** %6
store float %1, float* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load float*, float** %6
%11 = load i32, i32* %8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds float, float* %10, i64 %12
%14 = load float, float* %13
%15 = load float, float* %7
%16 = fcmp oeq float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %4
%18 = load i32, i32* %8
store i32 %18, i32* %5
br label %26
19: ; preds = %4
%20 = load float*, float** %6
%21 = load float, float* %7
%22 = load i32, i32* %8
%23 = add nsw i32 %22, 1
store i32 %23, i32* %8
%24 = load i32, i32* %9
%25 = call i32 @puntoB_desordenado(float* %20, float %21, i32 %23, i32 %24)
store i32 %25, i32* %5
br label %26
26: ; preds = %19, %17
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @puntoB_desordenado(float* nocapture %0, float %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
br label %6
6: ; preds = %6, %4
%7 = phi i64 [ %11, %6 ], [ %5, %4 ]
%8 = getelementptr inbounds float, float* %0, i64 %7
%9 = load float, float* %8
%10 = fcmp oeq float %9, %1
%11 = add i64 %7, 1
br i1 %10, label %12, label %6
12: ; preds = %6
%13 = trunc i64 %7 to i32
ret i32 %13
}
void RTBldCfgVersionBuild(void) {}


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

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

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

LLVM IR (-O2):
define void @RTBldCfgVersionBuild() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void Error(char *s) { printf("\nError: %s.", s); }


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

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

LLVM IR (-O2):
@.str = [12 x i8] c"\0AError: %s.\00"
define void @Error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int ftk_fs_is_root(const char *path) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ftk_fs_is_root(i8* nocapture readnone %0) {
ret i32 0
}
char f_sqr(double *a, const double *b) {
  *a = (*b) * (*b);
  return (0);
}


x86 assembly (clang, -O0):
<f_sqr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_sqr>:
movsd  (%rsi),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @f_sqr(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = load double*, double** %3
store double %9, double* %10
ret i8 0
}

LLVM IR (-O2):
define signext i8 @f_sqr(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fmul double %3, %3
store double %4, double* %0
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ io_set_pgc(int);
int /*<<< orphan*/ io_set_pgd(int);
int /*<<< orphan*/ io_set_pgm(int);
int /*<<< orphan*/ io_set_vpp(int);
void pic16_standby(void) {
  io_set_pgd((0x00));
  io_set_pgc((0x00));
  io_set_vpp((0x00));
  io_set_pgm((0x00));
}


x86 assembly (clang, -O0):
<pic16_standby>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <io_set_pgd@plt>
xor    %edi,%edi
call   1060 <io_set_pgc@plt>
xor    %edi,%edi
call   1040 <io_set_vpp@plt>
xor    %edi,%edi
call   1030 <io_set_pgm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic16_standby>:
push   %rax
xor    %edi,%edi
call   1050 <io_set_pgd@plt>
xor    %edi,%edi
call   1060 <io_set_pgc@plt>
xor    %edi,%edi
call   1040 <io_set_vpp@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <io_set_pgm@plt>

LLVM IR (-O0):
define void @pic16_standby() {
%1 = call i32 @io_set_pgd(i32 0)
%2 = call i32 @io_set_pgc(i32 0)
%3 = call i32 @io_set_vpp(i32 0)
%4 = call i32 @io_set_pgm(i32 0)
ret void
}

LLVM IR (-O2):
define void @pic16_standby() {
%1 = tail call i32 @io_set_pgd(i32 0)
%2 = tail call i32 @io_set_pgc(i32 0)
%3 = tail call i32 @io_set_vpp(i32 0)
%4 = tail call i32 @io_set_pgm(i32 0)
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct spx_datetime {
  int dummy;
};

/* Variables and functions */
scalar_t__ spx_mktime(struct spx_datetime *);
int spx_datetime_cmp(struct spx_datetime *dt1, struct spx_datetime *dt2) {
  time_t dz1 = spx_mktime(dt1);
  time_t dz2 = spx_mktime(dt2);
  if (dz1 < dz2)
    return -1;
  if (dz1 == dz2)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<spx_datetime_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <spx_mktime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <spx_mktime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    1154 <spx_datetime_cmp+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <spx_datetime_cmp+0x65>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    116e <spx_datetime_cmp+0x5e>
movl   $0x0,-0x4(%rbp)
jmp    1175 <spx_datetime_cmp+0x65>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spx_datetime_cmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <spx_mktime@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <spx_mktime@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.spx_datetime = type { i32 }
define i32 @spx_datetime_cmp(%struct.spx_datetime* %0, %struct.spx_datetime* %1) {
%3 = alloca i32
%4 = alloca %struct.spx_datetime*
%5 = alloca %struct.spx_datetime*
%6 = alloca i64
%7 = alloca i64
store %struct.spx_datetime* %0, %struct.spx_datetime** %4
store %struct.spx_datetime* %1, %struct.spx_datetime** %5
%8 = load %struct.spx_datetime*, %struct.spx_datetime** %4
%9 = call i64 @spx_mktime(%struct.spx_datetime* %8)
store i64 %9, i64* %6
%10 = load %struct.spx_datetime*, %struct.spx_datetime** %5
%11 = call i64 @spx_mktime(%struct.spx_datetime* %10)
store i64 %11, i64* %7
%12 = load i64, i64* %6
%13 = load i64, i64* %7
%14 = icmp slt i64 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %22
16: ; preds = %2
%17 = load i64, i64* %6
%18 = load i64, i64* %7
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 0, i32* %3
br label %22
21: ; preds = %16
store i32 1, i32* %3
br label %22
22: ; preds = %21, %20, %15
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
%struct.spx_datetime = type { i32 }
define i32 @spx_datetime_cmp(%struct.spx_datetime* %0, %struct.spx_datetime* %1) {
%3 = tail call i64 @spx_mktime(%struct.spx_datetime* %0)
%4 = tail call i64 @spx_mktime(%struct.spx_datetime* %1)
%5 = icmp slt i64 %3, %4
%6 = icmp ne i64 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ComputeMatrixWinogradMethod();
void ComputeMatrix(void) {
  ComputeMatrixWinogradMethod();
  return;
}


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

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

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

LLVM IR (-O2):
define void @ComputeMatrix() {
%1 = tail call i32 (...) @ComputeMatrixWinogradMethod()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void local_mcu_Cpu_reset__E() { printf("Cpu.reset\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"Cpu.reset\00"
define void @local_mcu_Cpu_reset__E() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tio_restore_terminal();
void menu_end(void) { tio_restore_terminal(); }


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

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

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

LLVM IR (-O2):
define void @menu_end() {
%1 = tail call i32 (...) @tio_restore_terminal()
ret void
}
/* Variables and functions */
unsigned long long _readgsbase_u64();
unsigned long long read_gs_base64(void) { return _readgsbase_u64(); }


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

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

LLVM IR (-O0):
define i64 @read_gs_base64() {
%1 = call i64 (...) @_readgsbase_u64()
ret i64 %1
}

LLVM IR (-O2):
define i64 @read_gs_base64() {
%1 = tail call i64 (...) @_readgsbase_u64()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printReply(int);
int sendRequest(int, char *, char *, int /*<<< orphan*/);
int logoutf(int sd, char argv[]) {
  int status = sendRequest(sd, "LOGOUT", argv, 0);
  if (status > 0) {
    printReply(sd);
    status = 0;
  }
  return status;
}


x86 assembly (clang, -O0):
<logoutf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rsi
xor    %ecx,%ecx
call   1040 <sendRequest@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1160 <logoutf+0x40>
mov    -0x4(%rbp),%edi
call   1030 <printReply@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logoutf>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rdx
mov    %edi,%ebp
lea    0xed1(%rip),%rsi
xor    %ebx,%ebx
xor    %ecx,%ecx
call   1040 <sendRequest@plt>
test   %eax,%eax
jle    1145 <logoutf+0x25>
mov    %ebp,%edi
call   1030 <printReply@plt>
jmp    1147 <logoutf+0x27>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"LOGOUT\00"
define i32 @logoutf(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i32 @sendRequest(i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %7, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* %3
%13 = call i32 @printReply(i32 %12)
store i32 0, i32* %5
br label %14
14: ; preds = %11, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
@.str = [7 x i8] c"LOGOUT\00"
define i32 @logoutf(i32 %0, i8* %1) {
%3 = tail call i32 @sendRequest(i32 %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i32 0)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @printReply(i32 %0)
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ 0, %5 ], [ %3, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ bar();
scalar_t__ foo();
int main() {
  if (bar() != 0 || foo() != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <bar@plt>
cmp    $0x0,%rax
jne    1161 <main+0x31>
mov    $0x0,%al
call   1050 <foo@plt>
cmp    $0x0,%rax
je     1168 <main+0x38>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
test   %rax,%rax
jne    114d <main+0x1d>
xor    %eax,%eax
call   1050 <foo@plt>
test   %rax,%rax
jne    114d <main+0x1d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @bar()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i64 (...) @foo()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3, %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
ret i32 0
}
/* Variables and functions */
int shift(int);
int get_bit_at(char *k, int i) {
  int bytes = i >> 3;
  int mask = shift(i);
  k += bytes;
  return *k & mask;
}


x86 assembly (clang, -O0):
<get_bit_at>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <shift@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit_at>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %esi,%ebp
sar    $0x3,%ebp
mov    %esi,%edi
call   1030 <shift@plt>
movslq %ebp,%rcx
movsbl (%rbx,%rcx,1),%ecx
and    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_bit_at(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = ashr i32 %7, 3
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @shift(i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i8*, i8** %3
%13 = sext i32 %11 to i64
%14 = getelementptr inbounds i8, i8* %12, i64 %13
store i8* %14, i8** %3
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i32, i32* %6
%19 = and i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @get_bit_at(i8* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 3
%4 = tail call i32 @shift(i32 %1)
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = and i32 %4, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ GETFIELD_B();
void GETFIELD_C() { GETFIELD_B(); }


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

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

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

LLVM IR (-O2):
define void @GETFIELD_C() {
%1 = tail call i32 (...) @GETFIELD_B()
ret void
}
int WEXITSTATUS(int stat) { return (stat & 0xff00) >> 8; }


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

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

LLVM IR (-O0):
define i32 @WEXITSTATUS(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @WEXITSTATUS(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
ret i32 %3
}
void McASPDITDisable(unsigned int baseAddr) {
  (*((volatile unsigned int *)(baseAddr + (0x50)))) &= ~(0x00000001u);
}


x86 assembly (clang, -O0):
<McASPDITDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPDITDisable>:
add    $0x50,%edi
andl   $0xfffffffe,(%rdi)
ret

LLVM IR (-O0):
define void @McASPDITDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 80
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -2
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @McASPDITDisable(i32 %0) {
%2 = add i32 %0, 80
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -2
store volatile i32 %6, i32* %4
ret void
}
extern __attribute__((always_)) void android_compiler_barrier(void) {
  __asm__ __volatile__("" : : : "memory");
}


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

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

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

LLVM IR (-O2):
define void @android_compiler_barrier() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
signed short int signedshortint_id(signed short int x) { return x; }


x86 assembly (clang, -O0):
<signedshortint_id>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i16 @signedshortint_id(i16 returned signext %0) {
ret i16 %0
}
/* Type definitions */
struct strlnode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ create(struct strlnode **, int);
int getnodenum(struct strlnode **);
int /*<<< orphan*/ insertnode(struct strlnode **, int, int);
void TestCase04_1() {
  struct strlnode *p;
  int num = 0;
  create(&p, 1);
  insertnode(&p, 1, 2);
  insertnode(&p, 2, 3);
  insertnode(&p, 3, 4);
  num = getnodenum(&p);
  assert(num == 4);
}


x86 assembly (clang, -O0):
<TestCase04_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <create@plt>
lea    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <insertnode@plt>
lea    -0x8(%rbp),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <insertnode@plt>
lea    -0x8(%rbp),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <insertnode@plt>
lea    -0x8(%rbp),%rdi
call   1060 <getnodenum@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestCase04_1>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <create@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <insertnode@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <insertnode@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <insertnode@plt>
mov    %rbx,%rdi
call   1060 <getnodenum@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
call   1050 <assert@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.strlnode = type { i32 }
define void @TestCase04_1() {
%1 = alloca %struct.strlnode*
%2 = alloca i32
store i32 0, i32* %2
%3 = call i32 @create(%struct.strlnode** %1, i32 1)
%4 = call i32 @insertnode(%struct.strlnode** %1, i32 1, i32 2)
%5 = call i32 @insertnode(%struct.strlnode** %1, i32 2, i32 3)
%6 = call i32 @insertnode(%struct.strlnode** %1, i32 3, i32 4)
%7 = call i32 @getnodenum(%struct.strlnode** %1)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 4
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret void
}

LLVM IR (-O2):
%struct.strlnode = type { i32 }
define void @TestCase04_1() {
%1 = alloca %struct.strlnode*
%2 = bitcast %struct.strlnode** %1 to i8*
%3 = call i32 @create(%struct.strlnode** %1, i32 1)
%4 = call i32 @insertnode(%struct.strlnode** %1, i32 1, i32 2)
%5 = call i32 @insertnode(%struct.strlnode** %1, i32 2, i32 3)
%6 = call i32 @insertnode(%struct.strlnode** %1, i32 3, i32 4)
%7 = call i32 @getnodenum(%struct.strlnode** %1)
%8 = icmp eq i32 %7, 4
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ printf(char *, char const *);
void die(const char *message) {
  if (errno) {
    perror(message);
  } else {
    printf("Error: %s\n", message);
  }
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
cmpq   $0x0,(%rax)
je     115b <die+0x2b>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
jmp    116b <die+0x3b>
mov    -0x8(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rsi
mov    0x2ea5(%rip),%rax
cmpq   $0x0,(%rax)
je     1153 <die+0x23>
mov    %rsi,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @errno
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @perror(i8* %6)
br label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %5
%12 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @die(i8* %0) {
%2 = load i64, i64* @errno
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DATA_OUTPUT(char *, char);
int /*<<< orphan*/ eeprom_read_block_safe(char *, char *, int);
void data_get_eeprom_char(char *val) {
  char tmp;
  eeprom_read_block_safe(&tmp, val, sizeof tmp);
  DATA_OUTPUT("%"
              "c",
              tmp);
}


x86 assembly (clang, -O0):
<data_get_eeprom_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x9(%rbp),%rdi
mov    $0x1,%edx
call   1030 <eeprom_read_block_safe@plt>
lea    0xebb(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1040 <DATA_OUTPUT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_get_eeprom_char>:
push   %rax
mov    %rdi,%rsi
lea    0x7(%rsp),%rdi
mov    $0x1,%edx
call   1030 <eeprom_read_block_safe@plt>
movsbl 0x7(%rsp),%esi
lea    0xec1(%rip),%rdi
call   1040 <DATA_OUTPUT@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @data_get_eeprom_char(i8* %0) {
%2 = alloca i8
%3 = call i32 @eeprom_read_block_safe(i8* %2, i8* %0, i32 1)
%4 = load i8, i8* %2
%5 = call i32 @DATA_OUTPUT(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct helium_channel {
  int dummy;
};

/* Variables and functions */
int _helium_channel_send(struct helium_channel *, int, int, void const *,
                         size_t, int /*<<< orphan*/ *);
int helium_channel_send(struct helium_channel *channel, void const *data,
                        size_t len, uint16_t *token) {
  return _helium_channel_send(channel, 0x03, 0x04, data, len, token);
}


x86 assembly (clang, -O0):
<helium_channel_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <_helium_channel_send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helium_channel_send>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    $0x3,%esi
mov    $0x4,%edx
jmp    1030 <_helium_channel_send@plt>

LLVM IR (-O0):
%struct.helium_channel = type { i32 }
define i32 @helium_channel_send(%struct.helium_channel* %0, i8* %1, i64 %2, i32* %3) {
%5 = alloca %struct.helium_channel*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32*
store %struct.helium_channel* %0, %struct.helium_channel** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load %struct.helium_channel*, %struct.helium_channel** %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i32 @_helium_channel_send(%struct.helium_channel* %9, i32 3, i32 4, i8* %10, i64 %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.helium_channel = type { i32 }
define i32 @helium_channel_send(%struct.helium_channel* %0, i8* %1, i64 %2, i32* %3) {
%5 = tail call i32 @_helium_channel_send(%struct.helium_channel* %0, i32 3, i32 4, i8* %1, i64 %2, i32* %3)
ret i32 %5
}
void g_get_current_dir() {}


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

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

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

LLVM IR (-O2):
define void @g_get_current_dir() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(void *, size_t);
void *malloc(size_t);
void *ft_memalloc(size_t size) {
  void *ptr;
  ptr = malloc(size);
  if (ptr == NULL)
    return (NULL);
  ft_bzero(ptr, size);
  return (ptr);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1151 <ft_memalloc+0x31>
movq   $0x0,-0x8(%rbp)
jmp    1166 <ft_memalloc+0x46>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_bzero@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113f <ft_memalloc+0x1f>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ft_bzero@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @ft_bzero(i8* %2, i64 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void hidden(char *name, char *value) {
  printf("<input type=hidden name=\"%s\" value=\"%s\">\n", name, value);
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"<input type=hidden name=\22%s\22 value=\22%s\22>\0A\00"
define void @hidden(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"<input type=hidden name=\22%s\22 value=\22%s\22>\0A\00"
define void @hidden(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
void XSharpGetImageSize(void *image, int *width, int *height) {
  *width = 1;
  *height = 1;
}


x86 assembly (clang, -O0):
<XSharpGetImageSize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<XSharpGetImageSize>:
movl   $0x1,(%rsi)
movl   $0x1,(%rdx)
ret

LLVM IR (-O0):
define void @XSharpGetImageSize(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
store i32 1, i32* %7
%8 = load i32*, i32** %6
store i32 1, i32* %8
ret void
}

LLVM IR (-O2):
define void @XSharpGetImageSize(i8* nocapture readnone %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
store i32 1, i32* %1
store i32 1, i32* %2
ret void
}
/* Variables and functions */
bool nrf53_errata_87(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_87() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ErrorMessage(char *, char *);
void yyerror(char *ps) {
  ;
  ErrorMessage("%s\n", ps);
  ;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @yyerror(i8* %0) {
%2 = tail call i32 @ErrorMessage(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ expm1f(float);
int /*<<< orphan*/ link_failure_expm1f();
void test_expm1f(float f) {
  if (expm1f(f) != expm1f(f))
    link_failure_expm1f();
}


x86 assembly (clang, -O0):
<test_expm1f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <expm1f@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <expm1f@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_expm1f+0x3c>
mov    $0x0,%al
call   1030 <link_failure_expm1f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_expm1f>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <expm1f@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <expm1f@plt>
cmp    %rax,%rbx
jne    1149 <test_expm1f+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_expm1f@plt>

LLVM IR (-O0):
define void @test_expm1f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @expm1f(float %3)
%5 = load float, float* %2
%6 = call i64 @expm1f(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_expm1f()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_expm1f(float %0) {
%2 = tail call i64 @expm1f(float %0)
%3 = tail call i64 @expm1f(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_expm1f()
br label %7
7: ; preds = %5, %1
ret void
}
void keyhash_init(void) {}


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

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

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

LLVM IR (-O2):
define void @keyhash_init() {
ret void
}
double cosh(double x) {
  return ({
    extern __typeof__(cosh) module_libc_cosh;
    &module_libc_cosh;
  })(x);
}


x86 assembly (clang, -O0):
<cosh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2edc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosh>:
jmp    1030 <module_libc_cosh@plt>

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

LLVM IR (-O2):
define double @cosh(double %0) {
%2 = tail call double @module_libc_cosh(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ say(char *);
void start(void) {
  debug("This is l start");
  say("hello from l");
  exit(0);
}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <debug@plt>
lea    0xec9(%rip),%rdi
call   1050 <say@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<start>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <debug@plt>
lea    0xecc(%rip),%rdi
call   1050 <say@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"This is l start\00"
@.str.1 = [13 x i8] c"hello from l\00"
define void @start() {
%1 = call i32 @debug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @say(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [16 x i8] c"This is l start\00"
@.str.1 = [13 x i8] c"hello from l\00"
define void @start() {
%1 = tail call i32 @debug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @say(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int simuart_putraw(int);
int simuart_putc(int ch) {
  int ret = ch;
  if (ch == '\n') {
    ret = simuart_putraw('\r');
  }
  if (ret >= 0) {
    ret = simuart_putraw(ch);
  }
  return ret;
}


x86 assembly (clang, -O0):
<simuart_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    1138 <simuart_putc+0x28>
mov    $0xd,%edi
call   1030 <simuart_putraw@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114d <simuart_putc+0x3d>
mov    -0x4(%rbp),%edi
call   1030 <simuart_putraw@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simuart_putc>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
cmp    $0xa,%edi
jne    1124 <simuart_putc+0x14>
mov    $0xd,%edi
call   1030 <simuart_putraw@plt>
test   %eax,%eax
js     1130 <simuart_putc+0x20>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <simuart_putraw@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @simuart_putc(i32 %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @simuart_putraw(i32 13)
br label %5
5: ; preds = %3, %1
%6 = phi i32 [ %4, %3 ], [ %0, %1 ]
%7 = icmp sgt i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @simuart_putraw(i32 %0)
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %9, %8 ], [ %6, %5 ]
ret i32 %11
}
/* Type definitions */
struct BasePRNGObject {
  int dummy;
};

/* Variables and functions */
double stdlib_base_prng_normalized(struct BasePRNGObject *);
double stdlib_base_random_randu(struct BasePRNGObject *obj) {
  return stdlib_base_prng_normalized(obj);
}


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

x86 assembly (clang, -O2):
<stdlib_base_random_randu>:
jmp    1030 <stdlib_base_prng_normalized@plt>

LLVM IR (-O0):
%struct.BasePRNGObject = type { i32 }
define double @stdlib_base_random_randu(%struct.BasePRNGObject* %0) {
%2 = alloca %struct.BasePRNGObject*
store %struct.BasePRNGObject* %0, %struct.BasePRNGObject** %2
%3 = load %struct.BasePRNGObject*, %struct.BasePRNGObject** %2
%4 = call double @stdlib_base_prng_normalized(%struct.BasePRNGObject* %3)
ret double %4
}

LLVM IR (-O2):
%struct.BasePRNGObject = type { i32 }
define double @stdlib_base_random_randu(%struct.BasePRNGObject* %0) {
%2 = tail call double @stdlib_base_prng_normalized(%struct.BasePRNGObject* %0)
ret double %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *ext_data;
};
typedef TYPE_1__ XFontStruct;
typedef int /*<<< orphan*/ XExtData;

/* Variables and functions */
void set_XFontStruct_ext_data(void *_p, void *_v) {
  ((XFontStruct *)_p)->ext_data = (XExtData *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define void @set_XFontStruct_ext_data(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32* %6, i32** %9
ret void
}

LLVM IR (-O2):
define void @set_XFontStruct_ext_data(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
double interp_8(double phim3, double phim2, double phim1, double phi,
                double phip1, double phip2, double phip3, double phip4) {
  return (533. / 840. * (phi + phip1) - 139.0 / 840.0 * (phim1 + phip2) +
          29.0 / 840.0 * (phim2 + phip3) - 1.0 / 280.0 * (phim3 + phip4));
}


x86 assembly (clang, -O0):
<interp_8>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
addsd  -0x30(%rbp),%xmm2
movsd  0xed0(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xea5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  0xe83(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  0xe61(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp_8>:
addsd  %xmm5,%xmm2
mulsd  0xef4(%rip),%xmm2
addsd  %xmm4,%xmm3
mulsd  0xef0(%rip),%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm6,%xmm1
mulsd  0xee8(%rip),%xmm1
addsd  %xmm3,%xmm1
addsd  %xmm7,%xmm0
mulsd  0xee0(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @interp_8(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%17 = load double, double* %12
%18 = load double, double* %13
%19 = fadd double %17, %18
%20 = load double, double* %11
%21 = load double, double* %14
%22 = fadd double %20, %21
%23 = fmul double 0x3FC52E52E52E52E5, %22
%24 = fneg double %23
%25 = call double @llvm.fmuladd.f64(double 0x3FE44E04E04E04E0, double %19, double %24)
%26 = load double, double* %10
%27 = load double, double* %15
%28 = fadd double %26, %27
%29 = call double @llvm.fmuladd.f64(double 0x3FA1AD1AD1AD1AD2, double %28, double %25)
%30 = load double, double* %9
%31 = load double, double* %16
%32 = fadd double %30, %31
%33 = call double @llvm.fmuladd.f64(double 0xBF6D41D41D41D41D, double %32, double %29)
ret double %33
}

LLVM IR (-O2):
define double @interp_8(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fadd double %3, %4
%10 = fadd double %2, %5
%11 = fmul double %10, 0xBFC52E52E52E52E5
%12 = tail call double @llvm.fmuladd.f64(double %9, double 0x3FE44E04E04E04E0, double %11)
%13 = fadd double %1, %6
%14 = tail call double @llvm.fmuladd.f64(double %13, double 0x3FA1AD1AD1AD1AD2, double %12)
%15 = fadd double %0, %7
%16 = tail call double @llvm.fmuladd.f64(double %15, double 0xBF6D41D41D41D41D, double %14)
ret double %16
}
void heapifyDown(int a[], int *cap) {}


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

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

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

LLVM IR (-O2):
define void @heapifyDown(i32* nocapture %0, i32* nocapture %1) {
ret void
}