	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iiWaitForTxEmptyII
_iiWaitForTxEmptyII:                    ## @iiWaitForTxEmptyII
	.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, %rbx
	movq	_Dl_spinlock@GOTPCREL(%rip), %r15
	movq	_SEL_COMMAND@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_write_lock_irqsave
	movl	(%r13), %edi
	movl	(%rbx), %esi
	callq	_outb
	movq	_SEL_CMD_SH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_outb
	movl	4(%rbx), %edi
	callq	_inb
	movl	%eax, %r12d
	movl	(%r13), %edi
	movl	(%rbx), %esi
	callq	_outb
	movq	_SEL_CMD_UNSH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_outb
	movq	_ST_IN_EMPTY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_I2_UPDATE_FIFO_ROOM
	movq	%r15, %rdi
	callq	_write_unlock_irqrestore
	movq	_I2EE_GOOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_I2_COMPLETE
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_write_unlock_irqrestore
	subl	$1, %r14d
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_iiDelay
	jmp	LBB0_1
LBB0_5:
	movq	_I2EE_TXE_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %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	_SEL_COMMAND,4,2                ## @SEL_COMMAND
	.comm	_SEL_CMD_SH,4,2                 ## @SEL_CMD_SH
	.comm	_SEL_CMD_UNSH,4,2               ## @SEL_CMD_UNSH
	.comm	_ST_IN_EMPTY,4,2                ## @ST_IN_EMPTY
	.comm	_I2EE_GOOD,4,2                  ## @I2EE_GOOD
	.comm	_I2EE_TXE_TIME,4,2              ## @I2EE_TXE_TIME
	.no_dead_strip	_iiWaitForTxEmptyII
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iiWaitForTxEmptyII
_iiWaitForTxEmptyII:                    ; @iiWaitForTxEmptyII
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _Dl_spinlock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Dl_spinlock@GOTPAGEOFF]
Lloh2:
	adrp	x23, _SEL_COMMAND@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SEL_COMMAND@GOTPAGEOFF]
Lloh4:
	adrp	x24, _SEL_CMD_SH@GOTPAGE
Lloh5:
	ldr	x24, [x24, _SEL_CMD_SH@GOTPAGEOFF]
Lloh6:
	adrp	x25, _SEL_CMD_UNSH@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SEL_CMD_UNSH@GOTPAGEOFF]
Lloh8:
	adrp	x26, _ST_IN_EMPTY@GOTPAGE
Lloh9:
	ldr	x26, [x26, _ST_IN_EMPTY@GOTPAGEOFF]
Lloh10:
	adrp	x27, _I2EE_GOOD@GOTPAGE
Lloh11:
	ldr	x27, [x27, _I2EE_GOOD@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_write_lock_irqsave
	ldr	w0, [x23]
	ldr	w1, [x19]
	bl	_outb
	ldr	w0, [x24]
	ldr	w1, [x19]
	bl	_outb
	ldr	w0, [x19, #4]
	bl	_inb
	mov	x22, x0
	ldr	w0, [x23]
	ldr	w1, [x19]
	bl	_outb
	ldr	w0, [x25]
	ldr	w1, [x19]
	bl	_outb
	ldr	w8, [x26]
	tst	w8, w22
	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, [x27]
	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:
Lloh12:
	adrp	x8, _I2EE_TXE_TIME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I2EE_TXE_TIME@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_I2_COMPLETE
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_Dl_spinlock,4,2                ; @Dl_spinlock
	.comm	_SEL_COMMAND,4,2                ; @SEL_COMMAND
	.comm	_SEL_CMD_SH,4,2                 ; @SEL_CMD_SH
	.comm	_SEL_CMD_UNSH,4,2               ; @SEL_CMD_UNSH
	.comm	_ST_IN_EMPTY,4,2                ; @ST_IN_EMPTY
	.comm	_I2EE_GOOD,4,2                  ; @I2EE_GOOD
	.comm	_I2EE_TXE_TIME,4,2              ; @I2EE_TXE_TIME
	.no_dead_strip	_iiWaitForTxEmptyII
.subsections_via_symbols
