	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msp3400c_set_mode              ## -- Begin function msp3400c_set_mode
	.p2align	4, 0x90
_msp3400c_set_mode:                     ## @msp3400c_set_mode
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_i2c_get_clientdata
	movl	%eax, %edi
	callq	_to_state
	movq	%rax, %r14
	movq	_msp3400c_init_data@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movslq	%ebx, %r12
	movl	(%r14), %ebx
	movq	_msp_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%r12d, %r8d
	callq	_dev_dbg_lvl
	movl	%r12d, 4(%r14)
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	leaq	(%r12,%r12,2), %r12
	shlq	$4, %r12
	andl	$8, %ebx
	shll	$5, %ebx
	orl	(%r13,%r12), %ebx
	movq	%r15, %rdi
	movl	$187, %esi
	movl	%ebx, %edx
	callq	_msp_write_dem
	movq	8(%r13,%r12), %rax
	movl	20(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_msp_write_dem
	movq	8(%r13,%r12), %rax
	movl	16(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_msp_write_dem
	movq	8(%r13,%r12), %rax
	movl	12(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_msp_write_dem
	movq	8(%r13,%r12), %rax
	movl	8(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_msp_write_dem
	movq	8(%r13,%r12), %rax
	movl	4(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_msp_write_dem
	movq	8(%r13,%r12), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_msp_write_dem
	movq	%r15, %rdi
	movl	$5, %esi
	movl	$4, %edx
	callq	_msp_write_dem
	movq	%r15, %rdi
	movl	$5, %esi
	movl	$64, %edx
	callq	_msp_write_dem
	movq	%r15, %rdi
	movl	$5, %esi
	xorl	%edx, %edx
	callq	_msp_write_dem
	movq	16(%r13,%r12), %rax
	movl	20(%rax), %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_msp_write_dem
	movq	16(%r13,%r12), %rax
	movl	16(%rax), %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_msp_write_dem
	movq	16(%r13,%r12), %rax
	movl	12(%rax), %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_msp_write_dem
	movq	16(%r13,%r12), %rax
	movl	8(%rax), %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_msp_write_dem
	movq	16(%r13,%r12), %rax
	movl	4(%rax), %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_msp_write_dem
	movq	16(%r13,%r12), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_msp_write_dem
	movl	24(%r13,%r12), %edx
	movq	%r15, %rdi
	movl	$131, %esi
	callq	_msp_write_dem
	movl	36(%r13,%r12), %edx
	movl	40(%r13,%r12), %esi
	movq	%r15, %rdi
	callq	_msp3400c_set_carrier
	movl	32(%r13,%r12), %esi
	movq	%r15, %rdi
	callq	_msp_set_source
	movq	%r15, %rdi
	movl	$13, %esi
	movl	$6400, %edx                     ## imm = 0x1900
	callq	_msp_write_dsp
	movl	28(%r13,%r12), %edx
	movq	%r15, %rdi
	movl	$14, %esi
	callq	_msp_write_dsp
	cmpq	$0, 8(%r14)
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movl	$16, %esi
	movl	$23040, %edx                    ## imm = 0x5A00
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msp_write_dsp                  ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_msp3400c_init_data,8,3         ## @msp3400c_init_data
	.comm	_msp_debug,4,2                  ## @msp_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set_mode: %d\n"

	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msp3400c_set_mode              ; -- Begin function msp3400c_set_mode
	.p2align	2
_msp3400c_set_mode:                     ; @msp3400c_set_mode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_i2c_get_clientdata
	bl	_to_state
	mov	x20, x0
Lloh0:
	adrp	x8, _msp3400c_init_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _msp3400c_init_data@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldr	w23, [x0]
Lloh3:
	adrp	x8, _msp_debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _msp_debug@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	mov	x4, x21
	bl	_dev_dbg_lvl
	str	w21, [x20, #4]
Lloh8:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	mov	w8, #48
	smaddl	x21, w21, w8, x22
	ldr	w8, [x21]
	lsl	w9, w23, #5
	and	w9, w9, #0x100
	orr	w2, w8, w9
	mov	x0, x19
	mov	w1, #187
	bl	_msp_write_dem
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #20]
	mov	x0, x19
	mov	w1, #1
	bl	_msp_write_dem
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #16]
	mov	x0, x19
	mov	w1, #1
	bl	_msp_write_dem
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #12]
	mov	x0, x19
	mov	w1, #1
	bl	_msp_write_dem
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #8]
	mov	x0, x19
	mov	w1, #1
	bl	_msp_write_dem
	ldr	x8, [x21, #8]
	ldr	w2, [x8, #4]
	mov	x0, x19
	mov	w1, #1
	bl	_msp_write_dem
	ldr	x8, [x21, #8]
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_msp_write_dem
	mov	x0, x19
	mov	w1, #5
	mov	w2, #4
	bl	_msp_write_dem
	mov	x0, x19
	mov	w1, #5
	mov	w2, #64
	bl	_msp_write_dem
	mov	x0, x19
	mov	w1, #5
	mov	w2, #0
	bl	_msp_write_dem
	ldr	x8, [x21, #16]
	ldr	w2, [x8, #20]
	mov	x0, x19
	mov	w1, #5
	bl	_msp_write_dem
	ldr	x8, [x21, #16]
	ldr	w2, [x8, #16]
	mov	x0, x19
	mov	w1, #5
	bl	_msp_write_dem
	ldr	x8, [x21, #16]
	ldr	w2, [x8, #12]
	mov	x0, x19
	mov	w1, #5
	bl	_msp_write_dem
	ldr	x8, [x21, #16]
	ldr	w2, [x8, #8]
	mov	x0, x19
	mov	w1, #5
	bl	_msp_write_dem
	ldr	x8, [x21, #16]
	ldr	w2, [x8, #4]
	mov	x0, x19
	mov	w1, #5
	bl	_msp_write_dem
	ldr	x8, [x21, #16]
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #5
	bl	_msp_write_dem
	ldr	w2, [x21, #24]
	mov	x0, x19
	mov	w1, #131
	bl	_msp_write_dem
	ldp	w2, w1, [x21, #36]
	mov	x0, x19
	bl	_msp3400c_set_carrier
	ldr	w1, [x21, #32]
	mov	x0, x19
	bl	_msp_set_source
	mov	x0, x19
	mov	w1, #13
	mov	w2, #6400
	bl	_msp_write_dsp
	ldr	w2, [x21, #28]
	mov	x0, x19
	mov	w1, #14
	bl	_msp_write_dsp
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #16
	mov	w2, #23040
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_msp_write_dsp
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_msp3400c_init_data,8,3         ; @msp3400c_init_data
	.comm	_msp_debug,4,2                  ; @msp_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set_mode: %d\n"

	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
.subsections_via_symbols
