// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x858e(%rip), %rsi      # 0x19359
callq 0xe220
cmpl $0x0, %eax
jne 0x10deb
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x1, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x8569(%rip), %rsi      # 0x1935f
callq 0xe220
cmpl $0x0, %eax
je 0x10e15
movq -0x10(%rbp), %rdi
leaq 0x855c(%rip), %rsi      # 0x19367
callq 0xe220
cmpl $0x0, %eax
jne 0x10e2b
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x4, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x8536(%rip), %rsi      # 0x1936c
callq 0xe220
cmpl $0x0, %eax
jne 0x10e75
movl 0x12a8a(%rip), %edi     # 0x238d0
callq 0x111f0
cwtl
movl %eax, -0x1c(%rbp)
movl 0x12a7f(%rip), %edi     # 0x238d4
callq 0x111f0
movl -0x1c(%rbp), %edx
cwtl
orl %eax, %edx
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl %edx, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x84f0(%rip), %rsi      # 0x19370
callq 0xe220
cmpl $0x0, %eax
jne 0x10ebf
movl 0x12a48(%rip), %edi     # 0x238d8
callq 0x111f0
cwtl
movl %eax, -0x20(%rbp)
movl 0x12a3d(%rip), %edi     # 0x238dc
callq 0x111f0
movl -0x20(%rbp), %edx
cwtl
orl %eax, %edx
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl %edx, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x84ac(%rip), %rsi      # 0x19376
callq 0xe220
cmpl $0x0, %eax
jne 0x10f09
movl 0x12a06(%rip), %edi     # 0x238e0
callq 0x111f0
cwtl
movl %eax, -0x24(%rbp)
movl 0x129fb(%rip), %edi     # 0x238e4
callq 0x111f0
movl -0x24(%rbp), %edx
cwtl
orl %eax, %edx
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl %edx, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x8468(%rip), %rsi      # 0x1937c
callq 0xe220
cmpl $0x0, %eax
jne 0x10f53
movl 0x129c4(%rip), %edi     # 0x238e8
callq 0x111f0
cwtl
movl %eax, -0x28(%rbp)
movl 0x129b9(%rip), %edi     # 0x238ec
callq 0x111f0
movl -0x28(%rbp), %edx
cwtl
orl %eax, %edx
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl %edx, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x8423(%rip), %rsi      # 0x19381
callq 0xe220
cmpl $0x0, %eax
jne 0x10f8b
movl 0x12982(%rip), %edi     # 0x238f0
callq 0x111f0
movswl %ax, %edx
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl %edx, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x83f7(%rip), %rsi      # 0x1938d
callq 0xe220
cmpl $0x0, %eax
jne 0x10fb6
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x8, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x83d1(%rip), %rsi      # 0x19392
callq 0xe220
cmpl $0x0, %eax
jne 0x10fe1
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x10, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x83ab(%rip), %rsi      # 0x19397
callq 0xe220
cmpl $0x0, %eax
jne 0x1100c
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x20, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x8385(%rip), %rsi      # 0x1939c
callq 0xe220
cmpl $0x0, %eax
jne 0x11037
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x40, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x835f(%rip), %rsi      # 0x193a1
callq 0xe220
cmpl $0x0, %eax
jne 0x11062
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x80, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x8339(%rip), %rsi      # 0x193a6
callq 0xe220
cmpl $0x0, %eax
jne 0x1108a
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x2, %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
movq -0x10(%rbp), %rdi
leaq 0x8316(%rip), %rsi      # 0x193ab
callq 0xe220
cmpl $0x0, %eax
jne 0x110b5
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
orl $0x8000, %ecx           # imm = 0x8000
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x110d3
jmp 0x110b7
jmp 0x110b9
jmp 0x110bb
jmp 0x110bd
jmp 0x110bf
jmp 0x110c1
jmp 0x110c3
jmp 0x110c5
jmp 0x110c7
jmp 0x110c9
jmp 0x110cb
jmp 0x110cd
jmp 0x110cf
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop