	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_load_script
_sdma_load_script:                      ## @sdma_load_script
	.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, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movl	(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	movl	%r14d, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	4(%r13), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_C0_SETPM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_BD_DONE@GOTPCREL(%rip), %rax
	movq	_BD_WRAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_BD_EXTD@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movl	%r14d, %eax
	shrl	$31, %eax
	addl	%r14d, %eax
	sarl	%eax
	movl	%eax, 12(%rbx)
	movl	-44(%rbp), %eax
	movl	%eax, 4(%rbx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
	movq	%r13, %rdi
	callq	_sdma_run_channel0
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r13), %edi
	movl	-44(%rbp), %ecx
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_dma_free_coherent
	jmp	LBB0_3
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$24, %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
	.comm	_C0_SETPM,4,2                   ## @C0_SETPM
	.comm	_BD_DONE,4,2                    ## @BD_DONE
	.comm	_BD_WRAP,4,2                    ## @BD_WRAP
	.comm	_BD_EXTD,4,2                    ## @BD_EXTD
	.no_dead_strip	_sdma_load_script
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_load_script
_sdma_load_script:                      ; @sdma_load_script
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x23, x3
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x25, [x0, #8]
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x1, x19
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
	add	x24, x20, #4
	mov	x0, x24
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x8, _C0_SETPM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _C0_SETPM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _BD_DONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BD_DONE@GOTPAGEOFF]
	str	w8, [x25, #16]
Lloh8:
	ldr	w8, [x9]
Lloh9:
	adrp	x9, _BD_WRAP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BD_WRAP@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _BD_EXTD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BD_EXTD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	cmp	w19, #0
	cinc	w9, w19, lt
	asr	w9, w9, #1
	stp	w8, w9, [x25, #8]
	ldr	w8, [sp, #12]
	stp	w23, w8, [x25]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_memcpy
	mov	x0, x20
	bl	_sdma_run_channel0
	mov	x22, x0
	mov	x0, x24
	bl	_spin_unlock_irqrestore
	ldr	w0, [x20]
	ldr	w3, [sp, #12]
	mov	x1, x19
	mov	x2, x21
	bl	_dma_free_coherent
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_3:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_C0_SETPM,4,2                   ; @C0_SETPM
	.comm	_BD_DONE,4,2                    ; @BD_DONE
	.comm	_BD_WRAP,4,2                    ; @BD_WRAP
	.comm	_BD_EXTD,4,2                    ; @BD_EXTD
	.no_dead_strip	_sdma_load_script
.subsections_via_symbols
