// File: /workspace/github_c_makefile_star2_O3/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 0x10381
movq %rdi, %r14
movb (%rdi), %bpl
cmpb $0x6c, %bpl
jne 0x1026c
cmpb $0x72, 0x1(%r14)
jne 0x1026c
cmpb $0x0, 0x2(%r14)
je 0x103f1
leaq 0x1a66c(%rip), %rsi     # 0x2a8df
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
je 0x103f8
leaq 0x18916(%rip), %rsi     # 0x28ba0
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
je 0x103f8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x73, %bpl
jne 0x10497
cmpb $0x65, 0x1(%r14)
jne 0x102b7
cmpb $0x0, 0x2(%r14)
je 0x102cd
cmpb $0x72, 0x1(%r14)
jne 0x10497
cmpb $0x0, 0x2(%r14)
jne 0x10497
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 0x18854(%rip), %xmm0    # 0x28b80
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 0x10497
cmpb $0x72, 0x1(%r14)
jne 0x10497
cmpb $0x0, 0x2(%r14)
jne 0x10497
orq $0x804e0, %rcx          # imm = 0x804E0
movq %rcx, (%rbx)
movl $0x1, 0x18(%rbx)
jmp 0x10497
movabsq $0x110000000b, %rax     # imm = 0x110000000B
movq %rax, (%r12)
movl $0xe, 0x8(%r12)
movq %rbx, %rdi
callq 0x10131
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x8(%r15)
movups %xmm0, 0x28(%r15)
movq $0x1, (%r15)
movaps 0x187a0(%rip), %xmm0    # 0x28b60
movups %xmm0, 0xc(%r15)
movabsq $0x90000000a, %rax      # imm = 0x90000000A
movq %rax, 0x1c(%r15)
movl $0xa, 0x24(%r15)
movsd 0x1878d(%rip), %xmm0    # 0x28b70
movsd %xmm0, 0x28(%r15)
movl $0x3f733333, 0x30(%r15) # imm = 0x3F733333
xorl %eax, %eax
jmp 0x10497
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 0x1873d(%rip), %xmm0    # 0x28b90
movups %xmm0, 0x60(%rbx)
movl $0x32, 0x58(%rbx)
movl $0x3c23d70a, 0x4c(%rbx) # imm = 0x3C23D70A
movl $0xee6b2800, %eax       # imm = 0xEE6B2800
movq %rax, 0x8(%rbx)
leaq 0x1872b(%rip), %rsi     # 0x28ba0
movq %r14, %rdi
callq 0x21f0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x10497
movl $0x1, 0x8(%r15)
movl $0x0, 0x88(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq