xunge/DecIR huggingface dataset:
int xmlUCSIsCombiningDiacriticalMarks(int code) {
  return (((code >= 0x0300) && (code <= 0x036F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsCombiningDiacriticalMarks>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x300,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsCombiningDiacriticalMarks+0x26>
cmpl   $0x36f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsCombiningDiacriticalMarks>:
add    $0xfffffd00,%edi
xor    %eax,%eax
cmp    $0x70,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsCombiningDiacriticalMarks(i32 %0) {
%2 = add i32 %0, -768
%3 = icmp ult i32 %2, 112
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned int f26(unsigned int x, unsigned long int y) {
  return (x >> ((-y) & (8 * sizeof(unsigned int) - 1))) ^ (x << y);
}


x86 assembly (clang, -O0):
<f26>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f26>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f26(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = sub i64 0, %6
%8 = and i64 %7, 31
%9 = trunc i64 %8 to i32
%10 = lshr i32 %5, %9
%11 = load i32, i32* %3
%12 = load i64, i64* %4
%13 = trunc i64 %12 to i32
%14 = shl i32 %11, %13
%15 = xor i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f26(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = sub i32 0, %3
%5 = and i32 %4, 31
%6 = lshr i32 %0, %5
%7 = shl i32 %0, %3
%8 = xor i32 %6, %7
ret i32 %8
}
float operate(int k1, int k2) {
  float valor = (k1 * 3.0 + k2 * 7.0) / 10;
  k2++;
  return valor + 5;
}


x86 assembly (clang, -O0):
<operate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xefc(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xee8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xed0(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movss  0xeaa(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<operate>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
mulsd  0xef0(%rip),%xmm1
mulsd  0xef0(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0xeec(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
addss  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @operate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to double
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = fmul double %9, 7.000000e+00
%11 = call double @llvm.fmuladd.f64(double %7, double 3.000000e+00, double %10)
%12 = fdiv double %11, 1.000000e+01
%13 = fptrunc double %12 to float
store float %13, float* %5
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
%16 = load float, float* %5
%17 = fadd float %16, 5.000000e+00
ret float %17
}

LLVM IR (-O2):
define float @operate(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = fmul double %4, 7.000000e+00
%6 = tail call double @llvm.fmuladd.f64(double %3, double 3.000000e+00, double %5)
%7 = fdiv double %6, 1.000000e+01
%8 = fptrunc double %7 to float
%9 = fadd float %8, 5.000000e+00
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ LPUART1_DriverIRQHandler();
__attribute__((weak)) void LPUART1_IRQHandler(void) {
  LPUART1_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @LPUART1_IRQHandler() {
%1 = call i32 (...) @LPUART1_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @LPUART1_IRQHandler() {
%1 = tail call i32 (...) @LPUART1_DriverIRQHandler()
ret void
}
/* Variables and functions */
bool is_leap(int year) {
  if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<is_leap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112f <is_leap+0x2f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <is_leap+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <is_leap+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <is_leap+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap>:
test   $0x3,%dil
sete   %al
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
cmp    $0x28f5c29,%edx
setae  %dl
and    %al,%dl
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
setb   %al
or     %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_leap(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = srem i32 %8, 100
%10 = icmp ne i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %7, %1
%12 = load i32, i32* %3
%13 = srem i32 %12, 400
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %7
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_leap(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp ne i32 %4, 0
%6 = and i1 %3, %5
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}
const char *Float_Name(void) { return "Float"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"Float\00"
define i8* @Float_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"Float\00"
define i8* @Float_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void plip_detach(struct parport *port) {
  { return; }
}


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

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

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

LLVM IR (-O2):
%struct.parport = type opaque
define void @plip_detach(%struct.parport* nocapture %0) {
ret void
}
void printarrayv(double *a, int aux) {
  int nvar;
  double(*ptr)[aux] = (double(*)[aux])a;
  for (nvar = 0; nvar < 1000; nvar++) {
  }
}


x86 assembly (clang, -O0):
<printarrayv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3e8,-0x10(%rbp)
jge    113a <printarrayv+0x3a>
jmp    112c <printarrayv+0x2c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111a <printarrayv+0x1a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @printarrayv(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
store double* %0, double** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = load double*, double** %3
store double* %11, double** %6
store i32 0, i32* %5
br label %12
12: ; preds = %16, %2
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 1000
br i1 %14, label %15, label %19
15: ; preds = %12
br label %16
16: ; preds = %15
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %12
19: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @printarrayv(double* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c;
  while ((c = (getchar() != EOF))) {
    printf("\n%d", c);
  }
  printf("\n%d\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x8(%rbp)
test   $0x1,%al
jne    115b <main+0x3b>
jmp    116f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
mov    -0x8(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%rax
je     1159 <main+0x39>
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea4(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i64 0
@.str = [4 x i8] c"\0A%d\00"
@.str.1 = [5 x i8] c"\0A%d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i64 (...) @getchar()
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
%10 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}
void NCONF_default(void) {}


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

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

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

LLVM IR (-O2):
define void @NCONF_default() {
ret void
}
int rcu_lockdep_current_cpu_online(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @rcu_lockdep_current_cpu_online() {
ret i32 1
}
int main() {
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    110b <main+0xb>

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

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
long long _strtoll_r(struct _reent *, char const *, char **, int);
long long _atoll_r(struct _reent *ptr, const char *str) {
  return _strtoll_r(ptr, str, (char **)NULL, 10);
}


x86 assembly (clang, -O0):
<_atoll_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0xa,%ecx
call   1030 <_strtoll_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_atoll_r>:
xor    %edx,%edx
mov    $0xa,%ecx
jmp    1030 <_strtoll_r@plt>

LLVM IR (-O0):
%struct._reent = type { i32 }
define i64 @_atoll_r(%struct._reent* %0, i8* %1) {
%3 = alloca %struct._reent*
%4 = alloca i8*
store %struct._reent* %0, %struct._reent** %3
store i8* %1, i8** %4
%5 = load %struct._reent*, %struct._reent** %3
%6 = load i8*, i8** %4
%7 = call i64 @_strtoll_r(%struct._reent* %5, i8* %6, i8** null, i32 10)
ret i64 %7
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define i64 @_atoll_r(%struct._reent* %0, i8* %1) {
%3 = tail call i64 @_strtoll_r(%struct._reent* %0, i8* %1, i8** null, i32 10)
ret i64 %3
}
int main(void) {
  extern void _keymgr_set_per_thread_data(unsigned int key, void *keydata);
  _keymgr_set_per_thread_data(500, 0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
tail call void @_keymgr_set_per_thread_data(i32 500, i8* null)
ret i32 0
}
void avformat_find_stream_info() {}


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

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

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

LLVM IR (-O2):
define void @avformat_find_stream_info() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tty_showboard(char const *);
void showboard(const char *b) { tty_showboard(b); }


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

x86 assembly (clang, -O2):
<showboard>:
jmp    1030 <tty_showboard@plt>

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

LLVM IR (-O2):
define void @showboard(i8* %0) {
%2 = tail call i32 @tty_showboard(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void l1_non_existant_read(void) {
  int *i = (void *)0xFFAFFFFC;
  printf("%i\n", *i);
}


x86 assembly (clang, -O0):
<l1_non_existant_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xffaffffc,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l1_non_existant_read>:
mov    $0xffaffffc,%eax
mov    (%rax),%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define void @l1_non_existant_read() {
%1 = load i32, i32* inttoptr (i64 4289724412 to i32*)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int pixel_get_signed_r8(unsigned int pixel) { return (char)(pixel & 0xFF); }


x86 assembly (clang, -O0):
<pixel_get_signed_r8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_get_signed_r8>:
movsbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @pixel_get_signed_r8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = trunc i32 %4 to i8
%6 = sext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @pixel_get_signed_r8(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
ret i32 %3
}
int fn1(int p1) {
  if (p1 < -2147483647)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x80000001,-0x8(%rbp)
jge    1120 <fn1+0x20>
movl   $0x0,-0x4(%rbp)
jmp    1127 <fn1+0x27>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
xor    %eax,%eax
cmp    $0x80000000,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @fn1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, -2147483647
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %8
7: ; preds = %1
store i32 1, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @fn1(i32 %0) {
%2 = icmp ne i32 %0, -2147483648
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void pand(int a, int b) { printf("%d & %d = %d\n", a, b, a & b); }


x86 assembly (clang, -O0):
<pand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
and    -0x8(%rbp),%ecx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pand>:
mov    %esi,%edx
mov    %edi,%esi
mov    %edx,%ecx
and    %edi,%ecx
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%d & %d = %d\0A\00"
define void @pand(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 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = and i32 %7, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d & %d = %d\0A\00"
define void @pand(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdin;
int get_confirm(const char *question) {
  char tmp_str[125 + 1];
  printf("%s", question);
  fgets(tmp_str, 125, stdin);
  if (tmp_str[0] == 'Y' || tmp_str[0] == 'y') {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<get_confirm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
mov    $0x7d,%esi
call   1040 <fgets@plt>
movsbl -0x90(%rbp),%eax
cmp    $0x59,%eax
je     1179 <get_confirm+0x59>
movsbl -0x90(%rbp),%eax
cmp    $0x79,%eax
jne    1185 <get_confirm+0x65>
movl   $0x1,-0x4(%rbp)
jmp    118c <get_confirm+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_confirm>:
sub    $0x88,%rsp
mov    %rdi,%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x7d,%esi
call   1040 <fgets@plt>
mov    (%rsp),%cl
and    $0xdf,%cl
xor    %eax,%eax
cmp    $0x59,%cl
sete   %al
add    $0x88,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define i32 @get_confirm(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [126 x i8]
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [126 x i8], [126 x i8]* %4, i64 0, i64 0
%8 = load i32, i32* @stdin
%9 = call i32 @fgets(i8* %7, i32 125, i32 %8)
%10 = getelementptr inbounds [126 x i8], [126 x i8]* %4, i64 0, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 89
br i1 %13, label %19, label %14
14: ; preds = %1
%15 = getelementptr inbounds [126 x i8], [126 x i8]* %4, i64 0, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 121
br i1 %18, label %19, label %20
19: ; preds = %14, %1
store i32 1, i32* %2
br label %21
20: ; preds = %14
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define i32 @get_confirm(i8* %0) {
%2 = alloca [126 x i8]
%3 = getelementptr inbounds [126 x i8], [126 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %3, i32 125, i32 %5)
%7 = load i8, i8* %3
%8 = and i8 %7, -33
%9 = icmp eq i8 %8, 89
%10 = zext i1 %9 to i32
ret i32 %10
}
void RTF_ClearName(char *token) { token[0] = 0; }


x86 assembly (clang, -O0):
<RTF_ClearName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTF_ClearName>:
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @RTF_ClearName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %4
ret void
}

LLVM IR (-O2):
define void @RTF_ClearName(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a, b;
  a = 2;
  b = 7;
  b++;
  if (a > 3) {
    a++;
  }
  printf("a=%d b=%d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0x8(%rbp)
jle    1149 <main+0x39>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"a=%d b=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 2, i32 8)
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int extract_month(uint16_t date) { return (date >> 7) & 0x000f; }


x86 assembly (clang, -O0):
<extract_month>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x7,%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_month>:
mov    %edi,%eax
shr    $0x7,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @extract_month(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 7
%5 = and i32 %4, 15
ret i32 %5
}

LLVM IR (-O2):
define i32 @extract_month(i32 %0) {
%2 = lshr i32 %0, 7
%3 = and i32 %2, 15
ret i32 %3
}
int test_imm_79uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x79 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_79uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 121
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.mm_struct = type opaque
%struct.task_struct = type opaque
define void @enter_lazy_tlb(%struct.mm_struct* nocapture %0, %struct.task_struct* nocapture %1) {
ret void
}
char f(char x) { return x + 1; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @f(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, 1
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @f(i8 signext %0) {
%2 = add i8 %0, 1
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ printArray(int *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ quickSort(int *, int /*<<< orphan*/, int);
int main() {
  int arr[] = {10, 7, 8, 9, 1, 5};
  int n = sizeof(arr) / sizeof(arr[0]);
  quickSort(arr, 0, n - 1);
  printf("Sorted array: \n");
  printArray(arr, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1040 <quickSort@plt>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1050 <printArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xed4(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1040 <quickSort@plt>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1050 <printArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [6 x i32] [i32 10, i32 7, i32 8, i32 9, i32 1, i32 5]
@.str = [16 x i8] c"Sorted array: \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [6 x i32]* %2 to i8*
store i32 6, i32* %3
%5 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
%8 = call i32 @quickSort(i32* %5, i32 0, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%11 = load i32, i32* %3
%12 = call i32 @printArray(i32* %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [6 x i32] [i32 10, i32 7, i32 8, i32 9, i32 1, i32 5]
@str = [15 x i8] c"Sorted array: \00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @quickSort(i32* %3, i32 0, i32 5)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%6 = call i32 @printArray(i32* %3, i32 6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void print_name(char *input) {
  char buf[15];
  strcpy(buf, input);
  printf("Hello %s\n", buf);
}


x86 assembly (clang, -O0):
<print_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x17(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x17(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_name>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rsi
lea    0x1(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"Hello %s\0A\00"
define void @print_name(i8* %0) {
%2 = alloca [15 x i8]
%3 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
void PDMR3UsbCreateEmulatedDevice(void) {}


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

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

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

LLVM IR (-O2):
define void @PDMR3UsbCreateEmulatedDevice() {
ret void
}
double in2mm(double d) { return d * 25.4; }


x86 assembly (clang, -O0):
<in2mm>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @in2mm(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 2.540000e+01
ret double %4
}

LLVM IR (-O2):
define double @in2mm(double %0) {
%2 = fmul double %0, 2.540000e+01
ret double %2
}
void retro_init() {}


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

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

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

LLVM IR (-O2):
define void @retro_init() {
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_whline_set(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_whline_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_whline_set+0x2a>
jmp    1170 <cmd_whline_set+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_whline_set>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_whline_set+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_whline_set(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_whline_set(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
int Cannonball(int height) {
  if (height == 1)
    return 1;
  return (height * height) + Cannonball(height - 1);
}


x86 assembly (clang, -O0):
<Cannonball>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <Cannonball+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1150 <Cannonball+0x40>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <Cannonball@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cannonball>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     114b <Cannonball+0x4b>
lea    -0x2(%rdi),%ecx
mov    %ecx,%eax
imul   %edi,%eax
add    $0x1,%eax
imul   %ecx,%eax
mov    $0x3,%esi
sub    %edi,%esi
sub    %edi,%esi
lea    -0x3(%rdi),%edx
imul   %rcx,%rdx
lea    -0x4(%rdi),%ecx
imul   %rdx,%rcx
shr    %rdx
imul   %esi,%edx
shr    %rcx
imul   $0x55555556,%ecx,%ecx
imul   %edi,%edi
add    %eax,%edi
add    %edx,%edi
lea    (%rcx,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @Cannonball(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %28, label %3
3: ; preds = %1
%4 = add i32 %0, -2
%5 = mul i32 %4, %0
%6 = add i32 %5, 1
%7 = mul i32 %4, %6
%8 = mul i32 %0, -2
%9 = add i32 %8, 3
%10 = zext i32 %4 to i33
%11 = add i32 %0, -3
%12 = zext i32 %11 to i33
%13 = mul i33 %10, %12
%14 = lshr i33 %13, 1
%15 = trunc i33 %14 to i32
%16 = mul i32 %9, %15
%17 = add i32 %0, -4
%18 = zext i32 %17 to i33
%19 = mul i33 %13, %18
%20 = lshr i33 %19, 1
%21 = trunc i33 %20 to i32
%22 = mul i32 %21, 1431655766
%23 = mul i32 %0, %0
%24 = add i32 %23, %7
%25 = add i32 %24, %16
%26 = add i32 %25, %22
%27 = add i32 %26, 1
br label %28
28: ; preds = %3, %1
%29 = phi i32 [ 1, %1 ], [ %27, %3 ]
ret i32 %29
}
void lgtd_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @lgtd_cleanup() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ display;
};
struct TYPE_4__ {
  TYPE_1__ xmap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void *get_XEvent_xmap_display(void *_p) {
  return (void *)((XEvent *)_p)->xmap.display;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xmap_display>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i8* @get_XEvent_xmap_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @get_XEvent_xmap_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
char *strsep(char **, char const *);
char *strsep_ne(char **stringp, const char *delims) {
  char *ret;
  while ((ret = strsep(stringp, delims)) && !*ret)
    ;
  return ret;
}


x86 assembly (clang, -O0):
<strsep_ne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strsep@plt>
mov    %rax,%rcx
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     1152 <strsep_ne+0x42>
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1162 <strsep_ne+0x52>
jmp    1167 <strsep_ne+0x57>
jmp    1120 <strsep_ne+0x10>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsep_ne>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strsep@plt>
test   %rax,%rax
je     1135 <strsep_ne+0x25>
cmpb   $0x0,(%rax)
je     1120 <strsep_ne+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strsep_ne(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %18, %2
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %4
%9 = call i8* @strsep(i8** %7, i8* %8)
store i8* %9, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i8*, i8** %5
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
%15 = xor i1 %14, true
br label %16
16: ; preds = %11, %6
%17 = phi i1 [ false, %6 ], [ %15, %11 ]
br i1 %17, label %18, label %19
18: ; preds = %16
br label %6
19: ; preds = %16
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
define i8* @strsep_ne(i8** %0, i8* %1) {
br label %3
3: ; preds = %6, %2
%4 = tail call i8* @strsep(i8** %0, i8* %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i8, i8* %4
%8 = icmp eq i8 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %3, %6
ret i8* %4
}
/* Variables and functions */
unsigned long __builtin_wasm_memory_grow(int /*<<< orphan*/, unsigned long);
long unsigned int memory_grow(long unsigned int delta) {
  return __builtin_wasm_memory_grow(0, delta);
}


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

x86 assembly (clang, -O2):
<memory_grow>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <__builtin_wasm_memory_grow@plt>

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

LLVM IR (-O2):
define i64 @memory_grow(i64 %0) {
%2 = tail call i64 @__builtin_wasm_memory_grow(i32 0, i64 %0)
ret i64 %2
}
int main() {
  _Bool b;
  *(char *)&b = 123;
  if (*(char *)&b != 123)
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x7b,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x7b,%eax
je     1135 <main+0x25>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 123, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 123
br i1 %5, label %6, label %7
6: ; preds = %0
unreachable
7: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int isgraph(int ch) { return ch >= 0x21 && ch <= 0x7A; }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x21,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isgraph+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 90
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int const);
void process(const int delay) { usleep(delay); }


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

x86 assembly (clang, -O2):
<process>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @process(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}
/* Type definitions */
struct stat64 {
  int dummy;
};
struct stat {
  int dummy;
};

/* Variables and functions */
int __xstat(int, char const *, struct stat *);
int __xstat64(int ver, const char *argpath, struct stat64 *buf) {
  return __xstat(ver, argpath, (struct stat *)buf);
}


x86 assembly (clang, -O0):
<__xstat64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__xstat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xstat64>:
jmp    1030 <__xstat@plt>

LLVM IR (-O0):
%struct.stat64 = type { i32 }
%struct.stat = type { i32 }
define i32 @__xstat64(i32 %0, i8* %1, %struct.stat64* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.stat64*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.stat64* %2, %struct.stat64** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load %struct.stat64*, %struct.stat64** %6
%10 = bitcast %struct.stat64* %9 to %struct.stat*
%11 = call i32 @__xstat(i32 %7, i8* %8, %struct.stat* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.stat64 = type { i32 }
%struct.stat = type { i32 }
define i32 @__xstat64(i32 %0, i8* %1, %struct.stat64* %2) {
%4 = bitcast %struct.stat64* %2 to %struct.stat*
%5 = tail call i32 @__xstat(i32 %0, i8* %1, %struct.stat* %4)
ret i32 %5
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
int convertBackward(struct node *);
int addBackwardOrder(struct node *one, struct node *two) {
  return convertBackward(one) + convertBackward(two);
}


x86 assembly (clang, -O0):
<addBackwardOrder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <convertBackward@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <convertBackward@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addBackwardOrder>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <convertBackward@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <convertBackward@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @addBackwardOrder(%struct.node* %0, %struct.node* %1) {
%3 = alloca %struct.node*
%4 = alloca %struct.node*
store %struct.node* %0, %struct.node** %3
store %struct.node* %1, %struct.node** %4
%5 = load %struct.node*, %struct.node** %3
%6 = call i32 @convertBackward(%struct.node* %5)
%7 = load %struct.node*, %struct.node** %4
%8 = call i32 @convertBackward(%struct.node* %7)
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @addBackwardOrder(%struct.node* %0, %struct.node* %1) {
%3 = tail call i32 @convertBackward(%struct.node* %0)
%4 = tail call i32 @convertBackward(%struct.node* %1)
%5 = add nsw i32 %4, %3
ret i32 %5
}