xunge/DecIR huggingface dataset:
/* Variables and functions */
char *GetEnvVar(char const *);
int IsEnvVarFalse(const char *name) {
  const char *s = GetEnvVar(name);
  return s && *s == '0';
}


x86 assembly (clang, -O0):
<IsEnvVarFalse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <GetEnvVar@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     1149 <IsEnvVarFalse+0x39>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEnvVarFalse>:
push   %rax
call   1030 <GetEnvVar@plt>
test   %rax,%rax
je     1128 <IsEnvVarFalse+0x18>
mov    %rax,%rcx
xor    %eax,%eax
cmpb   $0x30,(%rcx)
sete   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @IsEnvVarFalse(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @GetEnvVar(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 48
br label %13
13: ; preds = %8, %1
%14 = phi i1 [ false, %1 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @IsEnvVarFalse(i8* %0) {
%2 = tail call i8* @GetEnvVar(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 48
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ sub();
int _foo1_helper() {
  sub();
  return 0xf00;
}


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

x86 assembly (clang, -O2):
<_foo1_helper>:
push   %rax
xor    %eax,%eax
call   1030 <sub@plt>
mov    $0xf00,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_foo1_helper() {
%1 = call i32 (...) @sub()
ret i32 3840
}

LLVM IR (-O2):
define i32 @_foo1_helper() {
%1 = tail call i32 (...) @sub()
ret i32 3840
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(unsigned short, int /*<<< orphan*/ *);
void my_putw(unsigned short w, FILE *f) {
  putc((w & 0xFF), f);
  putc((w >> 8), f);
}


x86 assembly (clang, -O0):
<my_putw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    -0x10(%rbp),%rsi
movzwl %ax,%edi
call   1030 <putc@plt>
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
mov    -0x10(%rbp),%rsi
movzwl %ax,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putw>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
movzbl %bpl,%edi
call   1030 <putc@plt>
shr    $0x8,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @my_putw(i16 zeroext %0, i32* %1) {
%3 = alloca i16
%4 = alloca i32*
store i16 %0, i16* %3
store i32* %1, i32** %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i16
%9 = load i32*, i32** %4
%10 = call i32 @putc(i16 zeroext %8, i32* %9)
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = ashr i32 %12, 8
%14 = trunc i32 %13 to i16
%15 = load i32*, i32** %4
%16 = call i32 @putc(i16 zeroext %14, i32* %15)
ret void
}

LLVM IR (-O2):
define void @my_putw(i16 zeroext %0, i32* nocapture %1) {
%3 = and i16 %0, 255
%4 = tail call i32 @putc(i16 zeroext %3, i32* %1)
%5 = lshr i16 %0, 8
%6 = tail call i32 @putc(i16 zeroext %5, i32* %1)
ret void
}
/* Variables and functions */
char const *__GLeeGetExtStrPlat();
extern const char *GLeeGetExtStrGLX(void) { return __GLeeGetExtStrPlat(); }


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

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

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

LLVM IR (-O2):
define i8* @GLeeGetExtStrGLX() {
%1 = tail call i8* (...) @__GLeeGetExtStrPlat()
ret i8* %1
}
double fabs(double x) {
  double r;
  __asm__ __volatile__("fabs" : "=t"(r) : "0"(x));
  return r;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
fabs
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
fabs
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @fabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double asm sideeffect "fabs", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %4)
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = tail call double asm sideeffect "fabs", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ memfrob(char *, size_t);
char *encode(char *s, size_t len, size_t *lenout) {
  if (lenout)
    *lenout = len;
  memfrob(s, len);
  return s;
}


x86 assembly (clang, -O0):
<encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     113a <encode+0x2a>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <memfrob@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     111c <encode+0xc>
mov    %rsi,(%rdx)
mov    %rbx,%rdi
call   1030 <memfrob@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @encode(i8* returned %0, i64 %1, i64* writeonly %2) {
%4 = icmp eq i64* %2, null
br i1 %4, label %6, label %5
5: ; preds = %3
store i64 %1, i64* %2
br label %6
6: ; preds = %5, %3
%7 = tail call i32 @memfrob(i8* %0, i64 %1)
ret i8* %0
}
/* Variables and functions */
scalar_t__ acos(float);
float acosf(float x) { return (float)acos(x); }


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

x86 assembly (clang, -O2):
<acosf>:
push   %rax
call   1030 <acos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @acosf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @acos(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @acosf(float %0) {
%2 = tail call i64 @acos(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
void caller_2_1_1_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_1_1_1_1_2_2() {
ret void
}
void iommu_dma_compose_msi_msg(struct msi_desc *desc, struct msi_msg *msg) {}


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

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

LLVM IR (-O0):
%struct.msi_desc = type opaque
%struct.msi_msg = type opaque
define void @iommu_dma_compose_msi_msg(%struct.msi_desc* %0, %struct.msi_msg* %1) {
%3 = alloca %struct.msi_desc*
%4 = alloca %struct.msi_msg*
store %struct.msi_desc* %0, %struct.msi_desc** %3
store %struct.msi_msg* %1, %struct.msi_msg** %4
ret void
}

LLVM IR (-O2):
%struct.msi_desc = type opaque
%struct.msi_msg = type opaque
define void @iommu_dma_compose_msi_msg(%struct.msi_desc* nocapture %0, %struct.msi_msg* nocapture %1) {
ret void
}
void SP_info_player_intermission(void) {}


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

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

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

LLVM IR (-O2):
define void @SP_info_player_intermission() {
ret void
}
unsigned int bit_count(unsigned char byte) {
  const unsigned int lookup[16] = {0, 1, 1, 2, 1, 2, 2, 3,
                                   1, 2, 2, 3, 2, 3, 3, 4};
  return lookup[0x0f & byte] + lookup[byte >> 4];
}


x86 assembly (clang, -O0):
<bit_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xed7(%rip),%rsi
mov    $0x40,%edx
call   1030 <memcpy@plt>
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
cltq
mov    -0x50(%rbp,%rax,4),%eax
movzbl -0x1(%rbp),%ecx
sar    $0x4,%ecx
movslq %ecx,%rcx
add    -0x50(%rbp,%rcx,4),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_count>:
mov    %edi,%ecx
and    $0xf,%ecx
lea    0xef4(%rip),%rdx
shr    $0x2,%edi
and    $0xfffffffc,%edi
mov    (%rdi,%rdx,1),%eax
add    (%rdx,%rcx,4),%eax
ret

LLVM IR (-O0):
@__const.bit_count.lookup = [16 x i32] [i32 0, i32 1, i32 1, i32 2, i32 1, i32 2, i32 2, i32 3, i32 1, i32 2, i32 2, i32 3, i32 2, i32 3, i32 3, i32 4]
define i32 @bit_count(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca [16 x i32]
store i8 %0, i8* %2
%4 = bitcast [16 x i32]* %3 to i8*
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = and i32 15, %6
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %8
%10 = load i32, i32* %9
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = ashr i32 %12, 4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = add i32 %10, %16
ret i32 %17
}

LLVM IR (-O2):
@__const.bit_count.lookup = [16 x i32] [i32 0, i32 1, i32 1, i32 2, i32 1, i32 2, i32 2, i32 3, i32 1, i32 2, i32 2, i32 3, i32 2, i32 3, i32 3, i32 4]
define i32 @bit_count(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = and i32 %2, 15
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [16 x i32], [16 x i32]* @__const.bit_count.lookup, i64 0, i64 %4
%6 = load i32, i32* %5
%7 = lshr i32 %2, 4
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds [16 x i32], [16 x i32]* @__const.bit_count.lookup, i64 0, i64 %8
%10 = load i32, i32* %9
%11 = add i32 %10, %6
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "rangecmp: usage: rangecmp [-v] start test end\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"rangecmp: usage: rangecmp [-v] start test end\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"rangecmp: usage: rangecmp [-v] start test end\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
int fastpow(int base, int exp) {
  int res = 1;
  while (exp > 0) {
    if (exp & 1) {
      exp--;
      res *= base;
    } else {
      exp /= 2;
      base *= base;
    }
  }
  return res;
}


x86 assembly (clang, -O0):
<fastpow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    115f <fastpow+0x5f>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1142 <fastpow+0x42>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    115a <fastpow+0x5a>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1111 <fastpow+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastpow>:
test   %esi,%esi
jle    1139 <fastpow+0x39>
mov    $0x1,%r8d
mov    $0x1,%eax
nop
lea    -0x1(%rsi),%edx
mov    %esi,%ecx
shr    %ecx
test   $0x1,%sil
mov    $0x1,%esi
cmove  %edi,%esi
cmovne %edx,%ecx
mov    %edi,%edx
cmove  %r8d,%edx
imul   %esi,%edi
imul   %edx,%eax
mov    %ecx,%esi
test   %ecx,%ecx
jne    1110 <fastpow+0x10>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @fastpow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 1, i32* %5
br label %6
6: ; preds = %25, %2
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %26
9: ; preds = %6
%10 = load i32, i32* %4
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %9
%14 = load i32, i32* %4
%15 = add nsw i32 %14, -1
store i32 %15, i32* %4
%16 = load i32, i32* %3
%17 = load i32, i32* %5
%18 = mul nsw i32 %17, %16
store i32 %18, i32* %5
br label %25
19: ; preds = %9
%20 = load i32, i32* %4
%21 = sdiv i32 %20, 2
store i32 %21, i32* %4
%22 = load i32, i32* %3
%23 = load i32, i32* %3
%24 = mul nsw i32 %23, %22
store i32 %24, i32* %3
br label %25
25: ; preds = %19, %13
br label %6
26: ; preds = %6
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @fastpow(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %18
4: ; preds = %2, %4
%5 = phi i32 [ %16, %4 ], [ 1, %2 ]
%6 = phi i32 [ %14, %4 ], [ %1, %2 ]
%7 = phi i32 [ %13, %4 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
%10 = add nsw i32 %6, -1
%11 = lshr i32 %6, 1
%12 = select i1 %9, i32 %7, i32 1
%13 = mul nsw i32 %7, %12
%14 = select i1 %9, i32 %11, i32 %10
%15 = select i1 %9, i32 1, i32 %7
%16 = mul nsw i32 %5, %15
%17 = icmp eq i32 %14, 0
br i1 %17, label %18, label %4
18: ; preds = %4, %2
%19 = phi i32 [ 1, %2 ], [ %16, %4 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ addKeyBuffer(unsigned char);
void keyboardHandler(unsigned char key) { addKeyBuffer(key); }


x86 assembly (clang, -O0):
<keyboardHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <addKeyBuffer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboardHandler>:
jmp    1030 <addKeyBuffer@plt>

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

LLVM IR (-O2):
define void @keyboardHandler(i8 zeroext %0) {
%2 = tail call i32 @addKeyBuffer(i8 zeroext %0)
ret void
}
/* Variables and functions */
unsigned long __raw_readl(void *);
int /*<<< orphan*/ __raw_writel(unsigned long volatile, void *);
unsigned long AKCLR_BITS(unsigned long bits_result, void *reg) {
  volatile unsigned long val;
  val = __raw_readl(reg);
  val &= ~bits_result;
  __raw_writel(val, reg);
  return 0;
}


x86 assembly (clang, -O0):
<AKCLR_BITS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <__raw_readl@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
mov    -0x18(%rbp),%rax
and    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__raw_writel@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AKCLR_BITS>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <__raw_readl@plt>
mov    %rax,(%rsp)
not    %rbx
and    %rbx,(%rsp)
mov    (%rsp),%rdi
mov    %r14,%rsi
call   1030 <__raw_writel@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @AKCLR_BITS(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @__raw_readl(i8* %6)
store volatile i64 %7, i64* %5
%8 = load i64, i64* %3
%9 = xor i64 %8, -1
%10 = load volatile i64, i64* %5
%11 = and i64 %10, %9
store volatile i64 %11, i64* %5
%12 = load volatile i64, i64* %5
%13 = load i8*, i8** %4
%14 = call i32 @__raw_writel(i64 %12, i8* %13)
ret i64 0
}

LLVM IR (-O2):
define i64 @AKCLR_BITS(i64 %0, i8* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = tail call i64 @__raw_readl(i8* %1)
store volatile i64 %5, i64* %3
%6 = xor i64 %0, -1
%7 = load volatile i64, i64* %3
%8 = and i64 %7, %6
store volatile i64 %8, i64* %3
%9 = load volatile i64, i64* %3
%10 = tail call i32 @__raw_writel(i64 %9, i8* %1)
ret i64 0
}
int test_imm_8Euint8_reg(unsigned char val) {
  return ((val) & (0x8E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Euint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x8e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Euint8_reg>:
test   $0x8e,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Euint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -114
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct l_class_OC_small {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _ZN5smallC2Ev(struct l_class_OC_small *);
void _ZN5smallC1Ev(struct l_class_OC_small *llvm_cbe_this) {
  struct l_class_OC_small *llvm_cbe_this_2e_addr;
  struct l_class_OC_small *llvm_cbe_this1;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  _ZN5smallC2Ev(llvm_cbe_this1);
  return;
}


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

x86 assembly (clang, -O2):
<_ZN5smallC1Ev>:
jmp    1030 <_ZN5smallC2Ev@plt>

LLVM IR (-O0):
%struct.l_class_OC_small = type { i32 }
define void @_ZN5smallC1Ev(%struct.l_class_OC_small* %0) {
%2 = alloca %struct.l_class_OC_small*
%3 = alloca %struct.l_class_OC_small*
%4 = alloca %struct.l_class_OC_small*
store %struct.l_class_OC_small* %0, %struct.l_class_OC_small** %2
%5 = load %struct.l_class_OC_small*, %struct.l_class_OC_small** %2
store %struct.l_class_OC_small* %5, %struct.l_class_OC_small** %3
%6 = load %struct.l_class_OC_small*, %struct.l_class_OC_small** %3
store %struct.l_class_OC_small* %6, %struct.l_class_OC_small** %4
%7 = load %struct.l_class_OC_small*, %struct.l_class_OC_small** %4
%8 = call i32 @_ZN5smallC2Ev(%struct.l_class_OC_small* %7)
ret void
}

LLVM IR (-O2):
%struct.l_class_OC_small = type { i32 }
define void @_ZN5smallC1Ev(%struct.l_class_OC_small* %0) {
%2 = tail call i32 @_ZN5smallC2Ev(%struct.l_class_OC_small* %0)
ret void
}
float fz_clamp(float f, float min, float max) {
  return (f > min ? (f < max ? f : max) : min);
}


x86 assembly (clang, -O0):
<fz_clamp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    115d <fz_clamp+0x5d>
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1144 <fz_clamp+0x44>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    114e <fz_clamp+0x4e>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1167 <fz_clamp+0x67>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fz_clamp>:
movaps %xmm1,%xmm3
cmpltss %xmm0,%xmm3
minss  %xmm2,%xmm0
andps  %xmm3,%xmm0
andnps %xmm1,%xmm3
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @fz_clamp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp ogt float %7, %8
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load float, float* %4
%12 = load float, float* %6
%13 = fcmp olt float %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load float, float* %4
br label %18
16: ; preds = %10
%17 = load float, float* %6
br label %18
18: ; preds = %16, %14
%19 = phi float [ %15, %14 ], [ %17, %16 ]
br label %22
20: ; preds = %3
%21 = load float, float* %5
br label %22
22: ; preds = %20, %18
%23 = phi float [ %19, %18 ], [ %21, %20 ]
ret float %23
}

LLVM IR (-O2):
define float @fz_clamp(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %1
%5 = fcmp olt float %0, %2
%6 = select i1 %5, float %0, float %2
%7 = select i1 %4, float %6, float %1
ret float %7
}
/* Variables and functions */
char *malloc(size_t);
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *getInfo() {
  char *name;
  size_t size;
  size = strlen("Lines (C) 2004 Panayotis Katsaloulis http://www.panayotis.com "
                "under GNU GPL");
  name = malloc(size + 1);
  strncpy(name,
          ("Lines (C) 2004 Panayotis Katsaloulis http://www.panayotis.com "
           "under GNU GPL"),
          size + 1);
  return name;
}


x86 assembly (clang, -O0):
<getInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
lea    0xe94(%rip),%rsi
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInfo>:
push   %rbx
mov    $0x4c,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    $0x4c,%edx
mov    %rax,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [76 x i8] c"Lines (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under GNU GPL\00"
define i8* @getInfo() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i64 @strlen(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = add i64 %4, 1
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %1
%7 = load i8*, i8** %1
%8 = load i64, i64* %2
%9 = add i64 %8, 1
%10 = call i32 @strncpy(i8* %7, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [76 x i8] c"Lines (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under GNU GPL\00"
define i8* @getInfo() {
%1 = tail call dereferenceable_or_null(76) i8* @malloc(i64 76)
%2 = tail call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i64 76)
ret i8* %1
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t I2CFIFODataPutNonBlocking(uint32_t ui32Base, uint8_t ui8Data) {
  ;
  if ((*((volatile uint32_t *)(ui32Base + 0x00000F08))) & 0x00000002) {
    return (0);
  } else {
    (*((volatile uint32_t *)(ui32Base + 0x00000F00))) = ui8Data;
    return (1);
  }
}


x86 assembly (clang, -O0):
<I2CFIFODataPutNonBlocking>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xf08,%eax
cltq
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     112e <I2CFIFODataPutNonBlocking+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1144 <I2CFIFODataPutNonBlocking+0x44>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
add    $0xf00,%eax
cltq
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CFIFODataPutNonBlocking>:
movslq %edi,%rcx
xor    %eax,%eax
testl  $0x2,0xf08(%rcx)
jne    111c <I2CFIFODataPutNonBlocking+0x1c>
mov    %esi,0xf00(%rcx)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @I2CFIFODataPutNonBlocking(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 3848
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = add nsw i32 %0, 3840
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
store volatile i32 %1, i32* %12
br label %13
13: ; preds = %2, %9
%14 = phi i32 [ 1, %9 ], [ 0, %2 ]
ret i32 %14
}
unsigned char read_char_direct(void) {
  unsigned char c, *cp;
  cp = (unsigned char *)0xbd000020;
  while (1) {
    if (*(cp + 0x14) & 0x01) {
      c = (volatile unsigned char)*cp;
      return c;
    }
    cp++;
    cp--;
  }
}


x86 assembly (clang, -O0):
<read_char_direct>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbd000020,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x14(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1130 <read_char_direct+0x30>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    110d <read_char_direct+0xd>

x86 assembly (clang, -O2):
<read_char_direct>:
mov    $0xbd000020,%eax
testb  $0x1,0x14(%rax)
jne    1112 <read_char_direct+0x12>
nopl   0x0(%rax,%rax,1)
jmp    1110 <read_char_direct+0x10>
mov    (%rax),%al
ret

LLVM IR (-O0):
define zeroext i8 @read_char_direct() {
%1 = alloca i8
%2 = alloca i8*
store i8* inttoptr (i64 3170893856 to i8*), i8** %2
br label %3
3: ; preds = %0, %14
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 20
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
store i8 %12, i8* %1
%13 = load i8, i8* %1
ret i8 %13
14: ; preds = %3
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %2
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 -1
store i8* %18, i8** %2
br label %3
}

LLVM IR (-O2):
define zeroext i8 @read_char_direct() {
%1 = load i8, i8* inttoptr (i64 3170893876 to i8*)
%2 = and i8 %1, 1
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0, %4
br label %4
5: ; preds = %0
%6 = load i8, i8* inttoptr (i64 3170893856 to i8*)
ret i8 %6
}
void glgscan_(record, feed_no, return_code) float *record;
int *feed_no, *return_code;
{}


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

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

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

LLVM IR (-O2):
define void @glgscan_(float* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
char *langDbgDevHbi55() { return "Sony HBI-55"; }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Sony HBI-55\00"
define i8* @langDbgDevHbi55() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"Sony HBI-55\00"
define i8* @langDbgDevHbi55() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int SIGALRM;
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *);
void timeout(int sig) {
  if (sig == SIGALRM)
    printf("Time out!\n");
  alarm(2);
}


x86 assembly (clang, -O0):
<timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1149 <timeout+0x29>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeout>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
jne    1138 <timeout+0x18>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
pop    %rax
jmp    1040 <alarm@plt>

LLVM IR (-O0):
@SIGALRM = global i32 0
@.str = [11 x i8] c"Time out!\0A\00"
define void @timeout(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGALRM
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = call i32 @alarm(i32 2)
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@str = [10 x i8] c"Time out!\00"
define void @timeout(i32 %0) {
%2 = load i32, i32* @SIGALRM
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @alarm(i32 2)
ret void
}
int prepare_2D_loc(double *coord_3D) { coord_3D[2] = 0.0; }


x86 assembly (clang, -O0):
<prepare_2D_loc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prepare_2D_loc>:
movq   $0x0,0x10(%rdi)
ret

LLVM IR (-O0):
define i32 @prepare_2D_loc(double* %0) {
%2 = alloca i32
%3 = alloca double*
store double* %0, double** %3
%4 = load double*, double** %3
%5 = getelementptr inbounds double, double* %4, i64 2
store double 0.000000e+00, double* %5
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @prepare_2D_loc(double* nocapture writeonly %0) {
%2 = getelementptr inbounds double, double* %0, i64 2
store double 0.000000e+00, double* %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ init_epilogue();
int /*<<< orphan*/ init_space();
int /*<<< orphan*/ set_flg_skip_scene_ending(int /*<<< orphan*/);
void init_ending(void) {
  set_flg_skip_scene_ending(0);
  init_space();
  init_epilogue();
}


x86 assembly (clang, -O0):
<init_ending>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <set_flg_skip_scene_ending@plt>
mov    $0x0,%al
call   1040 <init_space@plt>
mov    $0x0,%al
call   1030 <init_epilogue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_ending>:
push   %rax
xor    %edi,%edi
call   1050 <set_flg_skip_scene_ending@plt>
xor    %eax,%eax
call   1040 <init_space@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <init_epilogue@plt>

LLVM IR (-O0):
define void @init_ending() {
%1 = call i32 @set_flg_skip_scene_ending(i32 0)
%2 = call i32 (...) @init_space()
%3 = call i32 (...) @init_epilogue()
ret void
}

LLVM IR (-O2):
define void @init_ending() {
%1 = tail call i32 @set_flg_skip_scene_ending(i32 0)
%2 = tail call i32 (...) @init_space()
%3 = tail call i32 (...) @init_epilogue()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
void test00_head() {
  do {
    printf("test00");
    puts("");
  } while (0);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test00_head+0x9>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"test00\00"
@.str.1 = [1 x i8] zeroinitializer
define void @test00_head() {
br label %1
1: ; preds = %0
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"test00\00"
define void @test00_head() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int EC_GROUP_get_curve_name(int /*<<< orphan*/);
int /*<<< orphan*/ EC_KEY_get0_group(int /*<<< orphan*/);
int /*<<< orphan*/ EVP_PKEY_get0(int /*<<< orphan*/ *);
int /*<<< orphan*/ OBJ_nid2obj(int);
int i2d_ASN1_OBJECT(int /*<<< orphan*/, unsigned char **);
int gost2001_param_encode(const EVP_PKEY *pkey, unsigned char **pder) {
  int nid = EC_GROUP_get_curve_name(
      EC_KEY_get0_group(EVP_PKEY_get0((EVP_PKEY *)pkey)));
  return i2d_ASN1_OBJECT(OBJ_nid2obj(nid), pder);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <EVP_PKEY_get0@plt>
mov    %eax,%edi
call   1050 <EC_KEY_get0_group@plt>
mov    %eax,%edi
call   1060 <EC_GROUP_get_curve_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <OBJ_nid2obj@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1070 <i2d_ASN1_OBJECT@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbx
mov    %rsi,%rbx
call   1040 <EVP_PKEY_get0@plt>
mov    %eax,%edi
call   1050 <EC_KEY_get0_group@plt>
mov    %eax,%edi
call   1060 <EC_GROUP_get_curve_name@plt>
mov    %eax,%edi
call   1030 <OBJ_nid2obj@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1070 <i2d_ASN1_OBJECT@plt>

LLVM IR (-O0):
define i32 @gost2001_param_encode(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
%5 = alloca i32
store i32* %0, i32** %3
store i8** %1, i8*** %4
%6 = load i32*, i32** %3
%7 = call i32 @EVP_PKEY_get0(i32* %6)
%8 = call i32 @EC_KEY_get0_group(i32 %7)
%9 = call i32 @EC_GROUP_get_curve_name(i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = call i32 @OBJ_nid2obj(i32 %10)
%12 = load i8**, i8*** %4
%13 = call i32 @i2d_ASN1_OBJECT(i32 %11, i8** %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @gost2001_param_encode(i32* %0, i8** %1) {
%3 = tail call i32 @EVP_PKEY_get0(i32* %0)
%4 = tail call i32 @EC_KEY_get0_group(i32 %3)
%5 = tail call i32 @EC_GROUP_get_curve_name(i32 %4)
%6 = tail call i32 @OBJ_nid2obj(i32 %5)
%7 = tail call i32 @i2d_ASN1_OBJECT(i32 %6, i8** %1)
ret i32 %7
}
/* Variables and functions */
long double M_PI_2;
long double asinl(long double);
long double acosl(long double x) { return (M_PI_2 - asinl(x)); }


x86 assembly (clang, -O0):
<acosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ec3(%rip),%rax
fldt   (%rax)
fstpt  -0x1c(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <asinl@plt>
fldt   -0x1c(%rbp)
fsubp  %st,%st(1)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosl>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
mov    0x2ec9(%rip),%rax
fldt   (%rax)
fstpt  0x1c(%rsp)
fstpt  (%rsp)
call   1030 <asinl@plt>
fldt   0x1c(%rsp)
fsubp  %st,%st(1)
add    $0x28,%rsp
ret

LLVM IR (-O0):
@M_PI_2 = global x86_fp80 0xK00000000000000000000
define x86_fp80 @acosl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* @M_PI_2
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 @asinl(x86_fp80 %4)
%6 = fsub x86_fp80 %3, %5
ret x86_fp80 %6
}

LLVM IR (-O2):
@M_PI_2 = global x86_fp80 0xK00000000000000000000
define x86_fp80 @acosl(x86_fp80 %0) {
%2 = load x86_fp80, x86_fp80* @M_PI_2
%3 = tail call x86_fp80 @asinl(x86_fp80 %0)
%4 = fsub x86_fp80 %2, %3
ret x86_fp80 %4
}
float k2_mix(float a, float b, float r) { return (1.0f - r) * a + r * b; }


x86 assembly (clang, -O0):
<k2_mix>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  0xee5(%rip),%xmm0
subss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<k2_mix>:
movss  0xef8(%rip),%xmm3
subss  %xmm2,%xmm3
mulss  %xmm2,%xmm1
mulss  %xmm3,%xmm0
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @k2_mix(float %0, float %1, float %2) {
%4 = fsub float 1.000000e+00, %2
%5 = fmul float %1, %2
%6 = tail call float @llvm.fmuladd.f32(float %4, float %0, float %5)
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int d_word(FILE *stream) {
  int word = fgetc(stream);
  word |= fgetc(stream) << 8;
  word |= fgetc(stream) << 16;
  word |= fgetc(stream) << 24;
  return word;
}


x86 assembly (clang, -O0):
<d_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
shl    $0x18,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_word>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <fgetc@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
or     %r14d,%ebp
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
mov    %r15,%rdi
call   1030 <fgetc@plt>
shl    $0x18,%eax
or     %ebx,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @d_word(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fgetc(i32* %4)
store i32 %5, i32* %3
%6 = load i32*, i32** %2
%7 = call i32 @fgetc(i32* %6)
%8 = shl i32 %7, 8
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
%11 = load i32*, i32** %2
%12 = call i32 @fgetc(i32* %11)
%13 = shl i32 %12, 16
%14 = load i32, i32* %3
%15 = or i32 %14, %13
store i32 %15, i32* %3
%16 = load i32*, i32** %2
%17 = call i32 @fgetc(i32* %16)
%18 = shl i32 %17, 24
%19 = load i32, i32* %3
%20 = or i32 %19, %18
store i32 %20, i32* %3
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @d_word(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = shl i32 %3, 8
%5 = or i32 %4, %2
%6 = tail call i32 @fgetc(i32* %0)
%7 = shl i32 %6, 16
%8 = or i32 %5, %7
%9 = tail call i32 @fgetc(i32* %0)
%10 = shl i32 %9, 24
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int SymSymExprWithDiffTypes(void *p) {
  int i;
  scanf("%d", &i);
  int j = (i % (int)(long)p);
  return 5 / j;
}


x86 assembly (clang, -O0):
<SymSymExprWithDiffTypes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    $0x5,%eax
cltd
idivl  -0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SymSymExprWithDiffTypes>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xee1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1030 <scanf@plt>
mov    0xc(%rsp),%eax
cltd
idiv   %ebx
mov    %edx,%ecx
mov    $0x5,%eax
xor    %edx,%edx
idiv   %ecx
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @SymSymExprWithDiffTypes(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = load i8*, i8** %2
%8 = ptrtoint i8* %7 to i64
%9 = trunc i64 %8 to i32
%10 = srem i32 %6, %9
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = sdiv i32 5, %11
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @SymSymExprWithDiffTypes(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = ptrtoint i8* %0 to i64
%7 = trunc i64 %6 to i32
%8 = srem i32 %5, %7
%9 = sdiv i32 5, %8
ret i32 %9
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ memset(char *, char, int);
char *rumStrmake(int n, char c) {
  char *str = malloc(n + 1);
  memset(str, c, n);
  str[n] = '\0';
  return str;
}


x86 assembly (clang, -O0):
<rumStrmake>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%edx
movsbl %al,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rumStrmake>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebx
lea    0x1(%rbx),%edi
call   1040 <malloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <memset@plt>
movslq %ebx,%rax
movb   $0x0,0x0(%rbp,%rax,1)
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @rumStrmake(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
%8 = call i8* @malloc(i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8, i8* %4
%11 = load i32, i32* %3
%12 = call i32 @memset(i8* %9, i8 signext %10, i32 %11)
%13 = load i8*, i8** %5
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
store i8 0, i8* %16
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @rumStrmake(i32 %0, i8 signext %1) {
%3 = add nsw i32 %0, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @memset(i8* %4, i8 signext %1, i32 %0)
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
store i8 0, i8* %7
ret i8* %4
}
/* Type definitions */
struct tm {
  int tm_mon;
};

/* Variables and functions */
int valid_tm_mon(const struct tm *date) {
  if (0 <= date->tm_mon && date->tm_mon <= 11)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<valid_tm_mon>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    (%rcx),%eax
jg     112f <valid_tm_mon+0x2f>
mov    -0x10(%rbp),%rax
cmpl   $0xb,(%rax)
jg     112f <valid_tm_mon+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1136 <valid_tm_mon+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_tm_mon>:
xor    %eax,%eax
cmpl   $0xc,(%rdi)
setb   %al
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @valid_tm_mon(%struct.tm* %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %3
%4 = load %struct.tm*, %struct.tm** %3
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = icmp sle i32 0, %6
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load %struct.tm*, %struct.tm** %3
%10 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = icmp sle i32 %11, 11
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %2
br label %15
14: ; preds = %8, %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @valid_tm_mon(%struct.tm* nocapture %0) {
%2 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 12
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
double exp(int);
double T_(int x) {
  double tempurature;
  double variable = 25.0;
  tempurature = exp(-x / variable);
}


x86 assembly (clang, -O0):
<T_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
movsd  0xedd(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
divsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<T_>:
neg    %edi
cvtsi2sd %edi,%xmm0
divsd  0xee2(%rip),%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @T_(i32 %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store i32 %0, i32* %3
store double 2.500000e+01, double* %5
%6 = load i32, i32* %3
%7 = sub nsw i32 0, %6
%8 = sitofp i32 %7 to double
%9 = load double, double* %5
%10 = fdiv double %8, %9
%11 = fptosi double %10 to i32
%12 = call double @exp(i32 %11)
store double %12, double* %4
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @T_(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 2.500000e+01
%5 = fptosi double %4 to i32
%6 = tail call double @exp(i32 %5)
ret double undef
}