	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i8042_port_close
_i8042_port_close:                      ## @i8042_port_close
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_i8042_ports@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_I8042_AUX_PORT_NO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rdi, (%rax,%rcx,8)
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %r15
	cmoveq	%rax, %r15
	movq	_I8042_CTR_KBDDIS@GOTPCREL(%rip), %rax
	cmoveq	_I8042_CTR_AUXDIS@GOTPCREL(%rip), %rax
	movq	_I8042_CTR_KBDINT@GOTPCREL(%rip), %rcx
	cmoveq	_I8042_CTR_AUXINT@GOTPCREL(%rip), %rcx
	movl	(%rax), %ebx
	movl	(%rcx), %r12d
	movl	%r12d, %eax
	notl	%eax
	movq	_i8042_ctr@GOTPCREL(%rip), %r14
	andl	%eax, (%r14)
	movq	_I8042_CMD_CTL_WCTR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_i8042_command
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	callq	_pr_warn
LBB0_2:
	movl	$50, %edi
	callq	_udelay
	notl	%ebx
	andl	(%r14), %ebx
	orl	%r12d, %ebx
	movl	%ebx, (%r14)
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_i8042_command
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	callq	_pr_err
LBB0_4:
	xorl	%edi, %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i8042_interrupt                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_i8042_ports,8,3                ## @i8042_ports
	.comm	_I8042_AUX_PORT_NO,8,3          ## @I8042_AUX_PORT_NO
	.comm	_I8042_CTR_AUXINT,4,2           ## @I8042_CTR_AUXINT
	.comm	_I8042_CTR_AUXDIS,4,2           ## @I8042_CTR_AUXDIS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AUX"

	.comm	_I8042_CTR_KBDINT,4,2           ## @I8042_CTR_KBDINT
	.comm	_I8042_CTR_KBDDIS,4,2           ## @I8042_CTR_KBDDIS
L_.str.1:                               ## @.str.1
	.asciz	"KBD"

	.comm	_i8042_ctr,4,2                  ## @i8042_ctr
	.comm	_I8042_CMD_CTL_WCTR,4,2         ## @I8042_CMD_CTL_WCTR
L_.str.2:                               ## @.str.2
	.asciz	"Can't write CTR while closing %s port\n"

L_.str.3:                               ## @.str.3
	.asciz	"Can't reactivate %s port\n"

	.no_dead_strip	_i8042_port_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i8042_port_close
_i8042_port_close:                      ; @i8042_port_close
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _i8042_ports@GOTPAGE
Lloh1:
	ldr	x8, [x8, _i8042_ports@GOTPAGEOFF]
Lloh2:
	adrp	x9, _I8042_AUX_PORT_NO@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I8042_AUX_PORT_NO@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
Lloh6:
	adrp	x9, l_.str.1@PAGE
Lloh7:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh8:
	adrp	x10, l_.str@PAGE
Lloh9:
	add	x10, x10, l_.str@PAGEOFF
	cmp	x8, x0
	csel	x19, x10, x9, eq
Lloh10:
	adrp	x8, _I8042_CTR_AUXDIS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _I8042_CTR_AUXDIS@GOTPAGEOFF]
Lloh12:
	adrp	x9, _I8042_CTR_KBDDIS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I8042_CTR_KBDDIS@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w21, [x8]
Lloh14:
	adrp	x8, _I8042_CTR_AUXINT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I8042_CTR_AUXINT@GOTPAGEOFF]
Lloh16:
	adrp	x9, _I8042_CTR_KBDINT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _I8042_CTR_KBDINT@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w22, [x8]
Lloh18:
	adrp	x20, _i8042_ctr@GOTPAGE
Lloh19:
	ldr	x20, [x20, _i8042_ctr@GOTPAGEOFF]
	ldr	w8, [x20]
	bic	w8, w8, w22
	str	w8, [x20]
Lloh20:
	adrp	x23, _I8042_CMD_CTL_WCTR@GOTPAGE
Lloh21:
	ldr	x23, [x23, _I8042_CMD_CTL_WCTR@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_i8042_command
	cbz	x0, LBB0_2
; %bb.1:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_pr_warn
LBB0_2:
	mov	w0, #50
	bl	_udelay
	ldr	w8, [x20]
	bic	w8, w8, w21
	orr	w8, w8, w22
	str	w8, [x20]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_i8042_command
	cbz	x0, LBB0_4
; %bb.3:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_pr_err
LBB0_4:
	mov	w0, #0
	mov	x1, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_i8042_interrupt
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_i8042_ports,8,3                ; @i8042_ports
	.comm	_I8042_AUX_PORT_NO,8,3          ; @I8042_AUX_PORT_NO
	.comm	_I8042_CTR_AUXINT,4,2           ; @I8042_CTR_AUXINT
	.comm	_I8042_CTR_AUXDIS,4,2           ; @I8042_CTR_AUXDIS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AUX"

	.comm	_I8042_CTR_KBDINT,4,2           ; @I8042_CTR_KBDINT
	.comm	_I8042_CTR_KBDDIS,4,2           ; @I8042_CTR_KBDDIS
l_.str.1:                               ; @.str.1
	.asciz	"KBD"

	.comm	_i8042_ctr,4,2                  ; @i8042_ctr
	.comm	_I8042_CMD_CTL_WCTR,4,2         ; @I8042_CMD_CTL_WCTR
l_.str.2:                               ; @.str.2
	.asciz	"Can't write CTR while closing %s port\n"

l_.str.3:                               ; @.str.3
	.asciz	"Can't reactivate %s port\n"

	.no_dead_strip	_i8042_port_close
.subsections_via_symbols
