	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_user_sdma_free_pkt_frag
_qib_user_sdma_free_pkt_frag:           ## @qib_user_sdma_free_pkt_frag
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	(%rdx), %rdx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	shlq	$4, %rbx
	cmpq	$0, 32(%rdx,%rbx)
	je	LBB0_7
## %bb.1:
	cmpq	$0, 24(%rdx,%rbx)
	je	LBB0_3
## %bb.2:
	movq	8(%rdx,%rbx), %rsi
	movl	16(%rdx,%rbx), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_unmap_page
	movq	(%r14), %rdx
LBB0_3:
	cmpq	$0, (%rdx,%rbx)
	je	LBB0_5
## %bb.4:
	movq	32(%rdx,%rbx), %rdi
	callq	_kunmap
	movq	(%r14), %rdx
LBB0_5:
	cmpq	$0, 40(%rdx,%rbx)
	movq	32(%rdx,%rbx), %rdi
	je	LBB0_6
## %bb.14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_put_user_page                  ## TAILCALL
LBB0_7:
	movq	(%rdx,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	cmpq	$0, 24(%rdx,%rbx)
	movq	8(%rdx,%rbx), %r8
	je	LBB0_10
## %bb.9:
	shlq	$4, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	movl	16(%rdx,%rbx), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r8, %rsi
	callq	_dma_unmap_single
	movq	(%r14), %rax
	movq	(%rax,%rbx), %rdi
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	___free_page                    ## TAILCALL
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	testq	%r8, %r8
	je	LBB0_11
## %bb.15:
	movl	(%rsi), %edi
	movq	%rax, %rsi
	movq	%r8, %rdx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dma_pool_free                  ## TAILCALL
LBB0_11:
	movq	%rax, %rdi
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_qib_user_sdma_free_pkt_frag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_user_sdma_free_pkt_frag
_qib_user_sdma_free_pkt_frag:           ; @qib_user_sdma_free_pkt_frag
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x19, x2
	ldr	x10, [x2]
	sxtw	x20, w3
	mov	w8, #48
	smaddl	x8, w3, w8, x10
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_7
; %bb.1:
	mov	w8, #48
	madd	x8, x20, x8, x10
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_3
; %bb.2:
	mov	w8, #48
	madd	x8, x20, x8, x10
	ldr	x1, [x8, #8]
	ldr	w2, [x8, #16]
Lloh0:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	bl	_dma_unmap_page
	ldr	x10, [x19]
LBB0_3:
	mov	w8, #48
	mul	x8, x20, x8
	ldr	x8, [x10, x8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	w8, #48
	madd	x8, x20, x8, x10
	ldr	x0, [x8, #32]
	bl	_kunmap
	ldr	x10, [x19]
LBB0_5:
	mov	w8, #48
	madd	x8, x20, x8, x10
	ldp	x0, x9, [x8, #32]
	cbz	x9, LBB0_11
; %bb.6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_put_user_page
LBB0_7:
	mov	w8, #48
	mul	x8, x20, x8
	ldr	x8, [x10, x8]
	cbz	x8, LBB0_12
; %bb.8:
	mov	w9, #48
	madd	x9, x20, x9, x10
	ldr	x11, [x9, #24]
	ldr	x9, [x9, #8]
	cbz	x11, LBB0_13
; %bb.9:
	add	x8, x20, x20, lsl #1
	lsl	x20, x8, #4
	add	x8, x10, x20
	ldr	w2, [x8, #16]
Lloh3:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x1, x9
	bl	_dma_unmap_single
	ldr	x8, [x19]
	ldr	x0, [x8, x20]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfree
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	___free_page
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
	cbz	x9, LBB0_15
; %bb.14:
	ldr	w0, [x1]
	mov	x1, x8
	mov	x2, x9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dma_pool_free
LBB0_15:
	mov	x0, x8
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_qib_user_sdma_free_pkt_frag
.subsections_via_symbols
