	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __i8042_command
___i8042_command:                       ## @__i8042_command
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_i8042_noloop@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	$-1, %ebx
	movq	_I8042_CMD_AUX_LOOP@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_16
LBB0_2:
	xorl	%eax, %eax
	callq	_i8042_wait_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.3:
	movzbl	%r14b, %r12d
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_dbg
	movl	%r12d, %edi
	callq	_i8042_write_command
	movl	%r14d, %eax
	shrl	$12, %eax
	andl	$15, %eax
	je	LBB0_8
## %bb.4:
	movl	%eax, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_i8042_wait_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movzbl	(%r15,%r13), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movzbl	(%r15,%r13), %edi
	callq	_i8042_write_data
	incq	%r13
	cmpq	%r13, %r12
	jne	LBB0_5
LBB0_8:
	movl	%r14d, %eax
	shrl	$8, %eax
	andl	$15, %eax
	je	LBB0_16
## %bb.9:
	movl	%eax, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_i8042_read_data
	movb	%al, (%r15,%r13)
	movzbl	%al, %esi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	incq	%r13
	cmpq	%r13, %r12
	je	LBB0_16
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_i8042_wait_read
	testl	%eax, %eax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_I8042_CMD_AUX_LOOP@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	callq	_i8042_read_status
	movq	_I8042_STR_AUXDATA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
## %bb.14:
	movl	$-1, %ebx
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_15
LBB0_6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_15
LBB0_11:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
LBB0_15:
	xorl	%eax, %eax
	callq	_dbg
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_i8042_noloop,8,3               ## @i8042_noloop
	.comm	_I8042_CMD_AUX_LOOP,4,2         ## @I8042_CMD_AUX_LOOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%02x -> i8042 (command)\n"

L_.str.1:                               ## @.str.1
	.asciz	"     -- i8042 (wait write timeout)\n"

L_.str.2:                               ## @.str.2
	.asciz	"%02x -> i8042 (parameter)\n"

L_.str.3:                               ## @.str.3
	.asciz	"     -- i8042 (wait read timeout)\n"

	.comm	_I8042_STR_AUXDATA,4,2          ## @I8042_STR_AUXDATA
L_.str.4:                               ## @.str.4
	.asciz	"     -- i8042 (auxerr)\n"

L_.str.5:                               ## @.str.5
	.asciz	"%02x <- i8042 (return)\n"

	.no_dead_strip	___i8042_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __i8042_command
___i8042_command:                       ; @__i8042_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _i8042_noloop@GOTPAGE
Lloh1:
	ldr	x8, [x8, _i8042_noloop@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x24, _I8042_CMD_AUX_LOOP@GOTPAGE
Lloh4:
	ldr	x24, [x24, _I8042_CMD_AUX_LOOP@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	x8, #0
	ccmp	w9, w1, #0, ne
	b.eq	LBB0_13
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	bl	_i8042_wait_write
	mov	x23, x0
	cbnz	w0, LBB0_14
; %bb.2:
	and	w21, w19, #0xff
	str	x21, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	mov	x0, x21
	bl	_i8042_write_command
	ubfx	w25, w19, #12, #4
	cbz	w25, LBB0_6
; %bb.3:
Lloh7:
	adrp	x21, l_.str.1@PAGE
Lloh8:
	add	x21, x21, l_.str.1@PAGEOFF
	mov	x26, x20
Lloh9:
	adrp	x22, l_.str.2@PAGE
Lloh10:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	bl	_i8042_wait_write
	cbnz	w0, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x26]
	str	x8, [sp]
	mov	x0, x22
	bl	_dbg
	ldrb	w0, [x26], #1
	bl	_i8042_write_data
	subs	x25, x25, #1
	b.ne	LBB0_4
LBB0_6:
	ubfx	w25, w19, #8, #4
	cbz	w25, LBB0_17
; %bb.7:
Lloh11:
	adrp	x21, l_.str.3@PAGE
Lloh12:
	add	x21, x21, l_.str.3@PAGEOFF
Lloh13:
	adrp	x27, _I8042_STR_AUXDATA@GOTPAGE
Lloh14:
	ldr	x27, [x27, _I8042_STR_AUXDATA@GOTPAGEOFF]
Lloh15:
	adrp	x26, l_.str.4@PAGE
Lloh16:
	add	x26, x26, l_.str.4@PAGEOFF
Lloh17:
	adrp	x22, l_.str.5@PAGE
Lloh18:
	add	x22, x22, l_.str.5@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	bl	_i8042_read_data
	strb	w0, [x20], #1
	mov	w8, w0
	str	x8, [sp]
	mov	x0, x22
	bl	_dbg
	subs	x25, x25, #1
	b.eq	LBB0_17
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	bl	_i8042_wait_read
	cbnz	w0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x24]
	cmp	w8, w19
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	bl	_i8042_read_status
	ldr	w8, [x27]
	tst	w8, w0
	b.ne	LBB0_8
; %bb.12:
	mov	w23, #-1
	mov	x21, x26
	b	LBB0_16
LBB0_13:
	mov	w23, #-1
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	mov	x23, x0
LBB0_16:
	mov	x0, x21
	bl	_dbg
	b	LBB0_14
LBB0_17:
	mov	w23, #0
	b	LBB0_14
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_i8042_noloop,8,3               ; @i8042_noloop
	.comm	_I8042_CMD_AUX_LOOP,4,2         ; @I8042_CMD_AUX_LOOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%02x -> i8042 (command)\n"

l_.str.1:                               ; @.str.1
	.asciz	"     -- i8042 (wait write timeout)\n"

l_.str.2:                               ; @.str.2
	.asciz	"%02x -> i8042 (parameter)\n"

l_.str.3:                               ; @.str.3
	.asciz	"     -- i8042 (wait read timeout)\n"

	.comm	_I8042_STR_AUXDATA,4,2          ; @I8042_STR_AUXDATA
l_.str.4:                               ; @.str.4
	.asciz	"     -- i8042 (auxerr)\n"

l_.str.5:                               ; @.str.5
	.asciz	"%02x <- i8042 (return)\n"

	.no_dead_strip	___i8042_command
.subsections_via_symbols
