	.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	_PD0@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	testb	$2, %al
	jne	LBB0_1
## %bb.2:
	notl	%edx
	movq	_PORTD@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	jmp	LBB0_3
LBB0_1:
	movq	_PORTD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
LBB0_3:
	movq	_PD1@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%edx, %esi
	btrl	%ecx, %esi
	btsl	%ecx, %edx
	testb	$4, %al
	cmovel	%esi, %edx
	movq	_PD6@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%edx, %esi
	btrl	%ecx, %esi
	btsl	%ecx, %edx
	testb	$8, %al
	cmovel	%esi, %edx
	movq	_PORTD@GOTPCREL(%rip), %rcx
	movl	%edx, (%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PD0,4,2                        ## @PD0
	.comm	_PORTD,4,2                      ## @PORTD
	.comm	_PD1,4,2                        ## @PD1
	.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, _PD0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PD0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w9, w9, w8
Lloh3:
	adrp	x8, _PORTD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PORTD@GOTPAGEOFF]
	tbnz	w0, #1, 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:
Lloh5:
	adrp	x10, _PD1@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PD1@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	mov	w11, #1
	lsl	w10, w11, w10
	bic	w12, w9, w10
	orr	w9, w10, w9
	tst	w0, #0x4
	csel	w9, w12, w9, eq
Lloh8:
	adrp	x10, _PD6@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PD6@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w10, w11, w10
	bic	w11, w9, w10
	orr	w9, w10, w9
	tst	w0, #0x8
	csel	w9, w11, w9, eq
	str	w9, [x8]
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PD0,4,2                        ; @PD0
	.comm	_PORTD,4,2                      ; @PORTD
	.comm	_PD1,4,2                        ; @PD1
	.comm	_PD6,4,2                        ; @PD6
.subsections_via_symbols
