	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efa_vmalloc_buf_to_sg
_efa_vmalloc_buf_to_sg:                 ## @efa_vmalloc_buf_to_sg
	.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	%esi, %r15d
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%esi, %edi
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_sg_init_table
	testl	%r15d, %r15d
	jle	LBB0_7
## %bb.2:
	movl	%r15d, %r15d
	shlq	$2, %r15
	xorl	%ebx, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_vmalloc_to_page
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%rbx), %rdi
	movl	(%r13), %edx
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	callq	_sg_set_page
	movslq	(%r13), %rax
	andq	$-4, %rax
	addq	%rax, %r12
	addq	$4, %rbx
	cmpq	%rbx, %r15
	jne	LBB0_3
	jmp	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	callq	_kfree
LBB0_6:
	xorl	%r14d, %r14d
LBB0_7:
	movq	%r14, %rax
	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_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_efa_vmalloc_buf_to_sg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efa_vmalloc_buf_to_sg
_efa_vmalloc_buf_to_sg:                 ; @efa_vmalloc_buf_to_sg
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x1
	mov	w1, #4
	bl	_kcalloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_sg_init_table
	cmp	w21, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x22, #0
	mov	w8, w21
	lsl	x21, x8, #2
Lloh3:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_vmalloc_to_page
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x0
	add	x0, x19, x22
	ldr	w2, [x23]
	mov	w3, #0
	bl	_sg_set_page
	ldrsw	x8, [x23]
	and	x8, x8, #0xfffffffffffffffc
	add	x20, x20, x8
	add	x22, x22, #4
	cmp	x21, x22
	b.ne	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	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_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_efa_vmalloc_buf_to_sg
.subsections_via_symbols
