// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/htslib/cram/sam_header.c
// Function: sam_hdr_PG_ID
const char *sam_hdr_PG_ID(SAM_hdr *sh, const char *name) {
    khint_t k = kh_get(m_s2i, sh->pg_hash, name);
    if (k == kh_end(sh->pg_hash))
	return name;

    do {
	sprintf(sh->ID_buf, "%.1000s.%d", name, sh->ID_cnt++);
	k = kh_get(m_s2i, sh->pg_hash, sh->ID_buf);
    } while (k != kh_end(sh->pg_hash));

    return sh->ID_buf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq 0x80(%rdi), %rax
movq %rax, (%rsp)
movl (%rax), %eax
testl %eax, %eax
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
je 0x64492
movq %rax, 0x18(%rsp)
leal -0x1(%rax), %esi
movsbl (%r15), %ebx
testl %ebx, %ebx
je 0x6449d
movb 0x1(%r15), %al
testb %al, %al
je 0x6449f
leaq 0x2(%r15), %rcx
movl %ebx, %edx
shll $0x5, %edx
subl %ebx, %edx
movsbl %al, %ebx
addl %edx, %ebx
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x6447b
jmp 0x6449f
movq %rdi, %r12
xorl %r14d, %r14d
jmp 0x6452b
xorl %ebx, %ebx
andl %esi, %ebx
movq (%rsp), %rax
movq 0x10(%rax), %r15
movl $0x1, %r12d
movl %ebx, %r14d
movl %esi, 0x20(%rsp)
movl %r14d, %eax
shrl $0x4, %eax
movl (%r15,%rax,4), %r13d
leal (%r14,%r14), %ebp
andl $0x1e, %ebp
movl %r13d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x6450f
testb $0x1, %al
jne 0x644f7
movq (%rsp), %rax
movq 0x18(%rax), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rsp), %rsi
callq 0x6a50
movl 0x20(%rsp), %esi
testl %eax, %eax
je 0x6450f
addl %r12d, %r14d
andl %esi, %r14d
incl %r12d
cmpl %ebx, %r14d
jne 0x644b6
movq 0x18(%rsp), %rax
movl %eax, %r14d
jmp 0x64521
movl %ebp, %ecx
shrl %cl, %r13d
testb $0x3, %r13b
movq 0x18(%rsp), %rax
cmovnel %eax, %r14d
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %r12
cmpl %eax, %r14d
je 0x6466e
leaq 0x94(%r12), %rax
movq %rax, (%rsp)
leaq 0x96(%r12), %rax
movq %rax, 0x30(%rsp)
movl 0x494(%r12), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x494(%r12)
xorl %r13d, %r13d
movq (%rsp), %rdi
leaq 0x353b2(%rip), %rsi     # 0x99920
movq %r15, %rdx
xorl %eax, %eax
callq 0x6170
movq 0x80(%r12), %rax
movq %rax, 0x20(%rsp)
movl (%rax), %esi
testl %esi, %esi
je 0x64661
movq (%rsp), %rax
movsbl (%rax), %ebx
testl %ebx, %ebx
je 0x645c2
movb 0x95(%r12), %al
testb %al, %al
je 0x645c4
movq 0x30(%rsp), %rcx
movl %ebx, %edx
shll $0x5, %edx
subl %ebx, %edx
movsbl %al, %ebx
addl %edx, %ebx
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x645ab
jmp 0x645c4
xorl %ebx, %ebx
movq %rsi, 0x28(%rsp)
leal -0x1(%rsi), %r15d
andl %r15d, %ebx
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %r12d
movl %ebx, %r13d
movq %rsi, 0x18(%rsp)
movl %r13d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %r14d
leal (,%r13,2), %ebp
andl $0x1e, %ebp
movl %r14d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x64645
testb $0x1, %al
jne 0x6462d
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movl %r13d, %ecx
movq (%rax,%rcx,8), %rdi
movq (%rsp), %rsi
callq 0x6a50
movq 0x18(%rsp), %rsi
testl %eax, %eax
je 0x64645
addl %r12d, %r13d
andl %r15d, %r13d
incl %r12d
cmpl %ebx, %r13d
jne 0x645e7
movq 0x28(%rsp), %rsi
movl %esi, %r13d
jmp 0x64657
movl %ebp, %ecx
shrl %cl, %r14d
testb $0x3, %r14b
movq 0x28(%rsp), %rsi
cmovnel %esi, %r13d
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %r12
cmpl %esi, %r13d
jne 0x6454d
movq (%rsp), %r15
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq