// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/sample.c
// Function: bam_smpl_rg2smid
int bam_smpl_rg2smid(const bam_sample_t *sm, const char *fn, const char *rg, kstring_t *str)
{
	khint_t k;
	khash_t(sm) *rg2smid = (khash_t(sm)*)sm->rg2smid;
	if (rg) {
		str->l = 0;
		kputs(fn, str); kputc('/', str); kputs(rg, str);
		k = kh_get(sm, rg2smid, str->s);
	} else k = kh_get(sm, rg2smid, fn);
	return k == kh_end(rg2smid)? -1 : kh_val(rg2smid, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq 0x10(%rdi), %r13
testq %rdx, %rdx
je 0x16f1e
movq %rcx, %r14
movq %rdx, %rbx
movq $0x0, (%rcx)
movq %r15, %rdi
callq 0x3360
movslq %eax, %r12
leaq 0x1(%r12), %rax
cmpq 0x8(%r14), %rax
jae 0x16f72
movq 0x10(%r14), %rax
xorl %edi, %edi
jmp 0x16fba
movl (%r13), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rcx, (%rsp)
testl %ecx, %ecx
je 0x17268
movsbl (%r15), %esi
xorl %edi, %edi
movl $0x0, %ecx
testl %esi, %esi
je 0x171b5
movb 0x1(%r15), %al
testb %al, %al
je 0x171b3
leaq 0x2(%r15), %rdx
movl %esi, %ecx
movl %ecx, %esi
shll $0x5, %esi
subl %ecx, %esi
movsbl %al, %ecx
addl %esi, %ecx
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x16f58
jmp 0x171b5
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
callq 0x3720
movq %rax, 0x10(%r14)
movq (%r14), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x37d0
addq (%r14), %r12
movq %r12, (%r14)
movq 0x10(%r14), %rax
movb $0x0, (%rax,%r12)
movq (%r14), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%r14), %rcx
jae 0x16fea
movq 0x10(%r14), %rax
jmp 0x17036
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
callq 0x3720
movq %rax, 0x10(%r14)
movq (%r14), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%r14)
movb $0x2f, (%rax,%rdx)
movq (%r14), %rax
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
movq %rbx, %rdi
callq 0x3360
movq (%r14), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x8(%r14), %rax
jae 0x17069
movq 0x10(%r14), %rax
jmp 0x170b1
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
callq 0x3720
movq %rax, 0x10(%r14)
movq (%r14), %rdi
addq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x37d0
addq (%r14), %r15
movq %r15, (%r14)
movq 0x10(%r14), %rax
movb $0x0, (%rax,%r15)
movl (%r13), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rcx, (%rsp)
testl %ecx, %ecx
je 0x17268
movq 0x10(%r14), %rbx
movsbl (%rbx), %edi
xorl %r8d, %r8d
movl $0x0, %ecx
testl %edi, %edi
je 0x1711c
movb 0x1(%rbx), %al
testb %al, %al
je 0x1711a
leaq 0x2(%rbx), %rdx
movl %edi, %ecx
movl %ecx, %edi
shll $0x5, %edi
subl %ecx, %edi
movsbl %al, %ecx
addl %edi, %ecx
movb (%rdx), %al
incq %rdx
testb %al, %al
jne 0x17103
jmp 0x1711c
movl %edi, %ecx
movl %ecx, %eax
xorl %edx, %edx
movq (%rsp), %rdi
divl %edi
movl %edx, %r15d
decl %edi
movl %ecx, %eax
xorl %edx, %edx
divl %edi
movl %edx, %r14d
incl %r14d
movq %r13, 0x8(%rsp)
movq 0x10(%r13), %rdi
movl %r15d, %r13d
movq %rdi, 0x10(%rsp)
movl %r13d, %eax
shrl $0x4, %eax
movl (%rdi,%rax,4), %ebp
leal (,%r13,2), %r12d
andl $0x1e, %r12d
movl %ebp, %eax
movl %r12d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x17240
testb $0x1, %al
jne 0x17198
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r13d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x35a0
movq 0x10(%rsp), %rdi
xorl %r8d, %r8d
testl %eax, %eax
je 0x17240
addl %r14d, %r13d
movq (%rsp), %rax
cmpl %eax, %r13d
cmovbl %r8d, %eax
subl %eax, %r13d
cmpl %r15d, %r13d
jne 0x17148
jmp 0x17239
movl %esi, %ecx
movq %r15, 0x10(%rsp)
movl %ecx, %eax
xorl %edx, %edx
movq (%rsp), %rsi
divl %esi
movl %edx, %r15d
decl %esi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
movl %edx, %ebx
incl %ebx
movq %r13, 0x8(%rsp)
movq 0x10(%r13), %r14
movl %r15d, %r13d
movl %r13d, %eax
shrl $0x4, %eax
movl (%r14,%rax,4), %ebp
leal (,%r13,2), %r12d
andl $0x1e, %r12d
movl %ebp, %eax
movl %r12d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x17240
testb $0x1, %al
jne 0x17224
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r13d, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x10(%rsp), %rsi
callq 0x35a0
xorl %edi, %edi
testl %eax, %eax
je 0x17240
addl %ebx, %r13d
movq (%rsp), %rax
cmpl %eax, %r13d
cmovbl %edi, %eax
subl %eax, %r13d
cmpl %r15d, %r13d
jne 0x171df
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x17268
movl %r12d, %ecx
shrl %cl, %ebp
testb $0x3, %bpl
cmovnel (%rsp), %r13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl (%rsp), %r13d
je 0x17268
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movl %r13d, %ecx
movl (%rax,%rcx,4), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq