	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sec_map_and_split_sg
_sec_map_and_split_sg:                  ## @sec_map_and_split_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %ebx
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	16(%rbp), %rdi
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rsi
	movl	%r9d, %edx
	callq	_dma_map_sg
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%r13d, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edx
	movl	%r13d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.6:
	movq	(%r15), %r9
	movl	(%rbx), %r10d
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	pushq	%r10
	pushq	%rax
	callq	_sg_split
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_9
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_kfree
LBB0_9:
	negl	%r15d
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	16(%rbp), %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dma_unmap_sg
LBB0_10:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sec_map_and_split_sg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sec_map_and_split_sg
_sec_map_and_split_sg:                  ; @sec_map_and_split_sg
	.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, x6
	mov	x19, x5
	mov	x23, x4
	mov	x22, x3
	mov	x25, x2
	mov	x24, x1
	mov	x21, x0
Lloh0:
	adrp	x27, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh1:
	ldr	x27, [x27, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w3, [x27]
	mov	x0, x6
	mov	x1, x21
	mov	x2, x5
	bl	_dma_map_sg
	cbz	w0, LBB0_5
; %bb.1:
	mov	x26, x0
Lloh2:
	adrp	x28, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x28, [x28, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x28]
	mov	x0, x25
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x22]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w2, [x28]
	mov	x0, x25
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x23]
	cbz	x0, LBB0_7
; %bb.3:
	mov	x6, x0
	ldr	x5, [x22]
	ldr	w7, [x28]
	mov	x0, x21
	mov	x1, x26
	mov	w2, #0
	mov	x3, x25
	mov	x4, x24
	bl	_sg_split
	cbz	w0, LBB0_11
; %bb.4:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w24, [x8]
	ldr	x0, [x23]
	bl	_kfree
	b	LBB0_8
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_6:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w24, [x8]
	b	LBB0_9
LBB0_7:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w24, [x8]
LBB0_8:
	ldr	x0, [x22]
	bl	_kfree
LBB0_9:
	neg	w22, w24
	ldr	w3, [x27]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_dma_unmap_sg
LBB0_10:
	mov	x0, x22
	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
LBB0_11:
	mov	w22, #0
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sec_map_and_split_sg
.subsections_via_symbols
