// File: /workspace/github_c_makefile_star2_O2/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 0xda87
movq %rdi, %r14
movb (%rdi), %bpl
cmpb $0x6c, %bpl
jne 0xd974
cmpb $0x72, 0x1(%r14)
jne 0xd974
cmpb $0x0, 0x2(%r14)
je 0xdaae
leaq 0x17f44(%rip), %rsi     # 0x258bf
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
je 0xdab5
leaq 0x1621e(%rip), %rsi     # 0x23bb0
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
je 0xdab5
pushq $-0x1
popq %rax
cmpb $0x73, %bpl
jne 0xdb51
cmpb $0x65, 0x1(%r14)
jne 0xd9bd
cmpb $0x0, 0x2(%r14)
je 0xd9d3
cmpb $0x72, 0x1(%r14)
jne 0xdb51
cmpb $0x0, 0x2(%r14)
jne 0xdb51
movabsq $0x150000000a, %rax     # imm = 0x150000000A
movq %rax, (%r12)
movq (%rbx), %rcx
movq %rcx, %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 0x1615e(%rip), %xmm0    # 0x23b90
movups %xmm0, 0x64(%rbx)
movq $0x2faf080, 0x8(%rbx)   # imm = 0x2FAF080
movl $0x32, 0xa4(%rbx)
movl $0x3e4ccccd, 0x50(%rbx) # imm = 0x3E4CCCCD
xorl %eax, %eax
cmpb $0x73, (%r14)
jne 0xdb51
cmpb $0x72, 0x1(%r14)
jne 0xdb51
cmpb $0x0, 0x2(%r14)
jne 0xdb51
orq $0x804e0, %rcx          # imm = 0x804E0
movq %rcx, (%rbx)
movl $0x1, 0x18(%rbx)
jmp 0xdb51
movabsq $0x110000000b, %rax     # imm = 0x110000000B
movq %rax, (%r12)
movl $0xe, 0x8(%r12)
movq %rbx, %rdi
callq 0xd839
movq %r15, %rdi
callq 0xd8f1
xorl %eax, %eax
jmp 0xdb51
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 0x16090(%rip), %xmm0    # 0x23ba0
movups %xmm0, 0x60(%rbx)
movl $0x32, 0x58(%rbx)
movl $0x3c23d70a, 0x4c(%rbx) # imm = 0x3C23D70A
movl $0xee6b2800, %eax       # imm = 0xEE6B2800
movq %rax, 0x8(%rbx)
leaq 0x1607e(%rip), %rsi     # 0x23bb0
movq %r14, %rdi
callq 0x21f0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xdb51
movl $0x1, 0x8(%r15)
andl $0x0, 0x88(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq