	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function msp3410d_thread
LCPI0_0:
	.quad	0x4025666666666666              ## double 10.699999999999999
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_msp3410d_thread
	.p2align	4, 0x90
_msp3410d_thread:                       ## @msp3410d_thread
	.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
	movq	%rdi, %r14
	callq	_i2c_get_clientdata
	movl	%eax, %edi
	callq	_to_state
	movq	%rax, %r15
	movq	_msp_debug@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15)
	xorl	%eax, %eax
	callq	_set_freezable
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_12 Depth 3
                                        ##       Child Loop BB0_18 Depth 3
                                        ##       Child Loop BB0_39 Depth 3
	movq	(%r13), %rdx
	movq	%r14, %rdi
	movl	$2, %esi
	leaq	L_.str.1(%rip), %rcx
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	movq	%r15, %rdi
	movl	$-1, %esi
	callq	_msp_sleep
	movq	(%r13), %rdx
	movq	%r14, %rdi
	movl	$2, %esi
	leaq	L_.str.2(%rip), %rcx
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_12 Depth 3
                                        ##       Child Loop BB0_18 Depth 3
                                        ##       Child Loop BB0_39 Depth 3
	movq	(%r13), %rdx
	movq	%r14, %rdi
	movl	$2, %esi
	leaq	L_.str.3(%rip), %rcx
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	movq	$0, 72(%r15)
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	jne	LBB0_42
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	(%r15), %rax
	movq	_MSP_MODE_EXTERN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	$1, 8(%r15)
	movq	%r15, %rdi
	callq	_msp_update_volume
	movl	$64, %r12d
	cmpq	$0, 56(%r15)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r15)
	movl	$32, %r12d
	movl	$1, %eax
	cmovel	%eax, %r12d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	$0, 16(%r15)
	movq	%r15, %rdi
	movl	$200, %esi
	callq	_msp_sleep
	testq	%rax, %rax
	jne	LBB0_2
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	(%r13), %r13
	testq	%r13, %r13
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	%r12d, %edi
	callq	_msp_standard_std_name
	movq	%r14, %rdi
	movl	$2, %esi
	movq	%r13, %rdx
	leaq	L_.str.5(%rip), %rcx
	movl	%eax, %r8d
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$1, %r12d
	movq	_msp_debug@GOTPCREL(%rip), %r13
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	%r14, %rdi
	movl	$32, %esi
	movl	$1, %edx
	callq	_msp_write_dem
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r15, %rdi
	movl	$100, %esi
	callq	_msp_sleep
	testq	%rax, %rax
	jne	LBB0_2
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=3
	movq	%r14, %rdi
	movl	$126, %esi
	callq	_msp_read_dem
	cmpl	$2047, %eax                     ## imm = 0x7FF
	jl	LBB0_14
## %bb.41:                              ##   in Loop: Header=BB0_12 Depth=3
	movq	(%r13), %rdx
	movq	%r14, %rdi
	movl	$2, %esi
	leaq	L_.str.6(%rip), %rcx
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	jmp	LBB0_12
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	%eax, %r12d
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_msp_stdlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=2
	addq	$24, %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpl	%r12d, -16(%rcx)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=3
	incq	%rax
	cmpq	$0, (%rcx)
	leaq	24(%rcx), %rcx
	jne	LBB0_18
	jmp	LBB0_20
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=2
	xorl	%eax, %eax
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	%eax, %ebx
	movq	(%r13), %r13
	movl	%r12d, %edi
	callq	_msp_standard_std_name
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	leaq	L_.str.7(%rip), %rcx
	movl	%eax, %r8d
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	movq	_msp_stdlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rbx,%rbx,2), %rcx
	movl	16(%rax,%rcx,8), %edx
	movl	%edx, 68(%r15)
	movl	12(%rax,%rcx,8), %ecx
	movl	%ecx, 64(%r15)
	movl	%r12d, 24(%r15)
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%r15)
	movq	_msp_amsound@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=2
	cmpq	$0, 56(%r15)
	je	LBB0_22
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	%r12d, %edi
	callq	_msp_standard_std
	movl	%eax, 52(%r15)
	addl	$-2, %r12d
	cmpl	$62, %r12d
	movq	_msp_debug@GOTPCREL(%rip), %r13
	ja	LBB0_33
