	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vortex_src_setupchannel
_vortex_src_setupchannel:               ## @vortex_src_setupchannel
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -76(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r14d
	movl	%ecx, -80(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movq	%rdi, %r13
	movl	40(%rbp), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	32(%rbp), %ebx
	movl	24(%rbp), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	16(%rbp), %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_vortex_src_flushbuffers
	testl	%r14d, %r14d
	movl	%r12d, -84(%rbp)                ## 4-byte Spill
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	je	LBB0_6
## %bb.1:
	cmpl	$65536, %ebx                    ## imm = 0x10000
	je	LBB0_5
## %bb.2:
	movl	%ebx, %eax
	andl	$65536, %eax                    ## imm = 0x10000
	je	LBB0_5
## %bb.3:
	xorl	%ecx, %ecx
	movl	$7, %esi
	movb	$1, %r12b
	jmp	LBB0_4
LBB0_6:
	xorl	%r12d, %r12d
	cmpl	$65536, %r15d                   ## imm = 0x10000
	je	LBB0_7
## %bb.8:
	andl	$65536, %r15d                   ## imm = 0x10000
	movl	$131072, %ecx                   ## imm = 0x20000
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	$12, %esi
	je	LBB0_12
## %bb.9:
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %eax
	shrl	$14, %eax
	andl	$7, %eax
	testl	$16383, %ecx                    ## imm = 0x3FFF
	je	LBB0_11
## %bb.10:
	movl	$16, %esi
	subl	%eax, %esi
	xorl	%ecx, %ecx
	movb	$1, %r12b
	jmp	LBB0_12
LBB0_5:
	movzwl	%bx, %eax
	shrl	$15, %eax
	cmpl	$32768, %ebx                    ## imm = 0x8000
	setne	%r12b
	andb	%al, %r12b
	movl	%r12d, %eax
	xorb	$1, %al
	movzbl	%al, %eax
	leal	8(,%rax,4), %esi
	movl	%eax, %ecx
	shll	$17, %ecx
LBB0_4:
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_12:
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movzbl	%dl, %ebx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_vortex_src_cleardrift
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_vortex_src_set_throttlesource
	movl	%r12d, %eax
	xorb	$1, %al
	movzbl	%al, %eax
	leal	(%rax,%rax,2), %eax
	orl	$12, %eax
	movl	%eax, %edx
	testb	%r12b, %r12b
	movl	$3072, %eax                     ## imm = 0xC00
	movq	%r13, %rbx
	movl	$3840, %r13d                    ## imm = 0xF00
	cmovnel	%eax, %r13d
	xorl	%eax, %eax
	movl	-84(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	orl	%r14d, %ecx
	cmovel	%eax, %r13d
	cmovnel	%eax, %edx
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %edi
	movq	_VORTEX_SRC_U0@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(,%rcx,4), %r12
	movq	(%rax), %rsi
	addq	%r12, %rsi
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	shll	$9, %ecx
	shll	$8, %r14d
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	shll	$4, %eax
	movzbl	%al, %eax
	orl	-76(%rbp), %r14d                ## 4-byte Folded Reload
	orl	%eax, %r14d
	orl	%ecx, %r14d
	movl	%r14d, %edx
	callq	_hwwrite
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_vortex_src_persist_convratio
	movl	(%rbx), %edi
	movq	_VORTEX_SRC_U1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	movzwl	-80(%rbp), %edx                 ## 2-byte Folded Reload
	callq	_hwwrite
	movl	(%rbx), %edi
	movq	_VORTEX_SRC_U2@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	shll	$16, %r15d
	orl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	orl	%r13d, %r15d
	orl	-68(%rbp), %r15d                ## 4-byte Folded Reload
	movq	%r12, %rsi
	movl	%r15d, %edx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hwwrite                        ## TAILCALL
LBB0_7:
	movl	$131072, %ecx                   ## imm = 0x20000
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	$12, %esi
	jmp	LBB0_12
LBB0_11:
	xorl	$15, %eax
	xorl	%ecx, %ecx
	movb	$1, %r12b
	movl	%eax, %esi
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_VORTEX_SRC_U0,8,3              ## @VORTEX_SRC_U0
	.comm	_VORTEX_SRC_U1,8,3              ## @VORTEX_SRC_U1
	.comm	_VORTEX_SRC_U2,8,3              ## @VORTEX_SRC_U2
	.no_dead_strip	_vortex_src_setupchannel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vortex_src_setupchannel
_vortex_src_setupchannel:               ; @vortex_src_setupchannel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	stp	w5, w7, [sp, #4]                ; 8-byte Folded Spill
	mov	x19, x6
	mov	x26, x4
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	ldp	w21, w27, [x29, #16]
	bl	_vortex_src_flushbuffers
	cbz	w26, LBB0_2
; %bb.1:
	and	w8, w21, #0x10000
	mov	w9, #7
	mov	w10, #1
	and	w11, w21, #0x8000
	cmp	w21, #8, lsl #12                ; =32768
	cset	w12, ne
	ands	w11, w12, w11, lsr #15
	mov	w12, #131072
	csel	w12, wzr, w12, ne
	mov	w13, #12
	mov	w14, #8
	csel	w13, w14, w13, ne
	cmp	w21, #16, lsl #12               ; =65536
	ccmp	w8, #0, #4, ne
	csel	w24, w10, w11, ne
	csel	w28, wzr, w12, ne
	csel	w21, w9, w13, ne
	b	LBB0_3
LBB0_2:
	and	w8, w22, #0x10000
	mov	w9, #12
	mov	w10, #131072
	ubfx	w11, w22, #14, #3
	eor	w12, w11, #0xf
	mov	w13, #1
	mov	w14, #16
	sub	w11, w14, w11
	mov	w14, #1
	tst	w22, #0x3fff
	csel	w13, w13, w14, eq
	csel	w14, wzr, wzr, eq
	csel	w11, w12, w11, eq
	cmp	w8, #0
	csel	w8, wzr, w13, eq
	csel	w12, w10, w14, eq
	csel	w11, w9, w11, eq
	cmp	w22, #16, lsl #12               ; =65536
	csel	w24, wzr, w8, eq
	csel	w28, w10, w12, eq
	csel	w21, w9, w11, eq
LBB0_3:
	mov	x0, x20
	mov	x1, x23
	bl	_vortex_src_cleardrift
	mov	x0, x20
	mov	x1, x23
	mov	x2, x27
	bl	_vortex_src_set_throttlesource
	orr	w8, w19, w26
	tst	w24, #0x1
	mov	w9, #15
	mov	w10, #12
	csel	w9, w10, w9, ne
	mov	w10, #3840
	mov	w11, #3072
	csel	w10, w11, w10, ne
	cmp	w8, #0
	csel	w24, wzr, w10, eq
	csel	w27, w9, wzr, eq
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _VORTEX_SRC_U0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VORTEX_SRC_U0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	mov	w9, w23
	lsl	x25, x9, #2
	add	x1, x8, x25
	ubfiz	w8, w21, #4, #4
	ldp	w9, w10, [sp, #4]               ; 8-byte Folded Reload
	orr	w9, w9, w26, lsl #8
	orr	w9, w9, w10, lsl #9
	orr	w2, w9, w8
	bl	_hwwrite
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	_vortex_src_persist_convratio
	ldr	w0, [x20]
Lloh3:
	adrp	x8, _VORTEX_SRC_U1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VORTEX_SRC_U1@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x25
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	and	w2, w8, #0xffff
	bl	_hwwrite
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _VORTEX_SRC_U2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VORTEX_SRC_U2@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x1, x8, x25
	orr	w8, w28, w19, lsl #16
	orr	w8, w8, w24
	orr	w2, w8, w27
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_hwwrite
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VORTEX_SRC_U0,8,3              ; @VORTEX_SRC_U0
	.comm	_VORTEX_SRC_U1,8,3              ; @VORTEX_SRC_U1
	.comm	_VORTEX_SRC_U2,8,3              ; @VORTEX_SRC_U2
	.no_dead_strip	_vortex_src_setupchannel
.subsections_via_symbols
