	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pkt_alloc_packet_data
_pkt_alloc_packet_data:                 ## @pkt_alloc_packet_data
	.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
	movl	%edi, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %r13
	movl	%r14d, (%rax)
	movl	%r14d, %edi
	callq	_pkt_bio_alloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	_FRAMES_PER_PAGE@GOTPCREL(%rip), %rcx
	movl	%r14d, %eax
	cltd
	idivl	(%rcx)
	testl	%eax, %eax
	jle	LBB0_14
## %bb.3:
	xorl	%ebx, %ebx
	movq	___GFP_ZERO@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	orl	(%r12), %edi
	callq	_alloc_page
	movq	16(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movl	%r14d, %eax
	cltd
	movq	_FRAMES_PER_PAGE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_14:
	movq	%r13, %rdi
	addq	$32, %rdi
	callq	_spin_lock_init
	testl	%r14d, %r14d
	jle	LBB0_22
## %bb.15:
	movl	%r14d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_pkt_bio_alloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.21:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	24(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_16
	jmp	LBB0_22
LBB0_17:
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_6
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	callq	_bio_put
	jmp	LBB0_20
LBB0_6:
	movq	_FRAMES_PER_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	testl	%eax, %eax
	jle	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	callq	___free_page
	movq	_FRAMES_PER_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_10
LBB0_11:
	movq	8(%r13), %rdi
	callq	_bio_put
LBB0_12:
	movq	%r13, %rdi
	callq	_kfree
LBB0_13:
	xorl	%r13d, %r13d
LBB0_22:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_FRAMES_PER_PAGE,4,2            ## @FRAMES_PER_PAGE
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.no_dead_strip	_pkt_alloc_packet_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pkt_alloc_packet_data
_pkt_alloc_packet_data:                 ; @pkt_alloc_packet_data
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #40
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_21
; %bb.1:
	str	w20, [x19]
	mov	x0, x20
	bl	_pkt_bio_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_20
; %bb.2:
Lloh2:
	adrp	x21, _FRAMES_PER_PAGE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FRAMES_PER_PAGE@GOTPAGEOFF]
	ldr	w8, [x21]
	sdiv	w8, w20, w8
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x23, #0
Lloh4:
	adrp	x24, ___GFP_ZERO@GOTPAGE
Lloh5:
	ldr	x24, [x24, ___GFP_ZERO@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	ldr	w9, [x24]
	orr	w0, w9, w8
	bl	_alloc_page
	ldr	x8, [x19, #16]
	str	x0, [x8, x23, lsl #3]
	cbz	x0, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	ldr	w8, [x21]
	sdiv	w8, w20, w8
	cmp	x23, w8, sxtw
	b.lt	LBB0_4
LBB0_6:
	add	x0, x19, #32
	bl	_spin_lock_init
	cmp	w20, #1
	b.lt	LBB0_21
; %bb.7:
	mov	x23, #0
	mov	w8, w20
	lsl	x22, x8, #3
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_pkt_bio_alloc
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19, #24]
	str	x0, [x8, x23]
	add	x23, x23, #8
	cmp	x22, x23
	b.ne	LBB0_8
	b	LBB0_21
LBB0_10:
	mov	x23, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x23, x23, #8
	cmp	x22, x23
	b.eq	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x23]
	cbz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_bio_put
	b	LBB0_11
LBB0_14:
	ldr	w8, [x21]
	sdiv	w9, w20, w8
	cmp	w9, #1
	b.lt	LBB0_19
; %bb.15:
	mov	x22, #0
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x22, x22, #1
	sdiv	w9, w20, w8
	cmp	x22, w9, sxtw
	b.ge	LBB0_19
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	x0, [x9, x22, lsl #3]
	cbz	x0, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	bl	___free_page
	ldr	w8, [x21]
	b	LBB0_16
LBB0_19:
	ldr	x0, [x19, #8]
	bl	_bio_put
LBB0_20:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_21:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_FRAMES_PER_PAGE,4,2            ; @FRAMES_PER_PAGE
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.no_dead_strip	_pkt_alloc_packet_data
.subsections_via_symbols
