// File: /workspace/github_c_makefile_star2_O1/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 0x68f4
leaq 0x2ee37(%rip), %rax     # 0x35700
movl $0xfffffff8, %ebx       # imm = 0xFFFFFFF8
cmpl $0x0, (%rax)
jle 0x69ca
movq 0x2e71a(%rip), %rax     # 0x34ff8
movq (%rax), %rdi
leaq 0x253ac(%rip), %rsi     # 0x2bc94
xorl %eax, %eax
callq 0x2260
jmp 0x69ca
movq %rsi, %rbx
movq (%rsi), %rax
testl %eax, %eax
setns %cl
testl $0x1080, %eax           # imm = 0x1080
sete %dl
orb %cl, %dl
je 0x693e
movq %rdi, %r14
testl $0x1000040, %eax        # imm = 0x1000040
je 0x6956
cmpq $0x0, 0x100(%rbx)
je 0x6956
leaq 0x2edda(%rip), %rax     # 0x35700
movl $0xfffffffa, %ebx       # imm = 0xFFFFFFFA
cmpl $0x0, (%rax)
jle 0x69ca
callq 0x2a30
jmp 0x69ca
leaq 0x2edbb(%rip), %rax     # 0x35700
movl $0xfffffff9, %ebx       # imm = 0xFFFFFFF9
cmpl $0x0, (%rax)
jle 0x69ca
callq 0x2a14
jmp 0x69ca
cmpw $0x0, (%r14)
jle 0x69b5
cmpw $0x0, 0x2(%r14)
jle 0x69b5
cmpl $0x0, 0x5c(%rbx)
js 0x69d2
leaq 0x2ed8e(%rip), %r15     # 0x35700
jne 0x697e
cmpl $0x2, (%r15)
jge 0x6a6c
movss 0x58(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x69ea
ucomiss 0x2523e(%rip), %xmm0    # 0x2bbd0
ja 0x69ea
movq (%rbx), %rax
movl %eax, %ecx
notl %ecx
testl $0x300000, %ecx         # imm = 0x300000
jne 0x69fc
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2b2c
jmp 0x69ca
leaq 0x2ed44(%rip), %rax     # 0x35700
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
cmpl $0x0, (%rax)
jg 0x6a62
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2ed27(%rip), %rax     # 0x35700
movl $0xfffffffc, %ebx       # imm = 0xFFFFFFFC
cmpl $0x0, (%rax)
jle 0x69ca
callq 0x2b64
jmp 0x69ca
movl $0xfffffffc, %ebx       # imm = 0xFFFFFFFC
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2b48
jmp 0x69ca
movl 0x70(%rbx), %ecx
testl %ecx, %ecx
jle 0x6a49
movl 0x6c(%rbx), %edx
testl %edx, %edx
jle 0x6a49
movl 0x74(%rbx), %esi
cmpl %esi, %edx
jne 0x6a16
cmpl 0x78(%rbx), %ecx
je 0x6a28
movl 0x78(%rbx), %edi
cmpl %edi, %ecx
jle 0x6a76
leal (%rdx,%rcx), %r8d
addl %esi, %edi
cmpl %edi, %r8d
jge 0x6a76
addl %ecx, %edx
addl %esi, %edx
addl 0x78(%rbx), %edx
cmpl $0x80, %edx
jl 0x6a8f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2af4
jmp 0x69ca
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2b10
jmp 0x69ca
callq 0x2b80
jmp 0x69ca
callq 0x2a4c
jmp 0x697e
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2a68
jmp 0x69ca
movl 0x80(%rbx), %ecx
testl %ecx, %ecx
js 0x6ac5
cmpl 0x68(%rbx), %ecx
jge 0x6ac5
movl 0x90(%rbx), %ecx
cmpl 0x94(%rbx), %ecx
jge 0x6ade
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2abc
jmp 0x69ca
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2ad8
jmp 0x69ca
movl %eax, %ecx
notl %ecx
testl $0x804000, %ecx         # imm = 0x804000
jne 0x6b03
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2aa0
jmp 0x69ca
xorl %ebx, %ebx
btq $0x20, %rax
jae 0x69ca
testl $0x2088, %eax           # imm = 0x2088
jne 0x6b22
testb $0x1, 0x4(%r14)
je 0x69ca
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
cmpl $0x0, (%r15)
jle 0x69ca
callq 0x2a84
jmp 0x69ca
nop