xunge/DecIR huggingface dataset:
/* Variables and functions */
int write_stitch_image_ex(void *, size_t, int, int /*<<< orphan*/);
int write_stitch_image(void *data, size_t size, int osii_index) {
  return write_stitch_image_ex(data, size, osii_index, 0);
}


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

x86 assembly (clang, -O2):
<write_stitch_image>:
xor    %ecx,%ecx
jmp    1030 <write_stitch_image_ex@plt>

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

LLVM IR (-O2):
define i32 @write_stitch_image(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @write_stitch_image_ex(i8* %0, i64 %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ matrix(int, int);
int main(void) {
  matrix(2, 3);
  matrix(31, 87);
  matrix(17, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <matrix@plt>
mov    $0x1f,%edi
mov    $0x57,%esi
call   1030 <matrix@plt>
mov    $0x11,%edi
mov    $0x1,%esi
call   1030 <matrix@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <matrix@plt>
mov    $0x1f,%edi
mov    $0x57,%esi
call   1030 <matrix@plt>
mov    $0x11,%edi
mov    $0x1,%esi
call   1030 <matrix@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @matrix(i32 2, i32 3)
%3 = call i32 @matrix(i32 31, i32 87)
%4 = call i32 @matrix(i32 17, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @matrix(i32 2, i32 3)
%2 = tail call i32 @matrix(i32 31, i32 87)
%3 = tail call i32 @matrix(i32 17, i32 1)
ret i32 0
}
/* Variables and functions */
float fmaf(float const, float const, float const);
float mixf(const float in_X, const float in_Y, const float in_A) {
  return fmaf(in_A, in_Y - in_X, in_X);
}


x86 assembly (clang, -O0):
<mixf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
call   1030 <fmaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixf>:
movaps %xmm0,%xmm3
subss  %xmm0,%xmm1
movaps %xmm2,%xmm0
movaps %xmm3,%xmm2
jmp    1030 <fmaf@plt>

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

LLVM IR (-O2):
define float @mixf(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fma.f32(float %2, float %4, float %0)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void wn_divide_vect_by_vect(double *x, double *y, int z) { assert(0); }


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

x86 assembly (clang, -O2):
<wn_divide_vect_by_vect>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @wn_divide_vect_by_vect(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @wn_divide_vect_by_vect(double* nocapture readnone %0, double* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
void *sbrk(size_t);
void *mymalloc(size_t size) {
  void *p;
  p = sbrk(0);
  if (sbrk(size) == (void *)-1)
    return NULL;
  return p;
}


x86 assembly (clang, -O0):
<mymalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <sbrk@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sbrk@plt>
mov    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jne    114f <mymalloc+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    1157 <mymalloc+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymalloc>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %r15d,%r15d
xor    %edi,%edi
call   1030 <sbrk@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <sbrk@plt>
cmp    $0xffffffffffffffff,%rax
cmove  %r15,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mymalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = call i8* @sbrk(i64 0)
store i8* %5, i8** %4
%6 = load i64, i64* %3
%7 = call i8* @sbrk(i64 %6)
%8 = icmp eq i8* %7, inttoptr (i64 -1 to i8*)
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* null, i8** %2
br label %12
10: ; preds = %1
%11 = load i8*, i8** %4
store i8* %11, i8** %2
br label %12
12: ; preds = %10, %9
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @mymalloc(i64 %0) {
%2 = tail call i8* @sbrk(i64 0)
%3 = tail call i8* @sbrk(i64 %0)
%4 = icmp eq i8* %3, inttoptr (i64 -1 to i8*)
%5 = select i1 %4, i8* null, i8* %2
ret i8* %5
}
void swap(long *ary, int i, int j) {
  ;
  long tmp = ary[i];
  ary[i] = ary[j];
  ary[j] = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rcx
movslq %edx,%rdx
mov    (%rdi,%rdx,8),%rsi
mov    %rsi,(%rdi,%rax,8)
mov    %rcx,(%rdi,%rdx,8)
ret

LLVM IR (-O0):
define void @swap(i64* %0, i32 %1, i32 %2) {
%4 = alloca i64*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i64* %0, i64** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i64*, i64** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %8, i64 %10
%12 = load i64, i64* %11
store i64 %12, i64* %7
%13 = load i64*, i64** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i64, i64* %13, i64 %15
%17 = load i64, i64* %16
%18 = load i64*, i64** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i64, i64* %18, i64 %20
store i64 %17, i64* %21
%22 = load i64, i64* %7
%23 = load i64*, i64** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i64, i64* %23, i64 %25
store i64 %22, i64* %26
ret void
}

LLVM IR (-O2):
define void @swap(i64* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = load i64, i64* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 %7
%9 = load i64, i64* %8
store i64 %9, i64* %5
store i64 %6, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
main() {
  int p;
  for (p = 1; p <= 5, --p; p = p + 2)
    puts("ki");
  puts("KIRAN");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1152 <main+0x42>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ki\00"
@.str.1 = [6 x i8] c"KIRAN\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 5
%6 = zext i1 %5 to i32
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
store i32 %8, i32* %2
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 2
store i32 %14, i32* %2
br label %3
15: ; preds = %3
%16 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"KIRAN\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *strrchr(char *, char);
char *getext(char *filename) {
  char *ext = strrchr(filename, '.');
  return ext == NULL ? "" : ++ext;
}


x86 assembly (clang, -O0):
<getext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <getext+0x39>
lea    0xec0(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1159 <getext+0x49>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getext>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
lea    0xed7(%rip),%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @getext(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 46)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
br label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
br label %12
12: ; preds = %9, %8
%13 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %8 ], [ %11, %9 ]
ret i8* %13
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @getext(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %4
ret i8* %5
}
int st_numcmp(x, y)
char *x;
char *y;
{ return ((int)(x) - (int)(y)); }


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

x86 assembly (clang, -O2):
<st_numcmp>:
mov    %rdi,%rax
sub    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @st_numcmp(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ genn0(char *);
int /*<<< orphan*/ strlen(char *);
char *genn1(char *sf) {
  char *ptr;
  genn0(sf);
  ptr += strlen(sf);
  ptr--;
  ptr[0] = '1';
}


x86 assembly (clang, -O0):
<genn1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <genn0@plt>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x31,(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genn1>:
push   %rbx
mov    %rdi,%rbx
call   1040 <genn0@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>

LLVM IR (-O0):
define i8* @genn1(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @genn0(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = load i8*, i8** %4
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i32 -1
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 0
store i8 49, i8* %15
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
define noalias i8* @genn1(i8* %0) {
%2 = tail call i32 @genn0(i8* %0)
%3 = tail call i32 @strlen(i8* %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printPartition(int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Integer partitions of 10:\n");
  printPartition(10);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1050 <printPartition@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
call   1050 <printPartition@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Integer partitions of 10:\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printPartition(i32 10)
%3 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c"Integer partitions of 10:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printPartition(i32 10)
%3 = tail call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int REG_EXTENDED;
int REG_NEWLINE;
scalar_t__ regcomp(int /*<<< orphan*/ *, char const *, int);
int compileRegex(regex_t *_regex, const char *_pattern) {
  if (0 != regcomp(_regex, _pattern, REG_EXTENDED | REG_NEWLINE)) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compileRegex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
mov    0x2eb0(%rip),%rax
or     (%rax),%edx
call   1030 <regcomp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1159 <compileRegex+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <compileRegex+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compileRegex>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    0x2ec9(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
call   1030 <regcomp@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@REG_EXTENDED = global i32 0
@REG_NEWLINE = global i32 0
define i32 @compileRegex(i32* %0, i8* %1) {
%3 = load i32, i32* @REG_EXTENDED
%4 = load i32, i32* @REG_NEWLINE
%5 = or i32 %4, %3
%6 = tail call i64 @regcomp(i32* %0, i8* %1, i32 %5)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
ret i32 %8
}
void seq_release_private(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<seq_release_private>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_release_private>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.seq_release_private = [20 x i8] c"seq_release_private\00"
define void @seq_release_private() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.seq_release_private, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.seq_release_private = [20 x i8] c"seq_release_private\00"
define void @seq_release_private() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.seq_release_private, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void test_usage(const char *argv0, int exit_code) {
  printf("Usage: %s [-hfo]\n"
         "\n"
         "Options:\n"
         "  -h            display help\n"
         "  -f <format>   select the format used for output\n"
         "  -o <filename> print output to a file\n"
         "\n"
         "Formats:\n"
         "  terminal      human-readable text for ansi terminals\n"
         "  json          rfc 4627 format\n",
         argv0);
  exit(exit_code);
}


x86 assembly (clang, -O0):
<test_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<test_usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [243 x i8] c"Usage: %s [-hfo]\0A\0AOptions:\0A -h display help\0A -f <format> select the format used for output\0A -o <filename> print output to a file\0A\0AFormats:\0A terminal human-readable text for ansi terminals\0A json rfc 4627 format\0A\00"
define void @test_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 ([243 x i8], [243 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [243 x i8] c"Usage: %s [-hfo]\0A\0AOptions:\0A -h display help\0A -f <format> select the format used for output\0A -o <filename> print output to a file\0A\0AFormats:\0A terminal human-readable text for ansi terminals\0A json rfc 4627 format\0A\00"
define void @test_usage(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([243 x i8], [243 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}
int emac2_ifoutucastpkts_set(unsigned int dev_id,
                             union emac2_ifoutucastpkts_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<emac2_ifoutucastpkts_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.emac2_ifoutucastpkts_u = type opaque
define i32 @emac2_ifoutucastpkts_set(i32 %0, %union.emac2_ifoutucastpkts_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac2_ifoutucastpkts_u*
store i32 %0, i32* %3
store %union.emac2_ifoutucastpkts_u* %1, %union.emac2_ifoutucastpkts_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac2_ifoutucastpkts_u = type opaque
define i32 @emac2_ifoutucastpkts_set(i32 %0, %union.emac2_ifoutucastpkts_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ __emit_string_literal_range(char *, int, int, int);
void test_ucn8(void) {
  __emit_string_literal_range("01234\U00002174\U00002175789", 5, 4, 11);
}


x86 assembly (clang, -O0):
<test_ucn8>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x5,%esi
mov    $0x4,%edx
mov    $0xb,%ecx
call   1030 <__emit_string_literal_range@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ucn8>:
lea    0xee9(%rip),%rdi
mov    $0x5,%esi
mov    $0x4,%edx
mov    $0xb,%ecx
jmp    1030 <__emit_string_literal_range@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"01234\E2\85\B4\E2\85\B5789\00"
define void @test_ucn8() {
%1 = call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 5, i32 4, i32 11)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"01234\E2\85\B4\E2\85\B5789\00"
define void @test_ucn8() {
%1 = tail call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 5, i32 4, i32 11)
ret void
}
midbar(i, c) {
  int k;
  k = midbcol(i, c);
  if (k == 0 && c > 0)
    k = midbcol(i, c - 1);
  return (k);
}


x86 assembly (clang, -O0):
<midbar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <midbcol@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1155 <midbar+0x45>
cmpl   $0x0,-0x8(%rbp)
jle    1155 <midbar+0x45>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    $0x0,%al
call   1030 <midbcol@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<midbar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <midbcol@plt>
test   %ebx,%ebx
jle    113a <midbar+0x2a>
test   %eax,%eax
jne    113a <midbar+0x2a>
add    $0xffffffff,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <midbcol@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @midbar(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @midbcol to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%4 = icmp eq i32 %3, 0
%5 = icmp sgt i32 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = add nsw i32 %1, -1
%9 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @midbcol to i32 (i32, i32, ...)*)(i32 %0, i32 %8)
br label %10
10: ; preds = %7, %2
%11 = phi i32 [ %9, %7 ], [ %3, %2 ]
ret i32 %11
}
void out_byte(int port, int value) {
  __asm__("movl	%0, %%eax;		        movl %1, %%edx;		       "
          " outb %%al, %%dx;"
          :
          : "r"(value), "r"(port)
          : "%eax", "%edx");
}


x86 assembly (clang, -O0):
<out_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%esi
mov    %ecx,%eax
mov    %esi,%edx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_byte>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @out_byte(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 = load i32, i32* %3
ret void
}

LLVM IR (-O2):
define void @out_byte(i32 %0, i32 %1) {
tail call void asm sideeffect "movl\09$0, %eax;\09\09 movl $1, %edx;\09\09 outb %al, %dx;", "r,r,~{eax},~{edx},~{dirflag},~{fpsr},~{flags}"(i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) { printf("Usage: %s cpunum\n", name); }


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"Usage: %s cpunum\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
max(a, b) {
  if (a > b)
    return (a);
  return (b);
}


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

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

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void xs_version(int *major, int *minor, int *patch) {
  if (major)
    *major = 1;
  if (minor)
    *minor = 0;
  if (patch)
    *patch = 1;
}


x86 assembly (clang, -O0):
<xs_version>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1125 <xs_version+0x25>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113a <xs_version+0x3a>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     114f <xs_version+0x4f>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xs_version>:
test   %rdi,%rdi
je     110b <xs_version+0xb>
movl   $0x1,(%rdi)
test   %rsi,%rsi
je     1116 <xs_version+0x16>
movl   $0x0,(%rsi)
test   %rdx,%rdx
je     1121 <xs_version+0x21>
movl   $0x1,(%rdx)
ret

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

LLVM IR (-O2):
define void @xs_version(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2) {
%4 = icmp eq i32* %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
store i32 1, i32* %0
br label %6
6: ; preds = %5, %3
%7 = icmp eq i32* %1, null
br i1 %7, label %9, label %8
8: ; preds = %6
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = icmp eq i32* %2, null
br i1 %10, label %12, label %11
11: ; preds = %9
store i32 1, i32* %2
br label %12
12: ; preds = %11, %9
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR4A_set(void) { return U_WMRCORENONE_set("U_WMR4A"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR4A\00"
define i8* @U_WMR4A_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR4A\00"
define i8* @U_WMR4A_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
call(int (*p)(int), int arg) { return p(arg); }


x86 assembly (clang, -O0):
<call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @call(i32 (i32)* nocapture %0, i32 %1) {
%3 = tail call i32 %0(i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
grunt(int argc, char **argv) {
  char *foo;
  puts(foo);
}


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

x86 assembly (clang, -O2):
<grunt>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define i32 @grunt(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) undef)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void print(int x, int y) { printf("\n%d - %d\n\n", x, y); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\0A%d - %d\0A\0A\00"
define void @print(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 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\0A%d - %d\0A\0A\00"
define void @print(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
char *strstr(char const *, char const *);
int mockable_name_pos(const char *buf, const char *mockable_name) {
  char *s = strstr(buf, mockable_name);
  int pos = 0;
  if (NULL == s) {
    return 0;
  }
  pos = s - buf;
  if (pos < 3) {
    return 0;
  }
  return pos;
}


x86 assembly (clang, -O0):
<mockable_name_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
xor    %eax,%eax
cmp    -0x20(%rbp),%rax
jne    1150 <mockable_name_pos+0x40>
movl   $0x0,-0x4(%rbp)
jmp    117a <mockable_name_pos+0x6a>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    1174 <mockable_name_pos+0x64>
movl   $0x0,-0x4(%rbp)
jmp    117a <mockable_name_pos+0x6a>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mockable_name_pos>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strstr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovl  %edx,%ecx
test   %rax,%rax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mockable_name_pos(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i8* @strstr(i8* %8, i8* %9)
store i8* %10, i8** %6
store i32 0, i32* %7
%11 = load i8*, i8** %6
%12 = icmp eq i8* null, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %26
14: ; preds = %2
%15 = load i8*, i8** %6
%16 = load i8*, i8** %4
%17 = ptrtoint i8* %15 to i64
%18 = ptrtoint i8* %16 to i64
%19 = sub i64 %17, %18
%20 = trunc i64 %19 to i32
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 3
br i1 %22, label %23, label %24
23: ; preds = %14
store i32 0, i32* %3
br label %26
24: ; preds = %14
%25 = load i32, i32* %7
store i32 %25, i32* %3
br label %26
26: ; preds = %24, %23, %13
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @mockable_name_pos(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = icmp slt i32 %8, 3
%10 = select i1 %4, i1 true, i1 %9
%11 = select i1 %10, i32 0, i32 %8
ret i32 %11
}
/* Variables and functions */
scalar_t__ is_user_module_valid();
int /*<<< orphan*/ module_user_init();
void system_part2_init() {
  if (is_user_module_valid()) {
    module_user_init();
  }
}


x86 assembly (clang, -O0):
<system_part2_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <is_user_module_valid@plt>
cmp    $0x0,%rax
je     113c <system_part2_init+0x1c>
mov    $0x0,%al
call   1040 <module_user_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_part2_init>:
push   %rax
xor    %eax,%eax
call   1030 <is_user_module_valid@plt>
test   %rax,%rax
je     1135 <system_part2_init+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <module_user_init@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @system_part2_init() {
%1 = call i64 (...) @is_user_module_valid()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @module_user_init()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @system_part2_init() {
%1 = tail call i64 (...) @is_user_module_valid()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @module_user_init()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
scalar_t__ fileno;
int main(int argc, char **argv) {
  void *p;
  (void)argc;
  (void)argv;
  p = (void *)(fileno);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@fileno = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* @fileno
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %6
ret i32 0
}

LLVM IR (-O2):
@fileno = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ esPrimo(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 1, contador = 0;
  while (contador < 10) {
    if (!esPrimo(i)) {
      printf("%d ", i);
      contador++;
    }
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    117e <main+0x5e>
mov    -0x8(%rbp),%edi
call   1040 <esPrimo@plt>
cmp    $0x0,%eax
jne    1170 <main+0x50>
mov    -0x8(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebx
xor    %ebp,%ebp
lea    0xece(%rip),%r14
jmp    1148 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%ebx
cmp    $0xa,%ebp
jge    1162 <main+0x42>
mov    %ebx,%edi
call   1040 <esPrimo@plt>
test   %eax,%eax
jne    1140 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebp
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
br label %1
1: ; preds = %0, %9
%2 = phi i32 [ 0, %0 ], [ %10, %9 ]
%3 = phi i32 [ 1, %0 ], [ %11, %9 ]
%4 = tail call i32 @esPrimo(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%8 = add nsw i32 %2, 1
br label %9
9: ; preds = %6, %1
%10 = phi i32 [ %2, %1 ], [ %8, %6 ]
%11 = add nuw nsw i32 %3, 1
%12 = icmp slt i32 %10, 10
br i1 %12, label %1, label %13
13: ; preds = %9
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ panicf(char *);
int /*<<< orphan*/ panicf_with_location(char *, int /*<<< orphan*/,
                                        int /*<<< orphan*/, char *);
void test_panic(void) {
  panicf("panicf...");
  panicf_with_location("<string>", 0, 0, "panicf_with_location...");
}


x86 assembly (clang, -O0):
<test_panic>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <panicf@plt>
lea    0xed3(%rip),%rdi
xor    %edx,%edx
lea    0xed3(%rip),%rcx
mov    %edx,%esi
call   1030 <panicf_with_location@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_panic>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <panicf@plt>
lea    0xed6(%rip),%rdi
lea    0xed8(%rip),%rcx
xor    %esi,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <panicf_with_location@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"panicf...\00"
@.str.1 = [9 x i8] c"<string>\00"
@.str.2 = [24 x i8] c"panicf_with_location...\00"
define void @test_panic() {
%1 = call i32 @panicf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @panicf_with_location(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"panicf...\00"
@.str.1 = [9 x i8] c"<string>\00"
@.str.2 = [24 x i8] c"panicf_with_location...\00"
define void @test_panic() {
%1 = tail call i32 @panicf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @panicf_with_location(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int UnpackXX_fileoutput(FILE *outputfile, int rarmethod, FILE *inputfile,
                        int DestUnpSize, int UnpPackedSize, int Flags) {
  int filepos, intfd;
  int retval = 0;
  return retval;
}


x86 assembly (clang, -O0):
<UnpackXX_fileoutput>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @UnpackXX_fileoutput(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
store i32 0, i32* %15
%16 = load i32, i32* %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @UnpackXX_fileoutput(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i32 %3, i32 %4, i32 %5) {
ret i32 0
}
int network_check_buffer() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @network_check_buffer() {
ret i32 0
}
void test5(char *P, char *Q) { __builtin___memmove_chk(P, Q, 128, 128); }


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movups (%rcx),%xmm0
movups 0x10(%rcx),%xmm1
movups 0x20(%rcx),%xmm2
movups 0x30(%rcx),%xmm3
movups 0x40(%rcx),%xmm4
movups 0x50(%rcx),%xmm5
movups 0x60(%rcx),%xmm6
movups 0x70(%rcx),%xmm7
movups %xmm7,0x70(%rax)
movups %xmm6,0x60(%rax)
movups %xmm5,0x50(%rax)
movups %xmm4,0x40(%rax)
movups %xmm3,0x30(%rax)
movups %xmm2,0x20(%rax)
movups %xmm1,0x10(%rax)
movups %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5>:
movups (%rsi),%xmm0
movups 0x10(%rsi),%xmm1
movups 0x20(%rsi),%xmm2
movups 0x30(%rsi),%xmm3
movups 0x40(%rsi),%xmm4
movups 0x50(%rsi),%xmm5
movups 0x60(%rsi),%xmm6
movups 0x70(%rsi),%xmm7
movups %xmm7,0x70(%rdi)
movups %xmm6,0x60(%rdi)
movups %xmm5,0x50(%rdi)
movups %xmm4,0x40(%rdi)
movups %xmm3,0x30(%rdi)
movups %xmm2,0x20(%rdi)
movups %xmm1,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @test5(i8* nocapture writeonly %0, i8* nocapture %1) {
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 dereferenceable(128) %0, i8* align 1 dereferenceable(128) %1, i64 128, i1 false)
ret void
}
/* Variables and functions */
scalar_t__ isupper(int);
extern __attribute__((gnu_)) int tolower(int __c) {
  return isupper(__c) ? (__c | 32) : __c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113b <tolower+0x2b>
mov    -0x4(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <tolower+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
mov    %ebx,%ecx
or     $0x20,%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = or i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int Multp_Rec(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int main() {
  setlocale(LC_ALL, "");
  printf("Multp_Rec: %d\n", Multp_Rec(3, 6));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1050 <setlocale@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <Multp_Rec@plt>
mov    %eax,%esi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1050 <setlocale@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <Multp_Rec@plt>
lea    0xea4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [15 x i8] c"Multp_Rec: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @LC_ALL
%3 = call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @Multp_Rec(i32 3, i32 6)
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [15 x i8] c"Multp_Rec: %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @Multp_Rec(i32 3, i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}