	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1000_setup_dma_link
_au1000_setup_dma_link:                 ## @au1000_setup_dma_link
	.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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_virt_to_phys
	movq	%rax, %rcx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	cmpl	%r15d, (%rbx)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	cmpl	%r14d, 4(%rbx)
	je	LBB0_14
LBB0_2:
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_au1000_release_dma_link
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movl	%r14d, 4(%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leal	-1(%r14), %ebx
	movl	%r14d, %r14d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leal	-1(%rcx), %r12d
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	movq	%rax, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r13
	addl	-48(%rbp), %r15d                ## 4-byte Folded Reload
	cmpq	%r13, %r14
	je	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %eax
	addq	%r8, %rax
	movq	%rax, 16(%rcx)
	leal	(%r12,%r15), %eax
	movq	%rax, 8(%rcx)
	cmpq	%rbx, %r13
	jae	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	callq	_kmalloc
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_11
LBB0_12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	jmp	LBB0_13
LBB0_5:
	movq	%rax, %rcx
LBB0_13:
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_au1000_release_dma_link
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$40, %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	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_au1000_setup_dma_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1000_setup_dma_link
_au1000_setup_dma_link:                 ; @au1000_setup_dma_link
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_virt_to_phys
	mov	x21, x0
	ldr	w8, [x19]
	cmp	w8, w20
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, w22
	b.ne	LBB0_3
; %bb.2:
	mov	w8, #0
	b	LBB0_15
LBB0_3:
	mov	x0, x19
	bl	_au1000_release_dma_link
	stp	w20, w22, [x19]
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #24
	bl	_kmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_14
; %bb.4:
	cbz	w22, LBB0_11
; %bb.5:
	mov	w24, #0
	mov	x25, #0
	sub	w26, w22, #1
	sub	w27, w20, #1
	mov	x28, x0
	mov	w22, w22
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x25, x25, #1
	add	w24, w24, w20
	cmp	x22, x25
	b.eq	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x21, w24, uxtw
	add	w9, w27, w24
	stp	x9, x8, [x28, #8]
	cmp	x25, x26
	b.hs	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x23]
	mov	w0, #24
	bl	_kmalloc
	str	x0, [x28]
	cbz	x0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x28, x0
	b	LBB0_6
LBB0_10:
	ldr	x0, [x19, #8]
	b	LBB0_12
LBB0_11:
	mov	x28, x0
LBB0_12:
	mov	w8, #0
	str	x0, [x28]
	b	LBB0_15
LBB0_13:
	mov	x0, x19
	bl	_au1000_release_dma_link
LBB0_14:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_15:
	mov	x0, x8
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_au1000_setup_dma_link
.subsections_via_symbols
