LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/nx2elf.cpp
// Function: NsoToElf(std::filesystem::__cxx11::path const&, bool)
static bool NsoToElf(const fs::path& path, bool verbose = false) {
  NsoFile nso;
  if (!nso.Load(path)) {
    return false;
  }
  printf("%s:\n", path.string().c_str());
  nso.Dump(verbose);
  if (verbose) {
    nso.DumpElfInfo();
  }
  fs::path elf_path(path);
  elf_path.replace_extension(".elf");
  bool rv = nso.WriteElf(elf_path);
  puts("");
  return rv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %r14
leaq -0x140(%rbp), %rbx
leaq -0x248(%rbp), %r15
movl $0x104, %edx            # imm = 0x104
movq %r15, %rdi
xorl %esi, %esi
callq 0x2100
movl $0xa8, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2100
xorps %xmm0, %xmm0
movups %xmm0, 0x1c0(%r15)
movups %xmm0, 0x1d0(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b48
testb %al, %al
je 0x28ae
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x3398
leaq -0x40(%rbp), %r15
movq (%r15), %rsi
leaq 0xf8ff(%rip), %rdi      # 0x1213a
xorl %eax, %eax
callq 0x2030
movq %r15, %rdi
callq 0x20e0
leaq -0x248(%rbp), %rdi
xorl %esi, %esi
callq 0x33b4
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x3672
leaq 0xf8d4(%rip), %rsi      # 0x1213f
leaq -0x68(%rbp), %rdi
pushq $0x2
popq %rdx
callq 0x36ac
leaq -0x40(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2180
leaq -0x68(%rbp), %rdi
callq 0x29f4
leaq -0x248(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x371a
pushq $0xa
popq %rdi
callq 0x2250
leaq -0x40(%rbp), %rdi
callq 0x29f4
movq %rbx, %rdi
callq 0x5518
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28d4
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x29f4
jmp 0x28d7
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x29f4
jmp 0x28e9
jmp 0x28e6
jmp 0x28e6
movq %rax, %r14
movq %rbx, %rdi
callq 0x5518
movq %r14, %rdi
callq 0x22b0
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/nx2elf.cpp
// Function: NsoFile::Decompress(unsigned char*, unsigned int, unsigned char const*, unsigned int)
bool Decompress(u8* dst, u32 dst_len, const u8* src, u32 src_len) {
    int len =
        LZ4_decompress_safe(reinterpret_cast<const char*>(src),
                            reinterpret_cast<char*>(dst), src_len, dst_len);
    if (len != dst_len)
      printf("LZ4_decompress_safe: %d (expected %8x)\n", len, dst_len);
    return len > 0;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rcx, %rdi
movl %r8d, %edx
movl %ebx, %ecx
callq 0xe04d
movl %eax, %r14d
cmpl %ebx, %eax
je 0x5324
leaq 0xcf25(%rip), %rdi      # 0x1223d
movl %r14d, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2030
testl %r14d, %r14d
setg %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/nx2elf.cpp
// Function: NsoFile::ResolvePlt(void*, unsigned long)
bool ResolvePlt(void* base, size_t len) {
    // Each plt slot is 4 instructions. The first entry fills 2 slots (resolving
    // thunk).
    if (dyn_info.pltrelsz) {
      const u32 plt_pattern[]{0xa9bf7bf0, 0xd00004d0, 0xf9428a11, 0x91144210,
                              0xd61f0220, 0xd503201f, 0xd503201f, 0xd503201f};
      const u32 plt_mask[ARRAY_SIZE(plt_pattern)]{
          0xffffffff, 0x00000000, 0xff000000, 0xff000000,
          0xff000000, 0xffffffff, 0xffffffff, 0xffffffff};
      auto found = static_cast<u8*>(
          memmem_m(base, len, plt_pattern, plt_mask, sizeof(plt_pattern)));
      if (found) {
        plt_info.addr = found - &image[0];
        // Assume the plt exactly matches .rela.plt
        u64 plt_entry_count = dyn_info.pltrelsz / sizeof(Elf64_Rela);
        const u64 plt_entry_size = sizeof(u32) * 4;
        plt_info.size = plt_entry_size * 2 + plt_entry_size * plt_entry_count;
        return true;
      }
    }
    return false;
  }

// Assembly:
cmpq $0x0, 0x150(%rdi)
je 0x53c3
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movaps 0xd3df(%rip), %xmm0     # 0x12730
leaq -0x50(%rbp), %rax
movaps %xmm0, 0x10(%rax)
movaps 0xd3c0(%rip), %xmm0     # 0x12720
movaps %xmm0, (%rax)
movaps 0xd3e6(%rip), %xmm0     # 0x12750
leaq -0x30(%rbp), %rcx
movaps %xmm0, 0x10(%rcx)
movaps 0xd3c7(%rip), %xmm0     # 0x12740
movaps %xmm0, (%rcx)
pushq $0x20
popq %r8
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x5616
testq %rax, %rax
je 0x53c6
subq 0x108(%rbx), %rax
movq %rax, 0x1b0(%rbx)
movq 0x150(%rbx), %rax
pushq $0x18
popq %rcx
xorl %edx, %edx
divq %rcx
shlq $0x4, %rax
addq $0x20, %rax
movq %rax, 0x1b8(%rbx)
movb $0x1, %al
jmp 0x53c8
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/./types.h
// Function: memmemr(void const*, unsigned long, void const*, unsigned long)
inline void* memmemr(const void* haystack,
                     size_t haystack_len,
                     const void* needle,
                     size_t needle_len) {
  u8* p = (u8*)haystack + haystack_len - needle_len;
  u8* e = (u8*)haystack;
  while (p >= e) {
    if (!memcmp(p, needle, needle_len)) {
      return p;
    }
    p--;
  }
  return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
addq %rdi, %rbx
subq %rcx, %rbx
cmpq %r12, %rbx
jb 0x5493
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21d0
testl %eax, %eax
je 0x5495
decq %rbx
jmp 0x5477
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/./types.h
// Function: memmem_m(void const*, unsigned long, void const*, void const*, unsigned long)
inline void* memmem_m(const void* haystack,
                      size_t haystack_len,
                      const void* needle,
                      const void* mask,
                      size_t needle_len) {
  u8* p = (u8*)haystack;
  u8* e = (u8*)haystack + haystack_len - needle_len;
  while (p <= e) {
    if (!memcmp_m(p, needle, mask, needle_len)) {
      return p;
    }
    p++;
  }
  return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
addq %rdi, %r13
subq %r8, %r13
cmpq %r13, %rbx
ja 0x5658
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x566c
testl %eax, %eax
je 0x565a
incq %rbx
jmp 0x5639
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/./types.h
// Function: memcmp_m(void const*, void const*, void const*, unsigned long)
inline int memcmp_m(const void* ptr1,
                    const void* ptr2,
                    const void* mask,
                    size_t len) {
  const u8* a = (const u8*)ptr1;
  const u8* b = (const u8*)ptr2;
  const u8* m = (const u8*)mask;
  u8 x = 0;
  while (len-- && !x) {
    x = (*a++ ^ *b++) & *m++;
  }
  return x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %r8d, %r8d
cmpq %rax, %rcx
je 0x5690
testb %r8b, %r8b
jne 0x5690
movb (%rsi,%rax), %r8b
xorb (%rdi,%rax), %r8b
andb (%rdx,%rax), %r8b
incq %rax
jmp 0x5675
movzbl %r8b, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/./types.h
// Function: memmem
inline void* memmem(const void* haystack,
                    size_t haystack_len,
                    const void* needle,
                    size_t needle_len) {
  u8* p = (u8*)haystack;
  u8* e = (u8*)haystack + haystack_len - needle_len;
  while (p <= e) {
    if (!memcmp(p, needle, needle_len)) {
      return p;
    }
    p++;
  }
  return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
addq %rdi, %r12
subq %rcx, %r12
cmpq %r12, %rbx
ja 0x637f
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6381
incq %rbx
jmp 0x6363
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/nx2elf.cpp
// Function: StringTable::GetBuffer()
std::vector<char> GetBuffer() {
    std::vector<char> buffer(watermark);
    for (const auto& entry : entries) {
      strcpy(&buffer[entry.second], entry.first);
    }
    return buffer;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x38(%rsi), %esi
leaq -0x11(%rbp), %rdx
callq 0x704c
addq $0x10, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x703f
movl 0x10(%r14), %edi
addq (%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0x2190
jmp 0x7025
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shuffle2[P]nx2elf/lz4.c
// Function: LZ4_decompress_safe_usingDict
int LZ4_decompress_safe_usingDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize)
{
    if (dictSize==0)
        return LZ4_decompress_safe(source, dest, compressedSize, maxOutputSize);
    if (dictStart+dictSize == dest) {
        if (dictSize >= 64 KB - 1) {
            return LZ4_decompress_safe_withPrefix64k(source, dest, compressedSize, maxOutputSize);
        }
        assert(dictSize >= 0);
        return LZ4_decompress_safe_withSmallPrefix(source, dest, compressedSize, maxOutputSize, (size_t)dictSize);
    }
    assert(dictSize >= 0);
    return LZ4_decompress_safe_forceExtDict(source, dest, compressedSize, maxOutputSize, dictStart, (size_t)dictSize);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %r9d, %r9d
je 0x11ceb
movl %r9d, %eax
movslq %r9d, %r9
leaq (%r8,%r9), %r10
cmpq %rsi, %r10
je 0x11cf1
popq %rbp
jmp 0xf828
popq %rbp
jmp 0xe04d
cmpl $0xffff, %eax           # imm = 0xFFFF
jl 0x11cfe
popq %rbp
jmp 0xf1b7
movq %r9, %r8
popq %rbp
jmp 0x1098e
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: check_bam_aux_get
uint8_t *check_bam_aux_get(const bam1_t *aln, const char *tag, char type)
{
    uint8_t *p = bam_aux_get(aln, tag);
    if (p) {
        if (*p == type) return p;
        else fail("%s field of type '%c', expected '%c'", tag, *p, type);
    }
    else fail("can't find %s field", tag);

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
callq 0x28b08
testq %rax, %rax
je 0x5af2
movq %rax, %rbx
movzbl (%rax), %edx
movsbl %bpl, %ecx
cmpl %ecx, %edx
je 0x5b05
leaq 0x71584(%rip), %rdi     # 0x77068
xorl %ebx, %ebx
movq %r14, %rsi
xorl %eax, %eax
callq 0x5b0d
jmp 0x5b05
leaq 0x71594(%rip), %rdi     # 0x7708d
xorl %ebx, %ebx
movq %r14, %rsi
xorl %eax, %eax
callq 0x5b0d
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: fail
static void HTS_FORMAT(HTS_PRINTF_FMT, 1, 2) fail(const char *fmt, ...)
{
    va_list args;

    fprintf(stderr, "Failed: ");
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);
    fprintf(stderr, "\n");

    status = EXIT_FAILURE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x5b70
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x9c469(%rip), %r15     # 0xa1fe0
movq (%r15), %rcx
leaq 0x71560(%rip), %rdi     # 0x770e1
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x49a0
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %r14, 0x10(%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x4690
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x4630
movl $0x1, 0x9c978(%rip)     # 0xa2544
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: test_text_file
static void test_text_file(const char *filename, int nexp)
{
    htsFile *in = hts_open(filename, "r");
    if (in) {
        kstring_t str = KS_INITIALIZE;
        int ret, n = 0;
        while ((ret = hts_getline(in, '\n', &str)) >= 0) {
            size_t len = strlen(str.s);
            n++;
            if (ret != len) fail("hts_getline read length %d (expected %zu)", ret, len);
        }
        if (ret != -1) fail("hts_getline got an error from %s", filename);
        if (n != nexp) fail("hts_getline read %d lines from %s (expected %d)", n, filename, nexp);

        hts_close(in);
        free(str.s);
    }
    else fail("can't open %s to read as text", filename);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x74f51(%rip), %rsi     # 0x7f68a
callq 0x170e7
testq %rax, %rax
je 0xa806
movq %rax, %r14
movl %ebp, 0x4(%rsp)
movq %rbx, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
andq $0x0, 0x10(%r12)
movaps %xmm0, (%r12)
pushq $0xa
popq %r13
leaq 0x6e248(%rip), %rbp     # 0x789b9
xorl %r15d, %r15d
movq %r14, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x18858
movl %eax, %ebx
testl %eax, %eax
js 0xa7ad
movq 0x20(%rsp), %rdi
callq 0x41c0
movl %ebx, %ecx
cmpq %rcx, %rax
je 0xa7a8
movq %rbp, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5b0d
incl %r15d
jmp 0xa774
cmpl $-0x1, %ebx
movq 0x8(%rsp), %rbx
je 0xa7c8
leaq 0x6e225(%rip), %rdi     # 0x789e3
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5b0d
movl 0x4(%rsp), %ecx
cmpl %r15d, %ecx
je 0xa7e5
leaq 0x6e22c(%rip), %rdi     # 0x78a04
movl %r15d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5b0d
movq %r14, %rdi
callq 0x182bd
movq 0x20(%rsp), %rdi
callq 0x45c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6e227(%rip), %rdi     # 0x78a34
movq %rbx, %rsi
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5b0d
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: check_aux_count
static void check_aux_count(const bam1_t *aln, int expected, const char *what)
{
    const uint8_t *itr;
    int n = 0;
    for (itr = bam_aux_first(aln); itr; itr = bam_aux_next(aln, itr)) n++;
    if (n != expected)
        fail("%s has %d aux fields, expected %d", what, n, expected);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
callq 0x29ec2
xorl %ebp, %ebp
testq %rax, %rax
je 0xacf5
incl %ebp
movq %r15, %rdi
movq %rax, %rsi
callq 0x29f10
jmp 0xace1
cmpl %ebp, %ebx
jne 0xad04
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6cbfe(%rip), %rdi     # 0x77909
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5b0d
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: check_int_B_array
static void check_int_B_array(bam1_t *aln, char *tag,
                             uint32_t nvals, int64_t *vals) {
    uint8_t *p;
    if ((p = check_bam_aux_get(aln, tag, 'B')) != NULL) {
        uint32_t i;

        if (bam_auxB_len(p) != nvals)
            fail("Wrong length reported for %s field, got %u, expected %u",
                 tag, bam_auxB_len(p), nvals);

        for (i = 0; i < nvals; i++) {
            if (bam_auxB2i(p, i) != vals[i]) {
                fail("Wrong value from bam_auxB2i for %s field index %u, "
                     "got %"PRId64" expected %"PRId64,
                     tag, i, bam_auxB2i(p, i), vals[i]);
            }
            if (bam_auxB2f(p, i) != (double) vals[i]) {
                fail("Wrong value from bam_auxB2f for %s field index %u, "
                     "got %f expected %f",
                     tag, i, bam_auxB2f(p, i), (double) vals[i]);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
pushq $0x42
popq %rdx
callq 0x5abc
testq %rax, %rax
je 0xadf4
movq %rax, %r15
movq %rax, %rdi
callq 0x2a7f5
cmpl %ebp, %eax
je 0xad73
movq %r15, %rdi
callq 0x2a7f5
leaq 0x6cbc6(%rip), %rdi     # 0x7792b
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x5b0d
movl %ebp, %r13d
leaq 0x6cc2e(%rip), %r12     # 0x779ab
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0xadf4
movq %r15, %rdi
movl %ebp, %esi
callq 0x2a811
cmpq (%rbx,%rbp,8), %rax
je 0xadb8
movq %r15, %rdi
movl %ebp, %esi
callq 0x2a811
movq (%rbx,%rbp,8), %r8
leaq 0x6cbba(%rip), %rdi     # 0x77963
movq %r14, %rsi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x5b0d
movq %r15, %rdi
movl %ebp, %esi
callq 0x2a852
cvtsi2sdq (%rbx,%rbp,8), %xmm1
ucomisd %xmm1, %xmm0
jne 0xadd0
jnp 0xadef
movq %r15, %rdi
movl %ebp, %esi
callq 0x2a852
cvtsi2sdq (%rbx,%rbp,8), %xmm1
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
movb $0x2, %al
callq 0x5b0d
incq %rbp
jmp 0xad7f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: test_update_int
static int test_update_int(bam1_t *aln,
                           const char target_id[2], int64_t target_val,
                           char expected_type,
                           const char next_id[2], int64_t next_val,
                           char next_type) {
    uint8_t *p;

    // Try updating target
    if (bam_aux_update_int(aln, target_id, target_val) < 0) {
        fail("update %.2s tag", target_id);
        return -1;
    }

    // Check it's there and has the right type and value
    p = bam_aux_get(aln, target_id);
    if (!p) {
        fail("find  %.2s tag", target_id);
        return -1;
    }
    if (*p != expected_type || bam_aux2i(p) != target_val) {
        fail("%.2s field is %c:%"PRId64"; expected %c:%"PRId64,
             target_id, *p, bam_aux2i(p), expected_type, target_val);
        return -1;
    }

    // If given, check that the next tag hasn't been clobbered by the
    // update above.
    if (!*next_id) return 0;
    p = bam_aux_get(aln, next_id);
    if (!p) {
        fail("find  %.2s tag after updating %.2s", next_id, target_id);
        return -1;
    }
    if (*p != next_type || bam_aux2i(p) != next_val) {
        fail("after updating %.2s to %"PRId64":"
             " %.2s field is %c:%"PRId64"; expected %c:%"PRId64,
             target_id, target_val,
             next_id, *p, bam_aux2i(p), next_type, next_val);
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r13
callq 0x2a219
testl %eax, %eax
js 0xaedd
movq %r12, (%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x28b08
testq %rax, %rax
je 0xaee6
movq %rax, %r12
movb (%rax), %al
cmpb %bpl, %al
jne 0xaefd
movq %r12, %rdi
callq 0x2a715
cmpq %r14, %rax
jne 0xaef9
xorl %ebp, %ebp
cmpb $0x0, (%r15)
je 0xaf2d
movq %r13, %rdi
movq %r15, %rsi
callq 0x28b08
testq %rax, %rax
je 0xaf3e
movq %rax, %r13
movb 0x40(%rsp), %r12b
movb (%rax), %al
cmpb %r12b, %al
jne 0xaea8
movq %r13, %rdi
callq 0x2a715
cmpq (%rsp), %rax
je 0xaf2d
movb (%r13), %al
movzbl %r12b, %r12d
movzbl %al, %ebp
movq %r13, %rdi
callq 0x2a715
leaq 0x6cb75(%rip), %rdi     # 0x77a33
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
movl %ebp, %r8d
movq %rax, %r9
xorl %eax, %eax
pushq (%rsp)
pushq %r12
callq 0x5b0d
popq %rax
popq %rcx
jmp 0xaf2a
leaq 0x6cb0d(%rip), %rdi     # 0x779f1
jmp 0xaeed
leaq 0x6cb14(%rip), %rdi     # 0x77a01
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5b0d
jmp 0xaf2a
movb (%r12), %al
movzbl %bpl, %ebp
movzbl %al, %r15d
movq %r12, %rdi
callq 0x2a715
leaq 0x6cb3b(%rip), %rdi     # 0x77a4f
movq %rbx, %rsi
movl %r15d, %edx
movq %rax, %rcx
movl %ebp, %r8d
movq %r14, %r9
xorl %eax, %eax
callq 0x5b0d
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6cacb(%rip), %rdi     # 0x77a10
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5b0d
jmp 0xaf2a
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: check_target_names
static int check_target_names(sam_hdr_t *header, int expected_n_targets,
                              const char **expected_targets,
                              const int   *expected_lengths) {
    int i;

    // Check consistency of target_names array
    if (!header->target_name) {
        fail("target_name is NULL");
        return -1;
    }
    if (!header->target_len) {
        fail("target_len is NULL");
        return -1;
    }
    if (header->n_targets != expected_n_targets) {
        fail("header->n_targets (%d) != expected_n_targets (%d)",
             header->n_targets, expected_n_targets);
        return -1;
    }
    for (i = 0; i < expected_n_targets; i++) {
        if (!header->target_name[i]
            || strcmp(header->target_name[i], expected_targets[i]) != 0) {
            fail("header->target_name[%d] (%s) != \"%s\"",
                 i, header->target_name[i] ? header->target_name[i] : "NULL",
                 expected_targets[i]);
            return -1;
        }
        if (header->target_len[i] != expected_lengths[i]) {
            fail("header->target_len[%d] (%d) != %d",
                 i, header->target_len[i], expected_lengths[i]);
            return -1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq 0x20(%rdi), %rbx
testq %rbx, %rbx
je 0xb494
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0xb49d
movq %rsi, %r15
movl (%rdi), %esi
cmpl $0x3, %esi
jne 0xb4ad
xorl %r12d, %r12d
cmpq $0x3, %r12
je 0xb4c0
movq (%rbx,%r12,8), %rbp
movq (%r15,%r12,8), %r13
testq %rbp, %rbp
je 0xb4c4
movq %rbp, %rdi
movq %r13, %rsi
callq 0x46c0
testl %eax, %eax
jne 0xb4cb
movl (%r14,%r12,4), %edx
movq (%rsp), %rax
movl (%rax,%r12,4), %ecx
cmpl %ecx, %edx
jne 0xb4e4
incq %r12
jmp 0xb45d
leaq 0x6ccb7(%rip), %rdi     # 0x78152
jmp 0xb4a4
leaq 0x6ccc2(%rip), %rdi     # 0x78166
xorl %eax, %eax
callq 0x5b0d
jmp 0xb4f5
leaq 0x6ccc5(%rip), %rdi     # 0x78179
pushq $0x3
popq %rdx
xorl %eax, %eax
callq 0x5b0d
jmp 0xb4f5
xorl %eax, %eax
jmp 0xb4f8
leaq 0x7261b(%rip), %rbp     # 0x7dae6
leaq 0x6ccd9(%rip), %rdi     # 0x781ab
movl %r12d, %esi
movq %rbp, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x5b0d
jmp 0xb4f5
leaq 0x6cce5(%rip), %rdi     # 0x781d0
movl %r12d, %esi
xorl %eax, %eax
callq 0x5b0d
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: check_ref_lookup
static void check_ref_lookup(sam_hdr_t *header, const char *msg, ...) {
    const char *name;
    va_list args;
    va_start(args, msg);
    while ((name = va_arg(args, const char *)) != NULL) {
        int exp = va_arg(args, int);
        int tid = sam_hdr_name2tid(header, name);
        if (tid != exp)
            fail("%s: altname \"%s\" => %d (expected %d)", msg, name, tid, exp);
    }
    va_end(args);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0xb970
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
leaq 0x6cf63(%rip), %r15     # 0x788fa
movl (%rsp), %eax
cmpq $0x28, %rax
ja 0xb9b0
movq %rax, %rcx
addq 0x10(%rsp), %rcx
addl $0x8, %eax
movl %eax, (%rsp)
jmp 0xb9be
movq 0x8(%rsp), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq (%rcx), %r12
testq %r12, %r12
je 0xba10
cmpl $0x28, %eax
ja 0xb9da
movl %eax, %ecx
addq 0x10(%rsp), %rcx
addl $0x8, %eax
movl %eax, (%rsp)
jmp 0xb9e8
movq 0x8(%rsp), %rcx
leaq 0x8(%rcx), %rax
movq %rax, 0x8(%rsp)
movl (%rcx), %ebp
movq %r14, %rdi
movq %r12, %rsi
callq 0x11cd0
cmpl %ebp, %eax
je 0xb997
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x5b0d
jmp 0xb997
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: check_ref_lengths
static int check_ref_lengths(const sam_hdr_t *header,
                             const hts_pos_t *expected_lengths,
                             int num_refs, const char *hdr_name)
{
    int i;
    for (i = 0; i < num_refs; i++) {
        hts_pos_t ln = sam_hdr_tid2len(header, i);
        if (ln != expected_lengths[i]) {
            fail("Wrong length for %s ref %d : "
                 "expected %"PRIhts_pos" got %"PRIhts_pos"\n",
                 hdr_name, i, expected_lengths[i], ln);
            return -1;
        }
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
xorl %r15d, %r15d
xorl %r14d, %r14d
cmpq $0x4, %r14
je 0xba73
movq %r13, %rdi
movl %r14d, %esi
callq 0x11d6b
movq (%r12,%r14,8), %rcx
incq %r14
cmpq %rcx, %rax
je 0xba38
decl %r14d
leaq 0x6d2ed(%rip), %rdi     # 0x78d4c
movq %rbx, %rsi
movl %r14d, %edx
movq %rax, %r8
xorl %eax, %eax
callq 0x5b0d
pushq $-0x1
popq %r15
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: test_parse_decimal1
static void test_parse_decimal1(long long exp, const char *str, size_t exp_consumed, int flags, const char *warning)
{
    if (warning) fprintf(stderr, "(Expect %s message for \"%s\")\n", warning, str);

    long long val = hts_parse_decimal(str, NULL, flags);
    if (val != exp) fail("hts_parse_decimal(\"%s\", NULL, %d) returned %lld, expected %lld", str, flags, val, exp);

    char *end;
    val = hts_parse_decimal(str, &end, flags);
    if (val != exp) fail("hts_parse_decimal(\"%s\", ..., %d) returned %lld, expected %lld", str, flags, val, exp);
    size_t consumed = end - str;
    if (consumed != exp_consumed) fail("hts_parse_decimal(\"%s\", ..., %d) consumed %zu chars, expected %zu", str, flags, consumed, exp_consumed);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %r8, %r8
jne 0xbb1d
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x1bb2a
cmpq %r15, %rax
je 0xbac5
leaq 0x6d399(%rip), %rdi     # 0x78e4c
movq %r14, %rsi
movl %ebp, %edx
movq %rax, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x5b0d
movq %rsp, %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x1bb2a
cmpq %r15, %rax
je 0xbaf0
leaq 0x6d3ad(%rip), %rdi     # 0x78e8b
movq %r14, %rsi
movl %ebp, %edx
movq %rax, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x5b0d
movq (%rsp), %rcx
subq %r14, %rcx
cmpq %rbx, %rcx
je 0xbb12
leaq 0x6d3c6(%rip), %rdi     # 0x78ec9
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %r8
xorl %eax, %eax
callq 0x5b0d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x964bc(%rip), %rax     # 0xa1fe0
movq (%rax), %rdi
leaq 0x6d300(%rip), %rsi     # 0x78e2e
movq %r8, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x4700
jmp 0xba9b
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/sam.c
// Function: read_data_block
static int read_data_block(const char *in_name, samFile *fp_in,
                           const char *out_name, samFile *fp_out,
                           sam_hdr_t *header, bam1_t *recs, size_t max_recs,
                           uint8_t *buffer, size_t bufsz, size_t *nrecs_out) {
    size_t buff_used = 0, nrecs;
    uint32_t new_m_data;
    int ret = -1, res = -1;

    for (nrecs = 0; nrecs < max_recs; nrecs++) {
        bam_set_mempolicy(&recs[nrecs],
                          BAM_USER_OWNS_STRUCT|BAM_USER_OWNS_DATA);

        recs[nrecs].data = &buffer[buff_used];
        recs[nrecs].m_data = bufsz - buff_used;

        res = sam_read1(fp_in, header, &recs[nrecs]);
        if (res < 0) break; // EOF or error

        if (fp_out) {
            if (sam_write1(fp_out, header, &recs[nrecs]) < 0) {
                nrecs++; // To return correct count
                fail("sam_write1() to \"%s\"", out_name);
                goto out;
            }
        }

        if ((bam_get_mempolicy(&recs[nrecs]) & BAM_USER_OWNS_DATA) == 0) {
            continue;  // Data not put in buffer
        }

        new_m_data = ((uint32_t) recs[nrecs].l_data + 7) & (~7U);
        if (new_m_data < recs[nrecs].m_data) recs[nrecs].m_data = new_m_data;

        buff_used += recs[nrecs].m_data;
    }
    if (res < -1) {
        fail("sam_read1() from \"%s\" failed", in_name);
    } else {
        ret = 0;
    }

 out:
    *nrecs_out = nrecs;
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpq $0x3e8, %r15            # imm = 0x3E8
je 0xbbee
orb $0x3, 0x48(%r12)
movq 0x50(%rsp), %rax
addq %rbx, %rax
movq %rax, 0x38(%r12)
movl $0x249f0, %eax          # imm = 0x249F0
subl %ebx, %eax
movl %eax, 0x44(%r12)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x279c2
testl %eax, %eax
js 0xbbfd
testq %rbp, %rbp
je 0xbbba
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x29349
testl %eax, %eax
js 0xbc24
testb $0x2, 0x48(%r12)
je 0xbbe2
movl 0x40(%r12), %eax
movl 0x44(%r12), %ecx
addl $0x7, %eax
andl $-0x8, %eax
cmpl %ecx, %eax
jae 0xbbdd
movl %eax, 0x44(%r12)
movl %eax, %ecx
movl %ecx, %eax
addq %rax, %rbx
incq %r15
addq $0x50, %r12
jmp 0xbb69
movl $0x3e8, %r15d           # imm = 0x3E8
movq 0x58(%rsp), %rbx
xorl %eax, %eax
jmp 0xbc42
cmpl $-0x1, %eax
movq 0x58(%rsp), %rbx
movl $0x0, %eax
je 0xbc42
leaq 0x6d447(%rip), %rdi     # 0x7905a
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x5b0d
pushq $-0x1
popq %rax
jmp 0xbc42
incq %r15
leaq 0x6d417(%rip), %rdi     # 0x79045
movq 0x8(%rsp), %rsi
xorl %eax, %eax
callq 0x5b0d
pushq $-0x1
popq %rax
movq 0x58(%rsp), %rbx
movq %r15, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/ch6/library_subset.c
// Function: main
int main() {

  lua_State *L = luaL_newstate();
  int set_global = 1;

  // Choose how many libraries to work with.
  Mode mode = mode_all_libs;  // Change this value to explore.
  switch (mode) {

    case mode_all_libs:
      luaL_openlibs(L);
      break;

    case mode_some_libs:
      luaL_requiref(L, "package", luaopen_package, set_global);
      luaL_requiref(L, "string", luaopen_string, set_global);
      luaL_requiref(L, "table", luaopen_table, set_global);
      luaL_requiref(L, "math", luaopen_math, set_global);
      // Fall through to also include the next case.

    case mode_base_only:
      luaL_requiref(L, "_G", luaopen_base, set_global);
      break;
  }

  luaL_dofile(L, "run_bash.lua");

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x12b1e
movq %rax, %rbx
movq %rax, %rdi
callq 0x12d44
leaq 0x199fb(%rip), %rsi     # 0x1e004
movq %rbx, %rdi
xorl %edx, %edx
callq 0x122ef
testl %eax, %eax
jne 0x462c
pushq $-0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x584c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.7/tsd.c
// Function: merge_sort
void merge_sort(int low, int high) 
{ 
    // calculating mid point of array 
    int mid = low + (high - low) / 2; 
    if (low < high) { 
  
        // calling first half 
        merge_sort(low, mid); 
  
        // calling second half 
        merge_sort(mid + 1, high); 
  
        // merging the two halves 
        merge(low, mid, high); 
    } 
}

// Assembly:
movl %esi, %eax
subl %edi, %eax
jle 0x13c9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, %r15d
leal (%r15,%r14), %r12d
movl %r12d, %esi
callq 0x137c
leal (%r15,%r14), %edi
incl %edi
movl %ebx, %esi
callq 0x137c
movl %r14d, %edi
movl %r12d, %esi
movl %ebx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1264
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.7/tsd.c
// Function: merge_sort_multithreading
void* merge_sort_multithreading(void* arg) 
{ 
	char thread_log_filename[20], log_message[100];
	FILE* thread_log;
	/* Generate the filename for this thread’s log file. */
	sprintf (thread_log_filename, "thread%d.log", (int) pthread_self ());
	/* Open the log file. */
	thread_log = fopen (thread_log_filename, "w");
	/* Store the file pointer in thread-specific data under thread_log_key.*/
	pthread_setspecific (thread_log_key, thread_log);
	
	write_to_thread_log ("Thread starting.");

	int old_cancel_state;

	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancel_state);

    // which part out of 4 parts 
    int thread_part = part++; 

    pthread_setcancelstate(old_cancel_state, NULL);

    sprintf (log_message, "Processing part %d of the array.", thread_part);
    write_to_thread_log (log_message);
  
    // calculating low and high 
    int low = thread_part * (MAX / 4); 
    int high = (thread_part + 1) * (MAX / 4) - 1; 

    sprintf (log_message, "The part starts at %d and ends at %d.", low, high);
    write_to_thread_log (log_message);
  
    // evaluating mid point 
    int mid = low + (high - low) / 2; 

    write_to_thread_log ("Sorting...");
    if (low < high) { 
        merge_sort(low, mid); 
        merge_sort(mid + 1, high); 
        merge(low, mid, high); 
    }
    write_to_thread_log ("Sorting finished succesfully!"); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
callq 0x10d0
leaq 0xc20(%rip), %rsi       # 0x2008
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x10f0
leaq 0xc16(%rip), %rsi       # 0x2015
movq %rbx, %rdi
callq 0x10e0
movl 0x2cb7(%rip), %edi      # 0x40c4
movq %rax, %rsi
callq 0x1120
leaq 0xbfb(%rip), %rdi       # 0x2017
callq 0x122c
pushq $0x1
popq %rdi
leaq -0x24(%rbp), %r14
movq %r14, %rsi
callq 0x1050
movl 0x2c8a(%rip), %ebx      # 0x40c0
leal 0x1(%rbx), %eax
movl %eax, 0x2c81(%rip)      # 0x40c0
movl (%r14), %edi
xorl %esi, %esi
callq 0x1050
leaq 0xbd8(%rip), %rsi       # 0x2028
leaq -0xb0(%rbp), %r12
movq %r12, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
movq %r12, %rdi
callq 0x122c
leal (%rbx,%rbx,4), %r15d
leal (%rbx,%rbx,4), %r14d
addl $0x4, %r14d
leaq 0xbcb(%rip), %rsi       # 0x2049
movq %r12, %rdi
movl %r15d, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x10f0
movq %r12, %rdi
callq 0x122c
leaq 0xbd2(%rip), %rdi       # 0x206f
callq 0x122c
leal (%rbx,%rbx,4), %r12d
addl $0x2, %r12d
movl %r15d, %edi
movl %r12d, %esi
callq 0x137c
leal (%rbx,%rbx,4), %edi
addl $0x3, %edi
movl %r14d, %esi
callq 0x137c
movl %r15d, %edi
movl %r12d, %esi
movl %r14d, %edx
callq 0x1264
leaq 0xba2(%rip), %rdi       # 0x207a
callq 0x122c
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.7/tsd.c
// Function: create_random_array
void create_random_array(){
	time_t t;

	srand((unsigned) time(&t));

	int i;
	for(i = 0; i < MAX; ++i){
		a[i] = rand() % 100;
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq -0x20(%rbp), %rdi
callq 0x10a0
movl %eax, %edi
callq 0x1080
xorl %ebx, %ebx
pushq $0x64
popq %r14
leaq 0x2bbc(%rip), %r15      # 0x40d0
cmpq $0x50, %rbx
je 0x152d
callq 0x1110
cltd
idivl %r14d
movl %edx, (%rbx,%r15)
addq $0x4, %rbx
jmp 0x1514
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.7/tsd.c
// Function: main
int main ()
{
	int i;

	create_random_array();

	pthread_t threads[THREAD_MAX];
	/* Create a key to associate thread log file pointers in
	thread-specific data. Use close_thread_log to clean up the file
	pointers. */ 
	pthread_key_create (&thread_log_key, close_thread_log);
	/* Create threads to do the work. */
	for (i = 0; i < THREAD_MAX; ++i)
		pthread_create (&(threads[i]), NULL, merge_sort_multithreading, NULL);
	/* Wait for all threads to finish. */
	for (i = 0; i < THREAD_MAX; ++i)
		pthread_join (threads[i], NULL);

	merge(0, (MAX / 2 - 1) / 2, MAX / 2 - 1); 
    merge(MAX / 2, MAX/2 + (MAX-1-MAX/2)/2, MAX - 1); 
    merge(0, (MAX - 1)/2, MAX - 1); 

	for (i = 0; i < MAX; ++i)
		printf("%d\n", a[i]);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
callq 0x14ed
leaq 0x2b73(%rip), %rdi      # 0x40c4
leaq -0x2fe(%rip), %rsi      # 0x125a
callq 0x1070
xorl %r14d, %r14d
leaq -0x19d(%rip), %rbx      # 0x13ca
cmpq $0x20, %r14
je 0x1587
leaq (%r14,%rbp), %rdi
addq $-0x40, %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x10c0
addq $0x8, %r14
jmp 0x1567
xorl %ebx, %ebx
cmpq $0x4, %rbx
je 0x15a0
movq -0x40(%rbp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1100
incq %rbx
jmp 0x1589
pushq $0x4
popq %rsi
pushq $0x9
popq %rbx
xorl %edi, %edi
movl %ebx, %edx
callq 0x1264
pushq $0xa
popq %rdi
pushq $0xe
popq %rsi
pushq $0x13
popq %r14
movl %r14d, %edx
callq 0x1264
xorl %edi, %edi
movl %ebx, %esi
movl %r14d, %edx
callq 0x1264
leaq 0x2afc(%rip), %r14      # 0x40d0
leaq 0xabd(%rip), %rbx       # 0x2098
xorl %r15d, %r15d
cmpq $0x50, %r15
je 0x15f8
movl (%r15,%r14), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
addq $0x4, %r15
jmp 0x15de
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lyda[P]tz/zic.c
// Function: warning
static void
warning(string)
const char * const	string;
{
	char *	cp;

	cp = ecpyalloc(_("warning: "));
	cp = ecatalloc(cp, string);
	error(cp);
	ifree(cp);
	--errors;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x412e(%rip), %rdi      # 0x92fb
callq 0x8d51
movq %rax, %r14
movq %rax, %rdi
callq 0x5211
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8cd6
movq %rax, %rbx
movq %rax, %rdi
callq 0x5211
movq %rbx, %rdi
callq 0x5251
movq %rbx, %rdi
callq 0x8d5b
decl 0x7feb(%rip)            # 0xd1f4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/lyda[P]tz/zic.c
// Function: error
static void
error(string)
const char * const	string;
{
	/*
	** Match the format of "cc" to allow sh users to
	**	zic ... 2>&1 | error -t "*" -v
	** on BSD systems.
	*/
	(void) fprintf(stderr, _("\"%s\", line %d: %s"),
		filename, linenum, string);
	if (rfilename != NULL)
		(void) fprintf(stderr, _(" (rule from \"%s\", line %d)"),
			rfilename, rlinenum);
	(void) fprintf(stderr, "\n");
	++errors;
}

// Assembly:
pushq %rbx
movq %rdi, %r8
movq 0x7d9c(%rip), %rbx      # 0xcff8
movq (%rbx), %rdi
movq 0x7fb2(%rip), %rdx      # 0xd218
movl 0x7fb4(%rip), %ecx      # 0xd220
leaq 0x40ac(%rip), %rsi      # 0x931f
xorl %eax, %eax
callq 0x21b0
movq 0x7fa7(%rip), %rdx      # 0xd228
testq %rdx, %rdx
jne 0x5299
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x2140
incl 0x7f5d(%rip)            # 0xd1f4
popq %rbx
retq
movq (%rbx), %rdi
movl 0x7f8e(%rip), %ecx      # 0xd230
leaq 0x4088(%rip), %rsi      # 0x9331
xorl %eax, %eax
callq 0x21b0
jmp 0x5286
// File: /workspace/github_c_makefile_star2_O2/lyda[P]tz/zic.c
// Function: itsdir
static int
itsdir(name)
const char * const	name;
{
	register char *	myname;
	register int	accres;

	myname = ecpyalloc(name);
	myname = ecatalloc(myname, "/.");
	accres = access(myname, F_OK);
	ifree(myname);
	return accres == 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x8d51
movq %rax, %rbx
movq %rax, %rdi
callq 0x5211
leaq 0x40cb(%rip), %rsi      # 0x9397
movq %rbx, %rdi
callq 0x8cd6
movq %rax, %rbx
movq %rax, %rdi
callq 0x5211
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2240
movl %eax, %ebp
movq %rbx, %rdi
callq 0x8d5b
xorl %eax, %eax
testl %ebp, %ebp
sete %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lyda[P]tz/zic.c
// Function: mkdirs
static int
mkdirs(argname)
char *		argname;
{
	register char *	name;
	register char *	cp;

	if (argname == NULL || *argname == '\0')
		return 0;
	cp = name = ecpyalloc(argname);
	while ((cp = strchr(cp + 1, '/')) != 0) {
		*cp = '\0';
#ifndef unix
		/*
		** DOS drive specifier?
		*/
		if (isalpha((unsigned char) name[0]) &&
			name[1] == ':' && name[2] == '\0') {
				*cp = '/';
				continue;
		}
#endif /* !defined unix */
		if (!itsdir(name)) {
			/*
			** It doesn't seem to exist, so we try to create it.
			** Creation may fail because of the directory being
			** created by some other multiprocessor, so we get
			** to do extra checking.
			*/
			if (mkdir(name, MKDIR_UMASK) != 0) {
				const char *e = strerror(errno);

				if (errno != EEXIST || !itsdir(name)) {
					(void) fprintf(stderr,
_("%s: Can't create directory %s: %s\n"),
						progname, name, e);
					ifree(name);
					return -1;
				}
			}
		}
		*cp = '/';
	}
	ifree(name);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x539d
cmpb $0x0, (%rdi)
je 0x539d
callq 0x8d51
movq %rax, %rbx
movq %rax, %rdi
callq 0x5211
pushq $0x2f
popq %rbp
movq %rbx, %r14
incq %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x2100
testq %rax, %rax
je 0x5393
movq %rax, %r14
movb $0x0, (%rax)
movq %rbx, %rdi
callq 0x52b2
testl %eax, %eax
jne 0x538d
movq %rbx, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x2090
testl %eax, %eax
je 0x538d
callq 0x2050
movq %rax, %r12
movl (%rax), %edi
callq 0x22c0
movq %rax, %r15
cmpl $0x11, (%r12)
jne 0x53a8
movq %rbx, %rdi
callq 0x52b2
testl %eax, %eax
je 0x53a8
movb $0x2f, (%r14)
jmp 0x5333
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x8d5b
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x7c49(%rip), %rax      # 0xcff8
movq (%rax), %rdi
movq 0x7e07(%rip), %rdx      # 0xd1c0
leaq 0x3fda(%rip), %rsi      # 0x939a
movq %rbx, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x21b0
pushq $-0x1
popq %rbp
jmp 0x5395
// File: /workspace/github_c_makefile_star2_O2/lyda[P]tz/zic.c
// Function: doabbr
static void
doabbr(abbr, format, letters, isdst, doquotes)
char * const		abbr;
const char * const	format;
const char * const	letters;
const int		isdst;
const int		doquotes;
{
	register char *	cp;
	register char *	slashp;
	register int	len;

	slashp = strchr(format, '/');
	if (slashp == NULL) {
		if (letters == NULL)
			(void) strcpy(abbr, format);
		else	(void) sprintf(abbr, format, letters);
	} else if (isdst) {
		(void) strcpy(abbr, slashp + 1);
	} else {
		if (slashp > format)
			(void) strncpy(abbr, format,
				(unsigned) (slashp - format));
		abbr[slashp - format] = '\0';
	}
	if (!doquotes)
		return;
	for (cp = abbr; *cp != '\0'; ++cp)
		if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", *cp) == NULL &&
			strchr("abcdefghijklmnopqrstuvwxyz", *cp) == NULL)
				break;
	len = strlen(abbr);
	if (len > 0 && *cp == '\0')
		return;
	abbr[len + 2] = '\0';
	abbr[len + 1] = '>';
	for ( ; len > 0; --len)
		abbr[len] = abbr[len - 1];
	abbr[0] = '<';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x2f
popq %rsi
movq %r14, %rdi
callq 0x2100
testq %rax, %rax
je 0x609d
movq %rax, %r15
testl %r13d, %r13d
je 0x60bb
incq %r15
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x60b4
movq %rbx, %rdi
movq %r14, %rsi
testq %r12, %r12
je 0x60b4
movq %r12, %rdx
xorl %eax, %eax
callq 0x2280
jmp 0x60d3
callq 0x2080
jmp 0x60d3
subq %r14, %r15
jbe 0x60ce
movl %r15d, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2060
movb $0x0, (%rbx,%r15)
testl %ebp, %ebp
je 0x6181
leaq 0x3a28(%rip), %r14      # 0x9b0a
pushq $0x1b
popq %r15
leaq 0x3a38(%rip), %r12      # 0x9b25
movq %rbx, %r13
movsbl (%r13), %ebp
testl %ebp, %ebp
je 0x6122
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x2150
testq %rax, %rax
jne 0x611d
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x2150
testq %rax, %rax
je 0x6122
incq %r13
jmp 0x60f0
testb %bpl, %bpl
sete %bpl
movq %rbx, %rdi
callq 0x20e0
testl %eax, %eax
setg %cl
testb %cl, %bpl
jne 0x6181
movq %rax, %rcx
shlq $0x20, %rcx
movabsq $0x200000000, %rdx      # imm = 0x200000000
addq %rcx, %rdx
sarq $0x20, %rdx
movb $0x0, (%rbx,%rdx)
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %rcx, %rdx
sarq $0x20, %rdx
movb $0x3e, (%rbx,%rdx)
movl %eax, %eax
testl %eax, %eax
jle 0x617e
movb -0x1(%rbx,%rax), %cl
movb %cl, (%rbx,%rax)
decq %rax
jmp 0x616e
movb $0x3c, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lyda[P]tz/zic.c
// Function: addtt
static void
addtt(starttime, type)
const zic_t	starttime;
int		type;
{
	if (starttime <= min_time ||
		(timecnt == 1 && attypes[0].at < min_time)) {
		gmtoffs[0] = gmtoffs[type];
		isdsts[0] = isdsts[type];
		ttisstds[0] = ttisstds[type];
		ttisgmts[0] = ttisgmts[type];
		if (abbrinds[type] != 0)
			(void) strcpy(chars, &chars[abbrinds[type]]);
		abbrinds[0] = 0;
		charcnt = strlen(chars) + 1;
		typecnt = 1;
		timecnt = 0;
		type = 0;
	}
	if (timecnt >= TZ_MAX_TIMES) {
		error(_("too many transitions?!"));
		exit(EXIT_FAILURE);
	}
	attypes[timecnt].at = starttime;
	attypes[timecnt].type = type;
	++timecnt;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x6d10(%rip), %ecx      # 0xd238
shlq $0x3f, %rcx
cmpq %rdi, %rcx
jge 0x654d
movl 0x71cd(%rip), %eax      # 0xd704
cmpl $0x1, %eax
jne 0x65dc
cmpq %rcx, 0x7e19(%rip)      # 0xe360
jge 0x65dc
movslq %esi, %rax
leaq 0x71c9(%rip), %rcx      # 0xd720
movq (%rcx,%rax,8), %rcx
movq %rcx, 0x71be(%rip)      # 0xd720
leaq 0x79b7(%rip), %rcx      # 0xdf20
movb (%rax,%rcx), %cl
movb %cl, 0x79ae(%rip)       # 0xdf20
leaq 0x7be7(%rip), %rcx      # 0xe160
movb (%rax,%rcx), %cl
movb %cl, 0x7bde(%rip)       # 0xe160
leaq 0x7cd7(%rip), %rcx      # 0xe260
movb (%rax,%rcx), %cl
movb %cl, 0x7cce(%rip)       # 0xe260
leaq 0x7ac7(%rip), %rcx      # 0xe060
movzbl (%rax,%rcx), %esi
testq %rsi, %rsi
je 0x65b1
leaq 0x7a77(%rip), %rdi      # 0xe020
addq %rdi, %rsi
callq 0x2080
movb $0x0, 0x7aa8(%rip)      # 0xe060
leaq 0x7a61(%rip), %rdi      # 0xe020
callq 0x20e0
incl %eax
movl %eax, 0x7140(%rip)      # 0xd70c
movl $0x1, 0x7132(%rip)      # 0xd708
xorl %esi, %esi
xorl %eax, %eax
jmp 0x65e3
cmpl $0x4b0, %eax            # imm = 0x4B0
jge 0x6606
cltq
movq %rax, %rcx
shlq $0x4, %rcx
leaq 0x7d6d(%rip), %rdx      # 0xe360
movq %rbx, (%rcx,%rdx)
movb %sil, 0x8(%rcx,%rdx)
incl %eax
movl %eax, 0x7100(%rip)      # 0xd704
popq %rbx
retq
leaq 0x3720(%rip), %rdi      # 0x9d2d
callq 0x5251
pushq $0x1
popq %rdi
callq 0x22a0