	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vortex_adbdma_setbuffers
_vortex_adbdma_setbuffers:              ## @vortex_adbdma_setbuffers
	.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, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	8(%rdi), %rsi
	movslq	%r13d, %rax
	leaq	(%rax,%rax,4), %r15
	movl	%edx, (%rsi,%r15,4)
	movl	%ecx, 4(%rsi,%r15,4)
	leaq	(%rsi,%r15,4), %rdx
	addq	$8, %rdx
	movq	$0, 8(%rsi,%r15,4)
	cmpl	$1, %ecx
	je	LBB0_5
## %bb.1:
	cmpl	$2, %ecx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.2:
	cmpl	$3, %ecx
	jne	LBB0_6
## %bb.3:
	movl	%r13d, %eax
	shll	$4, %eax
	movl	$301989888, %ecx                ## imm = 0x12000000
	xorl	%r8d, %r8d
	jmp	LBB0_7
LBB0_5:
	movl	%r13d, %ecx
	shll	$4, %ecx
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movl	%r13d, %eax
	shll	$4, %eax
	xorl	%r8d, %r8d
	jmp	LBB0_8
LBB0_6:
	leal	-1(%rbx), %eax
	orl	$-67108864, %eax                ## imm = 0xFC000000
	movl	%eax, 4(%rdx)
	movl	(%r14), %r14d
	movq	_VORTEX_ADBDMA_BUFBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
                                        ## kill: def $r13d killed $r13d killed $r13 def $r13
	shll	$4, %r13d
	addl	%r13d, %eax
	addl	$12, %eax
	movslq	%eax, %r12
	movl	16(%rsi,%r15,4), %edi
	leal	(%rbx,%rbx,2), %esi
	callq	_snd_pcm_sgbuf_get_addr
	movl	%r14d, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_hwwrite
	movq	%r13, %rax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	4(%rdx), %r8d
	movl	$301989888, %ecx                ## imm = 0x12000000
	orl	(%rdx), %ecx
LBB0_7:
	movl	%ecx, (%rdx)
	movl	%ebx, %ecx
	shll	$12, %ecx
	addl	$1073737728, %ecx               ## imm = 0x3FFFF000
	orl	%r8d, %ecx
	orl	$-1073741824, %ecx              ## imm = 0xC0000000
	movl	%ecx, 4(%rdx)
	movq	_VORTEX_ADBDMA_BUFBASE@GOTPCREL(%rip), %rdx
	movl	%eax, %ecx
	orl	$8, %ecx
	addl	(%rdx), %ecx
	movl	(%r14), %r12d
	movslq	%ecx, %r13
	movl	16(%rsi,%r15,4), %edi
	leal	(%rbx,%rbx), %esi
	movq	%rax, %r14
	callq	_snd_pcm_sgbuf_get_addr
	movl	%r12d, %edi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_hwwrite
	movq	%r14, %rax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	(%rdx), %r8d
LBB0_8:
	leal	-1(%rbx), %ecx
	orl	%r8d, %ecx
	orl	$-603979776, %ecx               ## imm = 0xDC000000
	movl	%ecx, (%rdx)
	movl	(%r14), %r12d
	movq	_VORTEX_ADBDMA_BUFBASE@GOTPCREL(%rip), %rdx
	movl	%eax, %ecx
	orl	$4, %ecx
	addl	(%rdx), %ecx
	movslq	%ecx, %r13
	movl	16(%rsi,%r15,4), %edi
	movl	%ebx, %esi
	movq	%rax, %r14
	callq	_snd_pcm_sgbuf_get_addr
	movl	%r12d, %edi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_hwwrite
	movq	%r14, %rcx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	(%rdx), %eax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_9:
	shll	$12, %ebx
	addl	$1073737728, %ebx               ## imm = 0x3FFFF000
	orl	%eax, %ebx
	orl	$-1073741824, %ebx              ## imm = 0xC0000000
	movl	%ebx, (%rdx)
	movl	(%r14), %r12d
	movq	_VORTEX_ADBDMA_BUFBASE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	%ecx, %rbx
	addq	%rax, %rbx
	movl	16(%rsi,%r15,4), %edi
	xorl	%esi, %esi
	movq	%rdx, %r15
	callq	_snd_pcm_sgbuf_get_addr
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_hwwrite
	movl	(%r14), %edi
	movq	_VORTEX_ADBDMA_BUFCFG0@GOTPCREL(%rip), %rax
	leal	(,%r13,8), %ecx
	movslq	%ecx, %rbx
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movl	(%r15), %edx
	callq	_hwwrite
	movl	(%r14), %edi
	movq	_VORTEX_ADBDMA_BUFCFG1@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movl	4(%r15), %edx
	movq	%rbx, %rsi
	callq	_hwwrite
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_vortex_adbdma_setfirstbuffer
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vortex_adbdma_setstartbuffer   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VORTEX_ADBDMA_BUFBASE,4,2      ## @VORTEX_ADBDMA_BUFBASE
	.comm	_VORTEX_ADBDMA_BUFCFG0,8,3      ## @VORTEX_ADBDMA_BUFCFG0
	.comm	_VORTEX_ADBDMA_BUFCFG1,8,3      ## @VORTEX_ADBDMA_BUFCFG1
	.no_dead_strip	_vortex_adbdma_setbuffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vortex_adbdma_setbuffers
