xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ pios_fbconsole_clear();
int cmdClear(int argc, char **argv) {
  pios_fbconsole_clear();
  return 0;
}


x86 assembly (clang, -O0):
<cmdClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <pios_fbconsole_clear@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cmdClear(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @pios_fbconsole_clear()
ret i32 0
}

LLVM IR (-O2):
define i32 @cmdClear(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pios_fbconsole_clear()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ indigoFree(int);
int indigoLoadReaction(int);
int indigoReadBuffer(char const *, int);
__attribute__((visibility("default"))) int
indigoLoadReactionFromBuffer(const char *buf, int size) {
  int source = indigoReadBuffer(buf, size);
  int result;
  if (source <= 0)
    return -1;
  result = indigoLoadReaction(source);
  indigoFree(source);
  return result;
}


x86 assembly (clang, -O0):
<indigoLoadReactionFromBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <indigoReadBuffer@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jg     1164 <indigoLoadReactionFromBuffer+0x34>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <indigoLoadReactionFromBuffer+0x4d>
mov    -0x18(%rbp),%edi
call   1040 <indigoLoadReaction@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
call   1030 <indigoFree@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indigoLoadReactionFromBuffer>:
push   %rbp
push   %rbx
push   %rax
call   1050 <indigoReadBuffer@plt>
test   %eax,%eax
jle    1152 <indigoLoadReactionFromBuffer+0x22>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <indigoLoadReaction@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <indigoFree@plt>
mov    %ebp,%eax
jmp    1157 <indigoLoadReactionFromBuffer+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @indigoLoadReactionFromBuffer(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @indigoReadBuffer(i8* %8, i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp sle i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %20
14: ; preds = %2
%15 = load i32, i32* %6
%16 = call i32 @indigoLoadReaction(i32 %15)
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = call i32 @indigoFree(i32 %17)
%19 = load i32, i32* %7
store i32 %19, i32* %3
br label %20
20: ; preds = %14, %13
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @indigoLoadReactionFromBuffer(i8* %0, i32 %1) {
%3 = tail call i32 @indigoReadBuffer(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @indigoLoadReaction(i32 %3)
%7 = tail call i32 @indigoFree(i32 %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
double calc(int, int, double);
int /*<<< orphan*/ print(double);
int main() {
  int a = 1;
  int b = 3;
  double c = 5.7;
  double x = calc(a, b, c);
  print(c);
  print(x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
call   1030 <calc@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <print@plt>
movsd  -0x20(%rbp),%xmm0
call   1040 <print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x1,%edi
mov    $0x3,%esi
call   1030 <calc@plt>
movsd  %xmm0,(%rsp)
movsd  0xebb(%rip),%xmm0
call   1040 <print@plt>
movsd  (%rsp),%xmm0
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
store i32 1, i32* %2
store i32 3, i32* %3
store double 5.700000e+00, double* %4
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load double, double* %4
%9 = call double @calc(i32 %6, i32 %7, double %8)
store double %9, double* %5
%10 = load double, double* %4
%11 = call i32 @print(double %10)
%12 = load double, double* %5
%13 = call i32 @print(double %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @calc(i32 1, i32 3, double 5.700000e+00)
%2 = tail call i32 @print(double 5.700000e+00)
%3 = tail call i32 @print(double %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ process_yield();
int sys_yield() {
  process_yield();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sys_yield() {
%1 = tail call i32 (...) @process_yield()
ret i32 0
}
float clamp(float amount, float low, float high) {
  return amount < low ? low : (amount > high ? high : amount);
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clamp+0x35>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1167 <clamp+0x67>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1153 <clamp+0x53>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    115d <clamp+0x5d>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @clamp(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
void recalc_sigpending(struct task_struct *t) {}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
define void @recalc_sigpending(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %2
ret void
}

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @recalc_sigpending(%struct.task_struct* nocapture %0) {
ret void
}
int test_imm_93uint8_mem(unsigned char *val) {
  return ((*val) & (0x93 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_93uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x93,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_93uint8_mem>:
testb  $0x93,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_93uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -109
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double RAND_MAX;
int rand();
double nextDouble() {
  double unit = (double)rand() / RAND_MAX * 2.0 - 1.0;
  int value = (rand() % (100 - 0)) - 0;
  return ((double)value) + unit;
}


x86 assembly (clang, -O0):
<nextDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %eax,%xmm0
mov    0x2ebe(%rip),%rax
divsd  (%rax),%xmm0
addsd  %xmm0,%xmm0
movsd  0xec6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
sub    $0x0,%edx
mov    %edx,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextDouble>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %eax,%xmm0
mov    0x2ec5(%rip),%rax
divsd  (%rax),%xmm0
addsd  %xmm0,%xmm0
addsd  0xecd(%rip),%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @nextDouble() {
%1 = alloca double
%2 = alloca i32
%3 = call i32 (...) @rand()
%4 = sitofp i32 %3 to double
%5 = load double, double* @RAND_MAX
%6 = fdiv double %4, %5
%7 = call double @llvm.fmuladd.f64(double %6, double 2.000000e+00, double -1.000000e+00)
store double %7, double* %1
%8 = call i32 (...) @rand()
%9 = srem i32 %8, 100
%10 = sub nsw i32 %9, 0
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to double
%13 = load double, double* %1
%14 = fadd double %12, %13
ret double %14
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @nextDouble() {
%1 = tail call i32 (...) @rand()
%2 = sitofp i32 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
%5 = tail call double @llvm.fmuladd.f64(double %4, double 2.000000e+00, double -1.000000e+00)
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 100
%8 = sitofp i32 %7 to double
%9 = fadd double %5, %8
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void addMasterRef(FILE *fo) {
  fprintf(
      fo,
      "<div><a href=\"index.html#MasterIndex\">index principal</a></div>\n");
}


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

x86 assembly (clang, -O2):
<addMasterRef>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x40,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"<div><a href=\22index.html#MasterIndex\22>index principal</a></div>\0A\00"
define void @addMasterRef(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"<div><a href=\22index.html#MasterIndex\22>index principal</a></div>\0A\00"
define void @addMasterRef(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i64 64, i64 1, i32* %0)
ret void
}
int RGB_24to8(int red, int grn, int blu) {
  return (((red >> 5) << 5) | ((grn >> 5) << 2) | (blu >> 6));
}


x86 assembly (clang, -O0):
<RGB_24to8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x5,%eax
shl    $0x5,%eax
mov    -0x8(%rbp),%ecx
sar    $0x5,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
sar    $0x6,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RGB_24to8>:
mov    %edx,%eax
and    $0xffffffe0,%edi
sar    $0x3,%esi
and    $0xfffffffc,%esi
sar    $0x6,%eax
or     %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @RGB_24to8(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 = ashr i32 %7, 5
%9 = shl i32 %8, 5
%10 = load i32, i32* %5
%11 = ashr i32 %10, 5
%12 = shl i32 %11, 2
%13 = or i32 %9, %12
%14 = load i32, i32* %6
%15 = ashr i32 %14, 6
%16 = or i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @RGB_24to8(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %0, -32
%5 = ashr i32 %1, 3
%6 = and i32 %5, -4
%7 = or i32 %6, %4
%8 = ashr i32 %2, 6
%9 = or i32 %7, %8
ret i32 %9
}
/* Variables and functions */
unsigned short float2half(float);
float half2float(unsigned short);
unsigned short subtract(unsigned short a, unsigned short b) {
  float op1 = half2float(a);
  float op2 = half2float(b);
  return float2half(op1 - op2);
}


x86 assembly (clang, -O0):
<subtract>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%edi
call   1040 <half2float@plt>
movss  %xmm0,-0x8(%rbp)
movzwl -0x4(%rbp),%edi
call   1040 <half2float@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <float2half@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
call   1040 <half2float@plt>
movss  %xmm0,0xc(%rsp)
mov    %ebx,%edi
call   1040 <half2float@plt>
movss  0xc(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1030 <float2half@plt>

LLVM IR (-O0):
define zeroext i16 @subtract(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca float
%6 = alloca float
store i16 %0, i16* %3
store i16 %1, i16* %4
%7 = load i16, i16* %3
%8 = call float @half2float(i16 zeroext %7)
store float %8, float* %5
%9 = load i16, i16* %4
%10 = call float @half2float(i16 zeroext %9)
store float %10, float* %6
%11 = load float, float* %5
%12 = load float, float* %6
%13 = fsub float %11, %12
%14 = call zeroext i16 @float2half(float %13)
ret i16 %14
}

LLVM IR (-O2):
define zeroext i16 @subtract(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call float @half2float(i16 zeroext %0)
%4 = tail call float @half2float(i16 zeroext %1)
%5 = fsub float %3, %4
%6 = tail call zeroext i16 @float2half(float %5)
ret i16 %6
}
long long f(long long a, short b) {
  short c = (char)a * b;
  return c;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movsbl %al,%eax
movswl -0xa(%rbp),%ecx
imul   %ecx,%eax
mov    %ax,-0xc(%rbp)
movswq -0xc(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movsbl %dil,%eax
imul   %esi,%eax
movswq %ax,%rax
ret

LLVM IR (-O0):
define i64 @f(i64 %0, i16 signext %1) {
%3 = alloca i64
%4 = alloca i16
%5 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i8
%8 = sext i8 %7 to i32
%9 = load i16, i16* %4
%10 = sext i16 %9 to i32
%11 = mul nsw i32 %8, %10
%12 = trunc i32 %11 to i16
store i16 %12, i16* %5
%13 = load i16, i16* %5
%14 = sext i16 %13 to i64
ret i64 %14
}

LLVM IR (-O2):
define i64 @f(i64 %0, i16 signext %1) {
%3 = trunc i64 %0 to i32
%4 = shl i32 %3, 24
%5 = ashr exact i32 %4, 24
%6 = trunc i32 %5 to i16
%7 = mul i16 %6, %1
%8 = sext i16 %7 to i64
ret i64 %8
}
/* Variables and functions */
void *malloc(size_t);
void *mm_alloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<mm_alloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @mm_alloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @mm_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
void glGetQueryObjectiv(int id, int pname, int *params) {}


x86 assembly (clang, -O0):
<glGetQueryObjectiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @glGetQueryObjectiv(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
ret void
}

LLVM IR (-O2):
define void @glGetQueryObjectiv(i32 %0, i32 %1, i32* nocapture %2) {
ret void
}
double modl(double z0) {
  if (z0 >= 0)
    return (z0);
  else
    return (-1 * z0);
}


x86 assembly (clang, -O0):
<modl>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <modl+0x2a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113c <modl+0x3c>
movsd  0xece(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<modl>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm1,%xmm1
cmpnlesd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @modl(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load double, double* %3
store double %7, double* %2
br label %11
8: ; preds = %1
%9 = load double, double* %3
%10 = fmul double -1.000000e+00, %9
store double %10, double* %2
br label %11
11: ; preds = %8, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @modl(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x08() {
  Assert_real((isxdigit(8) == 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_isxdigit.c",
              45, ("isxdigit should be 0 for 0x08"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x08>:
push   %rax
mov    $0x8,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x08\00"
define void @t_isxdigit_0x08() {
%1 = call i64 @isxdigit(i32 8)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x08\00"
define void @t_isxdigit_0x08() {
%1 = tail call i64 @isxdigit(i32 8)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int extract_n2mbits(unsigned int input, int n, int m) {
  int mask;
  if (n > m) {
    n = n + m;
    m = n - m;
    n = n - m;
  }
  mask = ~(~0 << (m - n + 1));
  return ((input >> n) & mask);
}


x86 assembly (clang, -O0):
<extract_n2mbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1134 <extract_n2mbits+0x34>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
and    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_n2mbits>:
cmp    %edx,%esi
mov    %edx,%ecx
cmovg  %esi,%ecx
cmovg  %edx,%esi
sub    %esi,%ecx
add    $0x1,%cl
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
mov    %esi,%ecx
shr    %cl,%edi
and    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @extract_n2mbits(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %2
%5 = select i1 %4, i32 %1, i32 %2
%6 = select i1 %4, i32 %2, i32 %1
%7 = sub i32 1, %6
%8 = add i32 %7, %5
%9 = shl nsw i32 -1, %8
%10 = xor i32 %9, -1
%11 = lshr i32 %0, %6
%12 = and i32 %11, %10
ret i32 %12
}
/* Variables and functions */
int testfunc_new(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @testfunc_new() {
ret i32 1
}
/* Variables and functions */
scalar_t__ iosr_read();
unsigned int dps_mi_memsize(void) {
  return *(unsigned int *)((char *)iosr_read() + 0x120);
}


x86 assembly (clang, -O0):
<dps_mi_memsize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <iosr_read@plt>
mov    0x120(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dps_mi_memsize>:
push   %rax
xor    %eax,%eax
call   1030 <iosr_read@plt>
mov    0x120(%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dps_mi_memsize() {
%1 = call i64 (...) @iosr_read()
%2 = inttoptr i64 %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 288
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @dps_mi_memsize() {
%1 = tail call i64 (...) @iosr_read()
%2 = inttoptr i64 %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 288
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ char_out(char);
int /*<<< orphan*/ strout_lower(int /*<<< orphan*/ const *);
void strout_lower_spc(const uint8_t *p) {
  strout_lower(p);
  char_out(' ');
}


x86 assembly (clang, -O0):
<strout_lower_spc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strout_lower@plt>
mov    $0x20,%edi
call   1030 <char_out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strout_lower_spc>:
push   %rax
call   1040 <strout_lower@plt>
mov    $0x20,%edi
pop    %rax
jmp    1030 <char_out@plt>

LLVM IR (-O0):
define void @strout_lower_spc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @strout_lower(i32* %3)
%5 = call i32 @char_out(i8 signext 32)
ret void
}

LLVM IR (-O2):
define void @strout_lower_spc(i32* %0) {
%2 = tail call i32 @strout_lower(i32* %0)
%3 = tail call i32 @char_out(i8 signext 32)
ret void
}
void wMemInit() {}


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

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

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

LLVM IR (-O2):
define void @wMemInit() {
ret void
}
unsigned int hash(char *k) {
  unsigned int h;
  for (h = 0; *k; ++k)
    (h = h + *k);
  return h % 60000;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113c <hash+0x3c>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0xea60,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1136 <hash+0x36>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x45e7b273,%rcx,%rcx
shr    $0x2e,%rcx
imul   $0xea60,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %9, %4 ], [ 0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = add i32 %6, %8
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = urem i32 %9, 60000
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
void setup_portio_remap(void) {}


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

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

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

LLVM IR (-O2):
define void @setup_portio_remap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ convert(int);
int main() {
  convert(300);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @convert(i32 300)
ret i32 0
}
int Bematech_FI_LeituraFormasPagamento(Var, Retorno) {
  return Formata("\x1b|35|32|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_LeituraFormasPagamento>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_LeituraFormasPagamento>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|32|\1B\00"
define i32 @Bematech_FI_LeituraFormasPagamento(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 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|32|\1B\00"
define i32 @Bematech_FI_LeituraFormasPagamento(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Error(char *);
void picture_temporal_scalable_extension(void) {
  {
    Error((char *)"temporal scalability not supported\n");
    return;
  }
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"temporal scalability not supported\0A\00"
define void @picture_temporal_scalable_extension() {
%1 = call i32 @Error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"temporal scalability not supported\0A\00"
define void @picture_temporal_scalable_extension() {
%1 = tail call i32 @Error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Util_runtime_error(char *);
void *malloc(int);
void *Util_allocate(int nmemb, int size) {
  void *rtn = malloc(nmemb * size);
  if (rtn == NULL) {
    Util_runtime_error("Error when allocating memory");
  }
  return rtn;
}


x86 assembly (clang, -O0):
<Util_allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
imul   -0x8(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <Util_allocate+0x35>
lea    0xeb0(%rip),%rdi
call   1040 <Util_runtime_error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Util_allocate>:
push   %rbx
imul   %esi,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113d <Util_allocate+0x1d>
lea    0xec8(%rip),%rdi
call   1040 <Util_runtime_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Error when allocating memory\00"
define i8* @Util_allocate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @Util_runtime_error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [29 x i8] c"Error when allocating memory\00"
define noalias i8* @Util_allocate(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @Util_runtime_error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret i8* %4
}
unsigned xrop3_87_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T | S;
  stk1 = D & stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_87_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_87_0_0>:
mov    %edi,%eax
or     %esi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_87_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_87_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
%5 = xor i32 %4, -1
ret i32 %5
}
int main() {
  int x;
  x = 0;
  if (1 || (x = 1)) {
  }
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
long f2() { return "asdfg"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"asdfg\00"
define i64 @f2() {
ret i64 ptrtoint ([6 x i8]* @.str to i64)
}

LLVM IR (-O2):
@.str = [6 x i8] c"asdfg\00"
define i64 @f2() {
ret i64 ptrtoint ([6 x i8]* @.str to i64)
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t get16(uint8_t *buf) {
  return (uint32_t)buf[0] + ((uint32_t)buf[1] << 8);
}


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

x86 assembly (clang, -O2):
<get16>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
add    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get16(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = load i64*, i64** %2
%8 = getelementptr inbounds i64, i64* %7, i64 1
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @get16(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = add nsw i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(
      stderr,
      "Usege: genkey [key_file]\n"
      "\tif no key_file named used the default key file(%s)\n"
      "\tif a single hyphen-minus (-) is given as a key_file) stdout is used\n",
      "$HOME/"
      ".engkey");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [147 x i8] c"Usege: genkey [key_file]\0A\09if no key_file named used the default key file(%s)\0A\09if a single hyphen-minus (-) is given as a key_file) stdout is used\0A\00"
@.str.1 = [14 x i8] c"$HOME/.engkey\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [147 x i8] c"Usege: genkey [key_file]\0A\09if no key_file named used the default key file(%s)\0A\09if a single hyphen-minus (-) is given as a key_file) stdout is used\0A\00"
@.str.1 = [14 x i8] c"$HOME/.engkey\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char **argv) {
  int this = 5;
  int that = 13;
  printf("this: %d, that: %d, result: %d\n", this, that, (this + that));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
movl   $0xd,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x5,%esi
mov    $0xd,%edx
mov    $0x12,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"this: %d, that: %d, result: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 5, i32* %6
store i32 13, i32* %7
%8 = load i32, i32* %6
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = add nsw i32 %10, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"this: %d, that: %d, result: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 5, i32 13, i32 18)
ret i32 0
}
char *udstrdup(from) const char *from;
{ return udstrndup(from, strlen(from)); }


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

x86 assembly (clang, -O2):
<udstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <udstrndup@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
define i8* @udstrdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @udstrndup to i32 (i8*, i64, ...)*)(i8* %3, i64 %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @udstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @udstrndup to i32 (i8*, i64, ...)*)(i8* %0, i64 %2)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void NextLine() { WRITETEST("\033E"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"\1BE\00"
define void @NextLine() {
%1 = call i32 @WRITETEST(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\1BE\00"
define void @NextLine() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _ErrorS(long, char *, char const *);
void Error_MalformedToken(long p_position, const char *p_string) {
  _ErrorS(p_position, "Illegal token '%s'", p_string);
}


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

x86 assembly (clang, -O2):
<Error_MalformedToken>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <_ErrorS@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Illegal token '%s'\00"
define void @Error_MalformedToken(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = load i8*, i8** %4
%7 = call i32 @_ErrorS(i64 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Illegal token '%s'\00"
define void @Error_MalformedToken(i64 %0, i8* %1) {
%3 = tail call i32 @_ErrorS(i64 %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArgItem();
int /*<<< orphan*/ SetMe(int /*<<< orphan*/);
void Act_SetMe(void) { SetMe(ArgItem()); }


x86 assembly (clang, -O0):
<Act_SetMe>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <ArgItem@plt>
mov    %eax,%edi
call   1030 <SetMe@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_SetMe>:
push   %rax
xor    %eax,%eax
call   1040 <ArgItem@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <SetMe@plt>

LLVM IR (-O0):
define void @Act_SetMe() {
%1 = call i32 (...) @ArgItem()
%2 = call i32 @SetMe(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Act_SetMe() {
%1 = tail call i32 (...) @ArgItem()
%2 = tail call i32 @SetMe(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strcasecmp(char *, char *);
void strcasecmp_diff_length_0() {
  char *x = "abcde";
  char *y = "aBd";
  clang_analyzer_eval(strcasecmp(x, y) == -1);
}


x86 assembly (clang, -O0):
<strcasecmp_diff_length_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcasecmp_diff_length_0>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <strcasecmp@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [4 x i8] c"aBd\00"
define void @strcasecmp_diff_length_0() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcasecmp(i8* %3, i8* %4)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [4 x i8] c"aBd\00"
define void @strcasecmp_diff_length_0() {
%1 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
int substract(int a1, int a2) { return a1 - a2; }


x86 assembly (clang, -O0):
<substract>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<substract>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @substract(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @substract(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
int pl_on_lib_init(const void *const arg, const int arg_size) { return 0; }


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

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

LLVM IR (-O0):
define i32 @pl_on_lib_init(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @pl_on_lib_init(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
long double cos(double);
long double cosl(long double x) { return cos((double)x); }


x86 assembly (clang, -O0):
<cosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <cos@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <cos@plt>

LLVM IR (-O0):
define x86_fp80 @cosl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @cos(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @cosl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @cos(double %2)
ret x86_fp80 %3
}