	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_alloc_pkt
_hw_alloc_pkt:                          ## @hw_alloc_pkt
	.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	%eax, %eax
	cmpl	$2, 8(%rdi)
	jl	LBB0_4
## %bb.1:
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	leaq	16(%rdi), %rsi
	movq	%r15, %rdi
	callq	_get_tx_pkt
	movq	16(%rbx), %rax
	movl	$1, (%rax)
	incq	32(%rbx)
	movslq	%r12d, %rax
	addq	(%rbx), %rax
	movq	%rax, (%rbx)
	movq	_MAX_TX_HELD_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_3
## %bb.2:
	movq	24(%rbx), %rax
	incq	%rax
	movq	%rax, 32(%rbx)
LBB0_3:
	movl	(%r15), %ecx
	cmpl	%r14d, %ecx
	movl	$1, %eax
	cmovgel	%ecx, %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TX_HELD_SIZE,8,3           ## @MAX_TX_HELD_SIZE
	.no_dead_strip	_hw_alloc_pkt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_alloc_pkt
_hw_alloc_pkt:                          ; @hw_alloc_pkt
	.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
	mov	x20, x0
	ldr	w8, [x20, #8]!
	cmp	w8, #2
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	add	x1, x0, #16
	mov	x0, x20
	bl	_get_tx_pkt
	ldr	x8, [x21, #16]
	mov	w9, #1
	str	w9, [x8]
	ldr	x8, [x21, #32]
	add	x8, x8, #1
	str	x8, [x21, #32]
	ldr	x8, [x21]
	add	x8, x8, w22, sxtw
	str	x8, [x21]
Lloh0:
	adrp	x9, _MAX_TX_HELD_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_TX_HELD_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_4
; %bb.3:
	ldr	x8, [x21, #24]
	add	x8, x8, #1
	str	x8, [x21, #32]
LBB0_4:
	ldr	w8, [x20]
	cmp	w8, w19
	csinc	w0, w8, wzr, ge
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TX_HELD_SIZE,8,3           ; @MAX_TX_HELD_SIZE
	.no_dead_strip	_hw_alloc_pkt
.subsections_via_symbols
