	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atkbd_select_set
_atkbd_select_set:                      ## @atkbd_select_set
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, (%rdi)
	movl	$2, %r15d
	cmpq	$0, 8(%rdi)
	jne	LBB0_17
## %bb.1:
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	cmpl	$44193, 4(%rdi)                 ## imm = 0xACA1
	jne	LBB0_3
## %bb.2:
	movb	$3, -34(%rbp)
	movq	_ATKBD_CMD_SSCANSET@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_3:
	movl	%esi, %r12d
	testl	%edx, %edx
	je	LBB0_6
## %bb.4:
	movb	$113, -34(%rbp)
	movq	_ATKBD_CMD_EX_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-34(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	movq	_atkbd_terminal@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_ATKBD_CMD_SETALL_MB@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %edx
	leaq	-34(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ps2_command
	movl	$3, %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpl	$3, %r12d
	jne	LBB0_17
## %bb.9:
	movq	_ATKBD_CMD_OK_GETID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-34(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movb	$3, -34(%rbp)
	movq	_ATKBD_CMD_SSCANSET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	-34(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_17
## %bb.12:
	movb	$0, -34(%rbp)
	movq	_ATKBD_CMD_GSCANSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-34(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_17
## %bb.13:
	cmpb	$3, -34(%rbp)
	je	LBB0_15
## %bb.14:
	movb	$2, -34(%rbp)
	movl	(%rbx), %edx
	leaq	-34(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_17
LBB0_15:
	movq	_ATKBD_CMD_SETALL_MBR@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_5:
	movl	$1, (%rbx)
	jmp	LBB0_17
LBB0_10:
	movzwl	-34(%rbp), %eax
	rolw	$8, %ax
	movzwl	%ax, %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_ATKBD_CMD_SSCANSET,4,2         ## @ATKBD_CMD_SSCANSET
	.comm	_ATKBD_CMD_EX_ENABLE,4,2        ## @ATKBD_CMD_EX_ENABLE
	.comm	_atkbd_terminal,8,3             ## @atkbd_terminal
	.comm	_ATKBD_CMD_SETALL_MB,4,2        ## @ATKBD_CMD_SETALL_MB
	.comm	_ATKBD_CMD_OK_GETID,4,2         ## @ATKBD_CMD_OK_GETID
	.comm	_ATKBD_CMD_GSCANSET,4,2         ## @ATKBD_CMD_GSCANSET
	.comm	_ATKBD_CMD_SETALL_MBR,4,2       ## @ATKBD_CMD_SETALL_MBR
	.no_dead_strip	_atkbd_select_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atkbd_select_set
_atkbd_select_set:                      ; @atkbd_select_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	str	wzr, [x0]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w20, #2
	b	LBB0_9
LBB0_2:
	mov	x20, x0
	add	x19, x0, #16
	ldr	w8, [x0, #4]
	mov	w9, #44193
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	mov	w20, #3
	strb	w20, [sp, #14]
Lloh0:
	adrp	x8, _ATKBD_CMD_SSCANSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATKBD_CMD_SSCANSET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	b	LBB0_9
LBB0_4:
	mov	x21, x1
	cbz	w2, LBB0_6
; %bb.5:
	mov	w8, #113
	strb	w8, [sp, #14]
Lloh3:
	adrp	x8, _ATKBD_CMD_EX_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATKBD_CMD_EX_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	cbz	x0, LBB0_17
LBB0_6:
Lloh6:
	adrp	x8, _atkbd_terminal@GOTPAGE
Lloh7:
	ldr	x8, [x8, _atkbd_terminal@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.7:
Lloh9:
	adrp	x8, _ATKBD_CMD_SETALL_MB@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATKBD_CMD_SETALL_MB@GOTPAGEOFF]
LBB0_8:
	ldr	w2, [x8]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	mov	w20, #3
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	cmp	w21, #3
	b.ne	LBB0_1
; %bb.11:
Lloh11:
	adrp	x8, _ATKBD_CMD_OK_GETID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATKBD_CMD_OK_GETID@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	cbz	x0, LBB0_18
; %bb.12:
	mov	w8, #3
	strb	w8, [sp, #14]
Lloh14:
	adrp	x21, _ATKBD_CMD_SSCANSET@GOTPAGE
Lloh15:
	ldr	x21, [x21, _ATKBD_CMD_SSCANSET@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	cbnz	x0, LBB0_1
; %bb.13:
	strb	wzr, [sp, #14]
Lloh16:
	adrp	x8, _ATKBD_CMD_GSCANSET@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ATKBD_CMD_GSCANSET@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	cbnz	x0, LBB0_1
; %bb.14:
	ldrb	w8, [sp, #14]
	cmp	w8, #3
	b.eq	LBB0_16
; %bb.15:
	mov	w20, #2
	strb	w20, [sp, #14]
	ldr	w2, [x21]
	add	x1, sp, #14
	mov	x0, x19
	bl	_ps2_command
	cbnz	x0, LBB0_9
LBB0_16:
Lloh19:
	adrp	x8, _ATKBD_CMD_SETALL_MBR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ATKBD_CMD_SETALL_MBR@GOTPAGEOFF]
	b	LBB0_8
LBB0_17:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_1
LBB0_18:
	ldrh	w8, [sp, #14]
	rev16	w8, w8
	str	w8, [x20, #4]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ATKBD_CMD_SSCANSET,4,2         ; @ATKBD_CMD_SSCANSET
	.comm	_ATKBD_CMD_EX_ENABLE,4,2        ; @ATKBD_CMD_EX_ENABLE
	.comm	_atkbd_terminal,8,3             ; @atkbd_terminal
	.comm	_ATKBD_CMD_SETALL_MB,4,2        ; @ATKBD_CMD_SETALL_MB
	.comm	_ATKBD_CMD_OK_GETID,4,2         ; @ATKBD_CMD_OK_GETID
	.comm	_ATKBD_CMD_GSCANSET,4,2         ; @ATKBD_CMD_GSCANSET
	.comm	_ATKBD_CMD_SETALL_MBR,4,2       ; @ATKBD_CMD_SETALL_MBR
	.no_dead_strip	_atkbd_select_set
.subsections_via_symbols
