// File: /workspace/github_c_makefile_star2_O2/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 0x739c(%rip), %rsi      # 0x1738b
callq 0xe220
testl %eax, %eax
je 0x1014a
leaq 0x738e(%rip), %rsi      # 0x17391
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10142
leaq 0x737f(%rip), %rsi      # 0x17399
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10142
leaq 0x736d(%rip), %rsi      # 0x1739e
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10152
leaq 0x735a(%rip), %rsi      # 0x173a2
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10167
leaq 0x7349(%rip), %rsi      # 0x173a8
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x1017c
leaq 0x7338(%rip), %rsi      # 0x173ae
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x10191
leaq 0x7326(%rip), %rsi      # 0x173b3
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x101b8
leaq 0x731b(%rip), %rsi      # 0x173bf
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x101c5
leaq 0x7309(%rip), %rsi      # 0x173c4
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x101cd
leaq 0x72f7(%rip), %rsi      # 0x173c9
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x101d5
leaq 0x72e5(%rip), %rsi      # 0x173ce
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x101dd
leaq 0x72d3(%rip), %rsi      # 0x173d3
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x101e5
leaq 0x72c1(%rip), %rsi      # 0x173d8
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x101ef
leaq 0x72af(%rip), %rsi      # 0x173dd
movq %r14, %rdi
callq 0xe220
testl %eax, %eax
je 0x101f7
xorl %eax, %eax
jmp 0x101b3
movzwl (%rbx), %eax
orl $0x4, %eax
jmp 0x101ae
movzwl (%rbx), %eax
orl $0x1, %eax
jmp 0x101ae
movl 0x12768(%rip), %edi     # 0x228c0
callq 0x10284
movl %eax, %ebp
movl 0x1275f(%rip), %edi     # 0x228c4
jmp 0x101a4
movl 0x1275b(%rip), %edi     # 0x228c8
callq 0x10284
movl %eax, %ebp
movl 0x12752(%rip), %edi     # 0x228cc
jmp 0x101a4
movl 0x1274e(%rip), %edi     # 0x228d0
callq 0x10284
movl %eax, %ebp
movl 0x12745(%rip), %edi     # 0x228d4
jmp 0x101a4
movl 0x12741(%rip), %edi     # 0x228d8
callq 0x10284
movl %eax, %ebp
movl 0x12738(%rip), %edi     # 0x228dc
callq 0x10284
orl %ebp, %eax
orw (%rbx), %ax
movw %ax, (%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movl 0x12722(%rip), %edi     # 0x228e0
callq 0x10284
jmp 0x101ab
movzwl (%rbx), %eax
orl $0x8, %eax
jmp 0x101ae
movzwl (%rbx), %eax
orl $0x10, %eax
jmp 0x101ae
movzwl (%rbx), %eax
orl $0x20, %eax
jmp 0x101ae
movzwl (%rbx), %eax
orl $0x40, %eax
jmp 0x101ae
movzwl (%rbx), %eax
orl $0x80, %eax
jmp 0x101ae
movzwl (%rbx), %eax
orl $0x2, %eax
jmp 0x101ae
movzwl (%rbx), %eax
orl $0x8000, %eax           # imm = 0x8000
jmp 0x101ae