	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acquire_packet_buffer
_acquire_packet_buffer:                 ## @acquire_packet_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rdi), %rbx
	movq	(%rax), %rsi
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %r14
	movq	40(%rdi), %r12
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rdi), %rax
	movl	(%rax), %eax
	leal	3(%rax), %r13d
	testl	%eax, %eax
	cmovnsl	%eax, %r13d
	sarl	$2, %r13d
	movslq	%r13d, %r15
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_pr_debug
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %rax
	notq	%rax
	addq	%r8, %rax
	addq	%r15, %rax
	movq	%rax, %rcx
	orq	%r15, %rcx
	shrq	$32, %rcx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%r15
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rcx, %rdx
	jb	LBB0_13
## %bb.4:
	leaq	(%rbx,%rcx), %rax
	cmpq	%r15, %rax
	jb	LBB0_12
## %bb.5:
	cmpq	%rcx, %r8
	ja	LBB0_6
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r13d
	movl	%edx, %ebx
	incq	%r14
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	testq	%rbx, %rbx
	je	LBB0_11
LBB0_7:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%rdi), %eax
	movl	%eax, (%rsi,%rbx,4)
	incq	%rbx
	movq	%rbx, %rax
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r15
	movq	%rdx, %rbx
	incq	%r14
	testq	%rbx, %rbx
	jne	LBB0_7
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rsi,%rbx,4), %rax
	movq	%rax, (%rdx)
	addq	%rcx, %rbx
	movq	%rbx, 8(%rdi)
	addq	%rcx, %r14
	movq	%r14, 24(%rdi)
	xorl	%eax, %eax
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rptr: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"wptr: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"queue_address 0x%p\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_acquire_packet_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acquire_packet_buffer
_acquire_packet_buffer:                 ; @acquire_packet_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldp	x8, x24, [x0]
	ldr	x26, [x8]
	ldp	x8, x23, [x0, #32]
	ldr	x22, [x0, #24]
	ldr	w8, [x8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x25, x8, #2, #30
	str	x26, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	str	x24, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	str	x23, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	mvn	x8, x24
	add	x8, x26, x8
	add	x8, x8, x25
	udiv	x9, x8, x25
	msub	x8, x9, x25, x8
	cmp	x8, x21
	b.lo	LBB0_6
; %bb.1:
	add	x8, x24, x21
	cmp	x8, x25
	b.lo	LBB0_5
; %bb.2:
	cmp	x26, x21
	b.ls	LBB0_6
; %bb.3:
	cbz	x24, LBB0_5
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, #16]
	str	w8, [x23, x24, lsl #2]
	add	x8, x24, #1
	udiv	x9, x8, x25
	msub	x24, x9, x25, x8
	add	x22, x22, #1
	cbnz	x24, LBB0_4
LBB0_5:
	mov	w0, #0
	add	x8, x23, x24, lsl #2
	str	x8, [x19]
	add	x8, x24, x21
	str	x8, [x20, #8]
	add	x8, x22, x21
	str	x8, [x20, #24]
	b	LBB0_7
LBB0_6:
	str	xzr, [x19]
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rptr: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"wptr: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"queue_address 0x%p\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_acquire_packet_buffer
.subsections_via_symbols
