	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pop_tx_status
_pop_tx_status:                         ## @pop_tx_status
	.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	%rdi, %r15
	movl	(%rdi), %r12d
	movl	$33, %r13d
	movq	_TX_STATUS@GOTPCREL(%rip), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r14), %rsi
	addq	%r12, %rsi
	xorl	%edi, %edi
	callq	_outb
	decl	%r13d
	cmpl	$1, %r13d
	jbe	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	addq	%r12, %rdi
	callq	_inb
	movl	%eax, %ebx
	testb	$-124, %bl
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	$48, %bl
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_TxReset@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_tc589_wait_for_completion
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	testb	$56, %bl
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%r15), %edx
	movl	$1, %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %ecx
	callq	_DEBUG
	movq	_TxEnable@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EL3_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outw
	incl	4(%r15)
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_STATUS,8,3                  ## @TX_STATUS
	.comm	_TxReset,4,2                    ## @TxReset
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: transmit error: status 0x%02x\n"

	.comm	_TxEnable,4,2                   ## @TxEnable
	.comm	_EL3_CMD,8,3                    ## @EL3_CMD
	.no_dead_strip	_pop_tx_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pop_tx_status
_pop_tx_status:                         ; @pop_tx_status
	.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	x19, x0
	ldr	w22, [x0]
	mov	w23, #33
Lloh0:
	adrp	x24, _TX_STATUS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TX_STATUS@GOTPAGEOFF]
	mov	w25, #132
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
Lloh4:
	adrp	x26, _TxEnable@GOTPAGE
Lloh5:
	ldr	x26, [x26, _TxEnable@GOTPAGEOFF]
Lloh6:
	adrp	x27, _EL3_CMD@GOTPAGE
Lloh7:
	ldr	x27, [x27, _EL3_CMD@GOTPAGEOFF]
Lloh8:
	adrp	x28, _TxReset@GOTPAGE
Lloh9:
	ldr	x28, [x28, _TxReset@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
	add	x1, x8, x22
	mov	w0, #0
	bl	_outb
	sub	w23, w23, #1
	cmp	w23, #1
	b.ls	LBB0_7
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x0, x8, x22
	bl	_inb
	tst	w0, w25
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	tst	w0, #0x30
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x28]
	mov	x0, x19
	bl	_tc589_wait_for_completion
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	tst	w21, #0x38
	b.eq	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x19, #8]
	mov	w0, #1
	mov	x1, x20
	mov	x3, x21
	bl	_DEBUG
	ldr	w0, [x26]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outw
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	b	LBB0_1
LBB0_7:
	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
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_STATUS,8,3                  ; @TX_STATUS
	.comm	_TxReset,4,2                    ; @TxReset
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: transmit error: status 0x%02x\n"

	.comm	_TxEnable,4,2                   ; @TxEnable
	.comm	_EL3_CMD,8,3                    ; @EL3_CMD
	.no_dead_strip	_pop_tx_status
.subsections_via_symbols
