xunge/DecIR huggingface dataset:
double power(double x, int n) {
  if (n == 1)
    return x;
  if ((n % 2) == 0)
    return power(x * x, n / 2);
  else
    return x * power(x, n - 1);
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1139 <power+0x29>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    119e <power+0x8e>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1173 <power+0x63>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <power@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    119e <power+0x8e>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edi
sub    $0x1,%edi
call   1030 <power@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
cmp    $0x1,%edi
je     113d <power+0x2d>
cs nopw 0x0(%rax,%rax,1)
nop
test   $0x1,%dil
jne    113e <power+0x2e>
mulsd  %xmm0,%xmm0
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
and    $0xfffffffe,%edi
cmp    $0x2,%edi
mov    %eax,%edi
jne    1120 <power+0x10>
ret
push   %rax
add    $0xffffffff,%edi
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
call   1030 <power@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
add    $0x8,%rsp
ret

LLVM IR (-O0):
define double @power(double %0, i32 %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %4
store double %9, double* %3
br label %28
10: ; preds = %2
%11 = load i32, i32* %5
%12 = srem i32 %11, 2
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %21
14: ; preds = %10
%15 = load double, double* %4
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = load i32, i32* %5
%19 = sdiv i32 %18, 2
%20 = call double @power(double %17, i32 %19)
store double %20, double* %3
br label %28
21: ; preds = %10
%22 = load double, double* %4
%23 = load double, double* %4
%24 = load i32, i32* %5
%25 = sub nsw i32 %24, 1
%26 = call double @power(double %23, i32 %25)
%27 = fmul double %22, %26
store double %27, double* %3
br label %28
28: ; preds = %21, %14, %8
%29 = load double, double* %3
ret double %29
}

LLVM IR (-O2):
define double @power(double %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %14, label %4
4: ; preds = %2, %9
%5 = phi i32 [ %11, %9 ], [ %1, %2 ]
%6 = phi double [ %10, %9 ], [ %0, %2 ]
%7 = and i32 %5, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = fmul double %6, %6
%11 = sdiv i32 %5, 2
%12 = and i32 %5, -2
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %4
14: ; preds = %9, %2, %16
%15 = phi double [ %19, %16 ], [ %0, %2 ], [ %10, %9 ]
ret double %15
16: ; preds = %4
%17 = add nsw i32 %5, -1
%18 = tail call double @power(double %6, i32 %17)
%19 = fmul double %6, %18
br label %14
}
void EVP_CipherUpdate(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CipherUpdate() {
ret void
}
void gpio_fec_inactive(void) {}


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

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

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

LLVM IR (-O2):
define void @gpio_fec_inactive() {
ret void
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int compare_offsets(const void *a, const void *b) {
  off_t *A = (off_t *)a;
  off_t *B = (off_t *)b;
  return *A - *B;
}


x86 assembly (clang, -O0):
<compare_offsets>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @compare_offsets(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int A[], int N) {
  int i;
  for (i = 0; i < N; i++)
    printf("%d\t", A[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\09\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printArray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
double CMtoM(double CM) { return CM / 100; }


x86 assembly (clang, -O0):
<CMtoM>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @CMtoM(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.000000e+02
ret double %4
}

LLVM IR (-O2):
define double @CMtoM(double %0) {
%2 = fdiv double %0, 1.000000e+02
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ start_scheduler();
void init_sched() { start_scheduler(); }


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

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

LLVM IR (-O0):
define void @init_sched() {
%1 = call i32 (...) @start_scheduler()
ret void
}

LLVM IR (-O2):
define void @init_sched() {
%1 = tail call i32 (...) @start_scheduler()
ret void
}
/* Variables and functions */
int pow(int, int);
int power(int stop) {
  int i, j;
  for (i = 0, j = 0; j < stop; i++)
    j = pow(2, i);
  return j;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1153 <power+0x43>
mov    -0x8(%rbp),%esi
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <power+0x19>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %edi,%edi
jle    113a <power+0x2a>
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x2,%edi
mov    %ebp,%esi
call   1030 <pow@plt>
add    $0x1,%ebp
cmp    %ebx,%eax
jl     1120 <power+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @power(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @pow(i32 2, i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp slt i32 %5, %0
br i1 %7, label %3, label %8
8: ; preds = %3, %1
%9 = phi i32 [ 0, %1 ], [ %5, %3 ]
ret i32 %9
}
void SysCtrlClockLossResetDisable(void) {
  (*((volatile unsigned long
          *)(((unsigned long)(0x40090000 + 0x00000028) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x40090000 + 0x00000028) & 0x000FFFFF) << 5) |
             ((5) << 2)))) = 0;
}


x86 assembly (clang, -O0):
<SysCtrlClockLossResetDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43200514,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtrlClockLossResetDisable>:
movq   $0x0,0x43200514
ret

LLVM IR (-O0):
define void @SysCtrlClockLossResetDisable() {
store volatile i64 0, i64* inttoptr (i64 1126171924 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtrlClockLossResetDisable() {
store volatile i64 0, i64* inttoptr (i64 1126171924 to i64*)
ret void
}
void SCSI_RST_ISR_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @SCSI_RST_ISR_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_get_home_dir() {
  printf("NOT IMPLEMENTED:"
         "pa_get_home_dir"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"NOT IMPLEMENTED:pa_get_home_dir\0A\00"
define i32 @pa_get_home_dir() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_get_home_dir\00"
define i32 @pa_get_home_dir() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int IntMax(int a, int b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<IntMax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <IntMax+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <IntMax+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntMax>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @IntMax(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @IntMax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ CG_WeaponIndex(int, int *, int *);
int getPrevWeapInBank(int, int);
int getPrevWeapInBankBynum(int weapnum) {
  int bank, cycle;
  if (!CG_WeaponIndex(weapnum, &bank, &cycle))
    return weapnum;
  return getPrevWeapInBank(bank, cycle);
}


x86 assembly (clang, -O0):
<getPrevWeapInBankBynum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <CG_WeaponIndex@plt>
cmp    $0x0,%eax
jne    114f <getPrevWeapInBankBynum+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <getPrevWeapInBankBynum+0x3d>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <getPrevWeapInBank@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPrevWeapInBankBynum>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <CG_WeaponIndex@plt>
test   %eax,%eax
je     1149 <getPrevWeapInBankBynum+0x29>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1030 <getPrevWeapInBank@plt>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @getPrevWeapInBankBynum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @CG_WeaponIndex(i32 %0, i32* %2, i32* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @getPrevWeapInBank(i32 %9, i32 %10)
br label %12
12: ; preds = %1, %8
%13 = phi i32 [ %11, %8 ], [ %0, %1 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void fun() { sleep(2); }


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

x86 assembly (clang, -O2):
<fun>:
mov    $0x2,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @fun() {
%1 = call i32 @sleep(i32 2)
ret void
}

LLVM IR (-O2):
define void @fun() {
%1 = tail call i32 @sleep(i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_postscript_comment_entities();
void all_postscript_tests() { test_postscript_comment_entities(); }


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

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

LLVM IR (-O0):
define void @all_postscript_tests() {
%1 = call i32 (...) @test_postscript_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_postscript_tests() {
%1 = tail call i32 (...) @test_postscript_comment_entities()
ret void
}
char randomNumber(int i) {
  if (i % 3 == 0)
    return 1;
  if (i % 3 == 1)
    return 2;
  if (i % 3 == 2)
    return 3;
  return 2;
}


x86 assembly (clang, -O0):
<randomNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1124 <randomNumber+0x24>
movb   $0x1,-0x1(%rbp)
jmp    1162 <randomNumber+0x62>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1141 <randomNumber+0x41>
movb   $0x2,-0x1(%rbp)
jmp    1162 <randomNumber+0x62>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x2,%edx
jne    115e <randomNumber+0x5e>
movb   $0x3,-0x1(%rbp)
jmp    1162 <randomNumber+0x62>
movb   $0x2,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomNumber>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
lea    0x1(%rax),%ecx
cmp    $0x3,%eax
movzbl %cl,%ecx
mov    $0x2,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i8 @randomNumber(i32 %0) {
%2 = srem i32 %0, 3
%3 = icmp ult i32 %2, 3
%4 = trunc i32 %2 to i8
%5 = add i8 %4, 1
%6 = select i1 %3, i8 %5, i8 2
ret i8 %6
}
int myisalpha(char ch) {
  return ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'));
}


x86 assembly (clang, -O0):
<myisalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <myisalpha+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <myisalpha+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <myisalpha+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myisalpha>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @myisalpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @myisalpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void BUF_MEM_free(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned int,
                           unsigned int);
int /*<<< orphan*/ fwrite(void *, unsigned int, int, int /*<<< orphan*/ *);
void dump_rgb(FILE *fp, void *data, unsigned int width, unsigned int height) {
  fprintf(fp, "P6 %u %u 255\n", width, height);
  fwrite(data, width * height * 3, 1, fp);
}


x86 assembly (clang, -O0):
<dump_rgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
imul   $0x3,%eax,%esi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_rgb>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
imul   %ebp,%ebx
lea    (%rbx,%rbx,2),%esi
mov    %r14,%rdi
mov    $0x1,%edx
mov    %r15,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"P6 %u %u 255\0A\00"
define void @dump_rgb(i32* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
%13 = load i8*, i8** %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = mul i32 %14, %15
%17 = mul i32 %16, 3
%18 = load i32*, i32** %5
%19 = call i32 @fwrite(i8* %13, i32 %17, i32 1, i32* %18)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"P6 %u %u 255\0A\00"
define void @dump_rgb(i32* nocapture %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%6 = mul i32 %2, 3
%7 = mul i32 %6, %3
%8 = tail call i32 @fwrite(i8* %1, i32 %7, i32 1, i32* %0)
ret void
}
__attribute__((always_)) void create_prof_cpu_mask(struct proc_dir_entry *de) {}


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

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

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

LLVM IR (-O2):
%struct.proc_dir_entry = type opaque
define void @create_prof_cpu_mask(%struct.proc_dir_entry* nocapture %0) {
ret void
}
void print_s(char s) { printf("%s\n", s); }


x86 assembly (clang, -O0):
<print_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @print_s(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Type definitions */
struct zint_symbol {
  int dummy;
};

/* Variables and functions */
int ean13_cc(struct zint_symbol *, unsigned char const *, int, char *,
             int /*<<< orphan*/);
int ean13(struct zint_symbol *symbol, const unsigned char source[], int length,
          char dest[]) {
  return ean13_cc(symbol, source, length, dest, 0);
}


x86 assembly (clang, -O0):
<ean13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <ean13_cc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ean13>:
xor    %r8d,%r8d
jmp    1030 <ean13_cc@plt>

LLVM IR (-O0):
%struct.zint_symbol = type { i32 }
define i32 @ean13(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca %struct.zint_symbol*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store %struct.zint_symbol* %0, %struct.zint_symbol** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load %struct.zint_symbol*, %struct.zint_symbol** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @ean13_cc(%struct.zint_symbol* %9, i8* %10, i32 %11, i8* %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.zint_symbol = type { i32 }
define i32 @ean13(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @ean13_cc(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3, i32 0)
ret i32 %5
}
/* Variables and functions */
char *longestPalindrome(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char const *argv[]) {
  char *string = "dddddddd";
  char *result = longestPalindrome(string);
  printf("result:%s \n", result);
  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)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <longestPalindrome@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <longestPalindrome@plt>
lea    0xed5(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"dddddddd\00"
@.str.1 = [12 x i8] c"result:%s \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @longestPalindrome(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
void bputc(char *buf, size_t *pos, size_t max, char c) {
  if (*pos < max)
    buf[(*pos)] = c;
  (*pos)++;
}


x86 assembly (clang, -O0):
<bputc>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
jae    1137 <bputc+0x37>
mov    -0x19(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bputc>:
mov    (%rsi),%rax
cmp    %rdx,%rax
jae    110e <bputc+0xe>
mov    %cl,(%rdi,%rax,1)
mov    (%rsi),%rax
add    $0x1,%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @bputc(i8* %0, i64* %1, i64 %2, i8 signext %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i8
store i8* %0, i8** %5
store i64* %1, i64** %6
store i64 %2, i64* %7
store i8 %3, i8* %8
%9 = load i64*, i64** %6
%10 = load i64, i64* %9
%11 = load i64, i64* %7
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %19
13: ; preds = %4
%14 = load i8, i8* %8
%15 = load i8*, i8** %5
%16 = load i64*, i64** %6
%17 = load i64, i64* %16
%18 = getelementptr inbounds i8, i8* %15, i64 %17
store i8 %14, i8* %18
br label %19
19: ; preds = %13, %4
%20 = load i64*, i64** %6
%21 = load i64, i64* %20
%22 = add i64 %21, 1
store i64 %22, i64* %20
ret void
}

LLVM IR (-O2):
define void @bputc(i8* nocapture writeonly %0, i64* nocapture %1, i64 %2, i8 signext %3) {
%5 = load i64, i64* %1
%6 = icmp ult i64 %5, %2
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %3, i8* %8
%9 = load i64, i64* %1
br label %10
10: ; preds = %7, %4
%11 = phi i64 [ %9, %7 ], [ %5, %4 ]
%12 = add i64 %11, 1
store i64 %12, i64* %1
ret void
}
int min(const int a, const int b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @min(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int hashtable_eqfn_int64(void *k1, void *k2) {
  int64_t i1 = *((int64_t *)k1);
  int64_t i2 = *((int64_t *)k2);
  return (i1 == i2);
}


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

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

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

LLVM IR (-O2):
define i32 @hashtable_eqfn_int64(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ is_alpha(char);
int ft_str_is_alpha(char *str) {
  int i;
  int result;
  i = 0;
  result = 1;
  while (str[i]) {
    if (!is_alpha(str[i]))
      result = 0;
    i++;
  }
  return (result);
}


x86 assembly (clang, -O0):
<ft_str_is_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     116b <ft_str_is_alpha+0x5b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <is_alpha@plt>
cmp    $0x0,%eax
jne    115d <ft_str_is_alpha+0x4d>
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <ft_str_is_alpha+0x1a>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_alpha>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114a <ft_str_is_alpha+0x3a>
mov    %rdi,%rbx
add    $0x1,%rbx
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <is_alpha@plt>
test   %eax,%eax
cmove  %eax,%ebp
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ft_str_is_alpha+0x20>
jmp    114f <ft_str_is_alpha+0x3f>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ft_str_is_alpha(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %21, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %24
12: ; preds = %5
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @is_alpha(i8 signext %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %12
store i32 0, i32* %4
br label %21
21: ; preds = %20, %12
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %5
24: ; preds = %5
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
define i32 @ft_str_is_alpha(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 i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %10, %4 ], [ 1, %1 ]
%8 = tail call i32 @is_alpha(i8 signext %6)
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 0, i32 %7
%11 = add nuw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 1, %1 ], [ %10, %4 ]
ret i32 %16
}
float maxf(float v1, float v2) { return v1 > v2 ? v1 : v2; }


x86 assembly (clang, -O0):
<maxf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <maxf+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <maxf+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxf>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @maxf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @maxf(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ my_strlen(char *);
scalar_t__ my_strncmp(char *, char *, int /*<<< orphan*/);
int my_str_startswith(char *s1, char *s2) {
  if (my_strncmp(s1, s2, my_strlen(s2)) == 0)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<my_str_startswith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <my_strncmp@plt>
cmp    $0x0,%rax
jne    116e <my_str_startswith+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <my_str_startswith+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_startswith>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <my_strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <my_strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @my_str_startswith(i8* %0, i8* %1) {
%3 = tail call i32 @my_strlen(i8* %1)
%4 = tail call i64 @my_strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int test_imm_60int64_highword_reg(long long val) {
  return ((val >> 32) & (0x60 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_60int64_highword_reg>:
movabs $0x6000000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_60int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 96
%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_60int64_highword_reg(i64 %0) {
%2 = and i64 %0, 412316860416
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gmx_vanhove(int, char **);
int main(int argc, char *argv[]) {
  gmx_vanhove(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_vanhove(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int bits;
int random();
int x;
int get_bit_double() {
  int bit;
  static bits = 0;
  static x;
  if (bits == 0) {
    x = random();
    bits = 63;
  }
  bit = x & 1;
  x = x >> 1;
  bits--;
  return bit;
}


x86 assembly (clang, -O0):
<get_bit_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f0d(%rip)
jne    113c <get_bit_double+0x2c>
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,0x2efe(%rip)
movl   $0x3f,0x2ef0(%rip)
mov    0x2eee(%rip),%eax
and    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    0x2ee2(%rip),%eax
sar    $0x1,%eax
mov    %eax,0x2ed9(%rip)
mov    0x2ecf(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2ec6(%rip)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit_double>:
push   %rax
mov    0x2f15(%rip),%edx
test   %edx,%edx
je     1126 <get_bit_double+0x16>
mov    0x2f0f(%rip),%eax
add    $0xffffffff,%edx
jmp    1132 <get_bit_double+0x22>
xor    %eax,%eax
call   1030 <random@plt>
mov    $0x3e,%edx
mov    %eax,%ecx
and    $0x1,%ecx
sar    %eax
mov    %eax,0x2ef1(%rip)
mov    %edx,0x2ee7(%rip)
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@get_bit_double.bits = internal global i32 0
@get_bit_double.x = internal global i32 0
@bits = global i32 0
@x = global i32 0
define i32 @get_bit_double() {
%1 = alloca i32
%2 = load i32, i32* @get_bit_double.bits
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @random()
store i32 %5, i32* @get_bit_double.x
store i32 63, i32* @get_bit_double.bits
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* @get_bit_double.x
%8 = and i32 %7, 1
store i32 %8, i32* %1
%9 = load i32, i32* @get_bit_double.x
%10 = ashr i32 %9, 1
store i32 %10, i32* @get_bit_double.x
%11 = load i32, i32* @get_bit_double.bits
%12 = add nsw i32 %11, -1
store i32 %12, i32* @get_bit_double.bits
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@get_bit_double.bits = internal unnamed_addr global i32 0
@get_bit_double.x = internal unnamed_addr global i32 0
@bits = global i32 0
@x = global i32 0
define i32 @get_bit_double() {
%1 = load i32, i32* @get_bit_double.bits
%2 = icmp eq i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @get_bit_double.x
%5 = add i32 %1, -1
br label %8
6: ; preds = %0
%7 = tail call i32 (...) @random()
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %5, %3 ], [ 62, %6 ]
%10 = phi i32 [ %4, %3 ], [ %7, %6 ]
%11 = and i32 %10, 1
%12 = ashr i32 %10, 1
store i32 %12, i32* @get_bit_double.x
store i32 %9, i32* @get_bit_double.bits
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ _puts(char *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void die(char *msg, ...) {
  va_list args;
  _puts(msg, 8);
  exit(0);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <_puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    $0x8,%esi
call   1030 <_puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @die(i8* %0, ...) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @_puts(i8* %4, i32 8)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @die(i8* %0, ...) {
%2 = tail call i32 @_puts(i8* %0, i32 8)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ signal(int, int);
int f(void) {
  signal(8, 1);
  signal(8, 1);
  signal(8, 1);
  signal(8, 1);
  signal(8, 1);
  signal(8, 1);
  signal(8, 1);
  signal(8, 1);
  signal(8, 1);
  puts("done");
  return 0;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
lea    0xe4e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <signal@plt>
lea    0xe51(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"done\00"
define i32 @f() {
%1 = call i32 @signal(i32 8, i32 1)
%2 = call i32 @signal(i32 8, i32 1)
%3 = call i32 @signal(i32 8, i32 1)
%4 = call i32 @signal(i32 8, i32 1)
%5 = call i32 @signal(i32 8, i32 1)
%6 = call i32 @signal(i32 8, i32 1)
%7 = call i32 @signal(i32 8, i32 1)
%8 = call i32 @signal(i32 8, i32 1)
%9 = call i32 @signal(i32 8, i32 1)
%10 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"done\00"
define i32 @f() {
%1 = tail call i32 @signal(i32 8, i32 1)
%2 = tail call i32 @signal(i32 8, i32 1)
%3 = tail call i32 @signal(i32 8, i32 1)
%4 = tail call i32 @signal(i32 8, i32 1)
%5 = tail call i32 @signal(i32 8, i32 1)
%6 = tail call i32 @signal(i32 8, i32 1)
%7 = tail call i32 @signal(i32 8, i32 1)
%8 = tail call i32 @signal(i32 8, i32 1)
%9 = tail call i32 @signal(i32 8, i32 1)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int INLINE_SYSCALL(int /*<<< orphan*/, int, int /*<<< orphan*/, char const *,
                   int /*<<< orphan*/, char const *);
int /*<<< orphan*/ renameat;
int rename(const char *oldpath, const char *newpath) {
  return INLINE_SYSCALL(renameat, 4, AT_FDCWD, oldpath, AT_FDCWD, newpath);
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rcx
mov    0x2e93(%rip),%rax
mov    (%rax),%r8d
mov    -0x10(%rbp),%r9
mov    $0x4,%esi
call   1030 <INLINE_SYSCALL@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
mov    %rsi,%r9
mov    %rdi,%rcx
mov    0x2ecb(%rip),%rax
mov    (%rax),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
mov    %edx,%r8d
jmp    1030 <INLINE_SYSCALL@plt>

LLVM IR (-O0):
@renameat = global i32 0
@AT_FDCWD = global i32 0
define i32 @rename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @renameat
%6 = load i32, i32* @AT_FDCWD
%7 = load i8*, i8** %3
%8 = load i32, i32* @AT_FDCWD
%9 = load i8*, i8** %4
%10 = call i32 @INLINE_SYSCALL(i32 %5, i32 4, i32 %6, i8* %7, i32 %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
@renameat = global i32 0
@AT_FDCWD = global i32 0
define i32 @rename(i8* %0, i8* %1) {
%3 = load i32, i32* @renameat
%4 = load i32, i32* @AT_FDCWD
%5 = tail call i32 @INLINE_SYSCALL(i32 %3, i32 4, i32 %4, i8* %0, i32 %4, i8* %1)
ret i32 %5
}