## %bb.27:                              ##   in Loop: Header=BB0_2 Depth=2
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r12,4), %rcx
	addq	%rax, %rcx
	movq	_MSP_MODE_FM_NICAM2@GOTPCREL(%rip), %rax
	jmpq	*%rcx
LBB0_32:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MSP_MODE_FM_TERRA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movl	$1, 16(%r15)
	jmp	LBB0_33
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 12(%r15)
	je	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$9, %r12d
	je	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	_msp_debug@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movq	192(%rax), %r8
	testq	%r8, %r8
	leaq	L_.str.9(%rip), %rax
	cmoveq	%rax, %r8
	movq	%r14, %rdi
	movl	$1, %esi
	leaq	L_.str.8(%rip), %rcx
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	movl	$9, 24(%r15)
	movq	%r14, %rdi
	movl	$32, %esi
	movl	$9, %edx
	callq	_msp_write_dem
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MSP_MODE_AM_NICAM@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_28:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MSP_MODE_FM_NICAM1@GOTPCREL(%rip), %rax
LBB0_29:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 16(%r15)
LBB0_33:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	%r14, %rdi
	movl	$13, %esi
	movl	$6400, %edx                     ## imm = 0x1900
	callq	_msp_write_dsp
	movq	%r14, %rdi
	movl	$14, %esi
	movl	$12288, %edx                    ## imm = 0x3000
	callq	_msp_write_dsp
	cmpq	$0, 40(%r15)
	je	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$23040, %edx                    ## imm = 0x5A00
	callq	_msp_write_dsp
LBB0_35:                                ##   in Loop: Header=BB0_2 Depth=2
	cmpq	$0, 32(%r15)
	je	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_2 Depth=2
	movl	28(%r15), %edx
	movq	%r14, %rdi
	movl	$64, %esi
	callq	_msp_write_dem
LBB0_37:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	%r14, %rdi
	callq	_msp3400c_set_audmode
	movl	$0, 8(%r15)
	movq	%r15, %rdi
	callq	_msp_update_volume
	cmpl	$0, 16(%r15)
	je	LBB0_1
## %bb.38:                              ##   in Loop: Header=BB0_2 Depth=2
	movl	$3, %ebx
	.p2align	4, 0x90
LBB0_39:                                ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	testl	%ebx, %ebx
	movl	$1000, %esi                     ## imm = 0x3E8
	movl	$5000, %eax                     ## imm = 0x1388
	cmovel	%eax, %esi
	movq	%r15, %rdi
	callq	_msp_sleep
	testq	%rax, %rax
	jne	LBB0_2
## %bb.40:                              ##   in Loop: Header=BB0_39 Depth=3
	subl	$1, %ebx
	movl	$0, %eax
	cmovbl	%eax, %ebx
	movq	%r14, %rdi
	callq	_watch_stereo
	cmpl	$0, 16(%r15)
	jne	LBB0_39
	jmp	LBB0_1
LBB0_30:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MSP_MODE_BTSC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	jmp	LBB0_33
LBB0_31:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MSP_MODE_FM_RADIO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	%rax, (%r15)
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r15)
	movq	(%rcx), %rsi
	movq	%r14, %rdi
	callq	_msp3400c_set_mode
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_MSP_CARRIER
	movl	%eax, %r12d
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_MSP_CARRIER
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_msp3400c_set_carrier
	jmp	LBB0_33
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rdx
	movq	%r14, %rdi
	movl	$1, %esi
	leaq	L_.str.4(%rip), %rcx
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	movl	$0, 8(%r15)
	movq	%r15, %rdi
	callq	_msp_update_volume
	jmp	LBB0_1
