	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5h1409_set_qam_interleave_mode_legacy
_s5h1409_set_qam_interleave_mode_legacy: ## @s5h1409_set_qam_interleave_mode_legacy
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$241, %esi
	callq	_s5h1409_readreg
	movl	(%rbx), %ecx
	testl	$32768, %eax                    ## imm = 0x8000
	jne	LBB0_1
## %bb.3:
	cmpl	$1, %ecx
	je	LBB0_6
## %bb.4:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	movl	$150, %esi
	movl	$8, %edx
	callq	_s5h1409_writereg
	movq	%rbx, %rdi
	movl	$171, %esi
	callq	_s5h1409_readreg
	orl	$4097, %eax                     ## imm = 0x1001
	jmp	LBB0_5
LBB0_1:
	cmpl	$2, %ecx
	jne	LBB0_2
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	$2, (%rbx)
	movq	%rbx, %rdi
	movl	$178, %esi
	callq	_s5h1409_readreg
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	$173, %esi
	callq	_s5h1409_readreg
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$150, %esi
	movl	$32, %edx
	callq	_s5h1409_writereg
	shrl	$4, %r14d
	andl	$3840, %r14d                    ## imm = 0xF00
	andl	$61695, %r15d                   ## imm = 0xF0FF
	orl	%r14d, %r15d
	movq	%rbx, %rdi
	movl	$173, %esi
	movl	%r15d, %edx
	callq	_s5h1409_writereg
	movq	%rbx, %rdi
	movl	$171, %esi
	callq	_s5h1409_readreg
	andl	$61438, %eax                    ## imm = 0xEFFE
LBB0_5:
	movq	%rbx, %rdi
	movl	$171, %esi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_s5h1409_writereg               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_s5h1409_set_qam_interleave_mode_legacy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5h1409_set_qam_interleave_mode_legacy
_s5h1409_set_qam_interleave_mode_legacy: ; @s5h1409_set_qam_interleave_mode_legacy
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x19, [x0]
	mov	x0, x19
	mov	w1, #241
	bl	_s5h1409_readreg
	ldr	w8, [x19]
	tbnz	w0, #15, LBB0_3
; %bb.1:
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.2:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #150
	mov	w2, #8
	bl	_s5h1409_writereg
	mov	x0, x19
	mov	w1, #171
	bl	_s5h1409_readreg
	mov	w8, #4097
	orr	w2, w0, w8
	b	LBB0_6
LBB0_3:
	cmp	w8, #2
	b.ne	LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	w8, #2
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #178
	bl	_s5h1409_readreg
	mov	x20, x0
	mov	x0, x19
	mov	w1, #173
	bl	_s5h1409_readreg
	mov	x21, x0
	mov	x0, x19
	mov	w1, #150
	mov	w2, #32
	bl	_s5h1409_writereg
	lsr	w8, w20, #4
	and	w8, w8, #0xf00
	mov	w9, #61695
	and	w9, w21, w9
	orr	w2, w8, w9
	mov	x0, x19
	mov	w1, #173
	bl	_s5h1409_writereg
	mov	x0, x19
	mov	w1, #171
	bl	_s5h1409_readreg
	mov	w8, #61438
	and	w2, w0, w8
LBB0_6:
	mov	x0, x19
	mov	w1, #171
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_s5h1409_writereg
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_s5h1409_set_qam_interleave_mode_legacy
.subsections_via_symbols
