	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function falcon_drain_tx_fifo
_falcon_drain_tx_fifo:                  ## @falcon_drain_tx_fifo
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_ef4_nic_rev
	movq	_EF4_REV_FALCON_B0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_4
## %bb.1:
	movq	(%rbx), %rax
	movq	_LOOPBACK_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movq	_FR_AB_MAC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-12(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ef4_reado
	movl	-12(%rbp), %edi
	movq	_FRF_BB_TXFIFO_DRAIN_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_EF4_OWORD_FIELD
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_falcon_reset_macs
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EF4_REV_FALCON_B0,8,3          ## @EF4_REV_FALCON_B0
	.comm	_LOOPBACK_NONE,8,3              ## @LOOPBACK_NONE
	.comm	_FR_AB_MAC_CTRL,4,2             ## @FR_AB_MAC_CTRL
	.comm	_FRF_BB_TXFIFO_DRAIN_EN,4,2     ## @FRF_BB_TXFIFO_DRAIN_EN
	.no_dead_strip	_falcon_drain_tx_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function falcon_drain_tx_fifo
_falcon_drain_tx_fifo:                  ; @falcon_drain_tx_fifo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_ef4_nic_rev
Lloh0:
	adrp	x8, _EF4_REV_FALCON_B0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EF4_REV_FALCON_B0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lt	LBB0_4
; %bb.1:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _LOOPBACK_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LOOPBACK_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _FR_AB_MAC_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FR_AB_MAC_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ef4_reado
	ldr	w0, [sp, #12]
Lloh9:
	adrp	x8, _FRF_BB_TXFIFO_DRAIN_EN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FRF_BB_TXFIFO_DRAIN_EN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_EF4_OWORD_FIELD
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_falcon_reset_macs
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EF4_REV_FALCON_B0,8,3          ; @EF4_REV_FALCON_B0
	.comm	_LOOPBACK_NONE,8,3              ; @LOOPBACK_NONE
	.comm	_FR_AB_MAC_CTRL,4,2             ; @FR_AB_MAC_CTRL
	.comm	_FRF_BB_TXFIFO_DRAIN_EN,4,2     ; @FRF_BB_TXFIFO_DRAIN_EN
	.no_dead_strip	_falcon_drain_tx_fifo
.subsections_via_symbols
