xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int);
int waitpid(int, int *, int /*<<< orphan*/);
void signal_child(int signo) {
  pid_t pid;
  int state;
  while ((pid = waitpid(-1, &state, WNOHANG)) > 0) {
    printf("\n==child %d terminated.==\n\n", pid);
  }
  return;
}


x86 assembly (clang, -O0):
<signal_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1162 <signal_child+0x42>
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112b <signal_child+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_child>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2eb8(%rip),%r15
mov    (%r15),%edx
lea    0xc(%rsp),%rsi
mov    $0xffffffff,%edi
call   1040 <waitpid@plt>
test   %eax,%eax
jle    117e <signal_child+0x5e>
lea    0xeb3(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    (%r15),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1040 <waitpid@plt>
test   %eax,%eax
jg     1160 <signal_child+0x40>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [28 x i8] c"\0A==child %d terminated.==\0A\0A\00"
define void @signal_child(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %4, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [28 x i8] c"\0A==child %d terminated.==\0A\0A\00"
define void @signal_child(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @WNOHANG
%5 = call i32 @waitpid(i32 -1, i32* %2, i32 %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ %5, %1 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @WNOHANG
%11 = call i32 @waitpid(i32 -1, i32* %2, i32 %10)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %7, label %13
13: ; preds = %7, %1
ret void
}
/* Variables and functions */
int exp(double);
int pow(double, int);
double FunctionalValue(double x) {
  double value = (exp(x) - 4 * pow(x, 2));
  return value;
}


x86 assembly (clang, -O0):
<FunctionalValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    $0x2,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FunctionalValue>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <exp@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
shl    $0x2,%eax
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @FunctionalValue(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @exp(double %4)
%6 = load double, double* %2
%7 = call i32 @pow(double %6, i32 2)
%8 = mul nsw i32 4, %7
%9 = sub nsw i32 %5, %8
%10 = sitofp i32 %9 to double
store double %10, double* %3
%11 = load double, double* %3
ret double %11
}

LLVM IR (-O2):
define double @FunctionalValue(double %0) {
%2 = tail call i32 @exp(double %0)
%3 = tail call i32 @pow(double %0, i32 2)
%4 = mul i32 %3, -4
%5 = add i32 %4, %2
%6 = sitofp i32 %5 to double
ret double %6
}
void YUY2ToYRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @YUY2ToYRow_AVX2() {
ret void
}
/* Variables and functions */
unsigned int Get_Bits(int);
int Get_dmvector(void) {
  int tmp___0;
  unsigned int tmp___1;
  unsigned int tmp___2;
  {
    tmp___2 = Get_Bits(1);
    if (tmp___2) {
      tmp___1 = Get_Bits(1);
      if (tmp___1) {
        tmp___0 = -1;
      } else {
        tmp___0 = 1;
      }
      return (tmp___0);
    } else {
      return (0);
    }
  }
}


x86 assembly (clang, -O0):
<Get_dmvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <Get_Bits@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1164 <Get_dmvector+0x54>
mov    $0x1,%edi
call   1030 <Get_Bits@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1152 <Get_dmvector+0x42>
movl   $0xffffffff,-0x8(%rbp)
jmp    1159 <Get_dmvector+0x49>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116b <Get_dmvector+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_dmvector>:
push   %rax
mov    $0x1,%edi
call   1030 <Get_Bits@plt>
test   %eax,%eax
je     1132 <Get_dmvector+0x22>
mov    $0x1,%edi
call   1030 <Get_Bits@plt>
neg    %eax
sbb    %eax,%eax
or     $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Get_dmvector() {
%1 = tail call i32 @Get_Bits(i32 1)
%2 = icmp eq i32 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @Get_Bits(i32 1)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 1, i32 -1
br label %7
7: ; preds = %0, %3
%8 = phi i32 [ %6, %3 ], [ 0, %0 ]
ret i32 %8
}
void sdmmc_write16(unsigned short reg, unsigned short val) {
  *(volatile unsigned short *)(0x10006000u + reg) = val;
}


x86 assembly (clang, -O0):
<sdmmc_write16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%cx
movzwl -0x2(%rbp),%eax
add    $0x10006000,%eax
mov    %eax,%eax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdmmc_write16>:
mov    %edi,%eax
mov    %si,0x10006000(%rax)
ret

LLVM IR (-O0):
define void @sdmmc_write16(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = add i32 268460032, %7
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i16*
store volatile i16 %5, i16* %10
ret void
}

LLVM IR (-O2):
define void @sdmmc_write16(i16 zeroext %0, i16 zeroext %1) {
%3 = zext i16 %0 to i64
%4 = add nuw nsw i64 %3, 268460032
%5 = inttoptr i64 %4 to i16*
store volatile i16 %1, i16* %5
ret void
}
void fn_pragma_0_default(void) {}


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

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

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

LLVM IR (-O2):
define void @fn_pragma_0_default() {
ret void
}
void prefetch(void *p) { asm volatile("prefetcht1 %0" : : "m"(p)); }


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

x86 assembly (clang, -O2):
<prefetch>:
mov    %rdi,-0x8(%rsp)
prefetcht1 -0x8(%rsp)
ret

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

LLVM IR (-O2):
define void @prefetch(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}
void pm_system_vp(const char *const progName, const char **const argArray,
                  void stdinFeeder(int, void *), void *const feederParm,
                  void stdoutAccepter(int, void *), void *const accepterParm) {}


x86 assembly (clang, -O0):
<pm_system_vp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pm_system_vp(i8* %0, i8** %1, void (i32, i8*)* %2, i8* %3, void (i32, i8*)* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca void (i32, i8*)*
%10 = alloca i8*
%11 = alloca void (i32, i8*)*
%12 = alloca i8*
store i8* %0, i8** %7
store i8** %1, i8*** %8
store void (i32, i8*)* %2, void (i32, i8*)** %9
store i8* %3, i8** %10
store void (i32, i8*)* %4, void (i32, i8*)** %11
store i8* %5, i8** %12
ret void
}

LLVM IR (-O2):
define void @pm_system_vp(i8* nocapture %0, i8** nocapture %1, void (i32, i8*)* nocapture %2, i8* nocapture %3, void (i32, i8*)* nocapture %4, i8* nocapture %5) {
ret void
}
/* Type definitions */
struct tms {
  double tms_utime;
  scalar_t__ tms_stime;
};

/* Variables and functions */
int /*<<< orphan*/ _SC_CLK_TCK;
int sysconf(int /*<<< orphan*/);
int /*<<< orphan*/ times(struct tms *);
double SuperLU_timer_() {
  struct tms use;
  double tmp;
  int clocks_per_sec = sysconf(_SC_CLK_TCK);
  times(&use);
  tmp = use.tms_utime;
  tmp += use.tms_stime;
  return (double)(tmp) / clocks_per_sec;
}


x86 assembly (clang, -O0):
<SuperLU_timer_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <times@plt>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SuperLU_timer_>:
push   %rbx
sub    $0x10,%rsp
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%ebx
mov    %rsp,%rdi
call   1030 <times@plt>
cvtsi2sdq 0x8(%rsp),%xmm0
addsd  (%rsp),%xmm0
cvtsi2sd %ebx,%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tms = type { double, i64 }
@_SC_CLK_TCK = global i32 0
define double @SuperLU_timer_() {
%1 = alloca %struct.tms
%2 = alloca double
%3 = alloca i32
%4 = load i32, i32* @_SC_CLK_TCK
%5 = call i32 @sysconf(i32 %4)
store i32 %5, i32* %3
%6 = call i32 @times(%struct.tms* %1)
%7 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 0
%8 = load double, double* %7
store double %8, double* %2
%9 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 1
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = load double, double* %2
%13 = fadd double %12, %11
store double %13, double* %2
%14 = load double, double* %2
%15 = load i32, i32* %3
%16 = sitofp i32 %15 to double
%17 = fdiv double %14, %16
ret double %17
}

LLVM IR (-O2):
%struct.tms = type { double, i64 }
@_SC_CLK_TCK = global i32 0
define double @SuperLU_timer_() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = load i32, i32* @_SC_CLK_TCK
%4 = tail call i32 @sysconf(i32 %3)
%5 = call i32 @times(%struct.tms* %1)
%6 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = fadd double %7, %10
%12 = sitofp i32 %4 to double
%13 = fdiv double %11, %12
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int usage(const char *pname, int exit) {
  printf("Usage: %s FILE\n"
         "\n"
         "Dump the history from file FILE.\n",
         pname);
  return exit;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Usage: %s FILE\0A\0ADump the history from file FILE.\0A\00"
define i32 @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
ret i32 %7
}

LLVM IR (-O2):
@.str = [50 x i8] c"Usage: %s FILE\0A\0ADump the history from file FILE.\0A\00"
define i32 @usage(i8* %0, i32 returned %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ same_screen;
};
struct TYPE_4__ {
  TYPE_1__ xmotion;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xmotion_same_screen(void *_p) {
  return (int)((XEvent *)_p)->xmotion.same_screen;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xmotion_same_screen(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
double __attribute__((no)) double_max1(double a, double b) {
  return ((a) > (b) ? (a) : (b));
}


x86 assembly (clang, -O0):
<double_max1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <double_max1+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <double_max1+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_max1>:
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @double_max1(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
long lrint(double x) {
  long retval;
  __asm__ __volatile__("fistpl %0" : "=m"(retval) : "t"(x) : "st");
  return retval;
}


x86 assembly (clang, -O0):
<lrint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
fistpl -0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrint>:
movsd  %xmm0,-0x10(%rsp)
fldl   -0x10(%rsp)
fistpl -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @lrint(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load double, double* %2
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @lrint(double %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i64, i64* %2
ret i64 %4
}
/* Variables and functions */
int yaffs_inodecount_common(int /*<<< orphan*/, char const *);
int yaffs_inodecount(const char *path) {
  return yaffs_inodecount_common((0), path);
}


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

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

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

LLVM IR (-O2):
define i32 @yaffs_inodecount(i8* %0) {
%2 = tail call i32 @yaffs_inodecount_common(i32 0, i8* %0)
ret i32 %2
}
void hugo_settextcolor(int c) {}


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

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

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

LLVM IR (-O2):
define void @hugo_settextcolor(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, unsigned int);
int nulldev_read(void *dev, char *buf, unsigned int size) {
  memset(buf, 0, size);
  return size;
}


x86 assembly (clang, -O0):
<nulldev_read>:
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    -0x14(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nulldev_read>:
push   %rbx
mov    %edx,%ebx
mov    %rsi,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @nulldev_read(i8* nocapture readnone %0, i8* %1, i32 returned %2) {
%4 = tail call i32 @memset(i8* %1, i32 0, i32 %2)
ret i32 %2
}
/* Type definitions */
struct group {
  int /*<<< orphan*/ gr_gid;
};
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char const *);
struct group *getgrnam(char const *);
gid_t to_gid(const char *grname) {
  struct group *g;
  g = getgrnam(grname);
  if (g == NULL)
    fatal("%s: failed to convert to gid", grname);
  return g->gr_gid;
}


x86 assembly (clang, -O0):
<to_gid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getgrnam@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <to_gid+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_gid>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <getgrnam@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <to_gid+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <fatal@plt>
mov    (%rbx),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.group = type { i32 }
@.str = [29 x i8] c"%s: failed to convert to gid\00"
define i32 @to_gid(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.group*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.group* @getgrnam(i8* %4)
store %struct.group* %5, %struct.group** %3
%6 = load %struct.group*, %struct.group** %3
%7 = icmp eq %struct.group* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @fatal(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load %struct.group*, %struct.group** %3
%13 = getelementptr inbounds %struct.group, %struct.group* %12, i32 0, i32 0
%14 = load i32, i32* %13
ret i32 %14
}

LLVM IR (-O2):
%struct.group = type { i32 }
@.str = [29 x i8] c"%s: failed to convert to gid\00"
define i32 @to_gid(i8* %0) {
%2 = tail call %struct.group* @getgrnam(i8* %0)
%3 = icmp eq %struct.group* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
%7 = getelementptr inbounds %struct.group, %struct.group* %2, i64 0, i32 0
%8 = load i32, i32* %7
ret i32 %8
}
void test4() {
  struct A {
    char c : 2;
  } a;
  a.c = 0x101;
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%al
and    $0xfc,%al
or     $0x1,%al
mov    %al,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.A = type { i8 }
define void @test4() {
%1 = alloca %struct.A
%2 = bitcast %struct.A* %1 to i8*
%3 = load i8, i8* %2
%4 = and i8 %3, -4
%5 = or i8 %4, 1
store i8 %5, i8* %2
ret void
}

LLVM IR (-O2):
define void @test4() {
ret void
}
/* Variables and functions */
scalar_t__ nearbyint(double);
long double nearbyintl(long double x) {
  return (long double)nearbyint((double)x);
}


x86 assembly (clang, -O0):
<nearbyintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <nearbyint@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearbyintl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <nearbyint@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define x86_fp80 @nearbyintl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @nearbyint(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_clear_lock(long *lock) { printf("\nOpenSHMEM Analyzer\n"); }


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_clear_lock(i64* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
OPHANDLER(setb_c) { SET_CY(1); }


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

x86 assembly (clang, -O2):
<OPHANDLER>:
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <SET_CY@plt>

LLVM IR (-O0):
define i32 @OPHANDLER(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @SET_CY to i32 (i32, ...)*)(i32 1)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @OPHANDLER(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @SET_CY to i32 (i32, ...)*)(i32 1)
ret i32 undef
}
long factor(int n) {
  if (n < 3)
    return 1;
  else
    return factor(n - 1) + factor(n - 2) + factor(n - 3);
}


x86 assembly (clang, -O0):
<factor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1132 <factor+0x22>
movq   $0x1,-0x8(%rbp)
jmp    1173 <factor+0x63>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <factor@plt>
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x2,%edi
call   1030 <factor@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x3,%edi
call   1030 <factor@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factor>:
push   %r15
push   %r14
push   %rbx
mov    $0x1,%ebx
cmp    $0x3,%edi
jl     1159 <factor+0x49>
mov    %edi,%r14d
add    $0x3,%r14d
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    -0x4(%r14),%edi
call   1030 <factor@plt>
mov    %rax,%r15
lea    -0x5(%r14),%edi
call   1030 <factor@plt>
add    %r15,%rbx
add    %rax,%rbx
add    $0xfffffffd,%r14d
cmp    $0x5,%r14d
ja     1130 <factor+0x20>
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @factor(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %16, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ %0, %1 ]
%5 = phi i64 [ %12, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i64 @factor(i32 %6)
%8 = add nsw i32 %4, -2
%9 = tail call i64 @factor(i32 %8)
%10 = add nsw i32 %4, -3
%11 = add i64 %7, %5
%12 = add i64 %11, %9
%13 = icmp ult i32 %4, 6
br i1 %13, label %14, label %3
14: ; preds = %3
%15 = add i64 %12, 1
br label %16
16: ; preds = %14, %1
%17 = phi i64 [ 1, %1 ], [ %15, %14 ]
ret i64 %17
}
float bgbdt_part_scurve(float a) { return (a * a * (3.0 - 2.0 * a)); }


x86 assembly (clang, -O0):
<bgbdt_part_scurve>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
addsd  %xmm2,%xmm2
movsd  0xed4(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bgbdt_part_scurve>:
cvtss2sd %xmm0,%xmm1
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm1
movsd  0xee8(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @bgbdt_part_scurve(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = fpext float %5 to double
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %8, double 3.000000e+00)
%10 = fmul double %6, %9
%11 = fptrunc double %10 to float
ret float %11
}

LLVM IR (-O2):
define float @bgbdt_part_scurve(float %0) {
%2 = fmul float %0, %0
%3 = fpext float %2 to double
%4 = fpext float %0 to double
%5 = tail call double @llvm.fmuladd.f64(double %4, double -2.000000e+00, double 3.000000e+00)
%6 = fmul double %5, %3
%7 = fptrunc double %6 to float
ret float %7
}
void e86_set_mem_uint8(void *mem, unsigned long addr, unsigned char val) {}


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

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

LLVM IR (-O0):
define void @e86_set_mem_uint8(i8* %0, i64 %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8 %2, i8* %6
ret void
}

LLVM IR (-O2):
define void @e86_set_mem_uint8(i8* nocapture %0, i64 %1, i8 zeroext %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *umalloc(int);
char *ustrdup2(const char *a, const char *b) {
  int len = b - a;
  char *ret;
  assert(b >= a);
  ret = umalloc(len + 1);
  strncpy(ret, a, len);
  return ret;
}


x86 assembly (clang, -O0):
<ustrdup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1050 <umalloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ustrdup2>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    %esi,%ebx
sub    %r14d,%ebx
xor    %edi,%edi
cmp    %r14,%rsi
setae  %dil
call   1040 <assert@plt>
lea    0x1(%rbx),%edi
call   1050 <umalloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @ustrdup2(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %8 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %5
%13 = load i8*, i8** %4
%14 = load i8*, i8** %3
%15 = icmp uge i8* %13, %14
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
%20 = call i8* @umalloc(i32 %19)
store i8* %20, i8** %6
%21 = load i8*, i8** %6
%22 = load i8*, i8** %3
%23 = load i32, i32* %5
%24 = call i32 @strncpy(i8* %21, i8* %22, i32 %23)
%25 = load i8*, i8** %6
ret i8* %25
}

LLVM IR (-O2):
define i8* @ustrdup2(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = icmp uge i8* %1, %0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = add nsw i32 %6, 1
%11 = tail call i8* @umalloc(i32 %10)
%12 = tail call i32 @strncpy(i8* %11, i8* %0, i32 %6)
ret i8* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ perror(char *);
FILE *inInit(const char *name) {
  FILE *temp;
  temp = fopen(name, "rb");
  if (temp == NULL) {
    perror("could not open input file");
    exit(-4);
  }
  return temp;
}


x86 assembly (clang, -O0):
<inInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1171 <inInit+0x41>
lea    0xea1(%rip),%rdi
call   1040 <perror@plt>
mov    $0xfffffffc,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inInit>:
push   %rax
lea    0xec8(%rip),%rsi
call   1030 <fopen@plt>
test   %rax,%rax
je     1144 <inInit+0x14>
pop    %rcx
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
mov    $0xfffffffc,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@.str.1 = [26 x i8] c"could not open input file\00"
define noalias i32* @inInit(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -4)
unreachable
7: ; preds = %1
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *name) {
  printf("\n\tUsage: %s [OPTION]... [DIR]...\n\n", name);
  printf("\n        Provides a convenient way to inspect the content of a "
         "directory\n        or drive at a glance.\n\n        -A, "
         "--include-all         include all files (i.e. hidden)\n\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"\0A\09Usage: %s [OPTION]... [DIR]...\0A\0A\00"
@.str.1 = [172 x i8] c"\0A Provides a convenient way to inspect the content of a directory\0A or drive at a glance.\0A\0A -A, --include-all include all files (i.e. hidden)\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@.str = [35 x i8] c"\0A\09Usage: %s [OPTION]... [DIR]...\0A\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [171 x i8] c"\0A Provides a convenient way to inspect the content of a directory\0A or drive at a glance.\0A\0A -A, --include-all include all files (i.e. hidden)\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([171 x i8], [171 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void mpk_deinit() { closelog(); }


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

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

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

LLVM IR (-O2):
define void @mpk_deinit() {
%1 = tail call i32 (...) @closelog()
ret void
}
/* Variables and functions */
int num_cifras(int);
void inverso(int n) {
  int elevar = num_cifras(n) - 1;
  int suma = 0;
  while (n / 10 != 0) {
    elevar = elevar - 1;
    n = n / 10;
  }
}


x86 assembly (clang, -O0):
<inverso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <num_cifras@plt>
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1160 <inverso+0x50>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1130 <inverso+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverso>:
jmp    1030 <num_cifras@plt>

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

LLVM IR (-O2):
define void @inverso(i32 %0) {
%2 = tail call i32 @num_cifras(i32 %0)
ret void
}
void x() {
  return;
  return;
  return;
}


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

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

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

LLVM IR (-O2):
define void @x() {
ret void
}
void *__arch_fetch_and_add_ptr(void **pointer, long int delta) {
  void *temp;
  temp = __atomic_fetch_add(pointer, delta, 0);
  return temp;
}


x86 assembly (clang, -O0):
<__arch_fetch_and_add_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
lock xadd %rax,(%rcx)
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__arch_fetch_and_add_ptr>:
mov    %rsi,%rax
lock xadd %rax,(%rdi)
ret

LLVM IR (-O0):
define i8* @__arch_fetch_and_add_ptr(i8** %0, i64 %1) {
%3 = alloca i8**
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8** %0, i8*** %3
store i64 %1, i64* %4
%8 = load i8**, i8*** %3
%9 = load i64, i64* %4
store i64 %9, i64* %6
%10 = bitcast i8** %8 to i64*
%11 = bitcast i8** %7 to i64*
%12 = load i64, i64* %6
%13 = atomicrmw add i64* %10, i64 %12 monotonic
store i64 %13, i64* %11
%14 = bitcast i64* %11 to i8**
%15 = load i8*, i8** %14
store i8* %15, i8** %5
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @__arch_fetch_and_add_ptr(i8** nocapture %0, i64 %1) {
%3 = bitcast i8** %0 to i64*
%4 = atomicrmw add i64* %3, i64 %1 monotonic
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
void fill_mem() {}


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

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

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

LLVM IR (-O2):
define void @fill_mem() {
ret void
}
/* Variables and functions */
scalar_t__ tgetent(char *, char *);
int terminaltypeok(char *s) {
  char buf[1024];
  if (tgetent(buf, s) == 0)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<terminaltypeok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <tgetent@plt>
cmp    $0x0,%rax
jne    1145 <terminaltypeok+0x35>
movl   $0x0,-0x4(%rbp)
jmp    114c <terminaltypeok+0x3c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminaltypeok>:
sub    $0x408,%rsp
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <tgetent@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x408,%rsp
ret

LLVM IR (-O0):
define i32 @terminaltypeok(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [1024 x i8]
store i8* %0, i8** %3
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %3
%7 = call i64 @tgetent(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %11
10: ; preds = %1
store i32 1, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @terminaltypeok(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i64 @tgetent(i8* %3, i8* %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x;
};
typedef TYPE_1__ XWindowChanges;

/* Variables and functions */
int get_XWindowChanges_x(void *_p) { return (int)((XWindowChanges *)_p)->x; }


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

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

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

LLVM IR (-O2):
define i32 @get_XWindowChanges_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int main(void) {
  int i = 64;
  i -= 22;
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
void hw_initialise(void) {}


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

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

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

LLVM IR (-O2):
define void @hw_initialise() {
ret void
}
void RTStrConvertHexBytes(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrConvertHexBytes() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mpush(int);
void memz() { mpush(0x8000); }


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

x86 assembly (clang, -O2):
<memz>:
mov    $0x8000,%edi
jmp    1030 <mpush@plt>

LLVM IR (-O0):
define void @memz() {
%1 = call i32 @mpush(i32 32768)
ret void
}

LLVM IR (-O2):
define void @memz() {
%1 = tail call i32 @mpush(i32 32768)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printNewLineCharacter();
int /*<<< orphan*/ printf(char const *);
int /*<<< orphan*/ waitForInput();
void printLine(const char *line, int include_new_line, int wait_for_input) {
  printf(line);
  if (include_new_line)
    printNewLineCharacter();
  if (wait_for_input)
    waitForInput();
  return;
}


x86 assembly (clang, -O0):
<printLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     115c <printLine+0x2c>
mov    $0x0,%al
call   1050 <printNewLineCharacter@plt>
cmpl   $0x0,-0x10(%rbp)
je     116d <printLine+0x3d>
mov    $0x0,%al
call   1030 <waitForInput@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLine>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1040 <printf@plt>
test   %ebp,%ebp
je     1147 <printLine+0x17>
xor    %eax,%eax
call   1050 <printNewLineCharacter@plt>
test   %ebx,%ebx
je     1158 <printLine+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <waitForInput@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @printLine(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* %7)
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = call i32 (...) @printNewLineCharacter()
br label %13
13: ; preds = %11, %3
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (...) @waitForInput()
br label %18
18: ; preds = %16, %13
ret void
}

LLVM IR (-O2):
define void @printLine(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) %0)
%5 = icmp eq i32 %1, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @printNewLineCharacter()
br label %8
8: ; preds = %6, %3
%9 = icmp eq i32 %2, 0
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 (...) @waitForInput()
br label %12
12: ; preds = %10, %8
ret void
}
void UYVYToYRow_C() {}


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

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

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

LLVM IR (-O2):
define void @UYVYToYRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *title) {
  printf("Usage: %s [-is] <publisher> <property-name> <value>\n", title);
  printf("        -i           - int property\n");
  printf("        -s           - string property\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"Usage: %s [-is] <publisher> <property-name> <value>\0A\00"
@.str.1 = [37 x i8] c" -i - int property\0A\00"
@.str.2 = [40 x i8] c" -s - string property\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [53 x i8] c"Usage: %s [-is] <publisher> <property-name> <value>\0A\00"
@str = [36 x i8] c" -i - int property\00"
@str.3 = [39 x i8] c" -s - string property\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}