// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/semind.c
// Function: set_search_modmask
static void set_search_modmask(const char *v)
{
	size_t n = strlen(v);

	if (n != 1 && n != 3)
		semind_error(1, 0, "the length of mode value must be 1 or 3: %s", v);

	semind_search_modmask_defined = 1;
	semind_search_modmask = 0;

	if (n == 1) {
		switch (v[0]) {
			case 'r': v = "rrr"; break;
			case 'w': v = "ww-"; break;
			case 'm': v = "mmm"; break;
			case '-': v = "---"; break;
			default: semind_error(1, 0, "unknown modificator: %s", v);
		}
	} else if (!strcmp(v, "def")) {
		semind_search_modmask = U_DEF;
		return;
	}

	static const int modes[] = {
		U_R_AOF, U_W_AOF, U_R_AOF | U_W_AOF,
		U_R_VAL, U_W_VAL, U_R_VAL | U_W_VAL,
		U_R_PTR, U_W_PTR, U_R_PTR | U_W_PTR,
	};

	for (int i = 0; i < 3; i++) {
		switch (v[i]) {
			case 'r': semind_search_modmask |= modes[i * 3];     break;
			case 'w': semind_search_modmask |= modes[i * 3 + 1]; break;
			case 'm': semind_search_modmask |= modes[i * 3 + 2]; break;
			case '-': break;
			default:  semind_error(1, 0,
			                "unknown modificator in the mode value"
			                " (`r', `w', `m' or `-' expected): %c", v[i]);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x121f0
movq %rax, -0x10(%rbp)
cmpq $0x1, -0x10(%rbp)
je 0x14260
cmpq $0x3, -0x10(%rbp)
je 0x14260
movq -0x8(%rbp), %rcx
movl $0x1, %edi
xorl %esi, %esi
leaq 0x5359a(%rip), %rdx     # 0x677f3
movb $0x0, %al
callq 0x131c0
movl $0x1, 0x80d6e(%rip)     # 0x94fd8
movl $0x0, 0x80d68(%rip)     # 0x94fdc
cmpq $0x1, -0x10(%rbp)
jne 0x142f9
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x18(%rbp)
subl $0x2d, %eax
je 0x142d1
jmp 0x1428c
movl -0x18(%rbp), %eax
subl $0x6d, %eax
je 0x142c4
jmp 0x14296
movl -0x18(%rbp), %eax
subl $0x72, %eax
je 0x142aa
jmp 0x142a0
movl -0x18(%rbp), %eax
subl $0x77, %eax
je 0x142b7
jmp 0x142de
leaq 0x5356e(%rip), %rax     # 0x6781f
movq %rax, -0x8(%rbp)
jmp 0x142f7
leaq 0x53565(%rip), %rax     # 0x67823
movq %rax, -0x8(%rbp)
jmp 0x142f7
leaq 0x5355c(%rip), %rax     # 0x67827
movq %rax, -0x8(%rbp)
jmp 0x142f7
leaq 0x53553(%rip), %rax     # 0x6782b
movq %rax, -0x8(%rbp)
jmp 0x142f7
movq -0x8(%rbp), %rcx
movl $0x1, %edi
xorl %esi, %esi
leaq 0x5353f(%rip), %rdx     # 0x6782f
movb $0x0, %al
callq 0x131c0
jmp 0x1431f
movq -0x8(%rbp), %rdi
leaq 0x553e8(%rip), %rsi     # 0x696ec
callq 0x12370
cmpl $0x0, %eax
jne 0x1431d
movl $0x10000, 0x80cc4(%rip) # imm = 0x10000
jmp 0x143fe
jmp 0x1431f
movl $0x0, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jge 0x143fe
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
subl $0x2d, %eax
je 0x143cb
jmp 0x1434a
movl -0x1c(%rbp), %eax
subl $0x6d, %eax
je 0x143a9
jmp 0x14354
movl -0x1c(%rbp), %eax
subl $0x72, %eax
je 0x14368
jmp 0x1435e
movl -0x1c(%rbp), %eax
subl $0x77, %eax
je 0x14387
jmp 0x143cd
imull $0x3, -0x14(%rbp), %eax
movslq %eax, %rcx
leaq 0x52daa(%rip), %rax     # 0x67120
movl (%rax,%rcx,4), %eax
orl 0x80c5d(%rip), %eax     # 0x94fdc
movl %eax, 0x80c57(%rip)     # 0x94fdc
jmp 0x143ee
imull $0x3, -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x52d88(%rip), %rax     # 0x67120
movl (%rax,%rcx,4), %eax
orl 0x80c3b(%rip), %eax     # 0x94fdc
movl %eax, 0x80c35(%rip)     # 0x94fdc
jmp 0x143ee
imull $0x3, -0x14(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rcx
leaq 0x52d66(%rip), %rax     # 0x67120
movl (%rax,%rcx,4), %eax
orl 0x80c19(%rip), %eax     # 0x94fdc
movl %eax, 0x80c13(%rip)     # 0x94fdc
jmp 0x143ee
jmp 0x143ee
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movl $0x1, %edi
xorl %esi, %esi
leaq 0x53460(%rip), %rdx     # 0x67847
movb $0x0, %al
callq 0x131c0
jmp 0x143f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x14326
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)