_vortex_adbdma_setbuffers:              ; @vortex_adbdma_setbuffers
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x26, [x0, #8]
	sxtw	x27, w19
	mov	w8, #20
	smaddl	x24, w1, w8, x26
	mov	x25, x24
	str	wzr, [x25, #8]!
	stp	w2, w3, [x24]
	str	wzr, [x24, #12]!
Lloh0:
	adrp	x10, _VORTEX_ADBDMA_BUFBASE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _VORTEX_ADBDMA_BUFBASE@GOTPAGEOFF]
	cmp	w3, #1
	b.eq	LBB0_4
; %bb.1:
	cmp	w3, #2
	b.eq	LBB0_5
; %bb.2:
	cmp	w3, #3
	b.ne	LBB0_6
; %bb.3:
	mov	w8, #0
	lsl	w28, w19, #4
	mov	w9, #301989888
	b	LBB0_7
LBB0_4:
	mov	w8, #0
	lsl	w28, w19, #4
	b	LBB0_9
LBB0_5:
	mov	w8, #0
	lsl	w28, w19, #4
	b	LBB0_8
LBB0_6:
	sub	w8, w21, #1
	orr	w8, w8, #0xfc000000
	str	w8, [x24]
	ldr	w22, [x20]
	ldr	w8, [x10]
	lsl	w28, w19, #4
	add	w8, w8, w28
	add	w8, w8, #12
	sxtw	x23, w8
	mov	w8, #20
	madd	x8, x27, x8, x26
	ldr	w0, [x8, #16]
	add	w1, w21, w21, lsl #1
	bl	_snd_pcm_sgbuf_get_addr
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_hwwrite
	ldr	w9, [x25]
	ldr	w8, [x24]
	mov	w10, #301989888
	orr	w9, w9, w10
Lloh2:
	adrp	x10, _VORTEX_ADBDMA_BUFBASE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VORTEX_ADBDMA_BUFBASE@GOTPAGEOFF]
LBB0_7:
	str	w9, [x25]
	mov	w9, #1073737728
	add	w9, w9, w21, lsl #12
	orr	w8, w9, w8
	orr	w8, w8, #0xc0000000
	str	w8, [x24]
	ldr	w22, [x20]
	ldr	w8, [x10]
	orr	w9, w28, #0x8
	add	w8, w9, w8
	sxtw	x23, w8
	mov	w8, #20
	madd	x8, x27, x8, x26
	ldr	w0, [x8, #16]
	lsl	w1, w21, #1
	bl	_snd_pcm_sgbuf_get_addr
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_hwwrite
Lloh4:
	adrp	x10, _VORTEX_ADBDMA_BUFBASE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _VORTEX_ADBDMA_BUFBASE@GOTPAGEOFF]
	ldr	w8, [x25]
LBB0_8:
	sub	w9, w21, #1
	orr	w8, w9, w8
	mov	w9, #-603979776
	orr	w8, w8, w9
	str	w8, [x25]
	ldr	w22, [x20]
	ldr	w8, [x10]
	orr	w9, w28, #0x4
	add	w8, w9, w8
	sxtw	x23, w8
	mov	w8, #20
	madd	x8, x27, x8, x26
	ldr	w0, [x8, #16]
	mov	x1, x21
	bl	_snd_pcm_sgbuf_get_addr
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_hwwrite
Lloh6:
	adrp	x10, _VORTEX_ADBDMA_BUFBASE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _VORTEX_ADBDMA_BUFBASE@GOTPAGEOFF]
	ldr	w8, [x25]
LBB0_9:
	mov	w9, #1073737728
	add	w9, w9, w21, lsl #12
	orr	w8, w9, w8
	orr	w8, w8, #0xc0000000
	str	w8, [x25]
	ldr	w21, [x20]
	ldrsw	x8, [x10]
	add	x22, x8, w28, sxtw
	mov	w8, #20
	madd	x8, x27, x8, x26
	ldr	w0, [x8, #16]
	mov	w1, #0
	bl	_snd_pcm_sgbuf_get_addr
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_hwwrite
Lloh8:
	adrp	x8, _VORTEX_ADBDMA_BUFCFG0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VORTEX_ADBDMA_BUFCFG0@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh10:
	ldr	x8, [x8]
	lsl	w9, w19, #3
	sxtw	x21, w9
	add	x1, x8, x21
	ldr	w2, [x25]
	bl	_hwwrite
	ldr	w0, [x20]
Lloh11:
	adrp	x8, _VORTEX_ADBDMA_BUFCFG1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VORTEX_ADBDMA_BUFCFG1@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	add	x1, x8, x21
	ldr	w2, [x24]
	bl	_hwwrite
	mov	x0, x20
	mov	x1, x19
	bl	_vortex_adbdma_setfirstbuffer
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	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
	b	_vortex_adbdma_setstartbuffer
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_VORTEX_ADBDMA_BUFBASE,4,2      ; @VORTEX_ADBDMA_BUFBASE
	.comm	_VORTEX_ADBDMA_BUFCFG0,8,3      ; @VORTEX_ADBDMA_BUFCFG0
	.comm	_VORTEX_ADBDMA_BUFCFG1,8,3      ; @VORTEX_ADBDMA_BUFCFG1
	.no_dead_strip	_vortex_adbdma_setbuffers
.subsections_via_symbols
