	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_next_tx_holding_buffer
_load_next_tx_holding_buffer:           ## @load_next_tx_holding_buffer
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpq	$0, 32(%rdi)
	je	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	40(%rdi), %r12
	callq	_num_free_tx_dma_buffers
	movl	%eax, %esi
	movl	(%r12,%r15,8), %ecx
	movq	_DMABUFFERSIZE@GOTPCREL(%rip), %rdi
	movl	%ecx, %eax
	cltd
	idivl	(%rdi)
	cmpl	$1, %edx
	sbbl	$-1, %eax
	cmpl	%esi, %eax
	jg	LBB0_3
## %bb.2:
	movl	%ecx, 8(%rbx)
	movl	4(%r12,%r15,8), %esi
	movq	%rbx, %rdi
	movl	%ecx, %edx
	callq	_mgsl_load_tx_dma_buffer
	decq	32(%rbx)
	movq	(%rbx), %rax
	incq	%rax
	xorl	%ecx, %ecx
	cmpq	16(%rbx), %rax
	cmovbq	%rax, %rcx
	movq	%rcx, (%rbx)
	addq	$24, %rbx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_msecs_to_jiffies
	addq	%rax, %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mod_timer
	movl	$1, %r14d
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMABUFFERSIZE,4,2              ## @DMABUFFERSIZE
	.comm	_jiffies,8,3                    ## @jiffies
	.no_dead_strip	_load_next_tx_holding_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_next_tx_holding_buffer
_load_next_tx_holding_buffer:           ; @load_next_tx_holding_buffer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #40]
	ldr	x21, [x0]
	bl	_num_free_tx_dma_buffers
	lsl	x8, x21, #3
	ldr	w2, [x20, x8]
Lloh0:
	adrp	x8, _DMABUFFERSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMABUFFERSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sdiv	w9, w2, w8
	msub	w8, w9, w8, w2
	cmp	w8, #0
	cinc	w8, w9, ne
	cmp	w8, w0
	b.le	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	str	w2, [x19, #8]
	add	x8, x20, x21, lsl #3
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_mgsl_load_tx_dma_buffer
	ldr	x8, [x19, #32]
	sub	x8, x8, #1
	str	x8, [x19, #32]
	ldr	x8, [x19]
	add	x9, x8, #1
	ldr	x10, [x19, #16]
	cmp	x9, x10
	csinc	x8, xzr, x8, hs
	str	x8, [x19], #24
Lloh3:
	adrp	x8, _jiffies@GOTPAGE
Lloh4:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh5:
	ldr	x20, [x8]
	mov	w0, #5000
	bl	_msecs_to_jiffies
	add	x1, x0, x20
	mov	x0, x19
	bl	_mod_timer
	mov	w0, #1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMABUFFERSIZE,4,2              ; @DMABUFFERSIZE
	.comm	_jiffies,8,3                    ; @jiffies
	.no_dead_strip	_load_next_tx_holding_buffer
.subsections_via_symbols
