// File: chhylp123[P]hifiasm/inter.cpp
// Function: init_mg_opt(mg_idxopt_t*, int, int, int, int, int, double, double, double, double, int)
void init_mg_opt(mg_idxopt_t *opt, int is_HPC, int k, int w, int hap_n, int max_n_chain, double bw_thres, 
double diff_ec_ul, double diff_ec_ul_low, double diff_ec_ul_hpc, int ec_ul_round)
{
    opt->k = k; 
    opt->w = w;
    opt->hap_n = hap_n;
    opt->is_HPC = is_HPC;
    opt->bw = 10000;///2000 in minigraph
    opt->max_gap = 500000;///5000 in minigraph
    opt->occ_weight = 20;
    opt->max_gap_pre = 10000;///1000 in minigraph
    opt->max_lc_iter = 10000;
    opt->chn_pen_gap = 0.19;///using minimap2's value
	opt->max_lc_skip = 25;// mo->max_gc_skip = 25;
	opt->max_lc_iter = 10000;
	opt->min_lc_cnt = 2; 
	opt->min_lc_score = 30;
	opt->max_gc_skip = 25;
	opt->ref_bonus = 0;
	opt->mask_level = 0.5f;
	opt->max_gc_seq_ext = 5;
	opt->seed = 11;
	opt->min_gc_cnt = 3, opt->min_gc_score = 50;
	opt->sub_diff = 6;
	opt->best_n = 5;
	opt->pri_ratio = 0.8f;
	opt->max_n_chain = max_n_chain;
	opt->bw_thres = bw_thres;
	opt->diff_ec_ul = diff_ec_ul;
	opt->diff_ec_ul_low = diff_ec_ul_low;
	opt->diff_ec_ul_hpc = diff_ec_ul_hpc;
	opt->ec_ul_round = ec_ul_round;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movsd %xmm2, -0x38(%rbp)
movsd %xmm3, -0x40(%rbp)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x2710, 0x8(%rax)      # imm = 0x2710
movq -0x8(%rbp), %rax
movl $0x7a120, 0xc(%rax)     # imm = 0x7A120
movq -0x8(%rbp), %rax
movl $0x14, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x2710, 0x1c(%rax)     # imm = 0x2710
movq -0x8(%rbp), %rax
movl $0x2710, 0x2c(%rax)     # imm = 0x2710
movq -0x8(%rbp), %rax
movss 0x10d9e6(%rip), %xmm0   # 0x390770
movss %xmm0, 0x50(%rax)
movq -0x8(%rbp), %rax
movl $0x19, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x2710, 0x2c(%rax)     # imm = 0x2710
movq -0x8(%rbp), %rax
movl $0x2, 0x30(%rax)
movq -0x8(%rbp), %rax
movl $0x1e, 0x34(%rax)
movq -0x8(%rbp), %rax
movl $0x19, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x3c(%rax)
movq -0x8(%rbp), %rax
movss 0xfc29b(%rip), %xmm0    # 0x37f078
movss %xmm0, 0x54(%rax)
movq -0x8(%rbp), %rax
movl $0x5, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0xb, 0x24(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x32, 0x44(%rax)
movq -0x8(%rbp), %rax
movl $0x6, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x5, 0x4c(%rax)
movq -0x8(%rbp), %rax
movss 0xfc258(%rip), %xmm0    # 0x37f088
movss %xmm0, 0x58(%rax)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x80(%rax)
movsd -0x28(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x60(%rax)
movsd -0x30(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x68(%rax)
movsd -0x38(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x70(%rax)
movsd -0x40(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x78(%rax)
movl 0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x84(%rax)
popq %rbp
retq
nopl (%rax)