xunge/DecIR huggingface dataset:
/* Type definitions */
typedef unsigned char uint16_t;

/* Variables and functions */
unsigned char receive_uint8();
uint16_t receive_uint16() {
  unsigned char low = receive_uint8();
  unsigned char high = receive_uint8();
  return high * 256 + low;
}


x86 assembly (clang, -O0):
<receive_uint16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <receive_uint8@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <receive_uint8@plt>
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
add    %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<receive_uint16>:
push   %rbx
xor    %eax,%eax
call   1030 <receive_uint8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <receive_uint8@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @receive_uint16() {
%1 = alloca i8
%2 = alloca i8
%3 = call zeroext i8 (...) @receive_uint8()
store i8 %3, i8* %1
%4 = call zeroext i8 (...) @receive_uint8()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = mul nsw i32 %6, 256
%8 = load i8, i8* %1
%9 = zext i8 %8 to i32
%10 = add nsw i32 %7, %9
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @receive_uint16() {
%1 = tail call zeroext i8 (...) @receive_uint8()
%2 = tail call zeroext i8 (...) @receive_uint8()
ret i8 %1
}
void hist_string_extract_single_quoted(string, sindex) char *string;
int *sindex;
{
  register int i;
  for (i = *sindex; string[i] && string[i] != '\''; i++)
    ;
  *sindex = i;
}


x86 assembly (clang, -O0):
<hist_string_extract_single_quoted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     1144 <hist_string_extract_single_quoted+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x27,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1154 <hist_string_extract_single_quoted+0x54>
jmp    1167 <hist_string_extract_single_quoted+0x67>
jmp    1159 <hist_string_extract_single_quoted+0x59>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <hist_string_extract_single_quoted+0x15>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hist_string_extract_single_quoted>:
movslq (%rsi),%rax
add    %rax,%rdi
cs nopw 0x0(%rax,%rax,1)
movzbl (%rdi),%ecx
test   %cl,%cl
je     1125 <hist_string_extract_single_quoted+0x25>
cmp    $0x27,%cl
je     1125 <hist_string_extract_single_quoted+0x25>
add    $0x1,%eax
add    $0x1,%rdi
jmp    1110 <hist_string_extract_single_quoted+0x10>
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @hist_string_extract_single_quoted(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
store i32 %7, i32* %5
br label %8
8: ; preds = %27, %2
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %24
16: ; preds = %8
%17 = load i8*, i8** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 39
br label %24
24: ; preds = %16, %8
%25 = phi i1 [ false, %8 ], [ %23, %16 ]
br i1 %25, label %26, label %30
26: ; preds = %24
br label %27
27: ; preds = %26
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %8
30: ; preds = %24
%31 = load i32, i32* %5
%32 = load i32*, i32** %4
store i32 %31, i32* %32
ret void
}

LLVM IR (-O2):
define void @hist_string_extract_single_quoted(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
br label %5
5: ; preds = %9, %2
%6 = phi i64 [ %10, %9 ], [ %4, %2 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
switch i8 %8, label %9 [
i8 0, label %11
i8 39, label %11
]
9: ; preds = %5
%10 = add i64 %6, 1
br label %5
11: ; preds = %5, %5
%12 = trunc i64 %6 to i32
store i32 %12, i32* %1
ret void
}
int f12() { return 1 || 1; }


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

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

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

LLVM IR (-O2):
define i32 @f12() {
ret i32 1
}
fibonnaci(int *x, int *y) {
  int soma = *x + *y;
  int aux = *y;
  *y = soma;
  *x = aux;
  return soma;
}


x86 assembly (clang, -O0):
<fibonnaci>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonnaci>:
mov    (%rsi),%ecx
mov    (%rdi),%eax
add    %ecx,%eax
mov    %eax,(%rsi)
mov    %ecx,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @fibonnaci(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %3
store i32 %5, i32* %1
store i32 %4, i32* %0
ret i32 %5
}
void main(int i) {
  f(1);
  g(3);
  f(1, 2);
  f();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <f@plt>
mov    $0x3,%edi
xor    %eax,%eax
call   1040 <g@plt>
mov    $0x1,%edi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define void @main(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 1)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @g to i32 (i32, ...)*)(i32 3)
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @f to i32 (i32, i32, ...)*)(i32 1, i32 2)
%5 = tail call i32 (...) @f()
ret void
}
/* Variables and functions */
float fabs(float);
float HexagonNorm(float x, float y) {
  x = 1.15470054f * (float)fabs(x);
  y = fabs(y);
  const float v = 0.5f * x + y;
  return (x > v) ? x : v;
}


