	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ef4_farch_handle_tx_flush_done
_ef4_farch_handle_tx_flush_done:        ## @ef4_farch_handle_tx_flush_done
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	movq	_FSF_AZ_DRIVER_EV_SUBDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_EF4_QWORD_FIELD
	movq	_EF4_TXQ_TYPES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rbx), %edx
	imull	%ecx, %edx
	cmpl	%edx, %eax
	jge	LBB0_2
## %bb.1:
	cltd
	idivl	%ecx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ef4_get_tx_queue
	movq	%rax, %rbx
	leaq	4(%rax), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_atomic_cmpxchg
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_EF4_CHANNEL_MAGIC_TX_DRAIN
	movl	%r14d, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ef4_farch_magic_event          ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FSF_AZ_DRIVER_EV_SUBDATA,4,2   ## @FSF_AZ_DRIVER_EV_SUBDATA
	.comm	_EF4_TXQ_TYPES,4,2              ## @EF4_TXQ_TYPES
	.no_dead_strip	_ef4_farch_handle_tx_flush_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ef4_farch_handle_tx_flush_done
_ef4_farch_handle_tx_flush_done:        ; @ef4_farch_handle_tx_flush_done
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x1]
Lloh0:
	adrp	x8, _FSF_AZ_DRIVER_EV_SUBDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FSF_AZ_DRIVER_EV_SUBDATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_EF4_QWORD_FIELD
Lloh3:
	adrp	x8, _EF4_TXQ_TYPES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EF4_TXQ_TYPES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19]
	mul	w9, w9, w8
	cmp	w0, w9
	b.ge	LBB0_3
; %bb.1:
	sdiv	w1, w0, w8
	msub	w2, w1, w8, w0
	mov	x0, x19
	bl	_ef4_get_tx_queue
	mov	x19, x0
	add	x0, x0, #4
	mov	w1, #1
	mov	w2, #0
	bl	_atomic_cmpxchg
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w20, [x19]
	mov	x0, x19
	bl	_EF4_CHANNEL_MAGIC_TX_DRAIN
	mov	x1, x0
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ef4_farch_magic_event
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FSF_AZ_DRIVER_EV_SUBDATA,4,2   ; @FSF_AZ_DRIVER_EV_SUBDATA
	.comm	_EF4_TXQ_TYPES,4,2              ; @EF4_TXQ_TYPES
	.no_dead_strip	_ef4_farch_handle_tx_flush_done
.subsections_via_symbols
