xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int rw_ctl_init(const char *ctl_path) {
  int ctl_fd;
  ctl_fd = open(ctl_path, O_RDONLY);
  if (ctl_fd == -1) {
    fprintf(stderr, "Cannot open ctl_fd\n");
    goto error;
  }
  return ctl_fd;
error:
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<rw_ctl_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1175 <rw_ctl_init+0x45>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1030 <fprintf@plt>
jmp    117e <rw_ctl_init+0x4e>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<rw_ctl_init>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
cmp    $0xffffffff,%eax
je     1146 <rw_ctl_init+0x16>
pop    %rcx
ret
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str = [20 x i8] c"Cannot open ctl_fd\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @rw_ctl_init(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %14
12: ; preds = %1
%13 = load i32, i32* %3
ret i32 %13
14: ; preds = %9
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str = [20 x i8] c"Cannot open ctl_fd\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @rw_ctl_init(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ system(char *);
void cleanup_test2(int fd) {
  close(fd);
  system("rmmod "
         "tracer");
}


x86 assembly (clang, -O0):
<cleanup_test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
lea    0xec6(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_test2>:
push   %rax
call   1040 <close@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"rmmod tracer\00"
define void @cleanup_test2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"rmmod tracer\00"
define void @cleanup_test2(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = tail call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
double linear_interpolate(double y1, double y2, double t) {
  return y1 + (y2 - y1) * t;
}


x86 assembly (clang, -O0):
<linear_interpolate>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_interpolate>:
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @linear_interpolate(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %4
%10 = fsub double %8, %9
%11 = load double, double* %6
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double %7)
ret double %12
}

LLVM IR (-O2):
define double @linear_interpolate(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double %0)
ret double %5
}
void gtk_icon_source_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_source_get_type() {
ret void
}
/* Variables and functions */
scalar_t__ sin(float);
float sdSin(float s) { return (float)sin(s * (3.1415926535f / 180.0)); }


x86 assembly (clang, -O0):
<sdSin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <sin@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdSin>:
push   %rax
cvtss2sd %xmm0,%xmm0
mulsd  0xee3(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <sin@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sdSin(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 0x3F91DF46AAAAAAAB
%6 = fptrunc double %5 to float
%7 = call i64 @sin(float %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @sdSin(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0x3F91DF46AAAAAAAB
%4 = fptrunc double %3 to float
%5 = tail call i64 @sin(float %4)
%6 = sitofp i64 %5 to float
ret float %6
}
void cb_copy(struct Screen *scrn) {}


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

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

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

LLVM IR (-O2):
%struct.Screen = type opaque
define void @cb_copy(%struct.Screen* nocapture %0) {
ret void
}
int ft_islower(int c) { return ((c >= 'a' && c <= 'z') ? 1 : 0); }


x86 assembly (clang, -O0):
<ft_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <ft_islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void dead_result10(int *data) {
  int j;
  j = data[2];
  data[j] = 2;
}


x86 assembly (clang, -O0):
<dead_result10>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dead_result10>:
movslq 0x8(%rdi),%rax
movl   $0x2,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @dead_result10(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
store i32 2, i32* %10
ret void
}

LLVM IR (-O2):
define void @dead_result10(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 2, i32* %5
ret void
}
/* Variables and functions */
void Dummy_Handler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @Dummy_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
short not_h(short *);
short intr_wrap_578(short p1) { return not_h(&p1); }


x86 assembly (clang, -O0):
<intr_wrap_578>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
call   1030 <not_h@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_578>:
push   %rax
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rdi
call   1030 <not_h@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_578(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call signext i16 @not_h(i16* %2)
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @intr_wrap_578(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call signext i16 @not_h(i16* %2)
ret i16 %3
}
void _Jv_RegisterResource() {}


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

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

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

LLVM IR (-O2):
define void @_Jv_RegisterResource() {
ret void
}
/* Variables and functions */
double DProbNormal(int /*<<< orphan*/);
int /*<<< orphan*/ DRanNormalZig32();
double DRanQuanNormalZig32(void) { return DProbNormal(DRanNormalZig32()); }


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

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

LLVM IR (-O0):
define double @DRanQuanNormalZig32() {
%1 = call i32 (...) @DRanNormalZig32()
%2 = call double @DProbNormal(i32 %1)
ret double %2
}

LLVM IR (-O2):
define double @DRanQuanNormalZig32() {
%1 = tail call i32 (...) @DRanNormalZig32()
%2 = tail call double @DProbNormal(i32 %1)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ conjecture(int, int);
int main() { conjecture(2, 2000); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x7d0,%esi
call   1030 <conjecture@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @conjecture(i32 2, i32 2000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @conjecture(i32 2, i32 2000)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ x;

/* Variables and functions */
int CHAR_BIT;
unsigned rightrot(unsigned x, unsigned n) {
  return (x >> n) | (x << (sizeof(x) * CHAR_BIT - n));
}


x86 assembly (clang, -O0):
<rightrot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    0x2ec4(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
mov    -0x8(%rbp),%esi
sub    %rsi,%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightrot>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
mov    0x2ed3(%rip),%rdx
mov    (%rdx),%edx
shl    $0x2,%edx
sub    %esi,%edx
mov    %edx,%ecx
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @rightrot(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = lshr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* @CHAR_BIT
%10 = sext i32 %9 to i64
%11 = mul i64 4, %10
%12 = load i32, i32* %4
%13 = zext i32 %12 to i64
%14 = sub i64 %11, %13
%15 = trunc i64 %14 to i32
%16 = shl i32 %8, %15
%17 = or i32 %7, %16
ret i32 %17
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @rightrot(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = load i32, i32* @CHAR_BIT
%5 = shl i32 %4, 2
%6 = sub i32 %5, %1
%7 = shl i32 %0, %6
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
void *strdup(char const *);
void *str_duplicate(const void *data_to_dup) {
  void *result = strdup((const char *)data_to_dup);
  return result;
}


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

x86 assembly (clang, -O2):
<str_duplicate>:
jmp    1030 <strdup@plt>

LLVM IR (-O0):
define i8* @str_duplicate(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @str_duplicate(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
int test_imm_9Buint32_reg(unsigned int val) {
  return ((val) & (0x9B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Buint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x9b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Buint32_reg>:
test   $0x9b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Buint32_reg(i32 %0) {
%2 = and i32 %0, 155
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_fcollect64(void *target, const void *source, size_t nlong,
                             int PE_start, int logPE_stride, int PE_size,
                             long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_fcollect64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_fcollect64(i8* %0, i8* %1, i64 %2, i32 %3, i32 %4, i32 %5, i64* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i64*
store i8* %0, i8** %8
store i8* %1, i8** %9
store i64 %2, i64* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i64* %6, i64** %14
%15 = 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_fcollect64(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i32 %3, i32 %4, i32 %5, i64* nocapture readnone %6) {
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int main(int argc, char **argv) {
  char buff[5];
  if (argc < 2) {
    puts("there needs a input string");
    exit(1);
  }
  strcpy(buff, argv[1]);
  printf("your input is buff[%s]\n", 0xbffff5ce);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1178 <main+0x38>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
lea    -0x15(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    0xe8b(%rip),%rdi
mov    $0xbffff5ce,%esi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    114d <main+0x1d>
lea    0xede(%rip),%rdi
mov    $0xbffff5ce,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"there needs a input string\00"
@.str.1 = [24 x i8] c"your input is buff[%s]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
unreachable
11: ; preds = %2
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i8* @strcpy(i8* %12, i8* %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 -1073744434)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"there needs a input string\00"
@.str.1 = [24 x i8] c"your input is buff[%s]\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
tail call void @exit(i32 1)
unreachable
6: ; preds = %2
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 -1073744434)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void v_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<v_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @v_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void check(int *p) {
  if (p) {
    return;
  }
  return;
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1118 <check+0x18>
jmp    111d <check+0x1d>
jmp    111d <check+0x1d>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @check(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @check(i32* nocapture %0) {
ret void
}
void _default_ihr(void) {}


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

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

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

LLVM IR (-O2):
define void @_default_ihr() {
ret void
}
/* Type definitions */
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
scalar_t__ inet_pton(int /*<<< orphan*/, char const *, unsigned char *);
int check_ip_format(const char *possibleip) {
  unsigned char buf[sizeof(struct in6_addr)];
  return inet_pton(AF_INET, possibleip, buf) > 0;
}


x86 assembly (clang, -O0):
<check_ip_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <inet_pton@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ip_format>:
push   %rax
mov    %rdi,%rsi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rdx
call   1030 <inet_pton@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
define i32 @check_ip_format(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = load i32, i32* @AF_INET
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%7 = call i64 @inet_pton(i32 %4, i8* %5, i8* %6)
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@AF_INET = global i32 0
define i32 @check_ip_format(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @AF_INET
%5 = call i64 @inet_pton(i32 %4, i8* %0, i8* %3)
%6 = icmp sgt i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_12173() {
  Assert_real((isqrt(12173) == 110),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1535, ("Integer square root of 12173 should be 110"));
}


x86 assembly (clang, -O0):
<t_sqrt_12173>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f8d,%edi
call   1030 <isqrt@plt>
cmp    $0x6e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x5ff,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_12173>:
push   %rax
mov    $0x2f8d,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x6e,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x5ff,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 12173 should be 110\00"
define void @t_sqrt_12173() {
%1 = call i32 @isqrt(i32 12173)
%2 = icmp eq i32 %1, 110
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1535, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 12173 should be 110\00"
define void @t_sqrt_12173() {
%1 = tail call i32 @isqrt(i32 12173)
%2 = icmp eq i32 %1, 110
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1535, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned long GCD(unsigned long a, unsigned long b) {
  return (b == 0) ? a : GCD(b, a % b);
}


x86 assembly (clang, -O0):
<GCD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1138 <GCD+0x28>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1154 <GCD+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,%rsi
call   1030 <GCD@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCD>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <GCD+0x35>
mov    %rsi,%rdx
jmp    111d <GCD+0x1d>
nopl   (%rax)
xor    %edx,%edx
div    %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <GCD+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <GCD+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <GCD+0x15>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @GCD(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %7, %4 ], [ %1, %2 ]
%6 = phi i64 [ %5, %4 ], [ %0, %2 ]
%7 = urem i64 %6, %5
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %5, %4 ]
ret i64 %10
}
char twos_to_ones_complement1(char num) { return num < 0 ? num - 1 : num; }


x86 assembly (clang, -O0):
<twos_to_ones_complement1>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jge    1126 <twos_to_ones_complement1+0x26>
movsbl -0x1(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <twos_to_ones_complement1+0x2d>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<twos_to_ones_complement1>:
mov    %edi,%eax
sar    $0x7,%al
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @twos_to_ones_complement1(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 1
br label %13
10: ; preds = %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %9, %6 ], [ %12, %10 ]
%15 = trunc i32 %14 to i8
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @twos_to_ones_complement1(i8 signext %0) {
%2 = ashr i8 %0, 7
%3 = add i8 %2, %0
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char const *);
int /*<<< orphan*/ c_plssub(int /*<<< orphan*/, int);
int opt_px(const char *opt, const char *myoptarg, void *client_data) {
  (void)opt;
  (void)client_data;
  c_plssub(atoi(myoptarg), -1);
  return 0;
}


x86 assembly (clang, -O0):
<opt_px>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
mov    $0xffffffff,%esi
call   1030 <c_plssub@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_px>:
push   %rax
mov    %rsi,%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
mov    $0xffffffff,%esi
call   1030 <c_plssub@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @opt_px(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = tail call i32 @atoi(i8* %1)
%5 = tail call i32 @c_plssub(i32 %4, i32 -1)
ret i32 0
}
void sigint_handler(int s) {}


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

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

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

LLVM IR (-O2):
define void @sigint_handler(i32 %0) {
ret void
}
R0RX1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if (r0 <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzbl -0x5(%rbp),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jg     1142 <R0RX1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <R0RX1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0RX1>:
movzbl %dil,%edx
movslq %ecx,%rax
movzbl (%r9,%rax,1),%ecx
xor    %eax,%eax
cmp    %ecx,%edx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @R0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = and i32 %0, 255
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp ule i32 %7, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
void a_and(volatile void *p, int v) {
  (void)__sync_fetch_and_and((volatile int *)p, v);
}


x86 assembly (clang, -O0):
<a_and>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
lock and %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_and>:
lock and %esi,(%rdi)
ret

LLVM IR (-O0):
define void @a_and(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = atomicrmw and i32* %6, i32 %7 seq_cst
ret void
}

LLVM IR (-O2):
define void @a_and(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = atomicrmw and i32* %3, i32 %1 seq_cst
ret void
}
int isFive3(int a) { return (a == 5) ? 1 : 0; }


x86 assembly (clang, -O0):
<isFive3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x5,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isFive3>:
xor    %eax,%eax
cmp    $0x5,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isFive3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 5
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @isFive3(i32 %0) {
%2 = icmp eq i32 %0, 5
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void welcome(void) { printf("welcome: Welcome\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"welcome: Welcome\0A\00"
define void @welcome() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"welcome: Welcome\00"
define void @welcome() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntEnable(int /*<<< orphan*/);
int /*<<< orphan*/ IntRegister(int /*<<< orphan*/, void (*)());
int /*<<< orphan*/ _EPIIntNumberGet(int /*<<< orphan*/);
void EPIIntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) {
  uint32_t ui32Int;
  ;
  ;
  ui32Int = _EPIIntNumberGet(ui32Base);
  ;
  IntRegister(ui32Int, pfnHandler);
  IntEnable(ui32Int);
}


x86 assembly (clang, -O0):
<EPIIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_EPIIntNumberGet@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <IntRegister@plt>
mov    -0x14(%rbp),%edi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIIntRegister>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <_EPIIntNumberGet@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
call   1050 <IntRegister@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @EPIIntRegister(i32 %0, void ()* %1) {
%3 = alloca i32
%4 = alloca void ()*
%5 = alloca i32
store i32 %0, i32* %3
store void ()* %1, void ()** %4
%6 = load i32, i32* %3
%7 = call i32 @_EPIIntNumberGet(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load void ()*, void ()** %4
%10 = bitcast void ()* %9 to void (...)*
%11 = call i32 @IntRegister(i32 %8, void (...)* %10)
%12 = load i32, i32* %5
%13 = call i32 @IntEnable(i32 %12)
ret void
}

LLVM IR (-O2):
define void @EPIIntRegister(i32 %0, void ()* %1) {
%3 = tail call i32 @_EPIIntNumberGet(i32 %0)
%4 = bitcast void ()* %1 to void (...)*
%5 = tail call i32 @IntRegister(i32 %3, void (...)* %4)
%6 = tail call i32 @IntEnable(i32 %3)
ret void
}
mps_present() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mps_present() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ e_tay();
void e_tay_accu() { e_tay(); }


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

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

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

LLVM IR (-O2):
define void @e_tay_accu() {
%1 = tail call i32 (...) @e_tay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(int argc, char *argv[]) {
  fprintf(stderr,
          "This is fifo: a simple replacement for the shell pipe (|)\n"
          "Usage:\n"
          "%s [-b bufsize] [-r readsize]\n"
          "\t-b bufsize: set FIFO buffer size to bufsize bytes\n"
          "\t-r readsize: read in blocks of readsize bytes\n",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [194 x i8] c"This is fifo: a simple replacement for the shell pipe (|)\0AUsage:\0A%s [-b bufsize] [-r readsize]\0A\09-b bufsize: set FIFO buffer size to bufsize bytes\0A\09-r readsize: read in blocks of readsize bytes\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stderr
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [194 x i8] c"This is fifo: a simple replacement for the shell pipe (|)\0AUsage:\0A%s [-b bufsize] [-r readsize]\0A\09-b bufsize: set FIFO buffer size to bufsize bytes\0A\09-r readsize: read in blocks of readsize bytes\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
unsigned long long get_some_potential_moves(const unsigned long long P,
                                            const int dir) {
  return (P << dir | P >> dir);
}


x86 assembly (clang, -O0):
<get_some_potential_moves>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    %cl,%rax
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
shr    %cl,%rdx
mov    %rdx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_some_potential_moves>:
mov    %esi,%ecx
mov    %rdi,%rax
shl    %cl,%rax
shr    %cl,%rdi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @get_some_potential_moves(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = shl i64 %5, %7
%9 = load i64, i64* %3
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = lshr i64 %9, %11
%13 = or i64 %8, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @get_some_potential_moves(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl i64 %0, %3
%5 = lshr i64 %0, %3
%6 = or i64 %4, %5
ret i64 %6
}
int array_cmp_int_dsc(const void *a, const void *b) {
  return (*(int *)b - *(int *)a);
}


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

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

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

LLVM IR (-O2):
define i32 @array_cmp_int_dsc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void CanonicalFourCC() {}


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

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

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

LLVM IR (-O2):
define void @CanonicalFourCC() {
ret void
}
void X509at_get_attr_by_OBJ(void) {}


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

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

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

LLVM IR (-O2):
define void @X509at_get_attr_by_OBJ() {
ret void
}
int partition_size(int n) { return n & 0x01 ? n / 2 + 1 : n / 2; }


x86 assembly (clang, -O0):
<partition_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     112c <partition_size+0x2c>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <partition_size+0x3a>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<partition_size>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
and    $0x1,%edi
sar    %eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @partition_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 2
%9 = add nsw i32 %8, 1
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 2
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %9, %6 ], [ %12, %10 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @partition_size(i32 %0) {
%2 = and i32 %0, 1
%3 = sdiv i32 %0, 2
%4 = add nsw i32 %3, %2
ret i32 %4
}
unsigned long min(unsigned long a, unsigned long b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void f() {
  char *str = "hi\n";
  __asm__("movl $4, %eax \n\t"
          "movl $1, %ebx \n\t"
          "movl -4(%ebp), %ecx \n\t"
          "movl $3, %edx \n\t"
          "int $0x80 \n\t"
          "movl $1, %eax; \n\t"
          "movl $0, %ebx; \n\t"
          "int $0x80; \n\t");
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x4,%eax
mov    $0x1,%ebx
mov    -0x4(%ebp),%ecx
mov    $0x3,%edx
int    $0x80
mov    $0x1,%eax
mov    $0x0,%ebx
int    $0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    $0x4,%eax
mov    $0x1,%ebx
mov    -0x4(%ebp),%ecx
mov    $0x3,%edx
int    $0x80
mov    $0x1,%eax
mov    $0x0,%ebx
int    $0x80
ret

LLVM IR (-O0):
@.str = [4 x i8] c"hi\0A\00"
define void @f() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
ret void
}

LLVM IR (-O2):
define void @f() {
tail call void asm sideeffect "movl $$4, %eax \0A\09movl $$1, %ebx \0A\09movl -4(%ebp), %ecx \0A\09movl $$3, %edx \0A\09int $$0x80 \0A\09movl $$1, %eax; \0A\09movl $$0, %ebx; \0A\09int $$0x80; \0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clog_write(int *, char *);
void clog_write_(int *clen, char *c) { clog_write(clen, c); }


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

x86 assembly (clang, -O2):
<clog_write_>:
jmp    1030 <clog_write@plt>

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

LLVM IR (-O2):
define void @clog_write_(i32* %0, i8* %1) {
%3 = tail call i32 @clog_write(i32* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hot_potato(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int players, elimination_number;
  printf("Enter the number of children n and i: ");
  scanf("%d%d", &players, &elimination_number);
  hot_potato(players, elimination_number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <hot_potato@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <hot_potato@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Enter the number of children n and i: \00"
@.str.1 = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @hot_potato(i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"Enter the number of children n and i: \00"
@.str.1 = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @hot_potato(i32 %7, i32 %8)
ret i32 0
}
void clac(void) { asm volatile(".byte 0x0f, 0x01, 0xca" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @clac() {
tail call void asm sideeffect ".byte 0x0f, 0x01, 0xca", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
void RTFileChangeLock(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileChangeLock() {
ret void
}
unsigned int _shrmb(unsigned int src1, unsigned int src2) {
  return (src2 >> 8) | (src1 << 24);
}


x86 assembly (clang, -O0):
<_shrmb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_shrmb>:
mov    %edi,%eax
shld   $0x18,%esi,%eax
ret

LLVM IR (-O0):
define i32 @_shrmb(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = lshr i32 %5, 8
%7 = load i32, i32* %3
%8 = shl i32 %7, 24
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @_shrmb(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %1, i32 24)
ret i32 %3
}