xunge/DecIR huggingface dataset:
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int exists(char *fname) {
  struct stat stbuf;
  if (stat(fname, &stbuf) < 0) {
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    113f <exists+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1146 <exists+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = lshr i64 %4, 63
%6 = trunc i64 %5 to i32
%7 = xor i32 %6, 1
ret i32 %7
}
int utf8_forbidden(unsigned char octet) {
  switch (octet) {
  case 0xc0:
  case 0xc1:
  case 0xf5:
  case 0xff:
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<utf8_forbidden>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffff40,%eax
sub    $0x2,%eax
jb     114a <utf8_forbidden+0x4a>
jmp    1124 <utf8_forbidden+0x24>
mov    -0xc(%rbp),%eax
sub    $0xf5,%eax
je     114a <utf8_forbidden+0x4a>
jmp    1137 <utf8_forbidden+0x37>
mov    -0xc(%rbp),%eax
sub    $0xff,%eax
jne    1156 <utf8_forbidden+0x56>
jmp    114a <utf8_forbidden+0x4a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <utf8_forbidden+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_forbidden>:
add    $0x40,%dil
cmp    $0x3f,%dil
ja     1124 <utf8_forbidden+0x24>
mov    $0xffffffff,%eax
movzbl %dil,%ecx
movabs $0x8020000000000003,%rdx
bt     %rcx,%rdx
jae    1124 <utf8_forbidden+0x24>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @utf8_forbidden(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %7 [
i32 192, label %6
i32 193, label %6
i32 245, label %6
i32 255, label %6
]
6: ; preds = %1, %1, %1, %1
store i32 -1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @utf8_forbidden(i8 zeroext %0) {
switch i8 %0, label %2 [
i8 -64, label %3
i8 -63, label %3
i8 -11, label %3
i8 -1, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ -1, %1 ], [ -1, %1 ], [ -1, %1 ], [ -1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void I2SMasterClockSelect(unsigned long ulBase, unsigned long ulMClock) {
  unsigned long ulConfig;
  DEBUG_ASSERT(ulBase == 0x40054000);
  DEBUG_ASSERT((ulMClock & (0x00000010 | 0x00000020)) == ulMClock);
  ulConfig = (*((volatile unsigned long *)(ulBase + 0x00000C00))) &
             ~(0x00000010 | 0x00000020);
  (*((volatile unsigned long *)(ulBase + 0x00000C00))) = ulConfig | ulMClock;
}


x86 assembly (clang, -O0):
<I2SMasterClockSelect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x40054000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
and    $0x30,%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0xc00(%rax),%rax
and    $0xffffffffffffffcf,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
or     -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0xc00(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2SMasterClockSelect>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x40054000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
test   $0xffffffffffffffcf,%r14
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0xc00(%rbx),%rax
and    $0xffffffffffffffcf,%rax
or     %r14,%rax
mov    %rax,0xc00(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @I2SMasterClockSelect(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 1074085888
%8 = zext i1 %7 to i32
%9 = call i32 @DEBUG_ASSERT(i32 %8)
%10 = load i64, i64* %4
%11 = and i64 %10, 48
%12 = load i64, i64* %4
%13 = icmp eq i64 %11, %12
%14 = zext i1 %13 to i32
%15 = call i32 @DEBUG_ASSERT(i32 %14)
%16 = load i64, i64* %3
%17 = add i64 %16, 3072
%18 = inttoptr i64 %17 to i64*
%19 = load volatile i64, i64* %18
%20 = and i64 %19, -49
store i64 %20, i64* %5
%21 = load i64, i64* %5
%22 = load i64, i64* %4
%23 = or i64 %21, %22
%24 = load i64, i64* %3
%25 = add i64 %24, 3072
%26 = inttoptr i64 %25 to i64*
store volatile i64 %23, i64* %26
ret void
}

LLVM IR (-O2):
define void @I2SMasterClockSelect(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074085888
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = and i64 %1, 48
%7 = icmp eq i64 %6, %1
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = add i64 %0, 3072
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, -49
%14 = or i64 %13, %1
store volatile i64 %14, i64* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_exp_d(double *, double);
double xil_fpo_exp_d(double a) {
  double res_d;
  xip_fpo_exp_d(&res_d, a);
  return res_d;
}


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

x86 assembly (clang, -O2):
<xil_fpo_exp_d>:
push   %rax
mov    %rsp,%rdi
call   1030 <xip_fpo_exp_d@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @xil_fpo_exp_d(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @xip_fpo_exp_d(double* %2, double %0)
%5 = load double, double* %2
ret double %5
}
int valid_piece_or_empty(const int pce) { return (pce >= 0 && pce <= 12); }


x86 assembly (clang, -O0):
<valid_piece_or_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <valid_piece_or_empty+0x20>
cmpl   $0xc,-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):
<valid_piece_or_empty>:
xor    %eax,%eax
cmp    $0xd,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @valid_piece_or_empty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 12
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 @valid_piece_or_empty(i32 %0) {
%2 = icmp ult i32 %0, 13
%3 = zext i1 %2 to i32
ret i32 %3
}
double pow_(double x, int e) {
  int i;
  double r = 1;
  for (i = 0; i < e; i++) {
    r *= x;
  }
  return r;
}


x86 assembly (clang, -O0):
<pow_>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1149 <pow_+0x49>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <pow_+0x20>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow_>:
test   %edi,%edi
jle    111b <pow_+0x1b>
lea    -0x1(%rdi),%ecx
mov    %edi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    1124 <pow_+0x24>
movsd  0xee7(%rip),%xmm1
jmp    1155 <pow_+0x55>
movsd  0xedd(%rip),%xmm0
ret
and    $0xfffffff8,%edi
movsd  0xed1(%rip),%xmm1
nop
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
add    $0xfffffff8,%edi
jne    1130 <pow_+0x30>
test   %eax,%eax
je     1169 <pow_+0x69>
nopl   0x0(%rax)
mulsd  %xmm0,%xmm1
add    $0xffffffff,%eax
jne    1160 <pow_+0x60>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @pow_(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
store double 1.000000e+00, double* %6
store i32 0, i32* %5
br label %7
7: ; preds = %15, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load double, double* %3
%13 = load double, double* %6
%14 = fmul double %13, %12
store double %14, double* %6
br label %15
15: ; preds = %11
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %7
18: ; preds = %7
%19 = load double, double* %6
ret double %19
}

LLVM IR (-O2):
define double @pow_(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi double [ 1.000000e+00, %8 ], [ %20, %10 ]
%12 = phi i32 [ 0, %8 ], [ %21, %10 ]
%13 = fmul double %11, %0
%14 = fmul double %13, %0
%15 = fmul double %14, %0
%16 = fmul double %15, %0
%17 = fmul double %16, %0
%18 = fmul double %17, %0
%19 = fmul double %18, %0
%20 = fmul double %19, %0
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi double [ undef, %4 ], [ %20, %10 ]
%25 = phi double [ 1.000000e+00, %4 ], [ %20, %10 ]
%26 = icmp eq i32 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi double [ %30, %27 ], [ %25, %23 ]
%29 = phi i32 [ %31, %27 ], [ 0, %23 ]
%30 = fmul double %28, %0
%31 = add i32 %29, 1
%32 = icmp eq i32 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi double [ 1.000000e+00, %2 ], [ %24, %23 ], [ %30, %27 ]
ret double %34
}
int gemini_processor(void) {
  unsigned char cpu = *(unsigned char *)((0xffeffe20));
  return (int)((cpu == 0) ? 4 : (cpu & 0x03));
}


x86 assembly (clang, -O0):
<gemini_processor>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffeffe20,%eax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    1128 <gemini_processor+0x28>
mov    $0x4,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <gemini_processor+0x32>
movzbl -0x1(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gemini_processor>:
mov    $0xffeffe20,%eax
mov    (%rax),%al
mov    %eax,%ecx
and    $0x3,%cl
test   %al,%al
movzbl %cl,%eax
mov    $0x4,%ecx
cmovne %eax,%ecx
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @gemini_processor() {
%1 = alloca i8
%2 = load i8, i8* inttoptr (i64 4293918240 to i8*)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
br label %11
7: ; preds = %0
%8 = load i8, i8* %1
%9 = zext i8 %8 to i32
%10 = and i32 %9, 3
br label %11
11: ; preds = %7, %6
%12 = phi i32 [ 4, %6 ], [ %10, %7 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @gemini_processor() {
%1 = load i8, i8* inttoptr (i64 4293918240 to i8*)
%2 = icmp eq i8 %1, 0
%3 = and i8 %1, 3
%4 = select i1 %2, i8 4, i8 %3
%5 = zext i8 %4 to i32
ret i32 %5
}
/* Type definitions */
struct RendererStateLogic {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _RSL_HandleTrackChange(void *, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ _RSL_OnCodecStateChange(void *);
void RSL_OnCodecEvent_Ended(void *rslObj) {
  struct RendererStateLogic *rsl;
  ;
  rsl = (struct RendererStateLogic *)rslObj;
  _RSL_HandleTrackChange(rslObj, 0, 1, 1);
  _RSL_OnCodecStateChange(rslObj);
}


x86 assembly (clang, -O0):
<RSL_OnCodecEvent_Ended>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1040 <_RSL_HandleTrackChange@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_RSL_OnCodecStateChange@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RSL_OnCodecEvent_Ended>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1040 <_RSL_HandleTrackChange@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <_RSL_OnCodecStateChange@plt>

LLVM IR (-O0):
%struct.RendererStateLogic = type { i32 }
define void @RSL_OnCodecEvent_Ended(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.RendererStateLogic*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.RendererStateLogic*
store %struct.RendererStateLogic* %5, %struct.RendererStateLogic** %3
%6 = load i8*, i8** %2
%7 = call i32 @_RSL_HandleTrackChange(i8* %6, i32 0, i32 1, i32 1)
%8 = load i8*, i8** %2
%9 = call i32 @_RSL_OnCodecStateChange(i8* %8)
ret void
}

LLVM IR (-O2):
define void @RSL_OnCodecEvent_Ended(i8* %0) {
%2 = tail call i32 @_RSL_HandleTrackChange(i8* %0, i32 0, i32 1, i32 1)
%3 = tail call i32 @_RSL_OnCodecStateChange(i8* %0)
ret void
}
int close(fd)
int fd;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ligne_2(int x) {
  int a;
  a = 0;
  while (a != x) {
    if (a != 0 && a != x - 1) {
      ft_putchar(' ');
    } else {
      ft_putchar('|');
    }
    a++;
  }
}


x86 assembly (clang, -O0):
<ligne_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1170 <ligne_2+0x60>
cmpl   $0x0,-0x8(%rbp)
je     1158 <ligne_2+0x48>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1158 <ligne_2+0x48>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
jmp    1162 <ligne_2+0x52>
mov    $0x7c,%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ligne_2+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ligne_2>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     1151 <ligne_2+0x41>
mov    %edi,%r14d
xor    %ebx,%ebx
mov    $0x7c,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r14,%rbx,1),%eax
cmp    $0x1,%eax
mov    $0x20,%edi
cmove  %ebp,%edi
sub    $0x1,%ebx
cmovb  %ebp,%edi
call   1030 <ft_putchar@plt>
mov    %r14d,%eax
add    %ebx,%eax
jne    1130 <ligne_2+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @ligne_2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %20, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %23
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = sub nsw i32 %13, 1
%15 = icmp ne i32 %12, %14
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 @ft_putchar(i8 signext 32)
br label %20
18: ; preds = %11, %8
%19 = call i32 @ft_putchar(i8 signext 124)
br label %20
20: ; preds = %18, %16
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %4
23: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @ligne_2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ 0, %3 ], [ %12, %5 ]
%7 = icmp eq i32 %6, 0
%8 = icmp eq i32 %6, %4
%9 = select i1 %7, i1 true, i1 %8
%10 = select i1 %9, i8 124, i8 32
%11 = tail call i32 @ft_putchar(i8 signext %10)
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %0
br i1 %13, label %14, label %5
14: ; preds = %5, %1
ret void
}
long double igraph_logbl(long double x) {
  long double res;
  __asm__("fxtract\n\t"
          "fstp	%%st"
          : "=t"(res)
          : "0"(x));
  return res;
}


x86 assembly (clang, -O0):
<igraph_logbl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fxtract
fstp   %st(0)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<igraph_logbl>:
fldt   0x8(%rsp)
fxtract
fstp   %st(0)
ret

LLVM IR (-O0):
define x86_fp80 @igraph_logbl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 asm "fxtract\0A\09fstp\09%st", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @igraph_logbl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm "fxtract\0A\09fstp\09%st", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
scalar_t__ cube(int);
int s(int n) {
  int i, sum = 0;
  for (i = 1; i <= n; i++) {
    sum += cube(i);
  }
  return sum;
}


x86 assembly (clang, -O0):

:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1158 <s+0x48>
mov    -0x8(%rbp),%edi
call   1030 <cube@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <s+0x19>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):

:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    114e <s+0x3e>
mov    %edi,%r14d
neg    %r14d
mov    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <cube@plt>
add    %eax,%ebp
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <s+0x20>
jmp    1150 <s+0x40>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @s(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
store i32 1, i32* %3
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %19
9: ; preds = %5
%10 = load i32, i32* %3
%11 = call i64 @cube(i32 %10)
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, %11
%15 = trunc i64 %14 to i32
store i32 %15, i32* %4
br label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %5
19: ; preds = %5
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @s(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 1, %1 ]
%6 = tail call i64 @cube(i32 %5)
%7 = trunc i64 %6 to i32
%8 = add i32 %4, %7
%9 = add nuw i32 %5, 1
%10 = icmp eq i32 %5, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
main() {
  printf(&1 ["\021%six\021\0"], (1)["have"] + "fun" - 0x60);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movsbl 0xeee(%rip),%eax
cltq
lea    0xee9(%rip),%rsi
add    %rax,%rsi
add    $0xffffffffffffffa0,%rsi
lea    0xece(%rip),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed9(%rip),%rdi
lea    0xeda(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\11%six\11\00\00"
@.str.1 = [5 x i8] c"have\00"
@.str.2 = [4 x i8] c"fun\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = load i8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 1)
%2 = sext i8 %1 to i32
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -96
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 1), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"\11%six\11\00\00"
@.str.2 = [4 x i8] c"fun\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 1), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 1))
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i, j, m, n;
  n = __VERIFIER_nondet_int();
  m = __VERIFIER_nondet_int();
  if (m > 0 && n > m) {
    i = 0;
    j = 0;
    while (i < n) {
      if (j < m) {
        j = j + 1;
      } else {
        j = 0;
        i = i + 1;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1197 <main+0x87>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1197 <main+0x87>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1192 <main+0x82>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    117d <main+0x6d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    118d <main+0x7d>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main+0x47>
jmp    1197 <main+0x87>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ showPNG(char *, int, int);
int main(int argc, char **argv) {
  if (argc == 2)
    showPNG(argv[1], 0x110, 0x111);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1147 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x110,%esi
mov    $0x111,%edx
call   1030 <showPNG@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jne    112d <main+0x1d>
push   %rax
mov    0x8(%rsi),%rdi
mov    $0x110,%esi
mov    $0x111,%edx
call   1030 <showPNG@plt>
add    $0x8,%rsp
xor    %eax,%eax
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 = icmp eq i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @showPNG(i8* %11, i32 272, i32 273)
br label %13
13: ; preds = %8, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @showPNG(i8* %6, i32 272, i32 273)
br label %8
8: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
long double cosl(long double);
long double powl(long double, long double);
long double sinl(long double);
long double g_bonus_derivative(long double x) {
  return powl(x - 4.0L, 2.0L) * (3.0L * sinl(x) + (x - 4.0L) * cosl(x));
}


x86 assembly (clang, -O0):
<g_bonus_derivative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeb9(%rip)
fld    %st(0)
fstpt  -0x40(%rbp)
fsubrp %st,%st(1)
mov    %rsp,%rax
flds   0xead(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1040 <powl@plt>
fstpt  -0x1c(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sinl@plt>
fldt   -0x40(%rbp)
fxch   %st(1)
fstpt  -0x28(%rbp)
fldt   -0x10(%rbp)
fsub   %st,%st(1)
fxch   %st(1)
fstpt  -0x34(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <cosl@plt>
fldt   -0x34(%rbp)
fldt   -0x28(%rbp)
fldt   -0x1c(%rbp)
fxch   %st(2)
fmulp  %st,%st(3)
flds   0xe68(%rip)
fmulp  %st,%st(1)
faddp  %st,%st(2)
fmulp  %st,%st(1)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_bonus_derivative>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fld    %st(0)
fstpt  0x18(%rsp)
fld    %st(0)
fadds  0xeca(%rip)
fld    %st(0)
fstpt  0x30(%rsp)
fmul   %st,%st(0)
fstpt  0x3c(%rsp)
fstpt  (%rsp)
call   1030 <sinl@plt>
fstpt  0x24(%rsp)
fldt   0x18(%rsp)
fstpt  (%rsp)
call   1040 <cosl@plt>
fldt   0x30(%rsp)
fmulp  %st,%st(1)
fldt   0x24(%rsp)
fmuls  0xe9a(%rip)
faddp  %st,%st(1)
fldt   0x3c(%rsp)
fmulp  %st,%st(1)
add    $0x48,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @g_bonus_derivative(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fsub x86_fp80 %3, 0xK40018000000000000000
%5 = call x86_fp80 @powl(x86_fp80 %4, x86_fp80 0xK40008000000000000000)
%6 = load x86_fp80, x86_fp80* %2
%7 = call x86_fp80 @sinl(x86_fp80 %6)
%8 = load x86_fp80, x86_fp80* %2
%9 = fsub x86_fp80 %8, 0xK40018000000000000000
%10 = load x86_fp80, x86_fp80* %2
%11 = call x86_fp80 @cosl(x86_fp80 %10)
%12 = fmul x86_fp80 %9, %11
%13 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK4000C000000000000000, x86_fp80 %7, x86_fp80 %12)
%14 = fmul x86_fp80 %5, %13
ret x86_fp80 %14
}

LLVM IR (-O2):
define x86_fp80 @g_bonus_derivative(x86_fp80 %0) {
%2 = fadd x86_fp80 %0, 0xKC0018000000000000000
%3 = fmul x86_fp80 %2, %2
%4 = tail call x86_fp80 @sinl(x86_fp80 %0)
%5 = tail call x86_fp80 @cosl(x86_fp80 %0)
%6 = fmul x86_fp80 %2, %5
%7 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %4, x86_fp80 0xK4000C000000000000000, x86_fp80 %6)
%8 = fmul x86_fp80 %3, %7
ret x86_fp80 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ name;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
main() {
  int i[25];
  char name[] = "Italy";
  char City[6] = {'M', 'i', 'l', 'a', 'n', '\0'};
  float amount[100] = {0.0};
  printf("%s\n", name);
  printf("%d", sizeof(name) / sizeof(name[0]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    0xecf(%rip),%eax
mov    %eax,-0x76(%rbp)
mov    0xec9(%rip),%ax
mov    %ax,-0x72(%rbp)
mov    0xec1(%rip),%eax
mov    %eax,-0x7c(%rbp)
mov    0xebb(%rip),%ax
mov    %ax,-0x78(%rbp)
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
lea    -0x76(%rbp),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x79,0x4(%rsp)
movl   $0x6c617449,(%rsp)
mov    %rsp,%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.name = [6 x i8] c"Italy\00"
@__const.main.City = [6 x i8] c"Milan\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [25 x i32]
%2 = alloca [6 x i8]
%3 = alloca [6 x i8]
%4 = alloca [100 x float]
%5 = bitcast [6 x i8]* %2 to i8*
%6 = bitcast [6 x i8]* %3 to i8*
%7 = bitcast [100 x float]* %4 to i8*
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [6 x i8] c"Italy\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @puts(i8* %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 6)
ret i32 0
}
void copia(void) {
  int i = 0;
  extern char linea[], linea_max[];
  while ((linea_max[i] = linea[i]) != '\0')
    i++;
}


x86 assembly (clang, -O0):
<copia>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax,%rcx,1),%al
movslq -0x4(%rbp),%rdx
mov    0x2eb4(%rip),%rcx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1141 <copia+0x41>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copia+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copia>:
xor    %eax,%eax
mov    0x2ee7(%rip),%rsi
mov    0x2ec8(%rip),%rdx
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdx,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copia+0x10>
ret

LLVM IR (-O0):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %8
store i8 %6, i8* %9
%10 = sext i8 %6 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ %7, %1 ], [ 0, %0 ]
%3 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %2
%4 = load i8, i8* %3
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %2
store i8 %4, i8* %5
%6 = icmp eq i8 %4, 0
%7 = add nuw i64 %2, 1
br i1 %6, label %8, label %1
8: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __mftb();
uint64_t read_time(void) { return __mftb(); }


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

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

LLVM IR (-O0):
define i32 @read_time() {
%1 = call i32 (...) @__mftb()
ret i32 %1
}

LLVM IR (-O2):
define i32 @read_time() {
%1 = tail call i32 (...) @__mftb()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
void unbufferstdout_() { setbuf(stdout, NULL); }


x86 assembly (clang, -O0):
<unbufferstdout_>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unbufferstdout_>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <setbuf@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @unbufferstdout_() {
%1 = load i32, i32* @stdout
%2 = call i32 @setbuf(i32 %1, i32* null)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @unbufferstdout_() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setbuf(i32 %1, i32* null)
ret void
}
double sin(double d) {
  double res;
  asm("fsin" : "=t"(res) : "0"(d));
  return res;
}


x86 assembly (clang, -O0):
<sin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
fsin
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sin>:
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
fsin
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @sin(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double asm "fsin", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %4)
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @sin(double %0) {
%2 = tail call double asm "fsin", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %0)
ret double %2
}
void release(volatile int *spinlock) { (void)spinlock; }


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

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

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

LLVM IR (-O2):
define void @release(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
int /*<<< orphan*/ system(char *);
void screen_rtorrent_kill(char nickname[]) {
  char chaine[100] = {0};
  snprintf(chaine, 100, "su --command='screen -S %s-rtorrent -X quit' %s\n",
           nickname, nickname);
  printf("%s", chaine);
  system(chaine);
}


x86 assembly (clang, -O0):
<screen_rtorrent_kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1060 <memset@plt>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    $0x64,%esi
lea    0xe8c(%rip),%rdx
call   1050 <snprintf@plt>
lea    -0x70(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <system@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_rtorrent_kill>:
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rcx
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xe99(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %rcx,%r8
call   1050 <snprintf@plt>
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"su --command='screen -S %s-rtorrent -X quit' %s\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @screen_rtorrent_kill(i8* %0) {
%2 = alloca i8*
%3 = alloca [100 x i8]
store i8* %0, i8** %2
%4 = bitcast [100 x i8]* %3 to i8*
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @snprintf(i8* %5, i32 100, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = call i32 @system(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"su --command='screen -S %s-rtorrent -X quit' %s\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @screen_rtorrent_kill(i8* %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 100, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
char *ch_ltoa(char *, unsigned long, int);
char *ultoa(unsigned long val, char *s, int radix) {
  return ch_ltoa(s, val, radix);
}


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

x86 assembly (clang, -O2):
<ultoa>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <ch_ltoa@plt>

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

LLVM IR (-O2):
define i8* @ultoa(i64 %0, i8* %1, i32 %2) {
%4 = tail call i8* @ch_ltoa(i8* %1, i64 %0, i32 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void RTPanic(void) { abort(); }


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

x86 assembly (clang, -O2):
<RTPanic>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @RTPanic() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @RTPanic() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t get_volume_id() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @get_volume_id() {
ret i32 0
}
/* Variables and functions */
void Reserved_Handler36(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Reserved_Handler36>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Reserved_Handler36+0x9>
jmp    1109 <Reserved_Handler36+0x9>

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

LLVM IR (-O0):
define void @Reserved_Handler36() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Reserved_Handler36() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned char f24(unsigned char x, unsigned long int y) {
  return (x >> ((-y) & (8 - 1))) ^ (x << y);
}


x86 assembly (clang, -O0):
<f24>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x7,%rcx
sar    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x10(%rbp),%rcx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f24>:
mov    %esi,%ecx
neg    %cl
and    $0x7,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f24(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 0, %7
%9 = and i64 %8, 7
%10 = trunc i64 %9 to i32
%11 = ashr i32 %6, %10
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = shl i32 %13, %15
%17 = xor i32 %11, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @f24(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 0, %4
%6 = and i32 %5, 7
%7 = lshr i32 %3, %6
%8 = shl i32 %3, %4
%9 = xor i32 %7, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ isalnum(int);
scalar_t__ isprint(int);
int /*<<< orphan*/ isspace(int);
int ispunct(int c) { return (isprint(c) && !isalnum(c) && !isspace(c)); }


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <isprint@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1180 <ispunct+0x50>
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1180 <ispunct+0x50>
mov    -0x4(%rbp),%edi
call   1040 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispunct>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <isprint@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     115a <ispunct+0x2a>
mov    %ebp,%edi
call   1030 <isalnum@plt>
test   %eax,%eax
jne    115a <ispunct+0x2a>
mov    %ebp,%edi
call   1040 <isspace@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isprint(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @isalnum(i32 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @isspace(i32 %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %10, %6, %1
%16 = phi i1 [ false, %6 ], [ false, %1 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = tail call i64 @isprint(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @isalnum(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i32 @isspace(i32 %0)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
/* Type definitions */
struct fd_set {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __DARWIN_FD_SET(int, struct fd_set *);
void qs_fd_set(struct fd_set *set, int fd) { __DARWIN_FD_SET(fd, set); }


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

x86 assembly (clang, -O2):
<qs_fd_set>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <__DARWIN_FD_SET@plt>

LLVM IR (-O0):
%struct.fd_set = type { i32 }
define void @qs_fd_set(%struct.fd_set* %0, i32 %1) {
%3 = alloca %struct.fd_set*
%4 = alloca i32
store %struct.fd_set* %0, %struct.fd_set** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load %struct.fd_set*, %struct.fd_set** %3
%7 = call i32 @__DARWIN_FD_SET(i32 %5, %struct.fd_set* %6)
ret void
}

LLVM IR (-O2):
%struct.fd_set = type { i32 }
define void @qs_fd_set(%struct.fd_set* %0, i32 %1) {
%3 = tail call i32 @__DARWIN_FD_SET(i32 %1, %struct.fd_set* %0)
ret void
}
/* Variables and functions */
int open_logfile(char *);
int open_logfile_default(void) { return open_logfile("log"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"log\00"
define i32 @open_logfile_default() {
%1 = call i32 @open_logfile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [4 x i8] c"log\00"
define i32 @open_logfile_default() {
%1 = tail call i32 @open_logfile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int select(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int pause(void) { return select(0, NULL, NULL, NULL, NULL); }


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rsi
mov    %r8,%rdx
mov    %r8,%rcx
call   1030 <select@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <select@plt>

LLVM IR (-O0):
define i32 @pause() {
%1 = call i32 @select(i32 0, i32* null, i32* null, i32* null, i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @pause() {
%1 = tail call i32 @select(i32 0, i32* null, i32* null, i32* null, i32* null)
ret i32 %1
}
void dbg_crash_event(void) {}


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

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

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

LLVM IR (-O2):
define void @dbg_crash_event() {
ret void
}
/* Variables and functions */
unsigned long random();
unsigned long sec_rnd() { return random(); }


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

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

LLVM IR (-O0):
define i64 @sec_rnd() {
%1 = call i64 (...) @random()
ret i64 %1
}

LLVM IR (-O2):
define i64 @sec_rnd() {
%1 = tail call i64 (...) @random()
ret i64 %1
}