LBB0_42:
	movq	(%r13), %rdx
	leaq	L_.str.10(%rip), %rcx
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dev_dbg_lvl
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_32, LBB0_32-LJTI0_0
.set L0_0_set_33, LBB0_33-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_29, LBB0_29-LJTI0_0
.set L0_0_set_30, LBB0_30-LJTI0_0
.set L0_0_set_31, LBB0_31-LJTI0_0
LJTI0_0:
	.long	L0_0_set_32
	.long	L0_0_set_32
	.long	L0_0_set_32
	.long	L0_0_set_32
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_28
	.long	L0_0_set_25
	.long	L0_0_set_29
	.long	L0_0_set_28
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_30
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_33
	.long	L0_0_set_31
	.end_data_region
                                        ## -- End function
	.comm	_msp_debug,8,3                  ## @msp_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"msp3410 daemon started\n"

	.comm	_V4L2_STD_ALL,4,2               ## @V4L2_STD_ALL
L_.str.1:                               ## @.str.1
	.asciz	"msp3410 thread: sleep\n"

L_.str.2:                               ## @.str.2
	.asciz	"msp3410 thread: wakeup\n"

L_.str.3:                               ## @.str.3
	.asciz	"thread: restart scan\n"

	.comm	_MSP_MODE_EXTERN,8,3            ## @MSP_MODE_EXTERN
L_.str.4:                               ## @.str.4
	.asciz	"thread: no carrier scan\n"

	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
L_.str.5:                               ## @.str.5
	.asciz	"setting standard: %s (0x%04x)\n"

L_.str.6:                               ## @.str.6
	.asciz	"detection still in progress\n"

	.comm	_msp_stdlist,8,3                ## @msp_stdlist
L_.str.7:                               ## @.str.7
	.asciz	"current standard: %s (0x%04x)\n"

	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_msp_amsound,8,3                ## @msp_amsound
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
L_.str.8:                               ## @.str.8
	.asciz	"autodetection failed, switching to backup standard: %s (0x%04x)\n"

L_.str.9:                               ## @.str.9
	.asciz	"unknown"

	.comm	_MSP_MODE_FM_NICAM2,8,3         ## @MSP_MODE_FM_NICAM2
	.comm	_MSP_MODE_FM_NICAM1,8,3         ## @MSP_MODE_FM_NICAM1
	.comm	_MSP_MODE_AM_NICAM,8,3          ## @MSP_MODE_AM_NICAM
	.comm	_MSP_MODE_BTSC,8,3              ## @MSP_MODE_BTSC
	.comm	_MSP_MODE_FM_RADIO,8,3          ## @MSP_MODE_FM_RADIO
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ## @V4L2_TUNER_SUB_STEREO
	.comm	_MSP_MODE_FM_TERRA,8,3          ## @MSP_MODE_FM_TERRA
L_.str.10:                              ## @.str.10
	.asciz	"thread: exit\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msp3410d_thread                ; -- Begin function msp3410d_thread
	.p2align	2
_msp3410d_thread:                       ; @msp3410d_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x19, x0
	bl	_i2c_get_clientdata
	bl	_to_state
	mov	x20, x0
Lloh0:
	adrp	x21, _msp_debug@GOTPAGE
Lloh1:
	ldr	x21, [x21, _msp_debug@GOTPAGEOFF]
	ldr	x2, [x21]
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
	mov	w22, #1
	mov	x0, x19
	mov	w1, #1
	bl	_dev_dbg_lvl
Lloh4:
	adrp	x8, _V4L2_STD_ALL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _V4L2_STD_ALL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x20, #52]
	bl	_set_freezable
Lloh7:
	adrp	x23, l_.str.3@PAGE
Lloh8:
	add	x23, x23, l_.str.3@PAGEOFF
Lloh9:
	adrp	x25, l_.str.6@PAGE
Lloh10:
	add	x25, x25, l_.str.6@PAGEOFF
	movi.2s	v9, #1
	mov	w28, #1000
	mov	w26, #5000
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;       Child Loop BB0_18 Depth 3
                                        ;       Child Loop BB0_36 Depth 3
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #2
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
	bl	_dev_dbg_lvl
	mov	x0, x20
	mov	w1, #-1
	bl	_msp_sleep
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #2
Lloh13:
	adrp	x3, l_.str.2@PAGE
