// File: /workspace/github_c_makefile_star2_O2/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 0x55a3
leaq 0x2d186(%rip), %rax     # 0x32700
pushq $-0x8
popq %rbx
cmpl $0x0, (%rax)
jle 0x5782
movq 0x2ca6b(%rip), %rax     # 0x31ff8
movq (%rax), %rdi
leaq 0x22719(%rip), %rsi     # 0x27cb0
xorl %eax, %eax
callq 0x2260
jmp 0x5782
movq %rsi, %rbx
movq (%rsi), %rax
testl %eax, %eax
setns %cl
testw $0x1080, %ax            # imm = 0x1080
sete %dl
orb %cl, %dl
je 0x55f8
movq %rdi, %r14
testl $0x1000040, %eax        # imm = 0x1000040
je 0x5623
cmpq $0x0, 0x100(%rbx)
je 0x5623
leaq 0x2d12c(%rip), %rax     # 0x32700
pushq $-0x6
popq %rbx
cmpl $0x0, (%rax)
jle 0x5782
movq 0x2ca11(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x2274d(%rip), %rdi     # 0x27d3e
pushq $0x41
jmp 0x56c8
leaq 0x2d101(%rip), %rax     # 0x32700
pushq $-0x7
popq %rbx
cmpl $0x0, (%rax)
jle 0x5782
movq 0x2c9e6(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x226e5(%rip), %rdi     # 0x27d01
pushq $0x3c
jmp 0x56c8
cmpw $0x0, (%r14)
jle 0x56a2
cmpw $0x0, 0x2(%r14)
jle 0x56a2
cmpl $0x0, 0x5c(%rbx)
js 0x56d6
leaq 0x2d0bd(%rip), %r15     # 0x32700
jne 0x564f
cmpl $0x2, (%r15)
jge 0x578a
movss 0x58(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x56fe
ucomiss 0x22589(%rip), %xmm0    # 0x27bf0
ja 0x56fe
movq (%rbx), %rax
movl %eax, %ecx
notl %ecx
testl $0x300000, %ecx         # imm = 0x300000
jne 0x571d
pushq $-0x3
popq %rbx
cmpl $0x0, (%r15)
jle 0x5782
movq 0x2c964(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x227dd(%rip), %rdi     # 0x27e7b
pushq $0x4f
jmp 0x56c8
leaq 0x2d057(%rip), %rax     # 0x32700
pushq $-0x5
popq %rbx
cmpl $0x0, (%rax)
jle 0x5782
movq 0x2c93c(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x226ba(%rip), %rdi     # 0x27d80
pushq $0x2e
popq %rsi
pushq $0x1
popq %rdx
callq 0x23f0
jmp 0x5782
leaq 0x2d023(%rip), %rax     # 0x32700
pushq $-0x4
popq %rbx
cmpl $0x0, (%rax)
jle 0x5782
movq 0x2c908(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x226b5(%rip), %rdi     # 0x27daf
pushq $0x2d
jmp 0x56c8
pushq $-0x4
popq %rbx
cmpl $0x0, (%r15)
jle 0x5782
movq 0x2c8ea(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x22721(%rip), %rdi     # 0x27e39
jmp 0x55f1
movl 0x70(%rbx), %edx
testl %edx, %edx
jle 0x5775
movl 0x6c(%rbx), %ecx
testl %ecx, %ecx
jle 0x5775
movl 0x74(%rbx), %esi
movl 0x78(%rbx), %edi
movl %ecx, %r8d
xorl %esi, %r8d
movl %edx, %r9d
xorl %edi, %r9d
orl %r8d, %r9d
jne 0x57ab
addl %edx, %ecx
addl %edx, %esi
addl %ecx, %esi
cmpl $0x80, %esi
jl 0x57df
pushq $-0x1
popq %rbx
cmpl $0x0, (%r15)
jle 0x5782
movq 0x2c894(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x227d3(%rip), %rdi     # 0x27f41
pushq $0x4d
jmp 0x56c8
pushq $-0x1
popq %rbx
cmpl $0x0, (%r15)
jg 0x5846
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x2c867(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x22642(%rip), %rdi     # 0x27ddd
pushq $0x5b
popq %rsi
pushq $0x1
popq %rdx
callq 0x23f0
jmp 0x564f
cmpl %edi, %edx
jle 0x57be
addl %edx, %ecx
movl %edi, %r8d
addl %esi, %r8d
movl %edi, %edx
cmpl %r8d, %ecx
jl 0x5744
pushq $-0x2
popq %rbx
cmpl $0x0, (%r15)
jle 0x5782
movq 0x2c82a(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x22722(%rip), %rdi     # 0x27efa
pushq $0x46
jmp 0x56c8
movl 0x80(%rbx), %ecx
testl %ecx, %ecx
js 0x5821
cmpl 0x68(%rbx), %ecx
jge 0x5821
movl 0x90(%rbx), %ecx
cmpl 0x94(%rbx), %ecx
jge 0x585c
pushq $-0x5
popq %rbx
cmpl $0x0, (%r15)
jle 0x5782
movq 0x2c7e8(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x227ad(%rip), %rdi     # 0x27fc7
pushq $0x43
jmp 0x56c8
pushq $-0x1
popq %rbx
cmpl $0x0, (%r15)
jle 0x5782
movq 0x2c7c3(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x22750(%rip), %rdi     # 0x27f8f
pushq $0x37
jmp 0x56c8
movq 0x2c7ab(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x22674(%rip), %rdi     # 0x27ecb
jmp 0x56c6
movl %eax, %ecx
notl %ecx
testl $0x804000, %ecx         # imm = 0x804000
jne 0x588d
pushq $-0x5
popq %rbx
cmpl $0x0, (%r15)
jle 0x5782
movq 0x2c77c(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x22785(%rip), %rdi     # 0x2800b
pushq $0x4e
jmp 0x56c8
xorl %ebx, %ebx
btq $0x20, %rax
jae 0x5782
testw $0x2088, %ax            # imm = 0x2088
jne 0x58ab
testb $0x1, 0x4(%r14)
je 0x5782
pushq $-0x5
popq %rbx
cmpl $0x0, (%r15)
jle 0x5782
movq 0x2c739(%rip), %rax     # 0x31ff8
movq (%rax), %rcx
leaq 0x22791(%rip), %rdi     # 0x2805a
pushq $0x4a
jmp 0x56c8