	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_move_wrpointer          ## -- Begin function DMAbuf_move_wrpointer
	.p2align	4, 0x90
_DMAbuf_move_wrpointer:                 ## @DMAbuf_move_wrpointer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movl	%edi, %ebx
	movq	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %r13
	movq	8(%r13), %r14
	leaq	80(%r14), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	(%r14), %esi
	movq	_DMA_POST@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	8(%r14), %rcx
	movq	16(%r14), %rdi
	movq	%rcx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rdi
	movq	%rdx, %r8
	jmp	LBB0_3
LBB0_1:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%edx, %r8d
LBB0_3:
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	notl	%r9d
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	andl	%esi, %r9d
	movl	%r9d, (%r14)
	movl	$-1, 24(%r14)
	movslq	%r12d, %r11
	addq	%rcx, %r11
	movq	%r11, 8(%r14)
	movq	_DMA_DIRTY@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movl	%r9d, (%r14)
	movq	32(%r14), %r10
	movslq	48(%r14), %r12
	cmpq	40(%r14), %r10
	jl	LBB0_8
## %bb.4:
	movq	%r10, %rax
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:
	movq	%r10, %rax
	cqto
	idivq	%r12
	jmp	LBB0_7
LBB0_5:
	movl	%r10d, %eax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_7:
	movq	%rdx, 32(%r14)
	subq	%r10, %r11
	addq	%rdx, %r11
	movq	%r11, 8(%r14)
LBB0_8:
	movq	%r11, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_9
## %bb.10:
	movq	%r11, %rax
	xorl	%edx, %edx
	divq	%rdi
	jmp	LBB0_11
LBB0_9:
	movl	%r11d, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_11:
	subq	%r8, %rcx
	movq	%r11, %r10
	subq	%rdx, %r10
	leaq	-1(%r11), %rax
	movq	%rax, %rdx
	orq	%r12, %rdx
	shrq	$32, %rdx
	je	LBB0_12
## %bb.13:
	xorl	%edx, %edx
	divq	%r12
	jmp	LBB0_14
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_14:
	movq	56(%r14), %r8
	movq	88(%r14), %rax
	movl	(%rax,%rdx,4), %eax
	movl	%eax, 96(%r14)
	cmpq	%r10, %rcx
	jae	LBB0_15
## %bb.16:
	movl	%ebx, %r12d
	movslq	72(%r14), %rbx
	movl	76(%r14), %esi
	movq	64(%r14), %rdx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	xorl	%edx, %edx
	divq	%rbx
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	%rdx, 64(%r14)
	incl	%esi
	movq	16(%r14), %rdi
	addq	%rdi, %rcx
	cmpq	%r10, %rcx
	jae	LBB0_21
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdi, (%r8,%rdx,8)
	movq	64(%r14), %rax
	incq	%rax
	movq	%rax, %rdx
	orq	%rbx, %rdx
	shrq	$32, %rdx
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_20
LBB0_15:
	movq	64(%r14), %rdx
	jmp	LBB0_22
LBB0_21:
	movl	%esi, 76(%r14)
	movq	8(%r14), %r11
	movl	%r12d, %ebx
LBB0_22:
	subq	%rcx, %r11
	movq	%r11, (%r8,%rdx,8)
	movq	(%r13), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movl	%ebx, %edi
	callq	*%rax
	movl	(%r14), %r9d
LBB0_24:
	movq	_DMA_ACTIVE@GOTPCREL(%rip), %rax
	testl	%r9d, (%rax)
	jne	LBB0_30
## %bb.25:
	cmpl	$1, 76(%r14)
	jg	LBB0_29
## %bb.26:
	jne	LBB0_30
## %bb.27:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_29
## %bb.28:
	cmpl	$2, 72(%r14)
	jg	LBB0_30
LBB0_29:
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_DMAbuf_launch_output
LBB0_30:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_DMA_POST,4,2                   ## @DMA_POST
	.comm	_DMA_DIRTY,4,2                  ## @DMA_DIRTY
	.comm	_DMA_ACTIVE,4,2                 ## @DMA_ACTIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_move_wrpointer          ; -- Begin function DMAbuf_move_wrpointer
	.p2align	2
_DMAbuf_move_wrpointer:                 ; @DMAbuf_move_wrpointer
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x25, [x8, w0, sxtw #3]
	ldr	x21, [x25, #8]
	add	x19, x21, #80
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w23, [x21]
Lloh3:
	adrp	x8, _DMA_POST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_POST@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	ldp	x8, x10, [x21, #8]
	udiv	x9, x8, x10
	mul	x9, x9, x10
	bic	w11, w23, w24
	str	w11, [x21]
	mov	w12, #-1
	str	w12, [x21, #24]
	add	x12, x8, w22, sxtw
	str	x12, [x21, #8]
Lloh6:
	adrp	x8, _DMA_DIRTY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_DIRTY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w8, w8, w11
	str	w8, [x21]
	ldp	x13, x14, [x21, #32]
	ldrsw	x11, [x21, #48]
	cmp	x13, x14
	b.lt	LBB0_2
; %bb.1:
	sdiv	x14, x13, x11
	mul	x14, x14, x11
	sub	x13, x13, x14
	str	x13, [x21, #32]
	sub	x12, x12, x14
	str	x12, [x21, #8]
LBB0_2:
	udiv	x13, x12, x10
	mul	x13, x13, x10
	sub	x14, x12, #1
	udiv	x15, x14, x11
	msub	x11, x15, x11, x14
	ldr	x14, [x21, #88]
	ldr	w11, [x14, x11, lsl #2]
	str	w11, [x21, #96]
	ldr	x11, [x21, #56]
	cmp	x9, x13
	b.hs	LBB0_6
; %bb.3:
	ldp	w15, w12, [x21, #72]
                                        ; kill: def $w15 killed $w15 def $x15
	sxtw	x15, w15
	ldr	x14, [x21, #64]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	x10, [x11, x14, lsl #3]
	ldr	x10, [x21, #64]
	add	x10, x10, #1
	udiv	x14, x10, x15
	msub	x14, x14, x15, x10
	str	x14, [x21, #64]
	add	w12, w12, #1
	ldr	x10, [x21, #16]
	add	x9, x10, x9
	cmp	x9, x13
	b.lo	LBB0_4
; %bb.5:
	str	w12, [x21, #76]
	ldr	x12, [x21, #8]
	b	LBB0_7
LBB0_6:
	ldr	x14, [x21, #64]
LBB0_7:
	sub	x9, x12, x9
	str	x9, [x11, x14, lsl #3]
	ldr	x9, [x25]
	ldr	x9, [x9]
	cbz	x9, LBB0_9
; %bb.8:
	mov	x0, x20
	blr	x9
	ldr	w8, [x21]
LBB0_9:
Lloh9:
	adrp	x9, _DMA_ACTIVE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_ACTIVE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.10:
	ldr	w8, [x21, #76]
	cmp	w8, #1
	b.gt	LBB0_14
; %bb.11:
	b.ne	LBB0_15
; %bb.12:
	and	w8, w24, w23
	cbnz	w8, LBB0_14
; %bb.13:
	ldr	w8, [x21, #72]
	cmp	w8, #2
	b.gt	LBB0_15
LBB0_14:
	mov	x0, x20
	mov	x1, x21
	bl	_DMAbuf_launch_output
LBB0_15:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_DMA_POST,4,2                   ; @DMA_POST
	.comm	_DMA_DIRTY,4,2                  ; @DMA_DIRTY
	.comm	_DMA_ACTIVE,4,2                 ; @DMA_ACTIVE
.subsections_via_symbols
