xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test(int, int, int, int);
int main() {
  test(7, 8, -5, 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%edi
mov    $0x8,%esi
mov    $0xfffffffb,%edx
mov    $0x5,%ecx
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
mov    $0x8,%esi
mov    $0xfffffffb,%edx
mov    $0x5,%ecx
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 7, i32 8, i32 -5, i32 5)
ret i32 0
}
void rop3_83_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D ^ S;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_83_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_83_1_1>:
mov    (%rdi),%al
mov    %edx,%ecx
or     %sil,%cl
not    %cl
and    %al,%sil
or     %cl,%sil
and    %dl,%al
or     %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_83_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = xor i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = xor i32 %40, -1
%42 = and i32 %38, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %5
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = load i8*, i8** %4
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = load i8, i8* %6
%54 = zext i8 %53 to i32
%55 = and i32 %52, %54
%56 = or i32 %49, %55
%57 = trunc i32 %56 to i8
%58 = load i8*, i8** %4
store i8 %57, i8* %58
ret void
}

LLVM IR (-O2):
define void @rop3_83_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = xor i8 %5, -1
%7 = and i8 %4, %1
%8 = or i8 %7, %6
%9 = and i8 %4, %2
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
unsigned int rev32(unsigned int c) {
  c = ((c & 0x0000FFFF) << 16) | ((c & 0xFFFF0000) >> 16);
  c = ((c & 0x00FF00FF) << 8) | ((c & 0xFF00FF00) >> 8);
  c = ((c & 0x0F0F0F0F) << 4) | ((c & 0xF0F0F0F0) >> 4);
  c = ((c & 0x33333333) << 2) | ((c & 0xCCCCCCCC) >> 2);
  c = ((c & 0x55555555) << 1) | ((c & 0xAAAAAAAA) >> 1);
  return c;
}


x86 assembly (clang, -O0):
<rev32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
shl    $0x10,%eax
mov    -0x4(%rbp),%ecx
and    $0xffff0000,%ecx
shr    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00ff,%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00ff00,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0f0f0f,%eax
shl    $0x4,%eax
mov    -0x4(%rbp),%ecx
and    $0xf0f0f0f0,%ecx
shr    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33333333,%eax
shl    $0x2,%eax
mov    -0x4(%rbp),%ecx
and    $0xcccccccc,%ecx
shr    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55555555,%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0xaaaaaaaa,%ecx
shr    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev32>:
bswap  %edi
mov    %edi,%eax
and    $0xf0f0f0f,%eax
shl    $0x4,%eax
shr    $0x4,%edi
and    $0xf0f0f0f,%edi
or     %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
lea    (%rdi,%rax,4),%eax
mov    %eax,%ecx
and    $0x55555555,%ecx
shr    %eax
and    $0x55555555,%eax
lea    (%rax,%rcx,2),%eax
ret

LLVM IR (-O0):
define i32 @rev32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
%5 = shl i32 %4, 16
%6 = load i32, i32* %2
%7 = and i32 %6, -65536
%8 = lshr i32 %7, 16
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 16711935
%12 = shl i32 %11, 8
%13 = load i32, i32* %2
%14 = and i32 %13, -16711936
%15 = lshr i32 %14, 8
%16 = or i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = and i32 %17, 252645135
%19 = shl i32 %18, 4
%20 = load i32, i32* %2
%21 = and i32 %20, -252645136
%22 = lshr i32 %21, 4
%23 = or i32 %19, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
%25 = and i32 %24, 858993459
%26 = shl i32 %25, 2
%27 = load i32, i32* %2
%28 = and i32 %27, -858993460
%29 = lshr i32 %28, 2
%30 = or i32 %26, %29
store i32 %30, i32* %2
%31 = load i32, i32* %2
%32 = and i32 %31, 1431655765
%33 = shl i32 %32, 1
%34 = load i32, i32* %2
%35 = and i32 %34, -1431655766
%36 = lshr i32 %35, 1
%37 = or i32 %33, %36
store i32 %37, i32* %2
%38 = load i32, i32* %2
ret i32 %38
}