x86 assembly (clang, -O0):
<HexagonNorm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movss  0xecd(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xe9f(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    118c <HexagonNorm+0x7c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1196 <HexagonNorm+0x86>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HexagonNorm>:
movaps 0xef9(%rip),%xmm2
andps  %xmm2,%xmm0
mulss  0xefe(%rip),%xmm0
andps  %xmm2,%xmm1
movss  0xef7(%rip),%xmm2
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
maxss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @HexagonNorm(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = call float @fabs(float %6)
%8 = fmul float 0x3FF279A740000000, %7
store float %8, float* %3
%9 = load float, float* %4
%10 = call float @fabs(float %9)
store float %10, float* %4
%11 = load float, float* %3
%12 = load float, float* %4
%13 = call float @llvm.fmuladd.f32(float 5.000000e-01, float %11, float %12)
store float %13, float* %5
%14 = load float, float* %3
%15 = load float, float* %5
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = load float, float* %3
br label %21
19: ; preds = %2
%20 = load float, float* %5
br label %21
21: ; preds = %19, %17
%22 = phi float [ %18, %17 ], [ %20, %19 ]
ret float %22
}

LLVM IR (-O2):
define float @HexagonNorm(float %0, float %1) {
%3 = tail call float @llvm.fabs.f32(float %0)
%4 = fmul float %3, 0x3FF279A740000000
%5 = tail call float @llvm.fabs.f32(float %1)
%6 = tail call float @llvm.fmuladd.f32(float %4, float 5.000000e-01, float %5)
%7 = fcmp ogt float %4, %6
%8 = select i1 %7, float %4, float %6
ret float %8
}
/* Variables and functions */
int _finite(double);
int igraph_finite(double x) { return _finite(x); }


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

x86 assembly (clang, -O2):
<igraph_finite>:
jmp    1030 <_finite@plt>

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

LLVM IR (-O2):
define i32 @igraph_finite(double %0) {
%2 = tail call i32 @_finite(double %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ isalnum(char);
int /*<<< orphan*/ *strchr(char *, char);
int issymbol(char ch) {
  return (isalnum(ch) || (strchr("/!$%&*_-+=<>?", ch) != NULL));
}


x86 assembly (clang, -O0):
<issymbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1163 <issymbol+0x43>
lea    0xeb0(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<issymbol>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <issymbol+0x17>
pop    %rbx
ret
movsbl %bl,%esi
lea    0xebf(%rip),%rdi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/!$%&*_-+=<>?\00"
define i32 @issymbol(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalnum(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32* @strchr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = icmp ne i32* %8, null
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [14 x i8] c"/!$%&*_-+=<>?\00"
define i32 @issymbol(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32* @strchr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ u_int;
struct TYPE_3__ {
  int /*<<< orphan*/ x_handy;
};
typedef TYPE_1__ XDR;

/* Variables and functions */
u_int x_getpostn(const XDR *xdrs) { return xdrs->x_handy; }


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

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

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @x_getpostn(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @x_getpostn(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_RFM_CTL0_INPUT() { clear_io_bit(0x45, 7); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RFM_CTL0_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x45,%edi
mov    $0x7,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RFM_CTL0_INPUT>:
mov    $0x45,%edi
mov    $0x7,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RFM_CTL0_INPUT() {
%1 = call i32 @clear_io_bit(i32 69, i32 7)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RFM_CTL0_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 69, i32 7)
ret void
}
void _exit(int status) {
  (void)status;
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

x86 assembly (clang, -O2):
<_exit>:
jmp    1100 <_exit>

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

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ func(int, int, int);
int main() {
  func(1, 2, 3);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <func@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func(i32 1, i32 2, i32 3)
ret i32 0
}
int test_andone(unsigned int a) { return __builtin_popcount(a & 1); }


x86 assembly (clang, -O0):
<test_andone>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_andone(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = call i32 @llvm.ctpop.i32(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @test_andone(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Type definitions */
struct passwd {
  int dummy;
};

/* Variables and functions */
struct passwd *getpwuid(int);
struct passwd *posix___new_Passwd_from_uid___impl(int uid) {
  return getpwuid(uid);
}


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

x86 assembly (clang, -O2):
<posix___new_Passwd_from_uid___impl>:
jmp    1030 <getpwuid@plt>

LLVM IR (-O0):
%struct.passwd = type { i32 }
define %struct.passwd* @posix___new_Passwd_from_uid___impl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.passwd* @getpwuid(i32 %3)
ret %struct.passwd* %4
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define %struct.passwd* @posix___new_Passwd_from_uid___impl(i32 %0) {
%2 = tail call %struct.passwd* @getpwuid(i32 %0)
ret %struct.passwd* %2
}
void cpu_die(void) {}


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

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

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

LLVM IR (-O2):
define void @cpu_die() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IO_get_le16();
int /*<<< orphan*/ put_argument4(char *, int /*<<< orphan*/, char *);
int am_abs_x16(void) {
  put_argument4(" L", IO_get_le16(), ", x");
  return 3;
}


x86 assembly (clang, -O0):
<am_abs_x16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <IO_get_le16@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
lea    0xec8(%rip),%rdx
call   1040 <put_argument4@plt>
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<am_abs_x16>:
push   %rax
xor    %eax,%eax
call   1030 <IO_get_le16@plt>
lea    0xed1(%rip),%rdi
lea    0xecd(%rip),%rdx
mov    %eax,%esi
call   1040 <put_argument4@plt>
mov    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c" L\00"
@.str.1 = [4 x i8] c", x\00"
define i32 @am_abs_x16() {
%1 = call i32 (...) @IO_get_le16()
%2 = call i32 @put_argument4(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}

LLVM IR (-O2):
@.str = [3 x i8] c" L\00"
@.str.1 = [4 x i8] c", x\00"
define i32 @am_abs_x16() {
%1 = tail call i32 (...) @IO_get_le16()
%2 = tail call i32 @put_argument4(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void LOG(char *mess) { printf("-- %s\n", mess); }


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

x86 assembly (clang, -O2):
<LOG>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"-- %s\0A\00"
define void @LOG(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct rq_asset_credit_spread {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rq_asset_credit_spread_free(struct rq_asset_credit_spread *);
void rq_asset_credit_spread_freefunc(void *asset_data) {
  rq_asset_credit_spread_free((struct rq_asset_credit_spread *)asset_data);
}


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

x86 assembly (clang, -O2):
<rq_asset_credit_spread_freefunc>:
jmp    1030 <rq_asset_credit_spread_free@plt>

LLVM IR (-O0):
%struct.rq_asset_credit_spread = type { i32 }
define void @rq_asset_credit_spread_freefunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.rq_asset_credit_spread*
%5 = call i32 @rq_asset_credit_spread_free(%struct.rq_asset_credit_spread* %4)
ret void
}

LLVM IR (-O2):
%struct.rq_asset_credit_spread = type { i32 }
define void @rq_asset_credit_spread_freefunc(i8* %0) {
%2 = bitcast i8* %0 to %struct.rq_asset_credit_spread*
%3 = tail call i32 @rq_asset_credit_spread_free(%struct.rq_asset_credit_spread* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_byte(int, int);
__attribute__((always_)) void patch_NCAS_3_2_3_1233_extra(void) {
  put_byte(0x10084F3B, 0xEA);
}


x86 assembly (clang, -O0):
<patch_NCAS_3_2_3_1233_extra>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10084f3b,%edi
mov    $0xea,%esi
call   1030 <put_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<patch_NCAS_3_2_3_1233_extra>:
mov    $0x10084f3b,%edi
mov    $0xea,%esi
jmp    1030 <put_byte@plt>

LLVM IR (-O0):
define void @patch_NCAS_3_2_3_1233_extra() {
%1 = call i32 @put_byte(i32 268980027, i32 234)
ret void
}

LLVM IR (-O2):
define void @patch_NCAS_3_2_3_1233_extra() {
%1 = tail call i32 @put_byte(i32 268980027, i32 234)
ret void
}
void XtScreen() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void WriteSlaveSyncFileRun(int iSyncRun) {
  FILE *fsync;
  char sSyncFileName[80];
  sprintf(sSyncFileName, "sync%i", iSyncRun);
  fsync = fopen(sSyncFileName, "w");
  fprintf(fsync, sSyncFileName);
  fclose(fsync);
}


x86 assembly (clang, -O0):
<WriteSlaveSyncFileRun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea7(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x60(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteSlaveSyncFileRun>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %edi,%edx
lea    0xeb0(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1060 <sprintf@plt>
lea    0xea5(%rip),%rsi
mov    %r14,%rdi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x58,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"sync%i\00"
@.str.1 = [2 x i8] c"w\00"
define void @WriteSlaveSyncFileRun(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [80 x i8]
store i32 %0, i32* %2
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%9 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%12 = call i32 @fprintf(i32* %10, i8* %11)
%13 = load i32*, i32** %3
%14 = call i32 @fclose(i32* %13)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"sync%i\00"
@.str.1 = [2 x i8] c"w\00"
define void @WriteSlaveSyncFileRun(i32 %0) {
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32* @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @fprintf(i32* %5, i8* %3)
%7 = tail call i32 @fclose(i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void QEIEnable(unsigned long ulBase) {
  DEBUG_ASSERT((ulBase == 0x4002C000) || (ulBase == 0x4002D000));
  (*((volatile unsigned long *)(ulBase + 0x00000000))) |= 0x00000001;
}


x86 assembly (clang, -O0):
<QEIEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x4002c000,-0x8(%rbp)
40
mov    %al,-0x9(%rbp)
je     113d <QEIEnable+0x2d>
cmpq   $0x4002d000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIEnable>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x4002c000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
orq    $0x1,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @QEIEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1073922048
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 1073926144
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @DEBUG_ASSERT(i32 %10)
%12 = load i64, i64* %2
%13 = add i64 %12, 0
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = or i64 %15, 1
store volatile i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @QEIEnable(i64 %0) {
%2 = and i64 %0, -4097
%3 = icmp eq i64 %2, 1073922048
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = inttoptr i64 %0 to i64*
%7 = load volatile i64, i64* %6
%8 = or i64 %7, 1
store volatile i64 %8, i64* %6
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
long timespec_diff_ms(struct timespec start, struct timespec end) {
  return (end.tv_sec - start.tv_sec) * 1000 +
         (end.tv_nsec - start.tv_nsec) / 1000000;
}


x86 assembly (clang, -O0):
<timespec_diff_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_diff_ms>:
mov    %rsi,%rax
sub    %edi,%esi
shr    $0x20,%rdi
shr    $0x20,%rax
imul   $0x3e8,%esi,%ecx
sub    %edi,%eax
cltq
imul   $0x431bde83,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rax
add    %edx,%eax
add    %ecx,%eax
cltq
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define i64 @timespec_diff_ms(i64 %0, i64 %1) {
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
%5 = bitcast %struct.timespec* %3 to i64*
store i64 %0, i64* %5
%6 = bitcast %struct.timespec* %4 to i64*
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %8, %10
%12 = mul nsw i32 %11, 1000
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%16 = load i32, i32* %15
%17 = sub nsw i32 %14, %16
%18 = sdiv i32 %17, 1000000
%19 = add nsw i32 %12, %18
%20 = sext i32 %19 to i64
ret i64 %20
}

LLVM IR (-O2):
define i64 @timespec_diff_ms(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = lshr i64 %0, 32
%5 = trunc i64 %4 to i32
%6 = trunc i64 %1 to i32
%7 = lshr i64 %1, 32
%8 = trunc i64 %7 to i32
%9 = sub nsw i32 %6, %3
%10 = mul nsw i32 %9, 1000
%11 = sub nsw i32 %8, %5
%12 = sdiv i32 %11, 1000000
%13 = add nsw i32 %12, %10
%14 = sext i32 %13 to i64
ret i64 %14
}
int execute_get_thread_area() { return 0; }


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

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

LLVM IR (-O0):
define i32 @execute_get_thread_area() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_get_thread_area() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
void *calloc(int, size_t);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void *emalloc(size_t bytes) {
  void *ptr = calloc(1, bytes);
  if (ptr == NULL) {
    perror("calloc");
    exit(EXIT_FAILURE);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <emalloc+0x43>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rax
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
test   %rax,%rax
je     1145 <emalloc+0x15>
pop    %rcx
ret
lea    0xeb4(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"calloc\00"
@EXIT_FAILURE = global i32 0
define i8* @emalloc(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x35() {
  Assert_real((isalpha(53) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              270, ("isalpha should be 0 for 5"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x35>:
push   %rbp
mov    %rsp,%rbp
mov    $0x35,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x10e,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x35>:
push   %rax
mov    $0x35,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x10e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 5\00"
define void @t_isalpha_0x35() {
%1 = call i64 @isalpha(i32 53)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 5\00"
define void @t_isalpha_0x35() {
%1 = tail call i64 @isalpha(i32 53)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __L4_TCR_Set_ThreadWord(int /*<<< orphan*/, unsigned int);
unsigned int __L4_TCR_ThreadWord(int /*<<< orphan*/);
void idl4_set_counter_minimum(unsigned value) {
  unsigned oldValue = __L4_TCR_ThreadWord(0);
  if (oldValue < value)
    __L4_TCR_Set_ThreadWord(0, value);
}


x86 assembly (clang, -O0):
<idl4_set_counter_minimum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <__L4_TCR_ThreadWord@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    114b <idl4_set_counter_minimum+0x2b>
mov    -0x4(%rbp),%esi
xor    %edi,%edi
call   1040 <__L4_TCR_Set_ThreadWord@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idl4_set_counter_minimum>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <__L4_TCR_ThreadWord@plt>
cmp    %ebx,%eax
jae    1138 <idl4_set_counter_minimum+0x18>
xor    %edi,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <__L4_TCR_Set_ThreadWord@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @idl4_set_counter_minimum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @__L4_TCR_ThreadWord(i32 0)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @__L4_TCR_Set_ThreadWord(i32 0, i32 %9)
br label %11
11: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @idl4_set_counter_minimum(i32 %0) {
%2 = tail call i32 @__L4_TCR_ThreadWord(i32 0)
%3 = icmp ult i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @__L4_TCR_Set_ThreadWord(i32 0, i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ SPI_IOC_RD_BITS_PER_WORD;
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int spi_get_bits_per_word(int fd, __u8 *pbits) {
  return ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, pbits);
}


x86 assembly (clang, -O0):
<spi_get_bits_per_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_get_bits_per_word>:
mov    %rsi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

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

LLVM IR (-O2):
@SPI_IOC_RD_BITS_PER_WORD = global i32 0
define i32 @spi_get_bits_per_word(i32 %0, i32* %1) {
%3 = load i32, i32* @SPI_IOC_RD_BITS_PER_WORD
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32* %1)
ret i32 %4
}
int get_Center(unsigned char *pds) { return pds[4]; }


x86 assembly (clang, -O0):
<get_Center>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_Center>:
movzbl 0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_Center(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
ret i32 %4
}
double mean(double a, double b, double c) { return (a + b + c) / 2; }


x86 assembly (clang, -O0):
<mean>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mean>:
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
mulsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mean(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fadd double %7, %8
%10 = load double, double* %6
%11 = fadd double %9, %10
%12 = fdiv double %11, 2.000000e+00
ret double %12
}

LLVM IR (-O2):
define double @mean(double %0, double %1, double %2) {
%4 = fadd double %0, %1
%5 = fadd double %4, %2
%6 = fmul double %5, 5.000000e-01
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ initialize();
int /*<<< orphan*/ test_getBits(int, int, int, int);
int main(int argc, char *argv[]) {
  (void)initialize();
  test_getBits(0, 2, 5, 5);
  test_getBits(31, 31, 0, 0);
  test_getBits(31, 31, -1, 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)
mov    $0x0,%al
call   1030 <initialize@plt>
xor    %edi,%edi
mov    $0x2,%esi
mov    $0x5,%ecx
mov    %ecx,%edx
call   1040 <test_getBits@plt>
mov    $0x1f,%esi
xor    %ecx,%ecx
mov    %esi,%edi
mov    %ecx,%edx
call   1040 <test_getBits@plt>
mov    $0x1f,%esi
mov    $0xffffffff,%edx
mov    $0x1,%ecx
mov    %esi,%edi
call   1040 <test_getBits@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initialize@plt>
xor    %edi,%edi
mov    $0x2,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
call   1040 <test_getBits@plt>
mov    $0x1f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <test_getBits@plt>
mov    $0x1f,%edi
mov    $0x1f,%esi
mov    $0xffffffff,%edx
mov    $0x1,%ecx
call   1040 <test_getBits@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @initialize()
%7 = call i32 @test_getBits(i32 0, i32 2, i32 5, i32 5)
%8 = call i32 @test_getBits(i32 31, i32 31, i32 0, i32 0)
%9 = call i32 @test_getBits(i32 31, i32 31, i32 -1, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initialize()
%4 = tail call i32 @test_getBits(i32 0, i32 2, i32 5, i32 5)
%5 = tail call i32 @test_getBits(i32 31, i32 31, i32 0, i32 0)
%6 = tail call i32 @test_getBits(i32 31, i32 31, i32 -1, i32 1)
ret i32 0
}
void sgx_get_quote() {}


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

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

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

LLVM IR (-O2):
define void @sgx_get_quote() {
ret void
}
/* Variables and functions */
double EvalAngDist_p0_2plus_12minus_14926_L1(double);
double funcAngDist_p0_2plus_12minus_14926_L1(double *x, double *par) {
  double result;
  result = par[0] * EvalAngDist_p0_2plus_12minus_14926_L1(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngDist_p0_2plus_12minus_14926_L1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngDist_p0_2plus_12minus_14926_L1@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngDist_p0_2plus_12minus_14926_L1>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngDist_p0_2plus_12minus_14926_L1@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngDist_p0_2plus_12minus_14926_L1(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngDist_p0_2plus_12minus_14926_L1(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngDist_p0_2plus_12minus_14926_L1(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngDist_p0_2plus_12minus_14926_L1(double %4)
%6 = fmul double %3, %5
ret double %6
}
double p_ice(double T) {
  T = T - 273.15;
  return 916.89 - 1.3071e-1 * T;
}


x86 assembly (clang, -O0):
<p_ice>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed0(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_ice>:
addsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @p_ice(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 2.731500e+02
store double %4, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double -1.307100e-01, double %5, double 0x408CA71EB851EB85)
ret double %6
}

LLVM IR (-O2):
define double @p_ice(double %0) {
%2 = fadd double %0, -2.731500e+02
%3 = tail call double @llvm.fmuladd.f64(double %2, double -1.307100e-01, double 0x408CA71EB851EB85)
ret double %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t iswap(uint8_t ch) {
  return ((ch & 0x01) << 4) | ((ch & 0x02) << 2) | ((ch & 0x04)) |
         ((ch & 0x08) >> 2) | ((ch & 0x10) >> 4);
}


x86 assembly (clang, -O0):
<iswap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
shl    $0x4,%eax
mov    -0x4(%rbp),%ecx
and    $0x2,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x4,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x8,%ecx
sar    $0x2,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x10,%ecx
sar    $0x4,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswap>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %al,%dil
mov    %edi,%eax
and    $0x54,%al
add    %al,%al
shr    %dil
and    $0x50,%dil
or     %al,%dil
shr    $0x3,%dil
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @iswap(i32 %0) {
%2 = trunc i32 %0 to i5
%3 = tail call i5 @llvm.bitreverse.i5(i5 %2)
%4 = zext i5 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ max_heapify(int *, int, int /*<<< orphan*/);
int heap_extract_max(int nums[], int heap_size) {
  int max;
  max = nums[0];
  nums[0] = nums[heap_size - 1];
  heap_size--;
  max_heapify(nums, heap_size, 0);
  return max;
}


x86 assembly (clang, -O0):
<heap_extract_max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <max_heapify@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heap_extract_max>:
push   %rbx
mov    (%rdi),%ebx
movslq %esi,%rax
add    $0xffffffff,%esi
mov    -0x4(%rdi,%rax,4),%eax
mov    %eax,(%rdi)
xor    %edx,%edx
call   1030 <max_heapify@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @heap_extract_max(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
store i32 %8, i32* %5
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 0
store i32 %14, i32* %16
%17 = load i32, i32* %4
%18 = add nsw i32 %17, -1
store i32 %18, i32* %4
%19 = load i32*, i32** %3
%20 = load i32, i32* %4
%21 = call i32 @max_heapify(i32* %19, i32 %20, i32 0)
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @heap_extract_max(i32* %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %1, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
store i32 %7, i32* %0
%8 = tail call i32 @max_heapify(i32* %0, i32 %4, i32 0)
ret i32 %3
}
/* Type definitions */
struct http_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_line(struct http_connection *, char const *, char *,
                             char const *, int /*<<< orphan*/ *);
void send_header(struct http_connection *conn, const char *field,
                 const char *value) {
  send_line(conn, field, ": ", value, NULL);
}


x86 assembly (clang, -O0):
<send_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <send_line@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_header>:
mov    %rdx,%rcx
lea    0xee6(%rip),%rdx
xor    %r8d,%r8d
jmp    1030 <send_line@plt>

LLVM IR (-O0):
%struct.http_connection = type { i32 }
@.str = [3 x i8] c": \00"
define void @send_header(%struct.http_connection* %0, i8* %1, i8* %2) {
%4 = alloca %struct.http_connection*
%5 = alloca i8*
%6 = alloca i8*
store %struct.http_connection* %0, %struct.http_connection** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.http_connection*, %struct.http_connection** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @send_line(%struct.http_connection* %7, i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9, i32* null)
ret void
}

LLVM IR (-O2):
%struct.http_connection = type { i32 }
@.str = [3 x i8] c": \00"
define void @send_header(%struct.http_connection* %0, i8* %1, i8* %2) {
%4 = tail call i32 @send_line(%struct.http_connection* %0, i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2, i32* null)
ret void
}
void __attribute__((weak)) _on_reset(void) {}


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

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

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

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