	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i8042_wait_write
_i8042_wait_write:                      ## @i8042_wait_write
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_i8042_read_status
	movq	_I8042_STR_IBF@GOTPCREL(%rip), %r14
	movq	_I8042_CTL_TIMEOUT@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.1:
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$50, %edi
	callq	_udelay
	incl	%ebx
	xorl	%eax, %eax
	callq	_i8042_read_status
	movl	(%r15), %ecx
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ecx, %ebx
	jl	LBB0_3
LBB0_5:
	xorl	%eax, %eax
	cmpl	%ecx, %ebx
	sete	%al
	negl	%eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I8042_STR_IBF,4,2              ## @I8042_STR_IBF
	.comm	_I8042_CTL_TIMEOUT,4,2          ## @I8042_CTL_TIMEOUT
	.no_dead_strip	_i8042_wait_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i8042_wait_write
_i8042_wait_write:                      ; @i8042_wait_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_i8042_read_status
Lloh0:
	adrp	x19, _I8042_STR_IBF@GOTPAGE
Lloh1:
	ldr	x19, [x19, _I8042_STR_IBF@GOTPAGEOFF]
	ldr	w8, [x19]
	and	w9, w8, w0
Lloh2:
	adrp	x21, _I8042_CTL_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _I8042_CTL_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w9, #0
	mov	w20, #0
	ccmp	w8, #1, #8, ne
	b.lt	LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #50
	bl	_udelay
	add	w20, w20, #1
	bl	_i8042_read_status
	ldr	w8, [x19]
	and	w9, w8, w0
	ldr	w8, [x21]
	cmp	w9, #0
	ccmp	w20, w8, #0, ne
	b.lt	LBB0_1
LBB0_2:
	cmp	w20, w8
	csetm	w0, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I8042_STR_IBF,4,2              ; @I8042_STR_IBF
	.comm	_I8042_CTL_TIMEOUT,4,2          ; @I8042_CTL_TIMEOUT
	.no_dead_strip	_i8042_wait_write
.subsections_via_symbols
