	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw686x_sg_setup
_tw686x_sg_setup:                       ## @tw686x_sg_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_is_second_gen
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_max_channels
	movq	_TW686X_SG_TABLE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_10
LBB0_1:
	imull	%eax, %ecx
	movl	$1, %eax
LBB0_3:
	movq	(%rbx), %rdx
	movl	%eax, %esi
	leaq	-1(%rsi), %rdi
	movl	%esi, %eax
	andl	$3, %eax
	cmpq	$3, %rdi
	jae	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	jmp	LBB0_7
LBB0_5:
	andl	$-4, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rdi,8), %rbx
	movl	%ecx, (%rbx)
	movl	%ecx, 4(%rbx)
	movq	8(%rdx,%rdi,8), %rbx
	movl	%ecx, (%rbx)
	movl	%ecx, 4(%rbx)
	movq	16(%rdx,%rdi,8), %rbx
	movl	%ecx, (%rbx)
	movl	%ecx, 4(%rbx)
	movq	24(%rdx,%rdi,8), %rbx
	movl	%ecx, (%rbx)
	movl	%ecx, 4(%rbx)
	addq	$4, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_6
LBB0_7:
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	leaq	(%rdx,%rdi,8), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rdi
	movl	%ecx, (%rdi)
	movl	%ecx, 4(%rdi)
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_9
LBB0_10:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TW686X_SG_TABLE_SIZE,4,2       ## @TW686X_SG_TABLE_SIZE
	.no_dead_strip	_tw686x_sg_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw686x_sg_setup
_tw686x_sg_setup:                       ; @tw686x_sg_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_is_second_gen
	mov	x20, x0
	mov	x0, x19
	bl	_max_channels
Lloh0:
	adrp	x8, _TW686X_SG_TABLE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TW686X_SG_TABLE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	x20, LBB0_2
; %bb.1:
	cbnz	w0, LBB0_3
	b	LBB0_5
LBB0_2:
	mul	w8, w8, w0
	mov	w0, #1
LBB0_3:
	ldr	x9, [x19]
	mov	w10, w0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9], #8
	stp	w8, w8, [x11]
	subs	x10, x10, #1
	b.ne	LBB0_4
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TW686X_SG_TABLE_SIZE,4,2       ; @TW686X_SG_TABLE_SIZE
	.no_dead_strip	_tw686x_sg_setup
.subsections_via_symbols
