// File: /workspace/github_c_makefile_star2_O3/lh3[P]minimap2/options.c
// Function: mm_check_opt
int mm_check_opt(const mm_idxopt_t *io, const mm_mapopt_t *mo)
{
	if (mo->bw > mo->bw_long) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m with '-rNUM1,NUM2', NUM1 (%d) can't be larger than NUM2 (%d)\033[0m\n", mo->bw, mo->bw_long);
		return -8;
	}
	if ((mo->flag & MM_F_RMQ) && (mo->flag & (MM_F_SR|MM_F_SPLICE))) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m --rmq doesn't work with --sr or --splice\033[0m\n");
		return -7;
	}
	if (mo->split_prefix && (mo->flag & (MM_F_OUT_CS|MM_F_OUT_MD))) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m --cs or --MD doesn't work with --split-prefix\033[0m\n");
		return -6;
	}
	if (io->k <= 0 || io->w <= 0) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m -k and -w must be positive\033[0m\n");
		return -5;
	}
	if (mo->best_n < 0) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m -N must be no less than 0\033[0m\n");
		return -4;
	}
	if (mo->best_n == 0 && mm_verbose >= 2)
		fprintf(stderr, "[WARNING]\033[1;31m '-N 0' reduces mapping accuracy. Please use '--secondary=no' instead.\033[0m\n");
	if (mo->pri_ratio < 0.0f || mo->pri_ratio > 1.0f) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m -p must be within 0 and 1 (including 0 and 1)\033[0m\n");
		return -4;
	}
	if ((mo->flag & MM_F_FOR_ONLY) && (mo->flag & MM_F_REV_ONLY)) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m --for-only and --rev-only can't be applied at the same time\033[0m\n");
		return -3;
	}
	if (mo->e <= 0 || mo->q <= 0) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m -O and -E must be positive\033[0m\n");
		return -1;
	}
	if ((mo->q != mo->q2 || mo->e != mo->e2) && !(mo->e > mo->e2 && mo->q + mo->e < mo->q2 + mo->e2)) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m dual gap penalties violating E1>E2 and O1+E1<O2+E2\033[0m\n");
		return -2;
	}
	if ((mo->q + mo->e) + (mo->q2 + mo->e2) > 127) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m scoring system violating ({-O}+{-E})+({-O2}+{-E2}) <= 127\033[0m\n");
		return -1;
	}
	if (mo->sc_ambi < 0 || mo->sc_ambi >= mo->b) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m --score-N should be within [0,{-B})\033[0m\n");
		return -1;
	}
	if (mo->zdrop < mo->zdrop_inv) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m Z-drop should not be less than inversion-Z-drop\033[0m\n");
		return -5;
	}
	if ((mo->flag & MM_F_NO_PRINT_2ND) && (mo->flag & MM_F_ALL_CHAINS)) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m -X/-P and --secondary=no can't be applied at the same time\033[0m\n");
		return -5;
	}
	if ((mo->flag & MM_F_QSTRAND) && ((mo->flag & (MM_F_OUT_SAM|MM_F_SPLICE|MM_F_FRAG_MODE)) || (io->flag & MM_I_HPC))) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m --qstrand doesn't work with -a, -H, --frag or --splice\033[0m\n");
		return -5;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x14(%rsi), %edx
movl 0x18(%rsi), %ecx
cmpl %ecx, %edx
jle 0x6871
leaq 0x2feba(%rip), %rax     # 0x36700
movl $0xfffffff8, %ebx       # imm = 0xFFFFFFF8
cmpl $0x0, (%rax)
jle 0x6947
movq 0x2f79d(%rip), %rax     # 0x35ff8
movq (%rax), %rdi
leaq 0x2644b(%rip), %rsi     # 0x2ccb0
xorl %eax, %eax
callq 0x2260
jmp 0x6947
movq %rsi, %rbx
movq (%rsi), %rax
testl %eax, %eax
setns %cl
testl $0x1080, %eax           # imm = 0x1080
sete %dl
orb %cl, %dl
je 0x68bb
movq %rdi, %r14
testl $0x1000040, %eax        # imm = 0x1000040
je 0x68d3
cmpq $0x0, 0x100(%rbx)
je 0x68d3
leaq 0x2fe5d(%rip), %rax     # 0x36700
movl $0xfffffffa, %ebx       # imm = 0xFFFFFFFA
cmpl $0x0, (%rax)
jle 0x6947
callq 0x2a2e
jmp 0x6947
leaq 0x2fe3e(%rip), %rax     # 0x36700
movl $0xfffffff9, %ebx       # imm = 0xFFFFFFF9
cmpl $0x0, (%rax)
jle 0x6947
callq 0x2a12
jmp 0x6947
cmpw $0x0, (%r14)
jle 0x6932
cmpw $0x0, 0x2(%r14)
jle 0x6932
cmpl $0x0, 0x5c(%rbx)
js 0x694f
leaq 0x2fe11(%rip), %r15     # 0x36700
jne 0x68fb
cmpl $0x2, (%r15)
jge 0x69e1
movss 0x58(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x6967
ucomiss 0x262e1(%rip), %xmm0    # 0x2cbf0
ja 0x6967
movq (%rbx), %rax
movl %eax, %ecx
notl %ecx
testl $0x300000, %ecx         # imm = 0x300000
jne 0x6979
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2b2a
jmp 0x6947
leaq 0x2fdc7(%rip), %rax     # 0x36700
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
cmpl $0x0, (%rax)
jg 0x69d7
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2fdaa(%rip), %rax     # 0x36700
movl $0xfffffffc, %ebx       # imm = 0xFFFFFFFC
cmpl $0x0, (%rax)
jle 0x6947
callq 0x2b62
jmp 0x6947
movl $0xfffffffc, %ebx       # imm = 0xFFFFFFFC
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2b46
jmp 0x6947
movl 0x70(%rbx), %edx
testl %edx, %edx
jle 0x69be
movl 0x6c(%rbx), %ecx
testl %ecx, %ecx
jle 0x69be
movl 0x74(%rbx), %esi
movl 0x78(%rbx), %edi
movl %ecx, %r8d
xorl %esi, %r8d
movl %edx, %r9d
xorl %edi, %r9d
orl %r8d, %r9d
jne 0x69eb
addl %edx, %ecx
addl %edx, %esi
addl %ecx, %esi
cmpl $0x80, %esi
jl 0x6a17
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2af2
jmp 0x6947
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2b0e
jmp 0x6947
callq 0x2b7e
jmp 0x6947
callq 0x2a4a
jmp 0x68fb
cmpl %edi, %edx
jle 0x69fe
addl %edx, %ecx
movl %edi, %r8d
addl %esi, %r8d
movl %edi, %edx
cmpl %r8d, %ecx
jl 0x69a0
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2a66
jmp 0x6947
movl 0x80(%rbx), %ecx
testl %ecx, %ecx
js 0x6a4d
cmpl 0x68(%rbx), %ecx
jge 0x6a4d
movl 0x90(%rbx), %ecx
cmpl 0x94(%rbx), %ecx
jge 0x6a66
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2aba
jmp 0x6947
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2ad6
jmp 0x6947
movl %eax, %ecx
notl %ecx
testl $0x804000, %ecx         # imm = 0x804000
jne 0x6a8b
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2a9e
jmp 0x6947
xorl %ebx, %ebx
btq $0x20, %rax
jae 0x6947
testl $0x2088, %eax           # imm = 0x2088
jne 0x6aaa
testb $0x1, 0x4(%r14)
je 0x6947
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
cmpl $0x0, (%r15)
jle 0x6947
callq 0x2a82
jmp 0x6947
nop