	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scif_p2p_setsg
_scif_p2p_setsg:                        ## @scif_p2p_setsg
	.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	%edx, %ebx
	movl	%esi, %r14d
	movl	%edi, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_sg_init_table
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.2:
	movl	%ebx, %r13d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r15
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15), %ecx
	movl	%r12d, %edi
	sarl	%cl, %edi
	callq	_pfn_to_page
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_sg_set_page
	addl	%r14d, %r12d
	addq	$4, %rbx
	decq	%r13
	jne	LBB0_3
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	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	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_scif_p2p_setsg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scif_p2p_setsg
_scif_p2p_setsg:                        ; @scif_p2p_setsg
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #4
	bl	_kcalloc
	mov	x21, x0
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x21
	mov	x1, x22
	bl	_sg_init_table
	cmp	w22, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w23, w22
Lloh3:
	adrp	x24, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PAGE_SHIFT@GOTPAGEOFF]
	mov	x22, x21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	asr	w0, w20, w8
	bl	_pfn_to_page
	mov	x1, x0
	mov	x0, x22
	mov	x2, x19
	mov	w3, #0
	bl	_sg_set_page
	add	w20, w20, w19
	add	x22, x22, #4
	subs	x23, x23, #1
	b.ne	LBB0_3
LBB0_4:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_scif_p2p_setsg
.subsections_via_symbols
