xunge/DecIR huggingface dataset:
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double timestamp() {
  struct timeval tp;
  gettimeofday(&tp, NULL);
  return ((double)tp.tv_sec) * 1e6 + (double)tp.tv_usec;
}


x86 assembly (clang, -O0):
<timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timestamp>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
cvtsi2sdq 0x8(%rsp),%xmm1
mulsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @timestamp() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = call double @llvm.fmuladd.f64(double %5, double 1.000000e+06, double %8)
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @timestamp() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %6, double 1.000000e+06, double %9)
ret double %10
}
float invsqrtf(float number) {
  long i;
  float x2, y;
  const float threehalfs = 1.5F;
  x2 = number * 0.5F;
  y = number;
  i = *(long *)&y;
  i = 0x5f3759df - (i >> 1);
  y = *(float *)&i;
  y = y * (threehalfs - (x2 * y * y));
  return y;
}


x86 assembly (clang, -O0):
<invsqrtf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xee6(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
sar    $0x1,%rcx
mov    $0x5f3759df,%eax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe7b(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @invsqrtf(float %0) {
%2 = alloca float
%3 = alloca i64
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %2
store float 1.500000e+00, float* %6
%7 = load float, float* %2
%8 = fmul float %7, 5.000000e-01
store float %8, float* %4
%9 = load float, float* %2
store float %9, float* %5
%10 = bitcast float* %5 to i64*
%11 = load i64, i64* %10
store i64 %11, i64* %3
%12 = load i64, i64* %3
%13 = ashr i64 %12, 1
%14 = sub nsw i64 1597463007, %13
store i64 %14, i64* %3
%15 = bitcast i64* %3 to float*
%16 = load float, float* %15
store float %16, float* %5
%17 = load float, float* %5
%18 = load float, float* %4
%19 = load float, float* %5
%20 = fmul float %18, %19
%21 = load float, float* %5
%22 = fneg float %20
%23 = call float @llvm.fmuladd.f32(float %22, float %21, float 1.500000e+00)
%24 = fmul float %17, %23
store float %24, float* %5
%25 = load float, float* %5
ret float %25
}

LLVM IR (-O2):
define float @invsqrtf(float %0) {
ret float poison
}
/* Type definitions */
struct Cyc_List_List {
  int dummy;
};
struct Cyc_JumpAnalysis_Jump_Anal_Result {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
Cyc_NewControlFlow_cf_check(struct Cyc_JumpAnalysis_Jump_Anal_Result *,
                            struct Cyc_List_List *);
struct Cyc_List_List *
Cyc_do_cfcheck(struct Cyc_JumpAnalysis_Jump_Anal_Result *tables,
               struct Cyc_List_List *tds) {
  ({ Cyc_NewControlFlow_cf_check(tables, tds); });
  return tds;
}


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

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

LLVM IR (-O0):
%struct.Cyc_JumpAnalysis_Jump_Anal_Result = type { i32 }
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_do_cfcheck(%struct.Cyc_JumpAnalysis_Jump_Anal_Result* %0, %struct.Cyc_List_List* %1) {
%3 = alloca %struct.Cyc_JumpAnalysis_Jump_Anal_Result*
%4 = alloca %struct.Cyc_List_List*
%5 = alloca i32
store %struct.Cyc_JumpAnalysis_Jump_Anal_Result* %0, %struct.Cyc_JumpAnalysis_Jump_Anal_Result** %3
store %struct.Cyc_List_List* %1, %struct.Cyc_List_List** %4
%6 = load %struct.Cyc_JumpAnalysis_Jump_Anal_Result*, %struct.Cyc_JumpAnalysis_Jump_Anal_Result** %3
%7 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %4
%8 = call i32 @Cyc_NewControlFlow_cf_check(%struct.Cyc_JumpAnalysis_Jump_Anal_Result* %6, %struct.Cyc_List_List* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %4
ret %struct.Cyc_List_List* %10
}

LLVM IR (-O2):
%struct.Cyc_JumpAnalysis_Jump_Anal_Result = type { i32 }
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_do_cfcheck(%struct.Cyc_JumpAnalysis_Jump_Anal_Result* %0, %struct.Cyc_List_List* returned %1) {
%3 = tail call i32 @Cyc_NewControlFlow_cf_check(%struct.Cyc_JumpAnalysis_Jump_Anal_Result* %0, %struct.Cyc_List_List* %1)
ret %struct.Cyc_List_List* %1
}
/* Variables and functions */
int /*<<< orphan*/ testComposites();
int /*<<< orphan*/ testNumbers();
int /*<<< orphan*/ testStrings();
int /*<<< orphan*/ testSymbols();
int main(int argc, const char *argv[]) {
  testComposites();
  testStrings();
  testNumbers();
  testSymbols();
  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)
mov    $0x0,%al
call   1040 <testComposites@plt>
mov    $0x0,%al
call   1050 <testStrings@plt>
mov    $0x0,%al
call   1030 <testNumbers@plt>
mov    $0x0,%al
call   1060 <testSymbols@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <testComposites@plt>
xor    %eax,%eax
call   1050 <testStrings@plt>
xor    %eax,%eax
call   1030 <testNumbers@plt>
xor    %eax,%eax
call   1060 <testSymbols@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 (...) @testComposites()
%7 = call i32 (...) @testStrings()
%8 = call i32 (...) @testNumbers()
%9 = call i32 (...) @testSymbols()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @testComposites()
%4 = tail call i32 (...) @testStrings()
%5 = tail call i32 (...) @testNumbers()
%6 = tail call i32 (...) @testSymbols()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr, "usage: %s LOOPDEV PATH\n", progname);
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"usage: %s LOOPDEV PATH\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"usage: %s LOOPDEV PATH\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void glVertexAttribPointer(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glVertexAttribPointer() {
ret void
}
void MSB2DWORD(unsigned int *d, unsigned char *b) {
  unsigned int retVal;
  retVal = (unsigned int)b[0];
  retVal = (retVal << 8) + (unsigned int)b[1];
  retVal = (retVal << 8) + (unsigned int)b[2];
  retVal = (retVal << 8) + (unsigned int)b[3];
  *d = retVal;
}


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

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

LLVM IR (-O0):
define void @MSB2DWORD(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 i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = shl i32 %10, 8
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = add i32 %11, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = shl i32 %17, 8
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 2
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = add i32 %18, %22
store i32 %23, i32* %5
%24 = load i32, i32* %5
%25 = shl i32 %24, 8
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 3
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = add i32 %25, %29
store i32 %30, i32* %5
%31 = load i32, i32* %5
%32 = load i32*, i32** %3
store i32 %31, i32* %32
ret void
}

LLVM IR (-O2):
define void @MSB2DWORD(i32* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %1, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %9, %8
%11 = getelementptr inbounds i8, i8* %1, i64 2
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = shl nuw i32 %14, 8
%16 = getelementptr inbounds i8, i8* %1, i64 3
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = or i32 %15, %18
store i32 %19, i32* %0
ret void
}
unsigned FUZ_rand(unsigned *src) {
  *src = ((*src) * 2654435761U) + 2246822519U;
  return (*src) >> 11;
}


x86 assembly (clang, -O0):
<FUZ_rand>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x9e3779b1,(%rax),%ecx
add    $0x85ebca77,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shr    $0xb,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FUZ_rand>:
imul   $0x9e3779b1,(%rdi),%eax
add    $0x85ebca77,%eax
mov    %eax,(%rdi)
shr    $0xb,%eax
ret

LLVM IR (-O0):
define i32 @FUZ_rand(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = mul i32 %4, -1640531535
%6 = add i32 %5, -2048144777
%7 = load i32*, i32** %2
store i32 %6, i32* %7
%8 = load i32*, i32** %2
%9 = load i32, i32* %8
%10 = lshr i32 %9, 11
ret i32 %10
}

LLVM IR (-O2):
define i32 @FUZ_rand(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul i32 %2, -1640531535
%4 = add i32 %3, -2048144777
store i32 %4, i32* %0
%5 = lshr i32 %4, 11
ret i32 %5
}
void nullcamera_free(void *data) {}


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

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

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

LLVM IR (-O2):
define void @nullcamera_free(i8* nocapture %0) {
ret void
}
void homekit_system_restart() {}


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

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

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

LLVM IR (-O2):
define void @homekit_system_restart() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __dissect_cr(unsigned int);
unsigned int extract_cr_rn(unsigned long, unsigned long);
void dissect_cr_rn(unsigned long local_cr, unsigned long rn) {
  unsigned int masked_cr;
  masked_cr = extract_cr_rn(local_cr, rn);
  __dissect_cr(masked_cr);
}


x86 assembly (clang, -O0):
<dissect_cr_rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <extract_cr_rn@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <__dissect_cr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dissect_cr_rn>:
push   %rax
call   1040 <extract_cr_rn@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <__dissect_cr@plt>

LLVM IR (-O0):
define void @dissect_cr_rn(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i32 @extract_cr_rn(i64 %6, i64 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @__dissect_cr(i32 %9)
ret void
}

LLVM IR (-O2):
define void @dissect_cr_rn(i64 %0, i64 %1) {
%3 = tail call i32 @extract_cr_rn(i64 %0, i64 %1)
%4 = tail call i32 @__dissect_cr(i32 %3)
ret void
}
int (*lace_specific_util(const char *arg))(unsigned, char **) {
  (void)arg;
  return 0;
}


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

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

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

LLVM IR (-O2):
define noalias i32 (i32, i8**)* @lace_specific_util(i8* nocapture readnone %0) {
ret i32 (i32, i8**)* null
}
void f19(void) {
  ({
    goto a;
    ({ 0; });
    ({ 0; });
  a:
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f19>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f19() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
br label %5
5: ; preds = %0
store i32 0, i32* %1
%6 = load i32, i32* %1
store i32 0, i32* %2
%7 = load i32, i32* %2
store i32 0, i32* %3
%8 = load i32, i32* %3
store i32 0, i32* %4
%9 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @f19() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_errorf(char *, char *, char *);
char *string_from_args(char *, int, char **, int /*<<< orphan*/ *);
char *string_from_args_insist(char *key, int argc, char *argv[]) {
  char *s = string_from_args(key, argc, argv, NULL);
  if (s == NULL)
    my_errorf("I insist that keyword %s is on the command line followed\n"
              "by some value. Please add %s <value> to the command line\n",
              key, key);
  return s;
}


x86 assembly (clang, -O0):
<string_from_args_insist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <string_from_args@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116a <string_from_args_insist+0x4a>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xe9b(%rip),%rdi
call   1040 <my_errorf@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_from_args_insist>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ecx,%ecx
call   1030 <string_from_args@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <string_from_args_insist+0x28>
lea    0xec3(%rip),%rdi
mov    %r14,%rsi
mov    %r14,%rdx
call   1040 <my_errorf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [115 x i8] c"I insist that keyword %s is on the command line followed\0Aby some value. Please add %s <value> to the command line\0A\00"
define i8* @string_from_args_insist(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i8**, i8*** %6
%11 = call i8* @string_from_args(i8* %8, i32 %9, i8** %10, i32* null)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load i8*, i8** %4
%16 = load i8*, i8** %4
%17 = call i32 @my_errorf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %16)
br label %18
18: ; preds = %14, %3
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
@.str = [115 x i8] c"I insist that keyword %s is on the command line followed\0Aby some value. Please add %s <value> to the command line\0A\00"
define i8* @string_from_args_insist(i8* %0, i32 %1, i8** %2) {
%4 = tail call i8* @string_from_args(i8* %0, i32 %1, i8** %2, i32* null)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @my_errorf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
br label %8
8: ; preds = %6, %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *, char ***);
int main(int argc, char **argv) {
  printf("argc %p\nargv %p\n", &argc, &argv);
  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
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %rsi,0x10(%rsp)
lea    0xedc(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"argc %p\0Aargv %p\0A\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), i32* %4, i8*** %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"argc %p\0Aargv %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32* %3, i8*** %4)
ret i32 0
}
/* Variables and functions */
bool ascii_isdigit(unsigned char c) { return (unsigned int)c - '0' <= 9; }


x86 assembly (clang, -O0):
<ascii_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sub    $0x30,%eax
cmp    $0x9,%eax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ascii_isdigit(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sub i32 %4, 48
%6 = icmp ule i32 %5, 9
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @ascii_isdigit(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = add nsw i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
float float_max2(float a, float b) { return ((a) >= (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<float_max2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     112c <float_max2+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <float_max2+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_max2>:
movaps %xmm1,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @float_max2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp oge float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @float_max2(float %0, float %1) {
%3 = fcmp oge float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
const char *handler(const char *input) { return "Hello World"; }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define i8* @handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define i8* @handler(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
unsigned long long R(unsigned long long, int);
unsigned long long sigma1(unsigned long long x) {
  return R(x, 19) ^ R(x, 61) ^ (x >> 6);
}


x86 assembly (clang, -O0):
<sigma1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x13,%esi
call   1030 <R@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3d,%esi
call   1030 <R@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
xor    %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x6,%rcx
xor    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma1>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x13,%esi
call   1030 <R@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    $0x3d,%esi
call   1030 <R@plt>
shr    $0x6,%rbx
xor    %r14,%rbx
xor    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @sigma1(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @R(i64 %3, i32 19)
%5 = load i64, i64* %2
%6 = call i64 @R(i64 %5, i32 61)
%7 = xor i64 %4, %6
%8 = load i64, i64* %2
%9 = lshr i64 %8, 6
%10 = xor i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @sigma1(i64 %0) {
%2 = tail call i64 @R(i64 %0, i32 19)
%3 = tail call i64 @R(i64 %0, i32 61)
%4 = lshr i64 %0, 6
%5 = xor i64 %2, %4
%6 = xor i64 %5, %3
ret i64 %6
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void default_cb(int n) {
  char buffer[300];
  sprintf(buffer, "[Warning] Network IO Failure (PID %d)", getpid());
  perror(buffer);
}


x86 assembly (clang, -O0):
<default_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x130(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x138(%rbp),%rdi
mov    %eax,%edx
lea    0xe9d(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x130(%rbp),%rdi
call   1040 <perror@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_cb>:
push   %rbx
sub    $0x130,%rsp
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeba(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %eax,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
add    $0x130,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"[Warning] Network IO Failure (PID %d)\00"
define void @default_cb(i32 %0) {
%2 = alloca i32
%3 = alloca [300 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%5 = call i32 (...) @getpid()
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%8 = call i32 @perror(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"[Warning] Network IO Failure (PID %d)\00"
define void @default_cb(i32 %0) {
%2 = alloca [300 x i8]
%3 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%4 = tail call i32 (...) @getpid()
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @perror(i8* %3)
ret void
}
/* Variables and functions */
double pop();
int /*<<< orphan*/ push(double);
void replace(void) {
  double a, b;
  a = pop();
  b = pop();
  push(a);
  push(b);
}


x86 assembly (clang, -O0):
<replace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <pop@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <pop@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <push@plt>
movsd  -0x10(%rbp),%xmm0
call   1040 <push@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <pop@plt>
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <pop@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <push@plt>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
jmp    1040 <push@plt>

LLVM IR (-O0):
define void @replace() {
%1 = alloca double
%2 = alloca double
%3 = call double (...) @pop()
store double %3, double* %1
%4 = call double (...) @pop()
store double %4, double* %2
%5 = load double, double* %1
%6 = call i32 @push(double %5)
%7 = load double, double* %2
%8 = call i32 @push(double %7)
ret void
}

LLVM IR (-O2):
define void @replace() {
%1 = tail call double (...) @pop()
%2 = tail call double (...) @pop()
%3 = tail call i32 @push(double %1)
%4 = tail call i32 @push(double %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ ntohll(int /*<<< orphan*/ const);
uint64_t htonll(const uint64_t input) { return (ntohll(input)); }


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

x86 assembly (clang, -O2):
<htonll>:
jmp    1030 <ntohll@plt>

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

LLVM IR (-O2):
define i32 @htonll(i32 %0) {
%2 = tail call i32 @ntohll(i32 %0)
ret i32 %2
}
char *strerror(int errnum) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @strerror(i32 %0) {
ret i8* null
}
/* Variables and functions */
scalar_t__ allocate_mem(int, int /*<<< orphan*/, int, unsigned long);
float *allocate_floats(long n_float) {
  return (float *)allocate_mem(9, 0, sizeof(float), (unsigned long)n_float);
}


x86 assembly (clang, -O0):
<allocate_floats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x9,%edi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <allocate_mem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate_floats>:
mov    %rdi,%rcx
mov    $0x9,%edi
xor    %esi,%esi
mov    $0x4,%edx
jmp    1030 <allocate_mem@plt>

LLVM IR (-O0):
define float* @allocate_floats(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @allocate_mem(i32 9, i32 0, i32 4, i64 %3)
%5 = inttoptr i64 %4 to float*
ret float* %5
}

LLVM IR (-O2):
define float* @allocate_floats(i64 %0) {
%2 = tail call i64 @allocate_mem(i32 9, i32 0, i32 4, i64 %0)
%3 = inttoptr i64 %2 to float*
ret float* %3
}
void parg_window_send(const char *msg, double *values, int nvalues) {}


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

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

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

LLVM IR (-O2):
define void @parg_window_send(i8* nocapture %0, double* nocapture %1, i32 %2) {
ret void
}
void av_hmac_init() {}


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

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

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

LLVM IR (-O2):
define void @av_hmac_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnlt_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpnlt_sd(__m128d A, __m128d B) { return _mm_cmpnlt_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_cmpnlt_sd>:
jmp    1030 <_mm_cmpnlt_sd@plt>

LLVM IR (-O0):
define i32 @test_mm_cmpnlt_sd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @_mm_cmpnlt_sd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_cmpnlt_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnlt_sd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int hal_io_apic_read32(int);
int /*<<< orphan*/ hal_io_apic_write32(int, int);
void disable_apic() {
  hal_io_apic_write32(0x000000F0, hal_io_apic_read32(0x000000F0) & (~0x100));
  return;
}


x86 assembly (clang, -O0):
<disable_apic>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf0,%edi
call   1030 <hal_io_apic_read32@plt>
mov    %eax,%esi
and    $0xfffffeff,%esi
mov    $0xf0,%edi
call   1040 <hal_io_apic_write32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_apic>:
push   %rax
mov    $0xf0,%edi
call   1030 <hal_io_apic_read32@plt>
and    $0xfffffeff,%eax
mov    $0xf0,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <hal_io_apic_write32@plt>

LLVM IR (-O0):
define void @disable_apic() {
%1 = call i32 @hal_io_apic_read32(i32 240)
%2 = and i32 %1, -257
%3 = call i32 @hal_io_apic_write32(i32 240, i32 %2)
ret void
}

LLVM IR (-O2):
define void @disable_apic() {
%1 = tail call i32 @hal_io_apic_read32(i32 240)
%2 = and i32 %1, -257
%3 = tail call i32 @hal_io_apic_write32(i32 240, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ analyze_utf(int /*<<< orphan*/ *, long, int, int,
                               int /*<<< orphan*/ *);
void analyze(FILE *infile, long offset, long file_length) {
  int indent = 0;
  analyze_utf(infile, offset, indent, 1, NULL);
}


x86 assembly (clang, -O0):
<analyze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    $0x1,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <analyze_utf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analyze>:
xor    %edx,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
jmp    1030 <analyze_utf@plt>

LLVM IR (-O0):
define void @analyze(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i32 0, i32* %7
%8 = load i32*, i32** %4
%9 = load i64, i64* %5
%10 = load i32, i32* %7
%11 = call i32 @analyze_utf(i32* %8, i64 %9, i32 %10, i32 1, i32* null)
ret void
}

LLVM IR (-O2):
define void @analyze(i32* %0, i64 %1, i64 %2) {
%4 = tail call i32 @analyze_utf(i32* %0, i64 %1, i32 0, i32 1, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ P_tmpdir;
char *strdup(int /*<<< orphan*/);
char *systools_fileutils_get_temp_folder() {
  char *result = strdup(P_tmpdir);
  return result;
}


x86 assembly (clang, -O0):
<systools_fileutils_get_temp_folder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
call   1030 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<systools_fileutils_get_temp_folder>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
@P_tmpdir = global i32 0
define i8* @systools_fileutils_get_temp_folder() {
%1 = load i32, i32* @P_tmpdir
%2 = tail call i8* @strdup(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ test_dlist();
int /*<<< orphan*/ test_dstring();
int main(int argc, char *argv[]) {
  test_dstring();
  test_dlist();
  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)
mov    $0x0,%al
call   1040 <test_dstring@plt>
mov    $0x0,%al
call   1030 <test_dlist@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 (...) @test_dstring()
%7 = call i32 (...) @test_dlist()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_dstring()
%4 = tail call i32 (...) @test_dlist()
ret i32 0
}
/* Variables and functions */
char *IfaceReadStr();
char *IfaceRead() { return IfaceReadStr(); }


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

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

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

LLVM IR (-O2):
define i8* @IfaceRead() {
%1 = tail call i8* (...) @IfaceReadStr()
ret i8* %1
}
int source_data_str_error(void *data) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @source_data_str_error(i8* nocapture readnone %0) {
ret i32 0
}
int func(void) {
  int a = 1;
  int b = 2;
  int c = 3;
  a = (b = c, -b, ~c, c = (b--), b > c);
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%4 = load i32, i32* %3
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = sub nsw i32 0, %5
%7 = load i32, i32* %3
%8 = xor i32 %7, -1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
store i32 %9, i32* %3
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp sgt i32 %11, %12
%14 = zext i1 %13 to i32
store i32 %14, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
int makeint(char *p) {
  int val = 0;
  while ((*p >= '0') && (*p <= '9')) {
    val = 10 * val + (*p - '0');
    ++p;
  }
  return val;
}


x86 assembly (clang, -O0):
<makeint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     1134 <makeint+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <makeint+0x44>
jmp    1168 <makeint+0x68>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <makeint+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeint>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <makeint+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <makeint+0x20>
ret

LLVM IR (-O0):
define i32 @makeint(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp sge i32 %7, 48
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 57
br label %14
14: ; preds = %9, %4
%15 = phi i1 [ false, %4 ], [ %13, %9 ]
br i1 %15, label %16, label %26
16: ; preds = %14
%17 = load i32, i32* %3
%18 = mul nsw i32 10, %17
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 48
%23 = add nsw i32 %18, %22
store i32 %23, i32* %3
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %2
br label %4
26: ; preds = %14
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @makeint(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %12, %5 ], [ 0, %1 ]
%8 = phi i8* [ %13, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: uname [-aimnoprsv]\n");
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"usage: uname [-aimnoprsv]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int testSymbolLoadingError() { return 1; }


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

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

LLVM IR (-O0):
define i32 @testSymbolLoadingError() {
ret i32 1
}

LLVM IR (-O2):
define i32 @testSymbolLoadingError() {
ret i32 1
}
int sleep_monitor_register_ops(void *dev, struct sleep_monitor_ops *ops,
                               int device_type) {}


x86 assembly (clang, -O0):
<sleep_monitor_register_ops>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sleep_monitor_ops = type opaque
define i32 @sleep_monitor_register_ops(i8* %0, %struct.sleep_monitor_ops* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.sleep_monitor_ops*
%7 = alloca i32
store i8* %0, i8** %5
store %struct.sleep_monitor_ops* %1, %struct.sleep_monitor_ops** %6
store i32 %2, i32* %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
%struct.sleep_monitor_ops = type opaque
define i32 @sleep_monitor_register_ops(i8* nocapture readnone %0, %struct.sleep_monitor_ops* nocapture readnone %1, i32 %2) {
ret i32 undef
}
int S3C2410_UFCON_TXC(int fcon) {
  if (fcon & (1 << 9))
    return 16;
  return ((fcon) & (15 << 4)) >> (4);
}


x86 assembly (clang, -O0):
<S3C2410_UFCON_TXC>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
je     1124 <S3C2410_UFCON_TXC+0x24>
movl   $0x10,-0x4(%rbp)
jmp    1132 <S3C2410_UFCON_TXC+0x32>
mov    -0x8(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<S3C2410_UFCON_TXC>:
mov    %edi,%ecx
shr    $0x4,%ecx
and    $0xf,%ecx
test   $0x200,%edi
mov    $0x10,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @S3C2410_UFCON_TXC(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 512
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 16, i32* %2
br label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 %9, 240
%11 = ashr i32 %10, 4
store i32 %11, i32* %2
br label %12
12: ; preds = %8, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @S3C2410_UFCON_TXC(i32 %0) {
%2 = and i32 %0, 512
%3 = icmp eq i32 %2, 0
%4 = lshr i32 %0, 4
%5 = and i32 %4, 15
%6 = select i1 %3, i32 %5, i32 16
ret i32 %6
}
/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/);
long zsecond(void) { return (long)time(0); }


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

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

LLVM IR (-O0):
define i64 @zsecond() {
%1 = call i64 @time(i32 0)
ret i64 %1
}

LLVM IR (-O2):
define i64 @zsecond() {
%1 = tail call i64 @time(i32 0)
ret i64 %1
}
/* Variables and functions */
double EcontourExp(double const, double const, double, double const);
double EcontourExpAlt(const double k1, const double k3, const double k4,
                      const double eta) {
  return EcontourExp(k3 + k4, k1 - 0.5 * (k3 + k4), 0.5 * (k3 - k4), eta);
}


x86 assembly (clang, -O0):
<EcontourExpAlt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
movsd  0xebb(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x10(%rbp),%xmm3
subsd  -0x18(%rbp),%xmm3
movsd  0xe99(%rip),%xmm2
mulsd  %xmm3,%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <EcontourExp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EcontourExpAlt>:
movapd %xmm1,%xmm4
movapd %xmm1,%xmm5
addsd  %xmm2,%xmm5
movsd  0xedc(%rip),%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
subsd  %xmm2,%xmm4
mulsd  0xed0(%rip),%xmm4
movapd %xmm5,%xmm0
movapd %xmm4,%xmm2
jmp    1030 <EcontourExp@plt>

LLVM IR (-O0):
define double @EcontourExpAlt(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %6
%10 = load double, double* %7
%11 = fadd double %9, %10
%12 = load double, double* %5
%13 = load double, double* %6
%14 = load double, double* %7
%15 = fadd double %13, %14
%16 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %15, double %12)
%17 = load double, double* %6
%18 = load double, double* %7
%19 = fsub double %17, %18
%20 = fmul double 5.000000e-01, %19
%21 = load double, double* %8
%22 = call double @EcontourExp(double %11, double %16, double %20, double %21)
ret double %22
}

LLVM IR (-O2):
define double @EcontourExpAlt(double %0, double %1, double %2, double %3) {
%5 = fadd double %1, %2
%6 = tail call double @llvm.fmuladd.f64(double %5, double -5.000000e-01, double %0)
%7 = fsub double %1, %2
%8 = fmul double %7, 5.000000e-01
%9 = tail call double @EcontourExp(double %5, double %6, double %8, double %3)
ret double %9
}