LLVM IR (-O2):
define i32 @rev32(i32 %0) {
%2 = tail call i32 @llvm.bitreverse.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ errno;
void C_pegasock_reset_errno() { errno = 0; }


x86 assembly (clang, -O0):
<C_pegasock_reset_errno>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_pegasock_reset_errno>:
mov    0x2ed9(%rip),%rax
movq   $0x0,(%rax)
ret

LLVM IR (-O0):
@errno = global i64 0
define void @C_pegasock_reset_errno() {
store i64 0, i64* @errno
ret void
}

LLVM IR (-O2):
@errno = global i64 0
define void @C_pegasock_reset_errno() {
store i64 0, i64* @errno
ret void
}
/* Variables and functions */
int /*<<< orphan*/ motorSet(int, int);
void driveMotors(int leftSpeed, int rightSpeed) {
  motorSet(8, -rightSpeed);
  motorSet(9, -rightSpeed);
  motorSet(10, -rightSpeed);
  motorSet(3, leftSpeed);
  motorSet(2, leftSpeed);
  motorSet(1, leftSpeed);
}


x86 assembly (clang, -O0):
<driveMotors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %esi,%esi
sub    -0x8(%rbp),%esi
mov    $0x8,%edi
call   1030 <motorSet@plt>
xor    %esi,%esi
sub    -0x8(%rbp),%esi
mov    $0x9,%edi
call   1030 <motorSet@plt>
xor    %esi,%esi
sub    -0x8(%rbp),%esi
mov    $0xa,%edi
call   1030 <motorSet@plt>
mov    -0x4(%rbp),%esi
mov    $0x3,%edi
call   1030 <motorSet@plt>
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1030 <motorSet@plt>
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
call   1030 <motorSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<driveMotors>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
neg    %ebp
mov    $0x8,%edi
mov    %ebp,%esi
call   1030 <motorSet@plt>
mov    $0x9,%edi
mov    %ebp,%esi
call   1030 <motorSet@plt>
mov    $0xa,%edi
mov    %ebp,%esi
call   1030 <motorSet@plt>
mov    $0x3,%edi
mov    %ebx,%esi
call   1030 <motorSet@plt>
mov    $0x2,%edi
mov    %ebx,%esi
call   1030 <motorSet@plt>
mov    $0x1,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <motorSet@plt>

LLVM IR (-O0):
define void @driveMotors(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sub nsw i32 0, %5
%7 = call i32 @motorSet(i32 8, i32 %6)
%8 = load i32, i32* %4
%9 = sub nsw i32 0, %8
%10 = call i32 @motorSet(i32 9, i32 %9)
%11 = load i32, i32* %4
%12 = sub nsw i32 0, %11
%13 = call i32 @motorSet(i32 10, i32 %12)
%14 = load i32, i32* %3
%15 = call i32 @motorSet(i32 3, i32 %14)
%16 = load i32, i32* %3
%17 = call i32 @motorSet(i32 2, i32 %16)
%18 = load i32, i32* %3
%19 = call i32 @motorSet(i32 1, i32 %18)
ret void
}

LLVM IR (-O2):
define void @driveMotors(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = tail call i32 @motorSet(i32 8, i32 %3)
%5 = tail call i32 @motorSet(i32 9, i32 %3)
%6 = tail call i32 @motorSet(i32 10, i32 %3)
%7 = tail call i32 @motorSet(i32 3, i32 %0)
%8 = tail call i32 @motorSet(i32 2, i32 %0)
%9 = tail call i32 @motorSet(i32 1, i32 %0)
ret void
}
/* Variables and functions */
float sqrt(float);
float rms(float a, float b) { return sqrt((a * a + b * b) / 2); }


x86 assembly (clang, -O0):
<rms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xeba(%rip),%xmm1
divss  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rms>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
mulss  0xedc(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1131 <rms+0x21>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define float @rms(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* %3
%7 = load float, float* %4
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = call float @llvm.fmuladd.f32(float %5, float %6, float %9)
%11 = fdiv float %10, 2.000000e+00
%12 = call float @sqrt(float %11)
ret float %12
}

LLVM IR (-O2):
define float @rms(float %0, float %1) {
%3 = fmul float %1, %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %3)
%5 = fmul float %4, 5.000000e-01
%6 = tail call float @sqrt(float %5)
ret float %6
}
int *hop(int *elem) { return elem + *elem; }


x86 assembly (clang, -O0):
<hop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hop>:
movslq (%rdi),%rax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define i32* @hop(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %3, i64 %6
ret i32* %7
}

LLVM IR (-O2):
define i32* @hop(i32* %0) {
%2 = load i32, i32* %0
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ output(int, int, int, int, int, int, int, int);
main() {
  if (0) {
    output(0, 0, 0, 0, 0, 0, 0, 1);
  }
  if (1) {
    output(1, 1, 1, 1, 1, 1, 1, 1);
  }
  if (1 > 2) {
    output(0, 0, 0, 0, 0, 0, 0, 2);
  } else {
    output(1, 1, 1, 1, 1, 1, 1, 2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x1,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <output@plt>
mov    $0x1,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x1,(%rsp)
movl   $0x2,0x8(%rsp)
call   1030 <output@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
push   $0x1
push   $0x1
call   1030 <output@plt>
add    $0x10,%rsp
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
push   $0x2
push   $0x1
call   1030 <output@plt>
add    $0x10,%rsp
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @output(i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1)
%2 = tail call i32 @output(i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 2)
ret i32 0
}
void g_mem_chunk_clean() {}


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

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

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

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

/* Variables and functions */
scalar_t__ strpbrk(char *, char *);
wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2) {
  return (wchar_t *)strpbrk((char *)s1, (char *)s2);
}


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

x86 assembly (clang, -O2):
<wcspbrk>:
jmp    1030 <strpbrk@plt>

LLVM IR (-O0):
define i32* @wcspbrk(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 = bitcast i32* %5 to i8*
%7 = load i32*, i32** %4
%8 = bitcast i32* %7 to i8*
%9 = call i64 @strpbrk(i8* %6, i8* %8)
%10 = inttoptr i64 %9 to i32*
ret i32* %10
}

LLVM IR (-O2):
define i32* @wcspbrk(i32* %0, i32* %1) {
%3 = bitcast i32* %0 to i8*
%4 = bitcast i32* %1 to i8*
%5 = tail call i64 @strpbrk(i8* %3, i8* %4)
%6 = inttoptr i64 %5 to i32*
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ HEX_IsHex(char const);
int HEX_IsHexString(const char *str) {
  int ok = 1;
  while (str != 0) {
    if (!HEX_IsHex(*str)) {
      ok = 0;
      break;
    }
    str++;
  }
  return ok;
}


x86 assembly (clang, -O0):
<HEX_IsHexString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1160 <HEX_IsHexString+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <HEX_IsHex@plt>
cmp    $0x0,%eax
jne    114f <HEX_IsHexString+0x3f>
movl   $0x0,-0xc(%rbp)
jmp    1160 <HEX_IsHexString+0x50>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <HEX_IsHexString+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HEX_IsHexString>:
test   %rdi,%rdi
je     1134 <HEX_IsHexString+0x24>
push   %rbx
mov    %rdi,%rbx
nopl   0x0(%rax)
movsbl (%rbx),%edi
call   1030 <HEX_IsHex@plt>
add    $0x1,%rbx
test   %eax,%eax
jne    1120 <HEX_IsHexString+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @HEX_IsHexString(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i32 @HEX_IsHex(i8 signext %5)
%7 = icmp eq i32 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ 0, %3 ]
ret i32 %10
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ rand();
float random_float(void) { return (float)rand() / RAND_MAX; }


x86 assembly (clang, -O0):
<random_float>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
divss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_float>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
divss  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define float @random_float() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load float, float* @RAND_MAX
%4 = fdiv float %2, %3
ret float %4
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define float @random_float() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load float, float* @RAND_MAX
%4 = fdiv float %2, %3
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
void c_format_log_time(time_t src, char *dest) {
  struct tm t;
  localtime_r(&src, &t);
  strftime(dest, 40, "%d/%b/%Y:%H:%M:%S %z", &t);
}


x86 assembly (clang, -O0):
<c_format_log_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <localtime_r@plt>
mov    -0x10(%rbp),%rdi
mov    $0x28,%esi
lea    0xeb4(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_format_log_time>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
call   1030 <localtime_r@plt>
lea    0xeb9(%rip),%rdx
mov    %rbx,%rdi
mov    $0x28,%esi
mov    %r14,%rcx
call   1040 <strftime@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [21 x i8] c"%d/%b/%Y:%H:%M:%S %z\00"
define void @c_format_log_time(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.tm
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call i32 @localtime_r(i32* %3, %struct.tm* %5)
%7 = load i8*, i8** %4
%8 = call i32 @strftime(i8* %7, i32 40, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [21 x i8] c"%d/%b/%Y:%H:%M:%S %z\00"
define void @c_format_log_time(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.tm
store i32 %0, i32* %3
%5 = bitcast %struct.tm* %4 to i8*
%6 = call i32 @localtime_r(i32* %3, %struct.tm* %4)
%7 = call i32 @strftime(i8* %1, i32 40, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret void
}
int test5() {
  return ({
    L1:
    L2:
    L3:
      5;
  });
}


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <test5+0x9>
jmp    110e <test5+0xe>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test5() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ ActionsDraw();
int /*<<< orphan*/ LeftPanelBgDraw();
int /*<<< orphan*/ SystemDiscsDraw();
void DrawLeftPanel() {
  SystemDiscsDraw();
  ActionsDraw();
  LeftPanelBgDraw();
}


x86 assembly (clang, -O0):
<DrawLeftPanel>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SystemDiscsDraw@plt>
mov    $0x0,%al
call   1040 <ActionsDraw@plt>
mov    $0x0,%al
call   1050 <LeftPanelBgDraw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawLeftPanel>:
push   %rax
xor    %eax,%eax
call   1030 <SystemDiscsDraw@plt>
xor    %eax,%eax
call   1040 <ActionsDraw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <LeftPanelBgDraw@plt>

LLVM IR (-O0):
define void @DrawLeftPanel() {
%1 = call i32 (...) @SystemDiscsDraw()
%2 = call i32 (...) @ActionsDraw()
%3 = call i32 (...) @LeftPanelBgDraw()
ret void
}

LLVM IR (-O2):
define void @DrawLeftPanel() {
%1 = tail call i32 (...) @SystemDiscsDraw()
%2 = tail call i32 (...) @ActionsDraw()
%3 = tail call i32 (...) @LeftPanelBgDraw()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_PWR(int /*<<< orphan*/);
int gen_PWR() {
  handle_PWR(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gen_PWR() {
%1 = call i32 @handle_PWR(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_PWR() {
%1 = tail call i32 @handle_PWR(i32 0)
ret i32 0
}
/* Variables and functions */
char *strncpy(char *, char const *, size_t);
char *wustrncpy(char *dest, const char *src, size_t n) {
  dest[n - 1] = '\0';
  return strncpy(dest, src, n - 1);
}


x86 assembly (clang, -O0):
<wustrncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wustrncpy>:
movb   $0x0,-0x1(%rdi,%rdx,1)
add    $0xffffffffffffffff,%rdx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define i8* @wustrncpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %6
%9 = sub i64 %8, 1
%10 = getelementptr inbounds i8, i8* %7, i64 %9
store i8 0, i8* %10
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = sub i64 %13, 1
%15 = call i8* @strncpy(i8* %11, i8* %12, i64 %14)
ret i8* %15
}

LLVM IR (-O2):
define i8* @wustrncpy(i8* returned %0, i8* nocapture %1, i64 %2) {
%4 = add i64 %2, -1
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %5
%6 = tail call i8* @strncpy(i8* dereferenceable(1) %0, i8* %1, i64 %4)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ yield_to(int);
void yield(void) { yield_to(-1); }


x86 assembly (clang, -O0):
<yield>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <yield_to@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<yield>:
mov    $0xffffffff,%edi
jmp    1030 <yield_to@plt>

LLVM IR (-O0):
define void @yield() {
%1 = call i32 @yield_to(i32 -1)
ret void
}

LLVM IR (-O2):
define void @yield() {
%1 = tail call i32 @yield_to(i32 -1)
ret void
}
/* Type definitions */
struct flashrom_flashctx {
  int dummy;
};

/* Variables and functions */
int spi_simple_write_cmd(struct flashrom_flashctx *, int, int);
int spi_chip_erase_60(struct flashrom_flashctx *flash) {
  return spi_simple_write_cmd(flash, 0x60, 1000 * 1000);
}


x86 assembly (clang, -O0):
<spi_chip_erase_60>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x60,%esi
mov    $0xf4240,%edx
call   1030 <spi_simple_write_cmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_chip_erase_60>:
mov    $0x60,%esi
mov    $0xf4240,%edx
jmp    1030 <spi_simple_write_cmd@plt>

LLVM IR (-O0):
%struct.flashrom_flashctx = type { i32 }
define i32 @spi_chip_erase_60(%struct.flashrom_flashctx* %0) {
%2 = alloca %struct.flashrom_flashctx*
store %struct.flashrom_flashctx* %0, %struct.flashrom_flashctx** %2
%3 = load %struct.flashrom_flashctx*, %struct.flashrom_flashctx** %2
%4 = call i32 @spi_simple_write_cmd(%struct.flashrom_flashctx* %3, i32 96, i32 1000000)
ret i32 %4
}

LLVM IR (-O2):
%struct.flashrom_flashctx = type { i32 }
define i32 @spi_chip_erase_60(%struct.flashrom_flashctx* %0) {
%2 = tail call i32 @spi_simple_write_cmd(%struct.flashrom_flashctx* %0, i32 96, i32 1000000)
ret i32 %2
}
void end_lis() {}


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

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

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

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


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

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

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

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

/* Variables and functions */
int stats_init_and_reg(void *a, uint8_t b, uint8_t c, void *d, uint8_t e,
                       const char *f) {
  return 0;
}


x86 assembly (clang, -O0):
<stats_init_and_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @stats_init_and_reg(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i8* %5, i8** %12
ret i32 0
}

LLVM IR (-O2):
define i32 @stats_init_and_reg(i8* nocapture readnone %0, i32 %1, i32 %2, i8* nocapture readnone %3, i32 %4, i8* nocapture readnone %5) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M20_f(char *s) {
  debug("M20_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M20_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M20_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"M20_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M20_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"M20_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M20_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ failure(char *);
scalar_t__ list_empty(struct list *);
void test_non_empty(struct list *list) {
  if (list_empty(list))
    failure("should not have been empty");
}


x86 assembly (clang, -O0):
<test_non_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <list_empty@plt>
cmp    $0x0,%rax
je     114b <test_non_empty+0x2b>
lea    0xeba(%rip),%rdi
call   1030 <failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_non_empty>:
push   %rax
call   1040 <list_empty@plt>
test   %rax,%rax
je     1138 <test_non_empty+0x18>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <failure@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.list = type { i32 }
@.str = [27 x i8] c"should not have been empty\00"
define void @test_non_empty(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
%4 = call i64 @list_empty(%struct.list* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @failure(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
@.str = [27 x i8] c"should not have been empty\00"
define void @test_non_empty(%struct.list* %0) {
%2 = tail call i64 @list_empty(%struct.list* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @failure(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
void gdk_visual_get_best_with_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_visual_get_best_with_type() {
ret void
}
/* Variables and functions */
float const INFINITY;
bool stdlib_base_is_infinitef(const float x) {
  return (x == INFINITY || x == -INFINITY);
}


x86 assembly (clang, -O0):
<stdlib_base_is_infinitef>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x1,%al
mov    0x2ed1(%rip),%rcx
ucomiss (%rcx),%xmm0
mov    %al,-0x5(%rbp)
jne    112e <stdlib_base_is_infinitef+0x2e>
jp     112e <stdlib_base_is_infinitef+0x2e>
jmp    1159 <stdlib_base_is_infinitef+0x59>
movss  -0x4(%rbp),%xmm0
mov    0x2eae(%rip),%rax
movss  (%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_base_is_infinitef>:
xorps  %xmm1,%xmm1
cmpeqss %xmm0,%xmm1
movd   %xmm1,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
@INFINITY = constant float 0.000000e+00
define i32 @stdlib_base_is_infinitef(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* @INFINITY
%5 = fcmp oeq float %3, %4
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load float, float* %2
%8 = load float, float* @INFINITY
%9 = fneg float %8
%10 = fcmp oeq float %7, %9
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ true, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@INFINITY = constant float 0.000000e+00
define i32 @stdlib_base_is_infinitef(float %0) {
%2 = fcmp oeq float %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
void stopCounter(void) {
  int *IO = (int *)(0x3c000000 + 5 * 0x00000020);
  int value;
  value = *IO;
  *IO = value & 0xbfffffff;
}


x86 assembly (clang, -O0):
<stopCounter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3c0000a0,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xbfffffff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stopCounter>:
andb   $0xbf,0x3c0000a3
bf
ret

LLVM IR (-O0):
define void @stopCounter() {
%1 = alloca i32*
%2 = alloca i32
store i32* inttoptr (i64 1006633120 to i32*), i32** %1
%3 = load i32*, i32** %1
%4 = load i32, i32* %3
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, -1073741825
%7 = load i32*, i32** %1
store i32 %6, i32* %7
ret void
}

LLVM IR (-O2):
define void @stopCounter() {
%1 = load i32, i32* inttoptr (i64 1006633120 to i32*)
%2 = and i32 %1, -1073741825
store i32 %2, i32* inttoptr (i64 1006633120 to i32*)
ret void
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int inet_aton(char *, struct in_addr *);
int main(int argc, char **argv) {
  struct in_addr ia;
  return (inet_aton("0.0.0.0", &ia));
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <inet_aton@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@.str = [8 x i8] c"0.0.0.0\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.in_addr
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @inet_aton(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %struct.in_addr* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@.str = [8 x i8] c"0.0.0.0\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.in_addr
%4 = bitcast %struct.in_addr* %3 to i8*
%5 = call i32 @inet_aton(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %struct.in_addr* %3)
ret i32 %5
}
unsigned char *heap_save_str(unsigned char *pStr) {
  return ((unsigned char *)42);
}


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

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

LLVM IR (-O0):
define i8* @heap_save_str(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* inttoptr (i64 42 to i8*)
}

LLVM IR (-O2):
define i8* @heap_save_str(i8* nocapture readnone %0) {
ret i8* inttoptr (i64 42 to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ i2c_close();
int yas_cdrv_term(void) {
  i2c_close();
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @yas_cdrv_term() {
%1 = call i32 (...) @i2c_close()
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_cdrv_term() {
%1 = tail call i32 (...) @i2c_close()
ret i32 0
}
void po(double e1[4], long j, long k, long l) {
  e1[j] = e1[k];
  e1[k] = e1[l];
  e1[l] = e1[j];
  return;
}


x86 assembly (clang, -O0):
<po>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<po>:
movsd  (%rdi,%rdx,8),%xmm0
movsd  %xmm0,(%rdi,%rsi,8)
movsd  (%rdi,%rcx,8),%xmm0
movsd  %xmm0,(%rdi,%rdx,8)
movsd  (%rdi,%rsi,8),%xmm0
movsd  %xmm0,(%rdi,%rcx,8)
ret

LLVM IR (-O0):
define void @po(double* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca double*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store double* %0, double** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load double*, double** %5
%10 = load i64, i64* %7
%11 = getelementptr inbounds double, double* %9, i64 %10
%12 = load double, double* %11
%13 = load double*, double** %5
%14 = load i64, i64* %6
%15 = getelementptr inbounds double, double* %13, i64 %14
store double %12, double* %15
%16 = load double*, double** %5
%17 = load i64, i64* %8
%18 = getelementptr inbounds double, double* %16, i64 %17
%19 = load double, double* %18
%20 = load double*, double** %5
%21 = load i64, i64* %7
%22 = getelementptr inbounds double, double* %20, i64 %21
store double %19, double* %22
%23 = load double*, double** %5
%24 = load i64, i64* %6
%25 = getelementptr inbounds double, double* %23, i64 %24
%26 = load double, double* %25
%27 = load double*, double** %5
%28 = load i64, i64* %8
%29 = getelementptr inbounds double, double* %27, i64 %28
store double %26, double* %29
ret void
}

LLVM IR (-O2):
define void @po(double* nocapture %0, i64 %1, i64 %2, i64 %3) {
%5 = getelementptr inbounds double, double* %0, i64 %2
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %0, i64 %1
store double %6, double* %7
%8 = getelementptr inbounds double, double* %0, i64 %3
%9 = load double, double* %8
store double %9, double* %5
%10 = load double, double* %7
store double %10, double* %8
ret void
}
void ff_hevc_put_hevc_uni_qpel_v64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v64_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eset(int);
char *find(char *, char *, char);
char *_mustFind(char *from, char *upto, char c, int err) {
  char *x = find(from, upto, c);
  if (x)
    return x;
  else {
    eset(err);
    return 0;
  }
}


x86 assembly (clang, -O0):
<_mustFind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movsbl -0x19(%rbp),%edx
call   1040 <find@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1165 <_mustFind+0x45>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <_mustFind+0x55>
mov    -0x20(%rbp),%edi
call   1030 <eset@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mustFind>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
call   1040 <find@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1139 <_mustFind+0x19>
mov    %ebp,%edi
call   1030 <eset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @_mustFind(i8* %0, i8* %1, i8 signext %2, i32 %3) {
%5 = tail call i8* @find(i8* %0, i8* %1, i8 signext %2)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @eset(i32 %3)
br label %9
9: ; preds = %4, %7
ret i8* %5
}
void pcp_def_pcsw_metrics(void) {}


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

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

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

LLVM IR (-O2):
define void @pcp_def_pcsw_metrics() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ type;
typedef int /*<<< orphan*/ size;
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ INT_MIN;
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
long mat_element_open(FILE *file, int32_t type) {
  fwrite(&type, sizeof(type), 1, file);
  long position = ftell(file);
  int32_t size = INT_MIN;
  fwrite(&size, sizeof(size), 1, file);
  return position;
}


x86 assembly (clang, -O0):
<mat_element_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x1c(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat_element_open>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i64 @mat_element_open(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = call i32 @fwrite(i32* %4, i32 4, i32 1, i32* %7)
%9 = load i32*, i32** %3
%10 = call i64 @ftell(i32* %9)
store i64 %10, i64* %5
%11 = load i32, i32* @INT_MIN
store i32 %11, i32* %6
%12 = load i32*, i32** %3
%13 = call i32 @fwrite(i32* %6, i32 4, i32 1, i32* %12)
%14 = load i64, i64* %5
ret i64 %14
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i64 @mat_element_open(i32* nocapture %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %1, i32* %3
%5 = call i32 @fwrite(i32* %3, i32 4, i32 1, i32* %0)
%6 = tail call i64 @ftell(i32* %0)
%7 = bitcast i32* %4 to i8*
%8 = load i32, i32* @INT_MIN
store i32 %8, i32* %4
%9 = call i32 @fwrite(i32* %4, i32 4, i32 1, i32* %0)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  unsigned int x = 0;
  unsigned int y = 1;
  while (x < 6) {
    x++;
    y *= 2;
  }
  __VERIFIER_assert(x != 6);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x6,-0x8(%rbp)
jae    114e <main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x6,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = mul i32 %10, 2
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 6
%15 = zext i1 %14 to i32
%16 = call i32 @__VERIFIER_assert(i32 %15)
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
/* Variables and functions */
bool hashmapIntEquals(void *keyA, void *keyB) {
  int a = *((int *)keyA);
  int b = *((int *)keyB);
  return a == b;
}


x86 assembly (clang, -O0):
<hashmapIntEquals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashmapIntEquals>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @hashmapIntEquals(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @hashmapIntEquals(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void check_option(bool condition, char *msg) {
  if (!condition) {
    fprintf(stderr, "*** %s\n", msg);
    exit(8);
  }
}


x86 assembly (clang, -O0):
<check_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    115c <check_option+0x3c>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x8,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_option>:
test   %edi,%edi
je     1125 <check_option+0x5>
ret
push   %rax
mov    %rsi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x8,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"*** %s\0A\00"
define void @check_option(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = tail call i32 @exit(i32 8)
unreachable
8: ; preds = %2
ret void
}