	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_keystate
_update_keystate:                       ## @update_keystate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edx, %r8d
	movl	%esi, %eax
	movq	_KEYBITS_WORD_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	leal	-1(%r9), %ecx
	andl	%esi, %ecx
	movl	$1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	cltd
	idivl	%r9d
	cltq
	testl	%r8d, %r8d
	je	LBB0_2
## %bb.1:
	orl	(%rdi,%rax,4), %esi
	jmp	LBB0_3
LBB0_2:
	notl	%esi
	andl	(%rdi,%rax,4), %esi
LBB0_3:
	movl	%esi, (%rdi,%rax,4)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEYBITS_WORD_BITS,4,2          ## @KEYBITS_WORD_BITS
	.no_dead_strip	_update_keystate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_keystate
_update_keystate:                       ; @update_keystate
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _KEYBITS_WORD_BITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEYBITS_WORD_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w8, #1
	and	w9, w9, w1
	mov	w10, #1
	lsl	w9, w10, w9
	sdiv	w8, w1, w8
	sxtw	x8, w8
	cbz	w2, LBB0_2
; %bb.1:
	ldr	w10, [x0, x8, lsl #2]
	orr	w9, w10, w9
	str	w9, [x0, x8, lsl #2]
	ret
LBB0_2:
	ldr	w10, [x0, x8, lsl #2]
	bic	w9, w10, w9
	str	w9, [x0, x8, lsl #2]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_KEYBITS_WORD_BITS,4,2          ; @KEYBITS_WORD_BITS
	.no_dead_strip	_update_keystate
.subsections_via_symbols
