xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
void force_trickybit_process(void) {
  emit("inc edi\n");
  emit("add [__cycles_leftover],edi\n");
  emit("or edi,byte -1\n");
}


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

x86 assembly (clang, -O2):
<force_trickybit_process>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <emit@plt>
lea    0xee5(%rip),%rdi
call   1030 <emit@plt>
lea    0xef6(%rip),%rdi
pop    %rax
jmp    1030 <emit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"inc edi\0A\00"
@.str.1 = [29 x i8] c"add [__cycles_leftover],edi\0A\00"
@.str.2 = [16 x i8] c"or edi,byte -1\0A\00"
define void @force_trickybit_process() {
%1 = call i32 @emit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @emit(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @emit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"inc edi\0A\00"
@.str.1 = [29 x i8] c"add [__cycles_leftover],edi\0A\00"
@.str.2 = [16 x i8] c"or edi,byte -1\0A\00"
define void @force_trickybit_process() {
%1 = tail call i32 @emit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @emit(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @emit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret void
}
float cosapprox(float val) {
  float val2 = val * val;
  return 1.f +
         val2 * (-0.4998515820f +
                 val2 * (4.1518035216e-2f +
                         val2 * (-1.3422947025e-3f + val2 * 1.8929864824e-5f)));
}


x86 assembly (clang, -O0):
<cosapprox>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movss  -0x8(%rbp),%xmm3
movss  0xed8(%rip),%xmm4
mulss  %xmm4,%xmm3
movss  0xed0(%rip),%xmm4
addss  %xmm4,%xmm3
mulss  %xmm3,%xmm2
movss  0xeb8(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  0xea4(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  0xe90(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosapprox>:
mulss  %xmm0,%xmm0
movss  0xef4(%rip),%xmm1
mulss  %xmm0,%xmm1
addss  0xeec(%rip),%xmm1
mulss  %xmm0,%xmm1
addss  0xee4(%rip),%xmm1
mulss  %xmm0,%xmm1
addss  0xedc(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  0xed4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @cosapprox(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = load float, float* %2
%6 = fmul float %4, %5
store float %6, float* %3
%7 = load float, float* %3
%8 = load float, float* %3
%9 = load float, float* %3
%10 = load float, float* %3
%11 = call float @llvm.fmuladd.f32(float %10, float 0x3EF3D97260000000, float 0xBF55FDFE00000000)
%12 = call float @llvm.fmuladd.f32(float %9, float %11, float 0x3FA541DA20000000)
%13 = call float @llvm.fmuladd.f32(float %8, float %12, float 0xBFDFFD9180000000)
%14 = call float @llvm.fmuladd.f32(float %7, float %13, float 1.000000e+00)
ret float %14
}

LLVM IR (-O2):
define float @cosapprox(float %0) {
%2 = fmul float %0, %0
%3 = tail call float @llvm.fmuladd.f32(float %2, float 0x3EF3D97260000000, float 0xBF55FDFE00000000)
%4 = tail call float @llvm.fmuladd.f32(float %2, float %3, float 0x3FA541DA20000000)
%5 = tail call float @llvm.fmuladd.f32(float %2, float %4, float 0xBFDFFD9180000000)
%6 = tail call float @llvm.fmuladd.f32(float %2, float %5, float 1.000000e+00)
ret float %6
}
/* Variables and functions */
int __dprintf(int, char const *, int *);
int printf(const char *format, ...) {
  return __dprintf(1, format, (int *)&format + 1);
}


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

x86 assembly (clang, -O2):
<printf>:
push   %rax
mov    %rdi,%rsi
mov    %rdi,(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x1,%edi
call   1030 <__dprintf@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8** %2 to i32*
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = call i32 @__dprintf(i32 1, i8* %3, i32* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = bitcast i8** %2 to i32*
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = call i32 @__dprintf(i32 1, i8* %0, i32* %4)
ret i32 %5
}
void rnd_clear(void) {}


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

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

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

LLVM IR (-O2):
define void @rnd_clear() {
ret void
}
int Kit_WordHasOneBit(unsigned uWord) { return (uWord & (uWord - 1)) == 0; }


x86 assembly (clang, -O0):
<Kit_WordHasOneBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kit_WordHasOneBit>:
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @Kit_WordHasOneBit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 %4, 1
%6 = and i32 %3, %5
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @Kit_WordHasOneBit(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
%3 = icmp ult i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char const *const);
int dialog_msgbox(char const *, char const *const, int /*<<< orphan*/,
                  int /*<<< orphan*/, int /*<<< orphan*/);
int j_infobox(const char *t, int ac, const char *const *av) {
  return dialog_msgbox(t, av[2], atoi(av[3]), atoi(av[4]), 0);
}


x86 assembly (clang, -O0):
<j_infobox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x20(%rax),%rdi
call   1040 <atoi@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
xor    %r8d,%r8d
call   1030 <dialog_msgbox@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_infobox>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    0x10(%rdx),%r15
mov    0x18(%rdx),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    0x20(%rbx),%rdi
call   1040 <atoi@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <dialog_msgbox@plt>

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

LLVM IR (-O2):
define i32 @j_infobox(i8* %0, i32 %1, i8** nocapture %2) {
%4 = getelementptr inbounds i8*, i8** %2, i64 2
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8*, i8** %2, i64 3
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = getelementptr inbounds i8*, i8** %2, i64 4
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = tail call i32 @dialog_msgbox(i8* %0, i8* %5, i32 %8, i32 %11, i32 0)
ret i32 %12
}
unsigned long EPINonBlockingWriteCount(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000204))));
}


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

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

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

LLVM IR (-O2):
define i64 @EPINonBlockingWriteCount(i64 %0) {
%2 = add i64 %0, 516
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
ret i64 %4
}
void check_for_orphaned_hosts(void) {}


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

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

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

LLVM IR (-O2):
define void @check_for_orphaned_hosts() {
ret void
}
void SteamAPI_ISteamGameServer_SetProduct(void *self, const char *pszProduct) {
  xlogf("%s(self = %p, pszProduct = %s)\n", __func__, self, pszProduct);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamGameServer_SetProduct>:
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xee3(%rip),%rdi
lea    0xefc(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"%s(self = %p, pszProduct = %s)\0A\00"
@__func__.SteamAPI_ISteamGameServer_SetProduct = [37 x i8] c"SteamAPI_ISteamGameServer_SetProduct\00"
define void @SteamAPI_ISteamGameServer_SetProduct(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 (i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_ISteamGameServer_SetProduct, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"%s(self = %p, pszProduct = %s)\0A\00"
@__func__.SteamAPI_ISteamGameServer_SetProduct = [37 x i8] c"SteamAPI_ISteamGameServer_SetProduct\00"
define void @SteamAPI_ISteamGameServer_SetProduct(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_ISteamGameServer_SetProduct, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
const char *Ten90GetVersion(void) { return "2.0.0"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"2.0.0\00"
define i8* @Ten90GetVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"2.0.0\00"
define i8* @Ten90GetVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main() { printf("Value of EOF:  %d\n", EOF); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"Value of EOF: %d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Value of EOF: %d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ charrep(char, int);
int /*<<< orphan*/ printf(char *);
void display_pstates_footer(void) {
  charrep('-', 64);
  printf("\n\n");
}


x86 assembly (clang, -O0):
<display_pstates_footer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
mov    $0x40,%esi
call   1040 <charrep@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_pstates_footer>:
push   %rax
mov    $0x2d,%edi
mov    $0x40,%esi
call   1040 <charrep@plt>
lea    0xec9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
define void @display_pstates_footer() {
%1 = call i32 @charrep(i8 signext 45, i32 64)
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define void @display_pstates_footer() {
%1 = tail call i32 @charrep(i8 signext 45, i32 64)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
int mangle_overstrike(char arr[64], int arr_len, int upos, char c) {
  if (upos >= arr_len)
    return (arr_len);
  arr[upos] = c;
  return (arr_len);
}


x86 assembly (clang, -O0):
<mangle_overstrike>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     112a <mangle_overstrike+0x2a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113e <mangle_overstrike+0x3e>
mov    -0x19(%rbp),%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mangle_overstrike>:
mov    %esi,%eax
cmp    %esi,%edx
jge    110c <mangle_overstrike+0xc>
movslq %edx,%rdx
mov    %cl,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define i32 @mangle_overstrike(i8* nocapture writeonly %0, i32 returned %1, i32 %2, i8 signext %3) {
%5 = icmp slt i32 %2, %1
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %3, i8* %8
br label %9
9: ; preds = %4, %6
ret i32 %1
}
int mixednums(int *a, double *b) {
  *a = 2;
  *b = 1.2;
  return *a;
}


x86 assembly (clang, -O0):
<mixednums>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xede(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixednums>:
movl   $0x2,(%rdi)
movabs $0x3ff3333333333333,%rax
33 f3 3f
mov    %rax,(%rsi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @mixednums(i32* %0, double* %1) {
%3 = alloca i32*
%4 = alloca double*
store i32* %0, i32** %3
store double* %1, double** %4
%5 = load i32*, i32** %3
store i32 2, i32* %5
%6 = load double*, double** %4
store double 1.200000e+00, double* %6
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @mixednums(i32* nocapture writeonly %0, double* nocapture writeonly %1) {
store i32 2, i32* %0
store double 1.200000e+00, double* %1
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ Fibonacci();
int /*<<< orphan*/ getchar();
int main() {
  Fibonacci();
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Fibonacci@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Fibonacci@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @Fibonacci()
%2 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Fibonacci()
%2 = tail call i32 (...) @getchar()
ret i32 0
}
void ecspi3_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @ecspi3_iomux_config() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *,
                           char *);
int /*<<< orphan*/ stderr;
void showUsage(char *exeName) {
  fprintf(stderr,
          "Usage :\n"
          "%s < inputFile.txt > output.bin\n"
          "%s -i inputfile.txt -o outputFile.txt\n"
          "%s -b < inputFile.bin > output.bin\n"
          "%s -b -i inputFile.bin -o output.bin\n"
          "arguments could be mixed with pipe style calling\n"
          "-b flag is to put binary array as input\n",
          exeName, exeName, exeName, exeName);
  exit(0);
}


x86 assembly (clang, -O0):
<showUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xeb4(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<showUsage>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [240 x i8] c"Usage :\0A%s < inputFile.txt > output.bin\0A%s -i inputfile.txt -o outputFile.txt\0A%s -b < inputFile.bin > output.bin\0A%s -b -i inputFile.bin -o output.bin\0Aarguments could be mixed with pipe style calling\0A-b flag is to put binary array as input\0A\00"
define void @showUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([240 x i8], [240 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6, i8* %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [240 x i8] c"Usage :\0A%s < inputFile.txt > output.bin\0A%s -i inputfile.txt -o outputFile.txt\0A%s -b < inputFile.bin > output.bin\0A%s -b -i inputFile.bin -o output.bin\0Aarguments could be mixed with pipe style calling\0A-b flag is to put binary array as input\0A\00"
define void @showUsage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([240 x i8], [240 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
double heatCapacity(double beta) {
  double C;
  double betaMuB = beta * 1.0 * 1.0;
  C = 2.0 * 1 * 1.0 * (betaMuB) * (betaMuB) * (atanh(betaMuB) * atanh(betaMuB));
  return C;
}


x86 assembly (clang, -O0):
<heatCapacity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xebd(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <atanh@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <atanh@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heatCapacity>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
call   1030 <atanh@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1030 <atanh@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @heatCapacity(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fmul double %5, 1.000000e+00
%7 = fmul double %6, 1.000000e+00
store double %7, double* %4
%8 = load double, double* %4
%9 = fmul double 2.000000e+00, %8
%10 = load double, double* %4
%11 = fmul double %9, %10
%12 = load double, double* %4
%13 = call double @atanh(double %12)
%14 = load double, double* %4
%15 = call double @atanh(double %14)
%16 = fmul double %13, %15
%17 = fmul double %11, %16
store double %17, double* %3
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
define double @heatCapacity(double %0) {
%2 = fmul double %0, 2.000000e+00
%3 = fmul double %2, %0
%4 = tail call double @atanh(double %0)
%5 = tail call double @atanh(double %0)
%6 = fmul double %4, %5
%7 = fmul double %3, %6
ret double %7
}
void RTUtf16GetCpInternal(void) {}


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

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

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

LLVM IR (-O2):
define void @RTUtf16GetCpInternal() {
ret void
}
void compute_add_sources_el_cuda_(long *Mesh_pointer, int *iphasef, int *itf) {}


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

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

LLVM IR (-O0):
define void @compute_add_sources_el_cuda_(i64* %0, i32* %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i32*
%6 = alloca i32*
store i64* %0, i64** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
define void @compute_add_sources_el_cuda_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
int symbol(int bit) {
  if (bit < 26)
    return ('A' + bit);
  else
    return ('a' + bit - 26);
}


x86 assembly (clang, -O0):
<symbol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jge    111f <symbol+0x1f>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    112b <symbol+0x2b>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0x1a,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbol>:
lea    0x47(%rdi),%ecx
lea    0x41(%rdi),%eax
cmp    $0x1a,%edi
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @symbol(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 26
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 65, %7
store i32 %8, i32* %2
br label %13
9: ; preds = %1
%10 = load i32, i32* %3
%11 = add nsw i32 97, %10
%12 = sub nsw i32 %11, 26
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @symbol(i32 %0) {
%2 = icmp slt i32 %0, 26
%3 = select i1 %2, i32 65, i32 71
%4 = add nsw i32 %3, %0
ret i32 %4
}
int main() {
  int *const *a;
  int **b = a;
  f(a);
  int *const *const *const c;
  f(c);
  f(*c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <f@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <f@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <f@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32**
%2 = alloca i32**
%3 = alloca i32***
%4 = load i32**, i32*** %1
store i32** %4, i32*** %2
%5 = load i32**, i32*** %1
%6 = call i32 (i32**, ...) bitcast (i32 (...)* @f to i32 (i32**, ...)*)(i32** %5)
%7 = load i32***, i32**** %3
%8 = call i32 (i32***, ...) bitcast (i32 (...)* @f to i32 (i32***, ...)*)(i32*** %7)
%9 = load i32***, i32**** %3
%10 = load i32**, i32*** %9
%11 = call i32 (i32**, ...) bitcast (i32 (...)* @f to i32 (i32**, ...)*)(i32** %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32**, ...) bitcast (i32 (...)* @f to i32 (i32**, ...)*)(i32** undef)
%2 = tail call i32 (i32***, ...) bitcast (i32 (...)* @f to i32 (i32***, ...)*)(i32*** undef)
%3 = tail call i32 (i32**, ...) bitcast (i32 (...)* @f to i32 (i32**, ...)*)(i32** undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, char const *, char const *);
int /*<<< orphan*/ stderr;
void assure_failed(const char *assertion, const char *file, unsigned int line,
                   const char *function) {
  fprintf(stderr, "%s:%d %s: Assure `%s' failed.\n", file, line, function,
          assertion);
  abort();
}


x86 assembly (clang, -O0):
<assure_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xeaa(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<assure_failed>:
push   %rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%r9
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"%s:%d %s: Assure `%s' failed.\0A\00"
define void @assure_failed(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = load i8*, i8** %5
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8* %12, i8* %13)
%15 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"%s:%d %s: Assure `%s' failed.\0A\00"
define void @assure_failed(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %3, i8* %0)
%7 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
double M_PI;
double x2lon_m(double x) { return (((x / 6378137) * 180) / M_PI); }


x86 assembly (clang, -O0):
<x2lon_m>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2ebb(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<x2lon_m>:
divsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
mov    0x2ed1(%rip),%rax
divsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @x2lon_m(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 0x415854A640000000
%5 = fmul double %4, 1.800000e+02
%6 = load double, double* @M_PI
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @x2lon_m(double %0) {
%2 = fdiv double %0, 0x415854A640000000
%3 = fmul double %2, 1.800000e+02
%4 = load double, double* @M_PI
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ cleanupGpio();
int /*<<< orphan*/ ledClearAll();
void ledCleanup() {
  ledClearAll();
  cleanupGpio();
}


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

x86 assembly (clang, -O2):
<ledCleanup>:
push   %rax
xor    %eax,%eax
call   1040 <ledClearAll@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <cleanupGpio@plt>

LLVM IR (-O0):
define void @ledCleanup() {
%1 = call i32 (...) @ledClearAll()
%2 = call i32 (...) @cleanupGpio()
ret void
}

LLVM IR (-O2):
define void @ledCleanup() {
%1 = tail call i32 (...) @ledClearAll()
%2 = tail call i32 (...) @cleanupGpio()
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int address;

/* Variables and functions */
int /*<<< orphan*/ tpi_write(int);
void tpi_sout(uint8_t data, uint8_t address) {
  tpi_write((0x90) | ((((address) & (0x30)) << (1)) | (((address) & (0x0F)))));
  tpi_write(data);
}


x86 assembly (clang, -O0):
<tpi_sout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0x30,%edi
shl    $0x1,%edi
mov    -0x8(%rbp),%eax
and    $0xf,%eax
or     %eax,%edi
or     $0x90,%edi
call   1030 <tpi_write@plt>
mov    -0x4(%rbp),%edi
call   1030 <tpi_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpi_sout>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%eax
and    $0x30,%eax
and    $0xf,%esi
lea    (%rsi,%rax,2),%edi
add    $0x90,%edi
call   1030 <tpi_write@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tpi_write@plt>

LLVM IR (-O0):
define void @tpi_sout(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 48
%7 = shl i32 %6, 1
%8 = load i32, i32* %4
%9 = and i32 %8, 15
%10 = or i32 %7, %9
%11 = or i32 144, %10
%12 = call i32 @tpi_write(i32 %11)
%13 = load i32, i32* %3
%14 = call i32 @tpi_write(i32 %13)
ret void
}

LLVM IR (-O2):
define void @tpi_sout(i32 %0, i32 %1) {
%3 = shl i32 %1, 1
%4 = and i32 %3, 96
%5 = and i32 %1, 15
%6 = or i32 %5, %4
%7 = or i32 %6, 144
%8 = tail call i32 @tpi_write(i32 %7)
%9 = tail call i32 @tpi_write(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RecursiveReturn();
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void EndVAR() {
  fputs("}", stdout);
  RecursiveReturn();
}


x86 assembly (clang, -O0):
<EndVAR>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x0,%al
call   1040 <RecursiveReturn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<EndVAR>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <RecursiveReturn@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"}\00"
@stdout = global i32 0
define void @EndVAR() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @RecursiveReturn()
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"}\00"
@stdout = global i32 0
define void @EndVAR() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @RecursiveReturn()
ret void
}
/* Variables and functions */
char or_b(char *, char *);
signed char intr_wrap_542(signed char p1, signed char p2) {
  return or_b(&p1, &p2);
}


x86 assembly (clang, -O0):
<intr_wrap_542>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
call   1030 <or_b@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_542>:
push   %rax
mov    %dil,0x7(%rsp)
mov    %sil,0x6(%rsp)
lea    0x7(%rsp),%rdi
lea    0x6(%rsp),%rsi
call   1030 <or_b@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @intr_wrap_542(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @or_b(i8* %3, i8* %4)
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @intr_wrap_542(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @or_b(i8* %3, i8* %4)
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int *);
int *f(int *p1, int *p2) {
  assert(p1);
  return p2;
}


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

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %rsi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @f(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 = call i32 @assert(i32* %5)
%7 = load i32*, i32** %4
ret i32* %7
}

LLVM IR (-O2):
define i32* @f(i32* %0, i32* readnone returned %1) {
%3 = tail call i32 @assert(i32* %0)
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
void sprint_rlc(char *str) { sprintf(str, "RLC   A                         "); }


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

x86 assembly (clang, -O2):
<sprint_rlc>:
movups 0xf09(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdi)
movb   $0x0,0x20(%rdi)
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"RLC A \00"
define void @sprint_rlc(i8* nocapture writeonly %0) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(33) %0, i8* align 1 dereferenceable(33) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 33, i1 false)
ret void
}
/* Variables and functions */
int hammingWeight(int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%d\n", hammingWeight(1)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <hammingWeight@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <hammingWeight@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = call i32 @hammingWeight(i32 1)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @hammingWeight(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void smpte_hbrmt_set_map(uint8_t *p_hbrmt, uint8_t map) {
  p_hbrmt[4] |= (map & 0xf) << 4;
}


x86 assembly (clang, -O0):
<smpte_hbrmt_set_map>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xf,%ecx
shl    $0x4,%ecx
mov    -0x8(%rbp),%rax
or     0x10(%rax),%ecx
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_hbrmt_set_map>:
shl    $0x4,%esi
movzbl %sil,%eax
or     %eax,0x10(%rdi)
ret

LLVM IR (-O0):
define void @smpte_hbrmt_set_map(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 15
%7 = shl i32 %6, 4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 4
%10 = load i32, i32* %9
%11 = or i32 %10, %7
store i32 %11, i32* %9
ret void
}

LLVM IR (-O2):
define void @smpte_hbrmt_set_map(i32* nocapture %0, i32 %1) {
%3 = shl i32 %1, 4
%4 = and i32 %3, 240
%5 = getelementptr inbounds i32, i32* %0, i64 4
%6 = load i32, i32* %5
%7 = or i32 %6, %4
store i32 %7, i32* %5
ret void
}
/* Variables and functions */
char *skip_quoted(char **, char const *, char const *, int /*<<< orphan*/);
char *skip(char **buf, const char *delimiters) {
  return skip_quoted(buf, delimiters, delimiters, 0);
}


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

x86 assembly (clang, -O2):
<skip>:
mov    %rsi,%rdx
xor    %ecx,%ecx
jmp    1030 <skip_quoted@plt>

LLVM IR (-O0):
define i8* @skip(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 = load i8*, i8** %4
%8 = call i8* @skip_quoted(i8** %5, i8* %6, i8* %7, i32 0)
ret i8* %8
}

LLVM IR (-O2):
define i8* @skip(i8** %0, i8* %1) {
%3 = tail call i8* @skip_quoted(i8** %0, i8* %1, i8* %1, i32 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ controller_home_start();
int /*<<< orphan*/ hardware_init();
int /*<<< orphan*/ kernel_launch();
int /*<<< orphan*/ sofware_init();
int /*<<< orphan*/ startup_threads_start();
int main() {
  hardware_init();
  sofware_init();
  startup_threads_start();
  controller_home_start();
  kernel_launch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <hardware_init@plt>
mov    $0x0,%al
call   1070 <sofware_init@plt>
mov    $0x0,%al
call   1060 <startup_threads_start@plt>
mov    $0x0,%al
call   1040 <controller_home_start@plt>
mov    $0x0,%al
call   1030 <kernel_launch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <hardware_init@plt>
xor    %eax,%eax
call   1070 <sofware_init@plt>
xor    %eax,%eax
call   1060 <startup_threads_start@plt>
xor    %eax,%eax
call   1040 <controller_home_start@plt>
xor    %eax,%eax
call   1030 <kernel_launch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @hardware_init()
%3 = call i32 (...) @sofware_init()
%4 = call i32 (...) @startup_threads_start()
%5 = call i32 (...) @controller_home_start()
%6 = call i32 (...) @kernel_launch()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hardware_init()
%2 = tail call i32 (...) @sofware_init()
%3 = tail call i32 (...) @startup_threads_start()
%4 = tail call i32 (...) @controller_home_start()
%5 = tail call i32 (...) @kernel_launch()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("only for testing");
  printf("b1");
  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>
lea    0xed8(%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>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"only for testing\00"
@.str.1 = [3 x i8] c"b1\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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"only for testing\00"
@.str.1 = [3 x i8] c"b1\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
unsigned int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
int socket_set_nonblock(int sock) {
  unsigned int flags;
  flags = fcntl(sock, F_GETFL);
  return fcntl(sock, F_SETFL, flags | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<socket_set_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    0x2ea1(%rip),%rax
or     (%rax),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_set_nonblock>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2eae(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb5(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @socket_set_nonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 (i32, i32, ...) @fcntl(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* @F_SETFL
%9 = load i32, i32* %3
%10 = load i32, i32* @O_NONBLOCK
%11 = or i32 %9, %10
%12 = call i32 (i32, i32, ...) @fcntl(i32 %7, i32 %8, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @socket_set_nonblock(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %3
%7 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %4, i32 %6)
ret i32 %7
}
/* Variables and functions */
scalar_t__ in_first_storage_class_specifier();
scalar_t__ in_first_type_qualifier();
scalar_t__ in_first_type_specifier();
int in_first_declaration_specifiers(void) {
  return (in_first_storage_class_specifier() || in_first_type_specifier() ||
          in_first_type_qualifier());
}


x86 assembly (clang, -O0):
<in_first_declaration_specifiers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <in_first_storage_class_specifier@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    117b <in_first_declaration_specifiers+0x4b>
mov    $0x0,%al
call   1030 <in_first_type_specifier@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    117b <in_first_declaration_specifiers+0x4b>
mov    $0x0,%al
call   1040 <in_first_type_qualifier@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_first_declaration_specifiers>:
push   %rbx
xor    %eax,%eax
call   1050 <in_first_storage_class_specifier@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    115d <in_first_declaration_specifiers+0x2d>
xor    %eax,%eax
call   1030 <in_first_type_specifier@plt>
test   %rax,%rax
jne    115d <in_first_declaration_specifiers+0x2d>
xor    %eax,%eax
call   1040 <in_first_type_qualifier@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @in_first_declaration_specifiers() {
%1 = call i64 (...) @in_first_storage_class_specifier()
%2 = icmp ne i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = call i64 (...) @in_first_type_specifier()
%5 = icmp ne i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = call i64 (...) @in_first_type_qualifier()
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %6, %3, %0
%10 = phi i1 [ true, %3 ], [ true, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @in_first_declaration_specifiers() {
%1 = tail call i64 (...) @in_first_storage_class_specifier()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = tail call i64 (...) @in_first_type_specifier()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i64 (...) @in_first_type_qualifier()
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ 1, %3 ], [ 1, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ sastantua(int);
int main() { sastantua(5); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <sastantua@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @sastantua(i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sastantua(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outString(char const *);
void puts(const char *str) {
  outString(str);
  outString("\n\r");
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"\0A\0D\00"
define void @puts(i8* %0) {
%2 = tail call i32 @outString(i8* %0)
%3 = tail call i32 @outString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
void ECDSA_set_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @ECDSA_set_ex_data() {
ret void
}