// File: /workspace/github_c_makefile_star2_O0/lh3[P]minimap2/hit.c
// Function: mm_reg_set_coor
static inline void mm_reg_set_coor(mm_reg1_t *r, int32_t qlen, const mm128_t *a, int is_qstrand)
{ // NB: r->as and r->cnt MUST BE set correctly for this function to work
	int32_t k = r->as, q_span = (int32_t)(a[k].y>>32&0xff);
	r->rev = a[k].x>>63;
	r->rid = a[k].x<<1>>33;
	r->rs = (int32_t)a[k].x + 1 > q_span? (int32_t)a[k].x + 1 - q_span : 0; // NB: target span may be shorter, so this test is necessary
	r->re = (int32_t)a[k + r->cnt - 1].x + 1;
	if (!r->rev || is_qstrand) {
		r->qs = (int32_t)a[k].y + 1 - q_span;
		r->qe = (int32_t)a[k + r->cnt - 1].y + 1;
	} else {
		r->qs = qlen - ((int32_t)a[k + r->cnt - 1].y + 1);
		r->qe = qlen - ((int32_t)a[k].y + 1 - q_span);
	}
	mm_cal_fuzzy_len(r, a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xff, %rax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x3f, %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %ecx
andl $0x1, %edx
shll $0xa, %edx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
orl %edx, %ecx
movl %ecx, 0x3c(%rax)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
shlq %rax
shrq $0x21, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
addl $0x1, %eax
cmpl -0x24(%rbp), %eax
jle 0x2a069
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
addl $0x1, %eax
subl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2a070
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x2a070
movl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rdx
addl 0x4(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %eax
shrl $0xa, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2a0bc
cmpl $0x0, -0x1c(%rbp)
je 0x2a10b
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
addl $0x1, %ecx
subl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rdx
addl 0x4(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x2a15e
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %edx
movq -0x8(%rbp), %rsi
addl 0x4(%rsi), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
addl $0x1, %eax
subl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
addl $0x1, %eax
subl -0x24(%rbp), %eax
subl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2c6d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)