	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i8042_flush
_i8042_flush:                           ## @i8042_flush
	.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_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_i8042_read_status
	movl	%eax, %r13d
	movq	_I8042_STR_OBF@GOTPCREL(%rip), %rax
	testb	%r13b, (%rax)
	je	LBB0_7
## %bb.1:
	movl	$-1, %ebx
	leaq	L_.str.2(%rip), %r12
	leaq	L_.str(%rip), %r14
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%al, %esi
	movq	%r14, %rdi
	callq	_dbg
	xorl	%eax, %eax
	callq	_i8042_read_status
	movl	%eax, %r13d
	movq	_I8042_STR_OBF@GOTPCREL(%rip), %rax
	testb	%r13b, (%rax)
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movq	_I8042_BUFFER_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$50, %edi
	callq	_udelay
	xorl	%eax, %eax
	callq	_i8042_read_data
	movq	%r12, %rdx
	movq	_I8042_STR_AUXDATA@GOTPCREL(%rip), %rcx
	andb	(%rcx), %r13b
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_5
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movq	_i8042_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_i8042_lock,4,2                 ## @i8042_lock
	.comm	_I8042_STR_OBF,1,0              ## @I8042_STR_OBF
	.comm	_I8042_BUFFER_SIZE,4,2          ## @I8042_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%02x <- i8042 (flush, %s)\n"

	.comm	_I8042_STR_AUXDATA,1,0          ## @I8042_STR_AUXDATA
L_.str.1:                               ## @.str.1
	.asciz	"aux"

L_.str.2:                               ## @.str.2
	.asciz	"kbd"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_i8042_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i8042_flush
_i8042_flush:                           ; @i8042_flush
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x0, _i8042_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _i8042_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	bl	_i8042_read_status
Lloh2:
	adrp	x21, _I8042_STR_OBF@GOTPAGE
Lloh3:
	ldr	x21, [x21, _I8042_STR_OBF@GOTPAGEOFF]
	ldrb	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w22, #-1
Lloh4:
	adrp	x23, _I8042_BUFFER_SIZE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _I8042_BUFFER_SIZE@GOTPAGEOFF]
Lloh6:
	adrp	x24, _I8042_STR_AUXDATA@GOTPAGE
Lloh7:
	ldr	x24, [x24, _I8042_STR_AUXDATA@GOTPAGEOFF]
Lloh8:
	adrp	x25, l_.str.1@PAGE
Lloh9:
	add	x25, x25, l_.str.1@PAGEOFF
Lloh10:
	adrp	x26, l_.str.2@PAGE
Lloh11:
	add	x26, x26, l_.str.2@PAGEOFF
Lloh12:
	adrp	x20, l_.str@PAGE
Lloh13:
	add	x20, x20, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	add	w22, w22, #1
	cmp	w22, w8
	b.ge	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #50
	bl	_udelay
	bl	_i8042_read_data
	mov	x1, x0
	ldrb	w8, [x24]
	tst	w8, w19
	csel	x2, x26, x25, eq
	mov	x0, x20
	bl	_dbg
	bl	_i8042_read_status
	mov	x19, x0
	ldrb	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_2
LBB0_4:
	mov	w19, #0
	b	LBB0_6
LBB0_5:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_6:
Lloh17:
	adrp	x0, _i8042_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _i8042_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_i8042_lock,4,2                 ; @i8042_lock
	.comm	_I8042_STR_OBF,1,0              ; @I8042_STR_OBF
	.comm	_I8042_BUFFER_SIZE,4,2          ; @I8042_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%02x <- i8042 (flush, %s)\n"

	.comm	_I8042_STR_AUXDATA,1,0          ; @I8042_STR_AUXDATA
l_.str.1:                               ; @.str.1
	.asciz	"aux"

l_.str.2:                               ; @.str.2
	.asciz	"kbd"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_i8042_flush
.subsections_via_symbols
