	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5h1409_set_qam_amhum_mode_legacy
_s5h1409_set_qam_amhum_mode_legacy:     ## @s5h1409_set_qam_amhum_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_1
## %bb.5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	movl	$240, %esi
	callq	_s5h1409_readreg
	testl	$8192, %eax                     ## imm = 0x2000
	jne	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	movl	$150, %esi
	movl	$8, %edx
	callq	_s5h1409_writereg
	movl	$11319, %r14d                   ## imm = 0x2C37
	movl	$13106, %edx                    ## imm = 0x3332
	jmp	LBB0_4
LBB0_2:
	movl	$1, (%rbx)
	movzbl	%al, %r14d
	movq	%rbx, %rdi
	movl	$150, %esi
	movl	$12, %edx
	callq	_s5h1409_writereg
	addl	$-105, %r14d
	cmpl	$-49, %r14d
	movl	$13106, %eax                    ## imm = 0x3332
	movl	$12592, %edx                    ## imm = 0x3130
	cmovbl	%eax, %edx
	movl	$11319, %eax                    ## imm = 0x2C37
	movl	$10294, %r14d                   ## imm = 0x2836
	cmovbl	%eax, %r14d
LBB0_4:
	movq	%rbx, %rdi
	movl	$147, %esi
	callq	_s5h1409_writereg
	movq	%rbx, %rdi
	movl	$158, %esi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_s5h1409_writereg               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_s5h1409_set_qam_amhum_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_amhum_mode_legacy
_s5h1409_set_qam_amhum_mode_legacy:     ; @s5h1409_set_qam_amhum_mode_legacy
	.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
	ldr	x19, [x0]
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	mov	w1, #240
	bl	_s5h1409_readreg
	tbnz	w0, #13, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #150
	mov	w2, #8
	bl	_s5h1409_writereg
	mov	w20, #11319
	mov	w2, #13106
	b	LBB0_5
LBB0_4:
	mov	w8, #1
	str	w8, [x19]
	and	w20, w0, #0xff
	mov	x0, x19
	mov	w1, #150
	mov	w2, #12
	bl	_s5h1409_writereg
	sub	w8, w20, #105
	cmn	w8, #49
	mov	w8, #12592
	mov	w9, #13106
	csel	w2, w9, w8, lo
	mov	w8, #10294
	mov	w9, #11319
	csel	w20, w9, w8, lo
LBB0_5:
	mov	x0, x19
	mov	w1, #147
	bl	_s5h1409_writereg
	mov	x0, x19
	mov	w1, #158
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_s5h1409_writereg
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_s5h1409_set_qam_amhum_mode_legacy
.subsections_via_symbols
