	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tm6000_init_dev
_tm6000_init_dev:                       ## @tm6000_init_dev
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	40(%r12), %edi
	callq	_is_generic
	movq	%r12, %rdi
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	callq	_tm6000_i2c_register
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	movq	%r12, %rdi
	callq	_use_alternative_detection_method
	movq	%r12, %rdi
	callq	_fill_board_specific_data
	testl	%eax, %eax
	jns	LBB0_6
	jmp	LBB0_13
LBB0_4:
	callq	_fill_board_specific_data
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:
	movq	%r12, %rdi
	callq	_tm6000_i2c_register
	testl	%eax, %eax
	js	LBB0_13
LBB0_6:
	movabsq	$2061584302800, %rax            ## imm = 0x1E0000002D0
	movq	%rax, (%r12)
	movq	_V4L2_STD_NTSC_M@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r12)
	movq	%r12, %rdi
	callq	_tm6000_config_tuner
	leaq	20(%r12), %r15
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_std@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	32(%r12), %r8
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_v4l2_device_call_all
	movq	$0, -40(%rbp)
	movq	_V4L2_TUNER_ANALOG_TV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	$3092, -48(%rbp)                ## imm = 0xC14
	movl	$3092, 8(%r12)                  ## imm = 0xC14
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_frequency@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %r8
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_v4l2_device_call_all
	cmpq	$0, 24(%r12)
	je	LBB0_8
## %bb.7:
	leaq	16(%r12), %rsi
	movq	_I2C_ADDR_TDA9874@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	callq	_v4l2_i2c_new_subdev
LBB0_8:
	movq	%r12, %rdi
	callq	_tm6000_v4l2_register
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:
	movq	%r12, %rdi
	callq	_tm6000_add_into_devlist
	movq	%r12, %rdi
	callq	_tm6000_init_extension
	movq	%r12, %rdi
	callq	_tm6000_ir_init
	movq	%r12, %rdi
	callq	_request_modules
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %ebx
LBB0_14:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_NTSC_M,8,3            ## @V4L2_STD_NTSC_M
	.comm	_video,4,2                      ## @video
	.comm	_s_std,4,2                      ## @s_std
	.comm	_V4L2_TUNER_ANALOG_TV,4,2       ## @V4L2_TUNER_ANALOG_TV
	.comm	_tuner,4,2                      ## @tuner
	.comm	_s_frequency,4,2                ## @s_frequency
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tvaudio"

	.comm	_I2C_ADDR_TDA9874,4,2           ## @I2C_ADDR_TDA9874
	.no_dead_strip	_tm6000_init_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function tm6000_init_dev
lCPI0_0:
	.long	720                             ; 0x2d0
	.long	480                             ; 0x1e0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_tm6000_init_dev:                       ; @tm6000_init_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_mutex_init
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x20, #40]
	bl	_is_generic
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_tm6000_i2c_register
	tbnz	w0, #31, LBB0_9
; %bb.2:
	mov	x0, x20
	bl	_use_alternative_detection_method
	mov	x0, x20
	bl	_fill_board_specific_data
	tbz	w0, #31, LBB0_5
	b	LBB0_9
LBB0_3:
	mov	x0, x20
	bl	_fill_board_specific_data
	tbnz	w0, #31, LBB0_9
; %bb.4:
	mov	x0, x20
	bl	_tm6000_i2c_register
	tbnz	w0, #31, LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20]
Lloh2:
	adrp	x8, _V4L2_STD_NTSC_M@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_STD_NTSC_M@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x20, #32]
	mov	x0, x20
	bl	_tm6000_config_tuner
Lloh5:
	adrp	x8, _video@GOTPAGE
Lloh6:
	ldr	x8, [x8, _video@GOTPAGEOFF]
	add	x21, x20, #20
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _s_std@GOTPAGE
Lloh9:
	ldr	x8, [x8, _s_std@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	ldr	x4, [x20, #32]
	mov	x0, x21
	mov	w1, #0
	bl	_v4l2_device_call_all
Lloh11:
	adrp	x8, _V4L2_TUNER_ANALOG_TV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_TUNER_ANALOG_TV@GOTPAGEOFF]
	str	xzr, [sp, #8]
Lloh13:
	ldr	w8, [x8]
	mov	w9, #3092
	stp	w9, w8, [sp]
	str	w9, [x20, #8]
Lloh14:
	adrp	x8, _tuner@GOTPAGE
Lloh15:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _s_frequency@GOTPAGE
Lloh18:
	ldr	x8, [x8, _s_frequency@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x4, sp
	mov	x0, x21
	mov	w1, #0
	bl	_v4l2_device_call_all
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_7
; %bb.6:
	add	x1, x20, #16
Lloh20:
	adrp	x8, _I2C_ADDR_TDA9874@GOTPAGE
Lloh21:
	ldr	x8, [x8, _I2C_ADDR_TDA9874@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
Lloh23:
	adrp	x2, l_.str@PAGE
Lloh24:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x4, #0
	bl	_v4l2_i2c_new_subdev
LBB0_7:
	mov	x0, x20
	bl	_tm6000_v4l2_register
	tbnz	w0, #31, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_tm6000_add_into_devlist
	mov	x0, x20
	bl	_tm6000_init_extension
	mov	x0, x20
	bl	_tm6000_ir_init
	mov	x0, x20
	bl	_request_modules
	mov	w21, #0
	b	LBB0_10
LBB0_9:
	mov	x21, x0
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_NTSC_M,8,3            ; @V4L2_STD_NTSC_M
	.comm	_video,4,2                      ; @video
	.comm	_s_std,4,2                      ; @s_std
	.comm	_V4L2_TUNER_ANALOG_TV,4,2       ; @V4L2_TUNER_ANALOG_TV
	.comm	_tuner,4,2                      ; @tuner
	.comm	_s_frequency,4,2                ; @s_frequency
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tvaudio"

	.comm	_I2C_ADDR_TDA9874,4,2           ; @I2C_ADDR_TDA9874
	.no_dead_strip	_tm6000_init_dev
.subsections_via_symbols
