	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iiWaitForTxEmptyIIEX
_iiWaitForTxEmptyIIEX:                  ## @iiWaitForTxEmptyIIEX
	.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, %ebx
	movq	%rdi, %r14
	movq	_Dl_spinlock@GOTPCREL(%rip), %r15
	movq	_STE_OUT_MT@GOTPCREL(%rip), %r12
	movq	_I2EE_GOOD@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_write_lock_irqsave
	movl	(%r14), %edi
	callq	_inb
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_I2_UPDATE_FIFO_ROOM
	movq	%r15, %rdi
	callq	_write_unlock_irqrestore
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_I2_COMPLETE
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_write_unlock_irqrestore
	subl	$1, %ebx
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_iiDelay
	jmp	LBB0_1
LBB0_5:
	movq	_I2EE_TXE_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I2_COMPLETE                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_Dl_spinlock,4,2                ## @Dl_spinlock
	.comm	_STE_OUT_MT,4,2                 ## @STE_OUT_MT
	.comm	_I2EE_GOOD,4,2                  ## @I2EE_GOOD
	.comm	_I2EE_TXE_TIME,4,2              ## @I2EE_TXE_TIME
	.no_dead_strip	_iiWaitForTxEmptyIIEX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iiWaitForTxEmptyIIEX
_iiWaitForTxEmptyIIEX:                  ; @iiWaitForTxEmptyIIEX
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _Dl_spinlock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Dl_spinlock@GOTPAGEOFF]
Lloh2:
	adrp	x22, _STE_OUT_MT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _STE_OUT_MT@GOTPAGEOFF]
Lloh4:
	adrp	x23, _I2EE_GOOD@GOTPAGE
Lloh5:
	ldr	x23, [x23, _I2EE_GOOD@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_write_lock_irqsave
	ldr	w0, [x19]
	bl	_inb
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_I2_UPDATE_FIFO_ROOM
	mov	x0, x21
	bl	_write_unlock_irqrestore
	ldr	w1, [x23]
	mov	x0, x19
	bl	_I2_COMPLETE
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	bl	_write_unlock_irqrestore
	cbz	w20, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w20, w20, #1
	mov	x0, x19
	mov	w1, #1
	bl	_iiDelay
	b	LBB0_1
LBB0_5:
Lloh6:
	adrp	x8, _I2EE_TXE_TIME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2EE_TXE_TIME@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	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	_I2_COMPLETE
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_Dl_spinlock,4,2                ; @Dl_spinlock
	.comm	_STE_OUT_MT,4,2                 ; @STE_OUT_MT
	.comm	_I2EE_GOOD,4,2                  ; @I2EE_GOOD
	.comm	_I2EE_TXE_TIME,4,2              ; @I2EE_TXE_TIME
	.no_dead_strip	_iiWaitForTxEmptyIIEX
.subsections_via_symbols
