// File: /workspace/github_c_makefile_star2_O1/baskerville[P]sxhkd/src/parse.c
// Function: parse_modifier
bool parse_modifier(char *name, uint16_t *modfield)
{
	if (strcmp(name, "shift") == 0) {
		*modfield |= XCB_MOD_MASK_SHIFT;
		return true;
	} else if (strcmp(name, "control") == 0 || strcmp(name, "ctrl") == 0) {
		*modfield |= XCB_MOD_MASK_CONTROL;
		return true;
	} else if (strcmp(name, "alt") == 0) {
		*modfield |= (modfield_from_keysym(Alt_L) | modfield_from_keysym(Alt_R));
		return true;
	} else if (strcmp(name, "super") == 0) {
		*modfield |= (modfield_from_keysym(Super_L) | modfield_from_keysym(Super_R));
		return true;
	} else if (strcmp(name, "hyper") == 0) {
		*modfield |= (modfield_from_keysym(Hyper_L) | modfield_from_keysym(Hyper_R));
		return true;
	} else if (strcmp(name, "meta") == 0) {
		*modfield |= (modfield_from_keysym(Meta_L) | modfield_from_keysym(Meta_R));
		return true;
	} else if (strcmp(name, "mode_switch") == 0) {
		*modfield |= modfield_from_keysym(Mode_switch);
		return true;
	} else if (strcmp(name, "mod1") == 0) {
		*modfield |= XCB_MOD_MASK_1;
		return true;
	} else if (strcmp(name, "mod2") == 0) {
		*modfield |= XCB_MOD_MASK_2;
		return true;
	} else if (strcmp(name, "mod3") == 0) {
		*modfield |= XCB_MOD_MASK_3;
		return true;
	} else if (strcmp(name, "mod4") == 0) {
		*modfield |= XCB_MOD_MASK_4;
		return true;
	} else if (strcmp(name, "mod5") == 0) {
		*modfield |= XCB_MOD_MASK_5;
		return true;
	} else if (strcmp(name, "lock") == 0) {
		*modfield |= XCB_MOD_MASK_LOCK;
		return true;
	} else if (strcmp(name, "any") == 0) {
		*modfield |= XCB_MOD_MASK_ANY;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x80df(%rip), %rsi      # 0x1838b
callq 0xe220
testl %eax, %eax
je 0x10407
leaq 0x80d1(%rip), %rsi      # 0x18391
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x103ff
leaq 0x80c2(%rip), %rsi      # 0x18399
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x103ff
leaq 0x80b0(%rip), %rsi      # 0x1839e
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x1040f
leaq 0x809d(%rip), %rsi      # 0x183a2
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10424
leaq 0x808c(%rip), %rsi      # 0x183a8
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10439
leaq 0x807b(%rip), %rsi      # 0x183ae
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x1044e
leaq 0x8069(%rip), %rsi      # 0x183b3
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10475
leaq 0x805e(%rip), %rsi      # 0x183bf
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10482
leaq 0x804c(%rip), %rsi      # 0x183c4
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x1048a
leaq 0x803a(%rip), %rsi      # 0x183c9
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10492
leaq 0x8028(%rip), %rsi      # 0x183ce
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x1049a
leaq 0x8016(%rip), %rsi      # 0x183d3
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x104a2
leaq 0x8004(%rip), %rsi      # 0x183d8
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x104ac
leaq 0x7ff2(%rip), %rsi      # 0x183dd
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x104b4
xorl %eax, %eax
jmp 0x10470
movzwl (%rbx), %eax
orl $0x4, %eax
jmp 0x1046b
movzwl (%rbx), %eax
orl $0x1, %eax
jmp 0x1046b
movl 0x134ab(%rip), %edi     # 0x238c0
callq 0x1055a
movl %eax, %ebp
movl 0x134a2(%rip), %edi     # 0x238c4
jmp 0x10461
movl 0x1349e(%rip), %edi     # 0x238c8
callq 0x1055a
movl %eax, %ebp
movl 0x13495(%rip), %edi     # 0x238cc
jmp 0x10461
movl 0x13491(%rip), %edi     # 0x238d0
callq 0x1055a
movl %eax, %ebp
movl 0x13488(%rip), %edi     # 0x238d4
jmp 0x10461
movl 0x13484(%rip), %edi     # 0x238d8
callq 0x1055a
movl %eax, %ebp
movl 0x1347b(%rip), %edi     # 0x238dc
callq 0x1055a
orl %ebp, %eax
orw (%rbx), %ax
movw %ax, (%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movl 0x13465(%rip), %edi     # 0x238e0
callq 0x1055a
jmp 0x10468
movzwl (%rbx), %eax
orl $0x8, %eax
jmp 0x1046b
movzwl (%rbx), %eax
orl $0x10, %eax
jmp 0x1046b
movzwl (%rbx), %eax
orl $0x20, %eax
jmp 0x1046b
movzwl (%rbx), %eax
orl $0x40, %eax
jmp 0x1046b
movzwl (%rbx), %eax
orl $0x80, %eax
jmp 0x1046b
movzwl (%rbx), %eax
orl $0x2, %eax
jmp 0x1046b
movzwl (%rbx), %eax
orl $0x8000, %eax           # imm = 0x8000
jmp 0x1046b