// File: chhylp123[P]hifiasm/Correct.cpp
// Function: get_init_paras(All_reads*, ul_idx_t const*, overlap_region*, long, long, double, long, long*, long*, long*, long*)
uint32_t get_init_paras(All_reads* rref, const ul_idx_t *uref, overlap_region *z, int64_t x_s, int64_t x_e, double e_rate, int64_t block_s, 
                        int64_t *r_ys, int64_t *r_ex_beg, int64_t *r_ex_end, int64_t *r_err_thre)
{
    int e, ex_beg, ex_end; long long y_s, o_len, Window_Len;
    e = get_init_err_thres(x_e+1-x_s, e_rate, block_s, rref?THRESHOLD:THRESHOLD_MAX_SIZE);
    y_s = (x_s-z->x_pos_s) + z->y_pos_s; y_s += y_start_offset(x_s, &(z->f_cigar));
    Window_Len = (x_e+1-x_s) + (e<<1);

    if(!determine_overlap_region(e, y_s, z->y_id, Window_Len, (rref?(Get_READ_LENGTH((*rref), z->y_id)):(uref->ug->u.a[z->y_id].len)),
    &ex_beg, &ex_end, &y_s, &o_len)) {
        return 0;
    }
    (*r_ys) = y_s; (*r_ex_beg) = ex_beg; (*r_ex_end) = ex_end; (*r_err_thre) = e;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
subq -0x28(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl $0x1f, %eax
movl $0xf, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movslq %eax, %rdx
callq 0x9e1c0
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x4(%rcx), %ecx
subq %rcx, %rax
movq -0x20(%rbp), %rcx
movl 0x14(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x38, %rsi
callq 0x331a0
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
subq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x34934
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x10(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x90(%rbp)
jmp 0x3495d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x10(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0x90(%rbp)
movq -0x70(%rbp), %rcx
movq -0x78(%rbp), %rdx
movq -0x80(%rbp), %rsi
movl -0x84(%rbp), %edi
movq -0x90(%rbp), %r8
leaq -0x48(%rbp), %r9
leaq -0x4c(%rbp), %r11
leaq -0x58(%rbp), %r10
leaq -0x60(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x32290
cmpl $0x0, %eax
jne 0x349a7
movl $0x0, -0x4(%rbp)
jmp 0x349da
movq -0x58(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movslq -0x48(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movslq -0x4c(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movslq -0x44(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)