// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/options.c
// Function: mg_opt_set
int mg_opt_set(const char *preset, mg_idxopt_t *io, mg_mapopt_t *mo, mg_ggopt_t *go)
{
	if (preset == 0) {
		mg_idxopt_init(io);
		mg_mapopt_init(mo);
		mg_ggopt_init(go);
	} else if (strcmp(preset, "lr") == 0) { // this is the default
	} else if (strcmp(preset, "asm") == 0 || strcmp(preset, "ggs") == 0) {
		io->k = 19, io->w = 10;
		mo->flag |= MG_M_RMQ;
		mo->occ_max1 = 10, mo->occ_max1_cap = 100;
		mo->bw = 1000, mo->bw_long = 150000;
		mo->max_gap = 10000, mo->max_gap_pre = 1000;
		mo->min_lc_cnt = 5, mo->min_lc_score = 40;
		mo->min_gc_cnt = 5, mo->min_gc_score = 1000;
		mo->min_cov_mapq = 5;
		mo->min_cov_blen = 100000;
		mo->max_lc_skip = mo->max_gc_skip = 50;
		mo->div = 0.01f;
		mo->mini_batch_size = 4000000000LL;
		if (strcmp(preset, "ggs") == 0)
			go->algo = MG_G_GGSIMPLE, mo->best_n = 0;
	} else if (strcmp(preset, "se") == 0 || strcmp(preset, "sr") == 0) {
		io->k = 21, io->w = 10;
		mo->flag |= MG_M_SR | MG_M_HEAP_SORT | MG_M_2_IO_THREADS;
		mo->occ_max1 = 1000;
		mo->occ_max1_cap = 2500;
		mo->max_gap = 100;
		mo->bw = mo->bw_long = 100;
		mo->max_frag_len = 800;
		mo->pri_ratio = 0.5f;
		mo->min_lc_cnt = 2, mo->min_lc_score = 25;
		mo->min_gc_cnt = 3, mo->min_gc_score = 40;
		mo->mini_batch_size = 50000000;
		mo->min_cov_blen = 50;
		mo->chn_pen_gap = 0.2f;
		mo->ref_bonus = 1;
		if (strcmp(preset, "sr") == 0) {
			mo->flag |= MG_M_FRAG_MODE | MG_M_FRAG_MERGE;
			mo->pe_ori = 0<<1|1; // FR
		}
	} else return -1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
testq %rdi, %rdi
je 0xff3e
movq %rdi, %r14
leaq 0x18d37(%rip), %rsi     # 0x28b60
callq 0x21f0
xorl %ebp, %ebp
testl %eax, %eax
je 0xffc5
leaq 0x1aa08(%rip), %rsi     # 0x2a847
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
je 0xffd2
leaq 0x18d0d(%rip), %rsi     # 0x28b63
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
je 0xffd2
leaq 0x18cfa(%rip), %rsi     # 0x28b67
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
je 0xfe95
leaq 0x18cea(%rip), %rsi     # 0x28b6a
movq %r14, %rdi
callq 0x21f0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0xffc7
movabsq $0x150000000a, %rax     # imm = 0x150000000A
movq %rax, (%r12)
movq (%rbx), %r15
movq %r15, %rax
orq $0x80420, %rax          # imm = 0x80420
movq %rax, (%rbx)
movabsq $0x9c4000003e8, %rax    # imm = 0x9C4000003E8
movq %rax, 0x1c(%rbx)
movl $0x64, 0x40(%rbx)
movabsq $0x6400000064, %rax     # imm = 0x6400000064
movq %rax, 0x28(%rbx)
movl $0x320, 0x48(%rbx)      # imm = 0x320
movabsq $0x13f000000, %rax      # imm = 0x13F000000
movq %rax, 0x8c(%rbx)
movaps 0x18c4c(%rip), %xmm0    # 0x28b40
movups %xmm0, 0x64(%rbx)
movq $0x2faf080, 0x8(%rbx)   # imm = 0x2FAF080
movl $0x32, 0xa4(%rbx)
movl $0x3e4ccccd, 0x50(%rbx) # imm = 0x3E4CCCCD
leaq 0x18c52(%rip), %rsi     # 0x28b6a
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
jne 0xffc5
orq $0x804e0, %r15          # imm = 0x804E0
movq %r15, (%rbx)
movl $0x1, 0x18(%rbx)
jmp 0xffc5
movabsq $0x110000000b, %rax     # imm = 0x110000000B
movq %rax, (%r12)
movl $0xe, 0x8(%r12)
movq %rbx, %rdi
callq 0xfcf5
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, 0x20(%r15)
movq $0x0, 0x30(%r15)
movq $0x1, (%r15)
movabsq $0x4e20000186a0, %rax   # imm = 0x4E20000186A0
movq %rax, 0x10(%r15)
movl $0x5, 0xc(%r15)
movabsq $0xa00000032, %rax      # imm = 0xA00000032
movq %rax, 0x18(%r15)
movabsq $0xa00000009, %rax      # imm = 0xA00000009
movq %rax, 0x20(%r15)
movabsq $0x3f4ccccd3dcccccd, %rax # imm = 0x3F4CCCCD3DCCCCCD
movq %rax, 0x28(%r15)
movl $0x3f733333, 0x30(%r15) # imm = 0x3F733333
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movabsq $0x130000000a, %rax     # imm = 0x130000000A
movq %rax, (%r12)
orb $-0x80, 0x1(%rbx)
movabsq $0x640000000a, %rax     # imm = 0x640000000A
movq %rax, 0x1c(%rbx)
movabsq $0x249f0000003e8, %rax  # imm = 0x249F0000003E8
movq %rax, 0x28(%rbx)
movabsq $0x2710000003e8, %rax   # imm = 0x2710000003E8
movq %rax, 0x3c(%rbx)
movl $0x3e8, 0x70(%rbx)      # imm = 0x3E8
movabsq $0x186a000000005, %rax  # imm = 0x186A000000005
movq %rax, 0xa0(%rbx)
movaps 0x18b23(%rip), %xmm0    # 0x28b50
movups %xmm0, 0x60(%rbx)
movl $0x32, 0x58(%rbx)
movl $0x3c23d70a, 0x4c(%rbx) # imm = 0x3C23D70A
movl $0xee6b2800, %eax       # imm = 0xEE6B2800
movq %rax, 0x8(%rbx)
leaq 0x18b14(%rip), %rsi     # 0x28b63
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
jne 0xffc7
movl $0x1, 0x8(%r15)
movl $0x0, 0x88(%rbx)
jmp 0xffc5