	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_coherent
_alloc_coherent:                        ## @alloc_coherent
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_get_domain
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PTR_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_get_order
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_alloc_pages
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_page_to_phys
	movl	%eax, (%r14)
	movq	%rbx, %rdi
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_page_address                   ## TAILCALL
LBB0_2:
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
LBB0_13:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	callq	_to_dma_ops_domain
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_PAGE_ALIGN
	movq	%rax, %rdi
	movq	___GFP_DMA@GOTPCREL(%rip), %rax
	movq	___GFP_HIGHMEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movq	___GFP_DMA32@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	notl	%r13d
	andl	%r12d, %r13d
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	8(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	%r13d, %ebx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_get_order
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_alloc_pages
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_4
LBB0_6:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	jne	LBB0_8
## %bb.7:
	movq	(%r15), %rax
	movq	(%rax), %rbx
LBB0_8:
	movq	%r12, %rdi
	callq	_page_to_phys
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rcx
	movq	%rbx, %r9
	callq	___map_single
	movl	%eax, (%r14)
	movq	_DMA_MAPPING_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.11:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %r13
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_dma_release_from_contiguous
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_order
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	___free_pages
	jmp	LBB0_13
LBB0_9:
	movq	%r12, %rdi
	jmp	LBB0_10
LBB0_4:
	movl	%r13d, %edi
	callq	_gfpflags_allow_blocking
	testl	%eax, %eax
	je	LBB0_13
## %bb.5:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %rbx
	shrq	%cl, %rbx
	callq	_get_order
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r13d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	movl	%r13d, %ecx
	callq	_dma_alloc_from_contiguous
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	___GFP_DMA,4,2                  ## @__GFP_DMA
	.comm	___GFP_HIGHMEM,4,2              ## @__GFP_HIGHMEM
	.comm	___GFP_DMA32,4,2                ## @__GFP_DMA32
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DMA_MAPPING_ERROR,4,2          ## @DMA_MAPPING_ERROR
	.no_dead_strip	_alloc_coherent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_coherent
_alloc_coherent:                        ; @alloc_coherent
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x24, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_get_domain
	mov	x22, x0
	bl	_PTR_ERR
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_get_order
	mov	x1, x0
	mov	x0, x24
	bl	_alloc_pages
	mov	x20, x0
	bl	_page_to_phys
	str	w0, [x19]
	mov	x0, x20
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_page_address
LBB0_3:
	mov	x0, x22
	bl	_IS_ERR
	cbz	x0, LBB0_5
LBB0_4:
	mov	x0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x22
	bl	_to_dma_ops_domain
	mov	x22, x0
	mov	x0, x21
	bl	_PAGE_ALIGN
	mov	x21, x0
Lloh3:
	adrp	x8, ___GFP_DMA@GOTPAGE
Lloh4:
	ldr	x8, [x8, ___GFP_DMA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, ___GFP_HIGHMEM@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___GFP_HIGHMEM@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, ___GFP_DMA32@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___GFP_DMA32@GOTPAGEOFF]
	ldr	x23, [x20, #8]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w8, w24, w8
Lloh12:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w25, w8, w9
Lloh15:
	adrp	x26, ___GFP_NOWARN@GOTPAGE
Lloh16:
	ldr	x26, [x26, ___GFP_NOWARN@GOTPAGEOFF]
	ldr	w8, [x26]
	orr	w24, w25, w8
	bl	_get_order
	mov	x1, x0
	mov	x0, x24
	bl	_alloc_pages
	mov	x24, x0
	cbz	x0, LBB0_12
LBB0_6:
	cbnz	x23, LBB0_8
; %bb.7:
	ldr	x8, [x20]
	ldr	x23, [x8]
LBB0_8:
	mov	x0, x24
	bl	_page_to_phys
	mov	x2, x0
Lloh17:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x21
	mov	x5, x23
	bl	___map_single
	str	w0, [x19]
Lloh20:
	adrp	x8, _DMA_MAPPING_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DMA_MAPPING_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.9:
Lloh23:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	lsr	x2, x21, x8
	mov	x0, x20
	mov	x1, x24
	bl	_dma_release_from_contiguous
	cbnz	w0, LBB0_4
; %bb.10:
	mov	x0, x21
	bl	_get_order
	mov	x1, x0
	mov	x0, x24
	bl	___free_pages
	b	LBB0_4
LBB0_11:
	mov	x0, x24
	b	LBB0_2
LBB0_12:
	mov	x0, x25
	bl	_gfpflags_allow_blocking
	cbz	w0, LBB0_4
; %bb.13:
Lloh26:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	lsr	x24, x21, x8
	mov	x0, x21
	bl	_get_order
	mov	x2, x0
	ldr	w8, [x26]
	and	w3, w8, w25
	mov	x0, x20
	mov	x1, x24
	bl	_dma_alloc_from_contiguous
	mov	x24, x0
	cbnz	x0, LBB0_6
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	___GFP_DMA,4,2                  ; @__GFP_DMA
	.comm	___GFP_HIGHMEM,4,2              ; @__GFP_HIGHMEM
	.comm	___GFP_DMA32,4,2                ; @__GFP_DMA32
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DMA_MAPPING_ERROR,4,2          ; @DMA_MAPPING_ERROR
	.no_dead_strip	_alloc_coherent
.subsections_via_symbols
