	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_layer_state_set_kb             ## -- Begin function layer_state_set_kb
	.p2align	4, 0x90
_layer_state_set_kb:                    ## @layer_state_set_kb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %eax
	movq	_QWERTY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_PD0@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	btl	%esi, %edi
	jae	LBB0_2
## %bb.1:
	notl	%edx
	movq	_PORTD@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	jmp	LBB0_3
LBB0_2:
	movq	_PORTD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
LBB0_3:
	movq	_WIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PD1@GOTPCREL(%rip), %rsi
	movb	(%rsi), %sil
	movl	%edx, %edi
	btsl	%esi, %edi
	btrl	%esi, %edx
	btl	%ecx, %eax
	cmovael	%edi, %edx
	movq	_LIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PD6@GOTPCREL(%rip), %rsi
	movb	(%rsi), %sil
	movl	%edx, %edi
	btsl	%esi, %edi
	btrl	%esi, %edx
	btl	%ecx, %eax
	cmovael	%edi, %edx
	movq	_PORTD@GOTPCREL(%rip), %rcx
	movl	%edx, (%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QWERTY,4,2                     ## @QWERTY
	.comm	_PD0,4,2                        ## @PD0
	.comm	_PORTD,4,2                      ## @PORTD
	.comm	_WIN,4,2                        ## @WIN
	.comm	_PD1,4,2                        ## @PD1
	.comm	_LIGHT,4,2                      ## @LIGHT
	.comm	_PD6,4,2                        ## @PD6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_layer_state_set_kb             ; -- Begin function layer_state_set_kb
	.p2align	2
_layer_state_set_kb:                    ; @layer_state_set_kb
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _QWERTY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QWERTY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PD0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PD0@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	lsr	w10, w0, w8
Lloh6:
	adrp	x8, _PORTD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PORTD@GOTPAGEOFF]
	tbz	w10, #0, LBB0_2
; %bb.1:
	ldr	w10, [x8]
	bic	w9, w10, w9
	b	LBB0_3
LBB0_2:
	ldr	w10, [x8]
	orr	w9, w10, w9
LBB0_3:
Lloh8:
	adrp	x10, _WIN@GOTPAGE
Lloh9:
	ldr	x10, [x10, _WIN@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _PD1@GOTPAGE
Lloh12:
	ldr	x11, [x11, _PD1@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	mov	w12, #1
	lsl	w11, w12, w11
	orr	w13, w11, w9
	bic	w9, w9, w11
	lsr	w10, w0, w10
	tst	w10, #0x1
	csel	w9, w13, w9, eq
Lloh14:
	adrp	x10, _LIGHT@GOTPAGE
Lloh15:
	ldr	x10, [x10, _LIGHT@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
Lloh17:
	adrp	x11, _PD6@GOTPAGE
Lloh18:
	ldr	x11, [x11, _PD6@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	lsl	w11, w12, w11
	orr	w12, w11, w9
	bic	w9, w9, w11
	lsr	w10, w0, w10
	tst	w10, #0x1
	csel	w9, w12, w9, eq
	str	w9, [x8]
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_QWERTY,4,2                     ; @QWERTY
	.comm	_PD0,4,2                        ; @PD0
	.comm	_PORTD,4,2                      ; @PORTD
	.comm	_WIN,4,2                        ; @WIN
	.comm	_PD1,4,2                        ; @PD1
	.comm	_LIGHT,4,2                      ; @LIGHT
	.comm	_PD6,4,2                        ; @PD6
.subsections_via_symbols
