	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdc_rx_list_sg_add
_pdc_rx_list_sg_add:                    ## @pdc_rx_list_sg_add
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_sg_nents
	movq	%rax, %r12
	movq	(%r15), %r14
	movl	36(%r15), %edi
	movl	8(%r15), %esi
	movq	%r14, %rdx
	callq	_NRXDACTIVE
	subq	%rax, %r14
	xorl	%edi, %edi
	cmpq	%r14, %r12
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
## %bb.12:
	incl	32(%r15)
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_1:
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	%r15, %rdx
	movq	%rdi, %r15
	callq	_pdc_build_rxd
	incq	%r12
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_sg_next
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_10
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	12(%r15), %eax
	decl	%eax
	xorl	%edi, %edi
	cmpl	%eax, 8(%r15)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_D64_CTRL1_EOT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_sg_dma_len
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_sg_dma_address
	movl	%eax, %r13d
	movq	_PDC_DMA_BUF_MAX@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	%r14, %rcx
	cmpq	%rdx, %r15
	jg	LBB0_6
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	incq	%r12
	addl	%r15d, %r13d
	movq	_PDC_DMA_BUF_MAX@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	%r14, %r15
	cmpq	%rdx, %r14
	jle	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_pdc_build_rxd
	movq	%r15, %r14
	movq	(%rbx), %r15
	subq	%r15, %r14
	movl	12(%r12), %eax
	decl	%eax
	xorl	%edi, %edi
	cmpl	%eax, 8(%r12)
	sete	%dil
	callq	_unlikely
	movq	%rax, %rcx
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	_D64_CTRL1_EOT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	jmp	LBB0_8
LBB0_10:
	movq	16(%r15), %rax
	movq	24(%r15), %rcx
	addl	%r12d, (%rcx,%rax,4)
	movq	_PDC_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_D64_CTRL1_EOT,8,3              ## @D64_CTRL1_EOT
	.comm	_PDC_DMA_BUF_MAX,8,3            ## @PDC_DMA_BUF_MAX
	.comm	_PDC_SUCCESS,4,2                ## @PDC_SUCCESS
	.no_dead_strip	_pdc_rx_list_sg_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pdc_rx_list_sg_add
_pdc_rx_list_sg_add:                    ; @pdc_rx_list_sg_add
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_sg_nents
	mov	x21, x0
	ldr	x22, [x19]
	ldr	w0, [x19, #36]
	ldr	w1, [x19, #8]
	mov	x2, x22
	bl	_NRXDACTIVE
	sub	x8, x22, x0
	cmp	x21, x8
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_2:
	cbz	x20, LBB0_8
; %bb.3:
	mov	x24, #0
Lloh3:
	adrp	x25, _D64_CTRL1_EOT@GOTPAGE
Lloh4:
	ldr	x25, [x25, _D64_CTRL1_EOT@GOTPAGEOFF]
Lloh5:
	adrp	x26, _PDC_DMA_BUF_MAX@GOTPAGE
Lloh6:
	ldr	x26, [x26, _PDC_DMA_BUF_MAX@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	bl	_pdc_build_rxd
	add	x24, x24, #1
	mov	x0, x20
	bl	_sg_next
	mov	x20, x0
	cbz	x0, LBB0_9
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldp	w8, w9, [x19, #8]
	sub	w9, w9, #1
	cmp	w8, w9
	cset	w0, eq
	bl	_unlikely
	ldr	x8, [x25]
	cmp	x0, #0
	csel	x23, xzr, x8, eq
	mov	x0, x20
	bl	_sg_dma_len
	mov	x21, x0
	mov	x0, x20
	bl	_sg_dma_address
	mov	x22, x0
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x2, [x26]
	mov	x0, x19
	cmp	x21, x2
	b.le	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x1, x22
	mov	x3, x23
	bl	_pdc_build_rxd
	add	x24, x24, #1
	ldr	x8, [x26]
	sub	x21, x21, x8
	add	w22, w22, w8
	ldp	w8, w9, [x19, #8]
	sub	w9, w9, #1
	cmp	w8, w9
	cset	w0, eq
	bl	_unlikely
	ldr	x8, [x25]
	cmp	x0, #0
	csel	x23, xzr, x8, eq
	b	LBB0_6
LBB0_8:
	mov	w24, #0
LBB0_9:
	ldp	x9, x8, [x19, #16]
	lsl	x9, x9, #2
	ldr	w10, [x8, x9]
	add	w10, w10, w24
	str	w10, [x8, x9]
Lloh7:
	adrp	x8, _PDC_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PDC_SUCCESS@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_D64_CTRL1_EOT,8,3              ; @D64_CTRL1_EOT
	.comm	_PDC_DMA_BUF_MAX,8,3            ; @PDC_DMA_BUF_MAX
	.comm	_PDC_SUCCESS,4,2                ; @PDC_SUCCESS
	.no_dead_strip	_pdc_rx_list_sg_add
.subsections_via_symbols
