	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iommu_dma_get_sgtable
_iommu_dma_get_sgtable:                 ## @iommu_dma_get_sgtable
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	_CONFIG_DMA_REMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_is_vmalloc_addr
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	callq	_dma_common_find_pages
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_PAGE_ALIGN
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movq	%r14, %r8
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sg_alloc_table_from_pages      ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	callq	_virt_to_page
	jmp	LBB0_6
LBB0_3:
	movq	%rbx, %rdi
	callq	_vmalloc_to_page
LBB0_6:
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_sg_alloc_table
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	(%r15), %r15d
	movq	%r14, %rdi
	callq	_PAGE_ALIGN
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_sg_set_page
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_DMA_REMAP,4,2           ## @CONFIG_DMA_REMAP
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_iommu_dma_get_sgtable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iommu_dma_get_sgtable
_iommu_dma_get_sgtable:                 ; @iommu_dma_get_sgtable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x4
	mov	x21, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _CONFIG_DMA_REMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_DMA_REMAP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x21
	bl	_is_vmalloc_addr
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x21
	bl	_dma_common_find_pages
	cbz	x0, LBB0_5
; %bb.3:
	mov	x22, x0
	mov	x0, x19
	bl	_PAGE_ALIGN
Lloh3:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	asr	w2, w0, w8
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	mov	x4, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_sg_alloc_table_from_pages
LBB0_4:
	mov	x0, x21
	bl	_virt_to_page
	b	LBB0_6
LBB0_5:
	mov	x0, x21
	bl	_vmalloc_to_page
LBB0_6:
	mov	x21, x0
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #1
	bl	_sg_alloc_table
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	w20, [x20]
	mov	x0, x19
	bl	_PAGE_ALIGN
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	bl	_sg_set_page
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_DMA_REMAP,4,2           ; @CONFIG_DMA_REMAP
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_iommu_dma_get_sgtable
.subsections_via_symbols
