	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_pin_iovec_pages            ## -- Begin function dma_pin_iovec_pages
	.p2align	4, 0x90
_dma_pin_iovec_pages:                   ## @dma_pin_iovec_pages
	.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	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_get_fs
	movq	_KERNEL_DS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_segment_eq
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	movl	$16, %r13d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r15d, %r15
	addq	8(%rbx), %r15
	movq	%rbx, %rdi
	callq	_num_pages_spanned
	addl	%eax, %r12d
	incq	%r14
	movslq	%r15d, %rax
	addq	$16, %rbx
	addl	$24, %r13d
	cmpq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	jb	LBB0_2
## %bb.3:
	leal	(%r13,%r12,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%rax, %r12
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$0, (%r12)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	movq	_VERIFY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_access_ok
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movl	%r14d, %eax
	leaq	(%rax,%rax,2), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %r13
	movl	%r14d, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$1, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_num_pages_spanned
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, (%r14,%r15)
	movq	(%rbx), %rax
	movq	%rax, 16(%r14,%r15)
	movq	%r13, 8(%r14,%r15)
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	callq	_down_read
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rsi
	movq	(%rbx), %rdx
	movl	(%r14,%r15), %ecx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	8(%r14,%r15)
	callq	_get_user_pages
	addq	$16, %rsp
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	callq	_up_read
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	cmpl	(%r14,%r15), %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, (%r12)
	cmpq	%rbx, -80(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movslq	-60(%rbp), %rax                 ## 4-byte Folded Reload
	leaq	(%r13,%rax,8), %r13
	movq	8(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	16(%rcx), %r14
	movq	16(%rcx), %rsi
	movq	24(%rcx), %rdx
	movq	_VERIFY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_access_ok
	incq	%rbx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	addq	$24, %r15
	movq	%r14, %rbx
	testl	%eax, %eax
	jne	LBB0_6
LBB0_9:
	movq	%r12, %rdi
	callq	_dma_unpin_iovec_pages
LBB0_10:
	xorl	%r12d, %r12d
LBB0_11:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KERNEL_DS,4,2                  ## @KERNEL_DS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_VERIFY_WRITE,4,2               ## @VERIFY_WRITE
	.comm	_current,8,3                    ## @current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_pin_iovec_pages            ; -- Begin function dma_pin_iovec_pages
	.p2align	2
_dma_pin_iovec_pages:                   ; @dma_pin_iovec_pages
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	bl	_get_fs
Lloh0:
	adrp	x8, _KERNEL_DS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KERNEL_DS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_segment_eq
	cbnz	x0, LBB0_10
; %bb.1:
	mov	x22, #0
	mov	x24, #0
	mov	w23, #0
	mov	w25, #16
	mov	x21, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	add	x24, x8, w24, sxtw
	mov	x0, x21
	bl	_num_pages_spanned
	add	w23, w0, w23
	add	x22, x22, #1
	add	x21, x21, #16
	add	w25, w25, #24
	cmp	x20, w24, sxtw
	b.hi	LBB0_2
; %bb.3:
	add	w0, w25, w23, lsl #3
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	mov	x20, x0
	cbz	x0, LBB0_11
; %bb.4:
	ldr	x23, [x20, #8]
	str	wzr, [x20]
Lloh6:
	adrp	x8, _VERIFY_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VERIFY_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x1, x2, [x19]
	bl	_access_ok
	cbz	w0, LBB0_9
; %bb.5:
	mov	x24, #0
	and	x25, x22, #0xffffffff
	mov	w8, #24
	madd	x26, x25, x8, x23
	mov	w27, #1
Lloh9:
	adrp	x28, _current@GOTPAGE
Lloh10:
	ldr	x28, [x28, _current@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_num_pages_spanned
	mov	x21, x0
	add	x23, x23, x24
	str	w0, [x23]
	ldr	x8, [x19]
	stp	x26, x8, [x23, #8]
	ldr	x8, [x28]
	ldr	x0, [x8]
	bl	_down_read
	ldr	x0, [x28]
	ldr	x1, [x0]
	ldr	x2, [x19]
	ldr	w3, [x23]
	ldr	x6, [x23, #8]
	mov	w4, #1
	mov	w5, #0
	mov	x7, #0
	bl	_get_user_pages
	mov	x22, x0
	ldr	x8, [x28]
	ldr	x0, [x8]
	bl	_up_read
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	str	w27, [x20]
	cmp	x25, x27
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x26, x26, w21, sxtw #3
	ldr	x23, [x20, #8]
	ldp	x1, x2, [x19, #16]!
Lloh11:
	adrp	x8, _VERIFY_WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VERIFY_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_access_ok
	add	x27, x27, #1
	add	x24, x24, #24
	cbnz	w0, LBB0_6
LBB0_9:
	mov	x0, x20
	bl	_dma_unpin_iovec_pages
LBB0_10:
	mov	x20, #0
LBB0_11:
	mov	x0, x20
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_KERNEL_DS,4,2                  ; @KERNEL_DS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_VERIFY_WRITE,4,2               ; @VERIFY_WRITE
	.comm	_current,8,3                    ; @current
.subsections_via_symbols