Lloh14:
	add	x3, x3, l_.str.2@PAGEOFF
	bl	_dev_dbg_lvl
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;       Child Loop BB0_18 Depth 3
                                        ;       Child Loop BB0_36 Depth 3
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #2
	mov	x3, x23
	bl	_dev_dbg_lvl
	str	xzr, [x20, #72]
	bl	_kthread_should_stop
	cbnz	x0, LBB0_41
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _MSP_MODE_EXTERN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MSP_MODE_EXTERN@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_40
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=2
	str	w22, [x20, #8]
	mov	x0, x20
	bl	_msp_update_volume
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	w27, #64
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=2
	ldr	w8, [x20, #12]
Lloh18:
	adrp	x9, _V4L2_STD_NTSC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _V4L2_STD_NTSC@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #32
	csinc	w27, w8, wzr, ne
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=2
	str	xzr, [x20, #16]
	mov	x0, x20
	mov	w1, #200
	bl	_msp_sleep
	cbnz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x24, [x21]
	cbz	x24, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x0, x27
	bl	_msp_standard_std_name
                                        ; kill: def $w0 killed $w0 def $x0
	mov	x8, x27
	stp	x0, x8, [sp]
	mov	x0, x19
	mov	w1, #2
	mov	x2, x24
Lloh21:
	adrp	x3, l_.str.5@PAGE
Lloh22:
	add	x3, x3, l_.str.5@PAGEOFF
	bl	_dev_dbg_lvl
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=2
	cmp	w27, #1
	b.ne	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=2
	mov	x0, x19
	mov	w1, #32
	mov	w2, #1
	bl	_msp_write_dem
LBB0_12:                                ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_2 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mov	x0, x20
	mov	w1, #100
	bl	_msp_sleep
	cbnz	x0, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=3
	mov	x0, x19
	mov	w1, #126
	bl	_msp_read_dem
	cmp	w0, #2047
	b.lt	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=3
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #2
	mov	x3, x25
	bl	_dev_dbg_lvl
	b	LBB0_12
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x27, x0
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=2
Lloh23:
	adrp	x8, _msp_stdlist@GOTPAGE
Lloh24:
	ldr	x8, [x8, _msp_stdlist@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x8]
	ldr	x8, [x9]
	cbz	x8, LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_2 Depth=2
	mov	x8, #0
	add	x9, x9, #24
LBB0_18:                                ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_2 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldur	w10, [x9, #-16]
	cmp	w10, w27
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=3
	add	x8, x8, #1
	ldr	x10, [x9], #24
	cbnz	x10, LBB0_18
LBB0_20:                                ;   in Loop: Header=BB0_2 Depth=2
	and	x22, x8, #0xffffffff
	ldr	x24, [x21]
	mov	x0, x27
	bl	_msp_standard_std_name
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, x27, [sp]
	mov	x0, x19
	mov	w1, #1
	mov	x2, x24
Lloh26:
	adrp	x3, l_.str.7@PAGE
Lloh27:
	add	x3, x3, l_.str.7@PAGEOFF
	bl	_dev_dbg_lvl
Lloh28:
	adrp	x8, _msp_stdlist@GOTPAGE
Lloh29:
	ldr	x8, [x8, _msp_stdlist@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	mov	w9, #24
	madd	x9, x22, x9, x8
	ldur	d0, [x9, #12]
	str	d0, [x20, #64]
	str	w27, [x20, #24]
Lloh31:
	adrp	x9, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh32:
	ldr	x9, [x9, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	str	w9, [x20, #48]
Lloh34:
	adrp	x9, _msp_amsound@GOTPAGE
Lloh35:
	ldr	x9, [x9, _msp_amsound@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cbz	x9, LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_2 Depth=2
	ldr	x9, [x20, #56]
	cbnz	x9, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_2 Depth=2
	ldr	w9, [x20, #12]
Lloh37:
	adrp	x10, _V4L2_STD_SECAM@GOTPAGE
Lloh38:
	ldr	x10, [x10, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	and	w9, w10, w9
	cmp	w9, #0
	ccmp	w27, #9, #4, ne
	b.ne	LBB0_27
LBB0_23:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x0, x27
	bl	_msp_standard_std
	str	w0, [x20, #52]
	sub	w8, w27, #2
	cmp	w8, #62
	mov	w22, #1
	b.hi	LBB0_30
; %bb.24:                               ;   in Loop: Header=BB0_2 Depth=2
Lloh40:
	adrp	x11, lJTI0_0@PAGE
Lloh41:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x9, LBB0_25
	ldrb	w10, [x11, x8]
	add	x9, x9, x10, lsl #2
Lloh42:
	adrp	x8, _MSP_MODE_FM_NICAM2@GOTPAGE
Lloh43:
	ldr	x8, [x8, _MSP_MODE_FM_NICAM2@GOTPAGEOFF]
	br	x9
LBB0_25:                                ;   in Loop: Header=BB0_2 Depth=2
Lloh44:
	adrp	x8, _MSP_MODE_FM_TERRA@GOTPAGE
Lloh45:
	ldr	x8, [x8, _MSP_MODE_FM_TERRA@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	str	x8, [x20]
	str	w22, [x20, #16]
	b	LBB0_30
LBB0_26:                                ;   in Loop: Header=BB0_2 Depth=2
Lloh47:
	adrp	x8, _MSP_MODE_FM_NICAM1@GOTPAGE
Lloh48:
	ldr	x8, [x8, _MSP_MODE_FM_NICAM1@GOTPAGEOFF]
	b	LBB0_29
LBB0_27:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x2, [x21]
	ldr	x8, [x8, #192]
	cmp	x8, #0
Lloh49:
	adrp	x9, l_.str.9@PAGE
Lloh50:
	add	x9, x9, l_.str.9@PAGEOFF
	csel	x8, x9, x8, eq
                                        ; kill: def $w27 killed $w27 killed $x27 def $x27
	stp	x8, x27, [sp]
	mov	x0, x19
	mov	w1, #1
Lloh51:
	adrp	x3, l_.str.8@PAGE
Lloh52:
	add	x3, x3, l_.str.8@PAGEOFF
	bl	_dev_dbg_lvl
	mov	w8, #9
	str	w8, [x20, #24]
	mov	x0, x19
	mov	w1, #32
	mov	w2, #9
	bl	_msp_write_dem
	mov	w22, #1
LBB0_28:                                ;   in Loop: Header=BB0_2 Depth=2
Lloh53:
	adrp	x8, _MSP_MODE_AM_NICAM@GOTPAGE
Lloh54:
	ldr	x8, [x8, _MSP_MODE_AM_NICAM@GOTPAGEOFF]
LBB0_29:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x8, [x8]
	str	x8, [x20]
	str	d9, [x20, #16]
LBB0_30:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x0, x19
	mov	w1, #13
	mov	w2, #6400
	bl	_msp_write_dsp
	mov	x0, x19
	mov	w1, #14
	mov	w2, #12288
	bl	_msp_write_dsp
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_2 Depth=2
	mov	x0, x19
	mov	w1, #16
	mov	w2, #23040
	bl	_msp_write_dsp
LBB0_32:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_34
; %bb.33:                               ;   in Loop: Header=BB0_2 Depth=2
	ldr	w2, [x20, #28]
	mov	x0, x19
	mov	w1, #64
	bl	_msp_write_dem
LBB0_34:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x0, x19
	bl	_msp3400c_set_audmode
	str	wzr, [x20, #8]
	mov	x0, x20
	bl	_msp_update_volume
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_1
; %bb.35:                               ;   in Loop: Header=BB0_2 Depth=2
	mov	w24, #3
LBB0_36:                                ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_2 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	w24, #0
	csel	w1, w26, w28, eq
	mov	x0, x20
	bl	_msp_sleep
	cbnz	x0, LBB0_2
; %bb.37:                               ;   in Loop: Header=BB0_36 Depth=3
	sub	w8, w24, #1
	cmp	w24, #0
	csel	w24, wzr, w8, eq
	mov	x0, x19
	bl	_watch_stereo
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_36
	b	LBB0_1
LBB0_38:                                ;   in Loop: Header=BB0_2 Depth=2
Lloh55:
	adrp	x8, _MSP_MODE_BTSC@GOTPAGE
Lloh56:
	ldr	x8, [x8, _MSP_MODE_BTSC@GOTPAGEOFF]
Lloh57:
	ldr	x8, [x8]
	str	x8, [x20]
	b	LBB0_30
LBB0_39:                                ;   in Loop: Header=BB0_2 Depth=2
Lloh58:
	adrp	x9, _MSP_MODE_FM_RADIO@GOTPAGE
Lloh59:
	ldr	x9, [x9, _MSP_MODE_FM_RADIO@GOTPAGEOFF]
	ldr	x8, [x9]
	str	x8, [x20]
Lloh60:
	adrp	x8, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh61:
	ldr	x8, [x8, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	ldr	x1, [x9]
	mov	x0, x19
	bl	_msp3400c_set_mode
	mov	x8, #7378697629483820646
	movk	x8, #16421, lsl #48
	fmov	d8, x8
	fmov	d0, d8
	bl	_MSP_CARRIER
	mov	x24, x0
	fmov	d0, d8
	bl	_MSP_CARRIER
	mov	x2, x0
	mov	x0, x19
	mov	x1, x24
	bl	_msp3400c_set_carrier
	b	LBB0_30
LBB0_40:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #1
Lloh63:
	adrp	x3, l_.str.4@PAGE
Lloh64:
	add	x3, x3, l_.str.4@PAGEOFF
	bl	_dev_dbg_lvl
	str	wzr, [x20, #8]
	mov	x0, x20
	bl	_msp_update_volume
	b	LBB0_1
LBB0_41:
	ldr	x2, [x21]
Lloh65:
	adrp	x3, l_.str.10@PAGE
Lloh66:
	add	x3, x3, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_dev_dbg_lvl
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpAdd	Lloh65, Lloh66
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_25-LBB0_25)>>2
	.byte	(LBB0_25-LBB0_25)>>2
	.byte	(LBB0_25-LBB0_25)>>2
	.byte	(LBB0_25-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_26-LBB0_25)>>2
	.byte	(LBB0_28-LBB0_25)>>2
	.byte	(LBB0_29-LBB0_25)>>2
	.byte	(LBB0_26-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_38-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_30-LBB0_25)>>2
	.byte	(LBB0_39-LBB0_25)>>2
                                        ; -- End function
	.comm	_msp_debug,8,3                  ; @msp_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"msp3410 daemon started\n"

	.comm	_V4L2_STD_ALL,4,2               ; @V4L2_STD_ALL
l_.str.1:                               ; @.str.1
	.asciz	"msp3410 thread: sleep\n"

l_.str.2:                               ; @.str.2
	.asciz	"msp3410 thread: wakeup\n"

l_.str.3:                               ; @.str.3
	.asciz	"thread: restart scan\n"

	.comm	_MSP_MODE_EXTERN,8,3            ; @MSP_MODE_EXTERN
l_.str.4:                               ; @.str.4
	.asciz	"thread: no carrier scan\n"

	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
l_.str.5:                               ; @.str.5
	.asciz	"setting standard: %s (0x%04x)\n"

l_.str.6:                               ; @.str.6
	.asciz	"detection still in progress\n"

	.comm	_msp_stdlist,8,3                ; @msp_stdlist
l_.str.7:                               ; @.str.7
	.asciz	"current standard: %s (0x%04x)\n"

	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_msp_amsound,8,3                ; @msp_amsound
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
l_.str.8:                               ; @.str.8
	.asciz	"autodetection failed, switching to backup standard: %s (0x%04x)\n"

l_.str.9:                               ; @.str.9
	.asciz	"unknown"

	.comm	_MSP_MODE_FM_NICAM2,8,3         ; @MSP_MODE_FM_NICAM2
	.comm	_MSP_MODE_FM_NICAM1,8,3         ; @MSP_MODE_FM_NICAM1
	.comm	_MSP_MODE_AM_NICAM,8,3          ; @MSP_MODE_AM_NICAM
	.comm	_MSP_MODE_BTSC,8,3              ; @MSP_MODE_BTSC
	.comm	_MSP_MODE_FM_RADIO,8,3          ; @MSP_MODE_FM_RADIO
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ; @V4L2_TUNER_SUB_STEREO
	.comm	_MSP_MODE_FM_TERRA,8,3          ; @MSP_MODE_FM_TERRA
l_.str.10:                              ; @.str.10
	.asciz	"thread: exit\n"

.subsections_via_symbols
