xunge/DecIR huggingface dataset:
double Sleef_pow_u10(double x, double y) { return __builtin_pow(x, y); }


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

x86 assembly (clang, -O2):
<Sleef_pow_u10>:
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define double @Sleef_pow_u10(double %0, double %1) {
%3 = tail call double @pow(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
char *strerror(int);
int main() {
  for (int i = 0; i < 140; i++) {
    printf("%4d:%s\n", i, strerror(i));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8c,-0x8(%rbp)
jge    1171 <main+0x51>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <strerror@plt>
mov    -0xc(%rbp),%esi
mov    %rax,%rdx
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %ebx,%edi
call   1040 <strerror@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %rax,%rdx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x8c,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%4d:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 140
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i8* @strerror(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %9)
br label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%4d:%s\0A\00"
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %6, %2 ]
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %4)
%6 = add nuw nsw i32 %3, 1
%7 = icmp eq i32 %6, 140
br i1 %7, label %1, label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *, char *);
char *strerror(int /*<<< orphan*/);
void error_errno_print(FILE *fp, const char *func) {
  fprintf(fp, "errno:%s:%s\n", func, strerror(errno));
}


x86 assembly (clang, -O0):
<error_errno_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xea0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_errno_print>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"errno:%s:%s\0A\00"
@errno = global i32 0
define void @error_errno_print(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 = load i8*, i8** %4
%7 = load i32, i32* @errno
%8 = call i8* @strerror(i32 %7)
%9 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"errno:%s:%s\0A\00"
@errno = global i32 0
define void @error_errno_print(i32* nocapture %0, i8* %1) {
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %4)
ret void
}
/* Variables and functions */
scalar_t__ nextafter(double, double);
long double nextafterl(long double x, long double y) {
  return (long double)nextafter((double)x, (double)y);
}


x86 assembly (clang, -O0):
<nextafterl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
call   1030 <nextafter@plt>
mov    %rax,-0x28(%rbp)
fildll -0x28(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextafterl>:
sub    $0x18,%rsp
fldt   0x30(%rsp)
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
fstpl  (%rsp)
movsd  (%rsp),%xmm1
call   1030 <nextafter@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @nextafterl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call i64 @nextafter(double %6, double %8)
%10 = sitofp i64 %9 to x86_fp80
ret x86_fp80 %10
}

LLVM IR (-O2):
define x86_fp80 @nextafterl(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call i64 @nextafter(double %3, double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}
void Interp3(unsigned char *pc, int c1, int c2) {
  *((int *)pc) = ((((c1 & 0x00FF00) * 7 + (c2 & 0x00FF00)) & 0x0007F800) +
                  (((c1 & 0xFF00FF) * 7 + (c2 & 0xFF00FF)) & 0x07F807F8)) >>
                 3;
}


x86 assembly (clang, -O0):
<Interp3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff00,%eax
imul   $0x7,%eax,%ecx
mov    -0x10(%rbp),%eax
and    $0xff00,%eax
add    %eax,%ecx
and    $0x7f800,%ecx
mov    -0xc(%rbp),%eax
and    $0xff00ff,%eax
imul   $0x7,%eax,%eax
mov    -0x10(%rbp),%edx
and    $0xff00ff,%edx
add    %edx,%eax
and    $0x7f807f8,%eax
add    %eax,%ecx
sar    $0x3,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp3>:
mov    %esi,%eax
and    $0xff00,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
mov    %edx,%eax
and    $0xff00,%eax
add    %ecx,%eax
and    $0x7f800,%eax
and    $0xff00ff,%esi
lea    0x0(,%rsi,8),%ecx
sub    %esi,%ecx
and    $0xff00ff,%edx
add    %ecx,%edx
and    $0x7f807f8,%edx
or     %eax,%edx
shr    $0x3,%edx
mov    %edx,(%rdi)
ret

LLVM IR (-O0):
define void @Interp3(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = and i32 %7, 65280
%9 = mul nsw i32 %8, 7
%10 = load i32, i32* %6
%11 = and i32 %10, 65280
%12 = add nsw i32 %9, %11
%13 = and i32 %12, 522240
%14 = load i32, i32* %5
%15 = and i32 %14, 16711935
%16 = mul nsw i32 %15, 7
%17 = load i32, i32* %6
%18 = and i32 %17, 16711935
%19 = add nsw i32 %16, %18
%20 = and i32 %19, 133695480
%21 = add nsw i32 %13, %20
%22 = ashr i32 %21, 3
%23 = load i8*, i8** %4
%24 = bitcast i8* %23 to i32*
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @Interp3(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = and i32 %1, 65280
%5 = mul nuw nsw i32 %4, 7
%6 = and i32 %2, 65280
%7 = add nuw nsw i32 %5, %6
%8 = and i32 %7, 522240
%9 = and i32 %1, 16711935
%10 = mul nuw nsw i32 %9, 7
%11 = and i32 %2, 16711935
%12 = add nuw nsw i32 %10, %11
%13 = and i32 %12, 133695480
%14 = or i32 %8, %13
%15 = lshr exact i32 %14, 3
%16 = bitcast i8* %0 to i32*
store i32 %15, i32* %16
ret void
}
double test() { return 3.0; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @test() {
ret double 3.000000e+00
}

LLVM IR (-O2):
define double @test() {
ret double 3.000000e+00
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ bswap64(scalar_t__);
void minipack_pack_int64(void *ptr, int64_t value, size_t *sz) {
  *sz = 9;
  *((uint8_t *)ptr) = 0xD3;
  *((int64_t *)(ptr + 1)) = (uint64_t)bswap64(value);
}


x86 assembly (clang, -O0):
<minipack_pack_int64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x9,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xd3,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <bswap64@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x1(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minipack_pack_int64>:
push   %rbx
mov    %rdi,%rbx
movq   $0x9,(%rdx)
movl   $0xd3,(%rdi)
mov    %rsi,%rdi
call   1030 <bswap64@plt>
mov    %rax,0x1(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @minipack_pack_int64(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
store i64 9, i64* %7
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32 211, i32* %9
%10 = load i64, i64* %5
%11 = call i64 @bswap64(i64 %10)
%12 = load i8*, i8** %4
%13 = getelementptr i8, i8* %12, i64 1
%14 = bitcast i8* %13 to i64*
store i64 %11, i64* %14
ret void
}

LLVM IR (-O2):
define void @minipack_pack_int64(i8* nocapture writeonly %0, i64 %1, i64* nocapture writeonly %2) {
store i64 9, i64* %2
%4 = bitcast i8* %0 to i32*
store i32 211, i32* %4
%5 = tail call i64 @bswap64(i64 %1)
%6 = getelementptr i8, i8* %0, i64 1
%7 = bitcast i8* %6 to i64*
store i64 %5, i64* %7
ret void
}
/* Variables and functions */
scalar_t__ chaz_CC_msvc_version_num();
scalar_t__ chaz_OS_is_cygwin();
const char *S_get_prefix() {
  if (chaz_CC_msvc_version_num()) {
    return "";
  } else if (chaz_OS_is_cygwin()) {
    return "cyg";
  } else {
    return "lib";
  }
}


x86 assembly (clang, -O0):
<S_get_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <chaz_CC_msvc_version_num@plt>
cmp    $0x0,%rax
je     1149 <S_get_prefix+0x29>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <S_get_prefix+0x55>
mov    $0x0,%al
call   1030 <chaz_OS_is_cygwin@plt>
cmp    $0x0,%rax
je     116a <S_get_prefix+0x4a>
lea    0xe9f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <S_get_prefix+0x55>
lea    0xe93(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_get_prefix>:
push   %rax
xor    %eax,%eax
call   1040 <chaz_CC_msvc_version_num@plt>
test   %rax,%rax
je     1136 <S_get_prefix+0x16>
lea    0xed3(%rip),%rax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <chaz_OS_is_cygwin@plt>
test   %rax,%rax
lea    0xebd(%rip),%rcx
lea    0xeb2(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"cyg\00"
@.str.2 = [4 x i8] c"lib\00"
define i8* @S_get_prefix() {
%1 = alloca i8*
%2 = call i64 (...) @chaz_CC_msvc_version_num()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %1
br label %10
5: ; preds = %0
%6 = call i64 (...) @chaz_OS_is_cygwin()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %10
9: ; preds = %5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %1
br label %10
10: ; preds = %9, %8, %4
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"cyg\00"
@.str.2 = [4 x i8] c"lib\00"
define i8* @S_get_prefix() {
%1 = tail call i64 (...) @chaz_CC_msvc_version_num()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 (...) @chaz_OS_is_cygwin()
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
br label %7
7: ; preds = %3, %0
%8 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %0 ], [ %6, %3 ]
ret i8* %8
}
void OptickAPI_NextFrame() {}


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

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

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

LLVM IR (-O2):
define void @OptickAPI_NextFrame() {
ret void
}
int isEOC(unsigned int fat_entry) {
  return ((0x0FFFFFF8 <= fat_entry) && (fat_entry <= 0x0FFFFFFF));
}


x86 assembly (clang, -O0):
<isEOC>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0xffffff8,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
ja     1127 <isEOC+0x27>
cmpl   $0xfffffff,-0x4(%rbp)
setbe  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEOC>:
and    $0xfffffff8,%edi
xor    %eax,%eax
cmp    $0xffffff8,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isEOC(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ule i32 268435448, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 268435455
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isEOC(i32 %0) {
%2 = and i32 %0, -8
%3 = icmp eq i32 %2, 268435448
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int func7b(int);
__attribute__((gnu_)) __attribute__((always_)) int func7a(int x) {
  return func7b(x * 29);
}


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

x86 assembly (clang, -O2):
<func7a>:
lea    (%rdi,%rdi,8),%eax
lea    (%rax,%rax,2),%eax
add    %edi,%eax
add    %eax,%edi
jmp    1030 <func7b@plt>

LLVM IR (-O0):
define i32 @func7a(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 29
%5 = call i32 @func7b(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @func7a(i32 %0) {
%2 = mul nsw i32 %0, 29
%3 = tail call i32 @func7b(i32 %2)
ret i32 %3
}
long extract_li(insn, invalid)
unsigned long insn;
int *invalid;
{
  if ((insn & 0x2000000) != 0)
    return (insn & 0x3fffffc) - 0x4000000;
  else
    return insn & 0x3fffffc;
}


x86 assembly (clang, -O0):
<extract_li>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0x2000000,%rax
cmp    $0x0,%rax
je     1139 <extract_li+0x39>
mov    -0x10(%rbp),%rax
and    $0x3fffffc,%rax
sub    $0x4000000,%rax
mov    %rax,-0x8(%rbp)
jmp    1147 <extract_li+0x47>
mov    -0x10(%rbp),%rax
and    $0x3fffffc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_li>:
mov    %edi,%ecx
and    $0x3fffffc,%ecx
lea    -0x4000000(%rcx),%rax
test   $0x2000000,%edi
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @extract_li(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32*
store i64 %0, i64* %4
store i32* %1, i32** %5
%6 = load i64, i64* %4
%7 = and i64 %6, 33554432
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i64, i64* %4
%11 = and i64 %10, 67108860
%12 = sub i64 %11, 67108864
store i64 %12, i64* %3
br label %16
13: ; preds = %2
%14 = load i64, i64* %4
%15 = and i64 %14, 67108860
store i64 %15, i64* %3
br label %16
16: ; preds = %13, %9
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @extract_li(i64 %0, i32* nocapture readnone %1) {
%3 = and i64 %0, 33554432
%4 = icmp eq i64 %3, 0
%5 = and i64 %0, 67108860
%6 = or i64 %5, -67108864
%7 = select i1 %4, i64 %5, i64 %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ do_handle_dude(int);
void *pthread(void *arg) {
  int s = (long)arg;
  do_handle_dude(s);
  return NULL;
}


x86 assembly (clang, -O0):
<pthread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <do_handle_dude@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @pthread(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @do_handle_dude(i32 %7)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @pthread(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @do_handle_dude(i32 %3)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void move() { printf("scamper \n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"scamper \00"
define void @move() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ptod2(double, double, double *, double *);
int ctod3(double cr, double ct, double cz, double *dx, double *dy, double *dz) {
  ptod2(cr, ct, dx, dy);
  *dz = cz;
  return 0;
}


x86 assembly (clang, -O0):
<ctod3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <ptod2@plt>
movsd  -0x18(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctod3>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
movsd  %xmm2,0x8(%rsp)
call   1030 <ptod2@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ctod3(double %0, double %1, double %2, double* %3, double* %4, double* nocapture writeonly %5) {
%7 = tail call i32 @ptod2(double %0, double %1, double* %3, double* %4)
store double %2, double* %5
ret i32 0
}
/* Variables and functions */
size_t strlen(char const *);
int strncmp(char const *, char const *, size_t);
int strcmpstart(const char *s1, const char *s2) {
  size_t n = strlen(s2);
  return strncmp(s1, s2, n);
}


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

x86 assembly (clang, -O2):
<strcmpstart>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
define i32 @strcmpstart(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i32 @strncmp(i8* %8, i8* %9, i64 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @strcmpstart(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sfree(void *);
void *smalloc(unsigned long);
int do_specific_alloc(unsigned long size) {
  void *ptr;
  ptr = smalloc(size);
  sfree(ptr);
  return 0;
}


x86 assembly (clang, -O0):
<do_specific_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <smalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sfree@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_specific_alloc>:
push   %rax
call   1040 <smalloc@plt>
mov    %rax,%rdi
call   1030 <sfree@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @do_specific_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @smalloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @sfree(i8* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @do_specific_alloc(i64 %0) {
%2 = tail call i8* @smalloc(i64 %0)
%3 = tail call i32 @sfree(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void showVersion() {
  printf("FAT attributes utility, version %s\n", "1"
                                                 "."
                                                 "0"
                                                 "."
                                                 "0");
  printf("Copyright 2013 David Caro Martinez\n"
         "\n"
         "This software comes with ABSOLUTELY NO WARRANTY.\n"
         "This is free software, and you are welcome to redistribute it \n"
         "under certain conditions. See the GNU General Public License \n"
         "for details.\n");
}


x86 assembly (clang, -O0):
<showVersion>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xf02(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<showVersion>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xef5(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeed(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"FAT attributes utility, version %s\0A\00"
@.str.1 = [6 x i8] c"1.0.0\00"
@.str.2 = [224 x i8] c"Copyright 2013 David Caro Martinez\0A\0AThis software comes with ABSOLUTELY NO WARRANTY.\0AThis is free software, and you are welcome to redistribute it \0Aunder certain conditions. See the GNU General Public License \0Afor details.\0A\00"
define void @showVersion() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([224 x i8], [224 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"FAT attributes utility, version %s\0A\00"
@.str.1 = [6 x i8] c"1.0.0\00"
@str = [223 x i8] c"Copyright 2013 David Caro Martinez\0A\0AThis software comes with ABSOLUTELY NO WARRANTY.\0AThis is free software, and you are welcome to redistribute it \0Aunder certain conditions. See the GNU General Public License \0Afor details.\00"
define void @showVersion() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([223 x i8], [223 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f(int, int /*<<< orphan*/, int);
int main(void) { return f(1, 0, 1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edx
xor    %esi,%esi
mov    %edx,%edi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x1,%edx
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1, i32 0, i32 1)
ret i32 %1
}
void free_char(char _val) { return; }


x86 assembly (clang, -O0):
<free_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @free_char(i8 signext %0) {
ret void
}
char int_to_ascii_hexa(int src) {
  char dst;
  dst = '0';
  if (src >= 1 && src <= 9) {
    dst = '0' + src;
  }
  if (src >= 10 && src <= 15) {
    dst = 'A' - 10 + src;
  }
  return dst;
}


x86 assembly (clang, -O0):
<int_to_ascii_hexa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movb   $0x30,-0x5(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     1128 <int_to_ascii_hexa+0x28>
cmpl   $0x9,-0x4(%rbp)
jg     1128 <int_to_ascii_hexa+0x28>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x5(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     1145 <int_to_ascii_hexa+0x45>
cmpl   $0xf,-0x4(%rbp)
jg     1145 <int_to_ascii_hexa+0x45>
mov    -0x4(%rbp),%eax
add    $0x37,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_ascii_hexa>:
lea    -0x1(%rdi),%eax
lea    0x30(%rdi),%ecx
cmp    $0x9,%eax
movzbl %cl,%eax
mov    $0x30,%ecx
cmovb  %eax,%ecx
lea    0x37(%rdi),%eax
mov    %edi,%edx
add    $0xfffffff6,%edx
cmp    $0x6,%edx
movzbl %al,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i8 @int_to_ascii_hexa(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 9
%4 = trunc i32 %0 to i8
%5 = add i8 %4, 48
%6 = select i1 %3, i8 %5, i8 48
%7 = add i32 %0, -10
%8 = icmp ult i32 %7, 6
%9 = add i8 %4, 55
%10 = select i1 %8, i8 %9, i8 %6
ret i8 %10
}
/* Variables and functions */
void set_very_very_verbose(bool on) {}


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

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

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

LLVM IR (-O2):
define void @set_very_very_verbose(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ encode(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "Invalid Number of Params\n");
    exit(1);
  }
  encode(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     116f <main+0x3f>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <encode@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1143 <main+0x13>
mov    0x8(%rsi),%rdi
call   1030 <encode@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Invalid Number of Params\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @encode(i8* %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_variable(int i) { printf("%d\n", i++); }


x86 assembly (clang, -O0):
<print_variable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_variable>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

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

/* Variables and functions */
void EMACTimestampConfigSet(uint32_t ui32Base, uint32_t ui32Config,
                            uint32_t ui32SubSecondInc) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000FC8))) |= 0x00040000;
  (*((volatile uint32_t *)(ui32Base + 0x00000704))) =
      ((ui32SubSecondInc << 0) & 0x000000FF);
  (*((volatile uint32_t *)(ui32Base + 0x00000700))) = ui32Config;
}


x86 assembly (clang, -O0):
<EMACTimestampConfigSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0xfc8,%eax
cltq
mov    (%rax),%ecx
or     $0x40000,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
shl    $0x0,%ecx
and    $0xff,%ecx
mov    -0x4(%rbp),%eax
add    $0x704,%eax
cltq
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x700,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACTimestampConfigSet>:
movslq %edi,%rax
orl    $0x40000,0xfc8(%rax)
movzbl %dl,%ecx
mov    %ecx,0x704(%rax)
mov    %esi,0x700(%rax)
ret

LLVM IR (-O0):
define void @EMACTimestampConfigSet(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 4040
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 262144
store volatile i32 %12, i32* %10
%13 = load i32, i32* %6
%14 = shl i32 %13, 0
%15 = and i32 %14, 255
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1796
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
store volatile i32 %15, i32* %19
%20 = load i32, i32* %5
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1792
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i32*
store volatile i32 %20, i32* %24
ret void
}

LLVM IR (-O2):
define void @EMACTimestampConfigSet(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %0, 4040
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 262144
store volatile i32 %8, i32* %6
%9 = and i32 %2, 255
%10 = add nsw i32 %0, 1796
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
store volatile i32 %9, i32* %12
%13 = add nsw i32 %0, 1792
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store volatile i32 %1, i32* %15
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
scalar_t__ timer_milliseconds_byte();
uint8_t timer_milliseconds_delta(uint8_t start) {
  return (timer_milliseconds_byte() - start);
}


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

x86 assembly (clang, -O2):
<timer_milliseconds_delta>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <timer_milliseconds_byte@plt>
sub    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @timer_milliseconds_delta(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 (...) @timer_milliseconds_byte()
%4 = load i64, i64* %2
%5 = sub nsw i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @timer_milliseconds_delta(i64 %0) {
%2 = tail call i64 (...) @timer_milliseconds_byte()
%3 = sub nsw i64 %2, %0
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t *Function4PointerUint8(uint8_t *a, uint8_t *b, uint8_t *c, uint8_t *d) {
  return a + 1;
}


x86 assembly (clang, -O0):
<Function4PointerUint8>:
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
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Function4PointerUint8>:
lea    0x4(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @Function4PointerUint8(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 1
ret i32* %10
}

LLVM IR (-O2):
define i32* @Function4PointerUint8(i32* readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3) {
%5 = getelementptr inbounds i32, i32* %0, i64 1
ret i32* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_UNIVERSALSTRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_UNIVERSALSTRING_it;
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
ASN1_UNIVERSALSTRING *ASN1_UNIVERSALSTRING_new(void) {
  return (ASN1_UNIVERSALSTRING *)ASN1_item_new(&ASN1_UNIVERSALSTRING_it);
}


x86 assembly (clang, -O0):
<ASN1_UNIVERSALSTRING_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_UNIVERSALSTRING_new>:
mov    0x2ee1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@ASN1_UNIVERSALSTRING_it = global i32 0
define i32* @ASN1_UNIVERSALSTRING_new() {
%1 = call i64 @ASN1_item_new(i32* @ASN1_UNIVERSALSTRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@ASN1_UNIVERSALSTRING_it = global i32 0
define i32* @ASN1_UNIVERSALSTRING_new() {
%1 = tail call i64 @ASN1_item_new(i32* @ASN1_UNIVERSALSTRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int gamma_dummy_set_temperature(void *state, int temp, float brightness,
                                const float gamma[3]) {
  printf("Temperature: %i\n", temp);
  return 0;
}


x86 assembly (clang, -O0):
<gamma_dummy_set_temperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Temperature: %i\0A\00"
define i32 @gamma_dummy_set_temperature(i8* %0, i32 %1, float %2, float* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca float
%8 = alloca float*
store i8* %0, i8** %5
store i32 %1, i32* %6
store float %2, float* %7
store float* %3, float** %8
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Temperature: %i\0A\00"
define i32 @gamma_dummy_set_temperature(i8* nocapture readnone %0, i32 %1, float %2, float* nocapture readnone %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
struct btrfs_chunk {
  int dummy;
};

/* Variables and functions */
char *btrfs_stripe_dev_uuid(int /*<<< orphan*/);
int /*<<< orphan*/ btrfs_stripe_nr(struct btrfs_chunk *, int);
char *btrfs_stripe_dev_uuid_nr(struct btrfs_chunk *c, int nr) {
  return btrfs_stripe_dev_uuid(btrfs_stripe_nr(c, nr));
}


x86 assembly (clang, -O0):
<btrfs_stripe_dev_uuid_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <btrfs_stripe_nr@plt>
mov    %eax,%edi
call   1040 <btrfs_stripe_dev_uuid@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.btrfs_chunk = type { i32 }
define i8* @btrfs_stripe_dev_uuid_nr(%struct.btrfs_chunk* %0, i32 %1) {
%3 = alloca %struct.btrfs_chunk*
%4 = alloca i32
store %struct.btrfs_chunk* %0, %struct.btrfs_chunk** %3
store i32 %1, i32* %4
%5 = load %struct.btrfs_chunk*, %struct.btrfs_chunk** %3
%6 = load i32, i32* %4
%7 = call i32 @btrfs_stripe_nr(%struct.btrfs_chunk* %5, i32 %6)
%8 = call i8* @btrfs_stripe_dev_uuid(i32 %7)
ret i8* %8
}

LLVM IR (-O2):
%struct.btrfs_chunk = type { i32 }
define i8* @btrfs_stripe_dev_uuid_nr(%struct.btrfs_chunk* %0, i32 %1) {
%3 = tail call i32 @btrfs_stripe_nr(%struct.btrfs_chunk* %0, i32 %1)
%4 = tail call i8* @btrfs_stripe_dev_uuid(i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ tty_putc(char);
void tty_puts(char *s) {
  char c;
  while ((c = *s++) != '\0') {
    tty_putc(c);
    if (c == '\n') {
      tty_putc('\r');
    }
  }
}


x86 assembly (clang, -O0):
<tty_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1161 <tty_puts+0x51>
movsbl -0x9(%rbp),%edi
call   1030 <tty_putc@plt>
movsbl -0x9(%rbp),%eax
cmp    $0xa,%eax
jne    115c <tty_puts+0x4c>
mov    $0xd,%edi
call   1030 <tty_putc@plt>
jmp    111c <tty_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_puts>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1157 <tty_puts+0x47>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    113b <tty_puts+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1157 <tty_puts+0x47>
movsbl %al,%ebp
mov    %ebp,%edi
call   1030 <tty_putc@plt>
cmp    $0xa,%bpl
jne    1130 <tty_puts+0x20>
mov    $0xd,%edi
call   1030 <tty_putc@plt>
jmp    1130 <tty_puts+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @tty_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %13, %12 ], [ %2, %1 ]
%6 = phi i8* [ %7, %12 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @tty_putc(i8 signext %5)
%9 = icmp eq i8 %5, 10
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = tail call i32 @tty_putc(i8 signext 13)
br label %12
12: ; preds = %10, %4
%13 = load i8, i8* %7
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %12, %1
ret void
}
/* Variables and functions */
int inb(int);
int getDebugChar() {
  while (inb(0x3F8 + 5) & 1)
    ;
  return inb(0x3F8);
}


x86 assembly (clang, -O0):
<getDebugChar>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <getDebugChar+0x9>
mov    $0x3fd,%edi
call   1030 <inb@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1134 <getDebugChar+0x24>
jmp    1119 <getDebugChar+0x9>
mov    $0x3f8,%edi
call   1030 <inb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDebugChar>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x3fd,%edi
call   1030 <inb@plt>
test   $0x1,%al
jne    1120 <getDebugChar+0x10>
mov    $0x3f8,%edi
pop    %rax
jmp    1030 <inb@plt>

LLVM IR (-O0):
define i32 @getDebugChar() {
br label %1
1: ; preds = %5, %0
%2 = call i32 @inb(i32 1021)
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
%7 = call i32 @inb(i32 1016)
ret i32 %7
}

LLVM IR (-O2):
define i32 @getDebugChar() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @inb(i32 1021)
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
%6 = tail call i32 @inb(i32 1016)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_read;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int, void *, size_t);
ssize_t read(int fd, void *buf, size_t count) {
  return syscall(SYS_read, fd, buf, count);
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_read = global i32 0
define i32 @read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* @SYS_read
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @syscall(i32 %7, i32 %8, i8* %9, i64 %10)
ret i32 %11
}

LLVM IR (-O2):
@SYS_read = global i32 0
define i32 @read(i32 %0, i8* %1, i64 %2) {
%4 = load i32, i32* @SYS_read
%5 = tail call i32 @syscall(i32 %4, i32 %0, i8* %1, i64 %2)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fs_univ_emptysustained(int /*<<< orphan*/, int,
                                          int /*<<< orphan*/);
uint8_t fs_mr_emptysustained(uint32_t ts, uint32_t freeinodes) {
  return fs_univ_emptysustained(ts, 0x80, freeinodes);
}


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

x86 assembly (clang, -O2):
<fs_mr_emptysustained>:
mov    %esi,%edx
mov    $0x80,%esi
jmp    1030 <fs_univ_emptysustained@plt>

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

LLVM IR (-O2):
define i32 @fs_mr_emptysustained(i32 %0, i32 %1) {
%3 = tail call i32 @fs_univ_emptysustained(i32 %0, i32 128, i32 %1)
ret i32 %3
}