	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __tm6000_open
___tm6000_open:                         ## @__tm6000_open
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_video_devdata
	movq	%rax, %r13
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_video_drvdata
	movq	%rax, %r12
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movq	_V4L2_DEBUG_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_video_device_node_name
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r13), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_2
## %bb.3:
	cmpl	$130, %eax
	jne	LBB0_5
## %bb.4:
	movl	(%r14), %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_6:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_V4L2_BUF_TYPE_VBI_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r15d, %ebx
LBB0_7:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	incl	40(%r12)
	movq	_V4L2_DEBUG_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r13, %rdi
	callq	_video_device_node_name
	movq	_v4l2_type_names@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%ebx, %edx
	movl	(%rcx,%rdx,4), %r8d
	movl	40(%r12), %r9d
	leaq	L_.str.1(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	_V4L2_DEBUG_OPEN@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r15
	leaq	8(%rax), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	callq	_v4l2_fh_init
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	%r12, 32(%r15)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	movl	%eax, (%r12)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r15)
	movq	_format@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	%edi, 36(%r12)
	callq	_format_by_fourcc
	movl	%eax, 24(%r15)
	movq	%r12, %rdi
	callq	_tm6000_get_std_res
	movl	32(%r12), %eax
	movl	%eax, 20(%r15)
	movl	28(%r12), %eax
	movl	%eax, 16(%r15)
	movl	(%rbx), %esi
	leaq	20(%r12), %r14
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	movq	%r15, %rcx
	movq	%r12, %r8
	movq	%r14, %r9
	xorl	%eax, %eax
	callq	_dprintk
	movq	%rbx, %r13
	movl	(%rbx), %ebx
	leaq	24(%r12), %rdi
	callq	_list_empty
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r13), %ebx
	movq	%r14, %rdi
	callq	_list_empty
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r12, %rdi
	callq	_tm6000_init_analog_mode
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	_TM6000_MODE_ANALOG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	cmpl	$0, (%r15)
	je	LBB0_12
## %bb.13:
	movq	_V4L2_DEBUG_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r12, %rdi
	callq	_tm6000_set_audio_rinput
	movq	%r12, %rdi
	addq	$4, %rdi
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_radio@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	callq	_v4l2_device_call_all
	movq	%r12, %rdi
	callq	_tm6000_prepare_isoc
	movq	%r12, %rdi
	callq	_tm6000_start_thread
	jmp	LBB0_14
LBB0_8:
	decl	40(%r12)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_10:
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_v4l2_fh_exit
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_15
LBB0_12:
	movq	%r15, %rdi
	addq	$12, %rdi
	leaq	12(%r12), %rcx
	movl	4(%r15), %r8d
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	addq	$8, %r12
	subq	$8, %rsp
	movq	_tm6000_video_qops@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	pushq	%r12
	pushq	%r15
	pushq	$4
	callq	_videobuf_queue_vmalloc_init
	addq	$32, %rsp
LBB0_14:
	movq	%rbx, %rdi
	callq	_v4l2_fh_add
	xorl	%r14d, %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_DEBUG_OPEN,4,2            ## @V4L2_DEBUG_OPEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tm6000: open called (dev=%s)\n"

	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,4,2  ## @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"open dev=%s type=%s users=%d\n"

	.comm	_v4l2_type_names,8,3            ## @v4l2_type_names
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_format,8,3                     ## @format
L_.str.2:                               ## @.str.2
	.asciz	"Open: fh=%p, dev=%p, dev->vidq=%p\n"

L_.str.3:                               ## @.str.3
	.asciz	"Open: list_empty queued=%d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Open: list_empty active=%d\n"

	.comm	_TM6000_MODE_ANALOG,4,2         ## @TM6000_MODE_ANALOG
	.comm	_tm6000_video_qops,4,2          ## @tm6000_video_qops
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
L_.str.5:                               ## @.str.5
	.asciz	"video_open: setting radio device\n"

	.comm	_tuner,4,2                      ## @tuner
	.comm	_s_radio,4,2                    ## @s_radio
	.no_dead_strip	___tm6000_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __tm6000_open
___tm6000_open:                         ; @__tm6000_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x22, x0
	bl	_video_devdata
	mov	x23, x0
	mov	x0, x22
	bl	_video_drvdata
	mov	x19, x0
Lloh0:
	adrp	x21, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	ldr	w25, [x21]
Lloh2:
	adrp	x24, _V4L2_DEBUG_OPEN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _V4L2_DEBUG_OPEN@GOTPAGEOFF]
	ldr	w20, [x24]
	mov	x0, x23
	bl	_video_device_node_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_dprintk
	ldr	w8, [x23]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_11
; %bb.3:
	mov	w26, #0
	ldr	w25, [x21]
	b	LBB0_6
LBB0_4:
	mov	w26, #0
Lloh6:
	adrp	x8, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGEOFF]
Lloh8:
	ldr	w25, [x8]
	b	LBB0_6
LBB0_5:
	mov	w26, #1
LBB0_6:
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #40]
	ldr	w20, [x24]
	mov	x0, x23
	bl	_video_device_node_name
                                        ; kill: def $w0 killed $w0 def $x0
Lloh9:
	adrp	x8, _v4l2_type_names@GOTPAGE
Lloh10:
	ldr	x8, [x8, _v4l2_type_names@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w8, [x8, w25, uxtw #2]
	ldr	w9, [x19, #40]
	stp	x8, x9, [sp, #8]
	str	x0, [sp]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_dprintk
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.7:
	mov	x21, x0
	add	x20, x0, #8
	mov	x0, x20
	mov	x1, x23
	bl	_v4l2_fh_init
	str	x21, [x22]
	str	x19, [x21, #32]
	str	w26, [x19]
	stp	w26, w25, [x21]
Lloh17:
	adrp	x8, _format@GOTPAGE
Lloh18:
	ldr	x8, [x8, _format@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	w0, [x8]
	str	w0, [x19, #36]
	bl	_format_by_fourcc
	str	w0, [x21, #24]
	mov	x0, x19
	bl	_tm6000_get_std_res
	ldur	d0, [x19, #28]
	str	d0, [x21, #16]
	ldr	w1, [x24]
	add	x22, x19, #20
	stp	x19, x22, [sp, #8]
	str	x21, [sp]
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dprintk
	ldr	w23, [x24]
	add	x0, x19, #24
	bl	_list_empty
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh22:
	adrp	x2, l_.str.3@PAGE
Lloh23:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x23
	bl	_dprintk
	ldr	w23, [x24]
	mov	x0, x22
	bl	_list_empty
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh24:
	adrp	x2, l_.str.4@PAGE
Lloh25:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x23
	bl	_dprintk
	mov	x0, x19
	bl	_tm6000_init_analog_mode
	tbnz	w0, #31, LBB0_13
; %bb.8:
Lloh26:
	adrp	x8, _TM6000_MODE_ANALOG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TM6000_MODE_ANALOG@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w8, [x21]
	cbz	w8, LBB0_14
; %bb.9:
	ldr	w1, [x24]
Lloh29:
	adrp	x2, l_.str.5@PAGE
Lloh30:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dprintk
	mov	x0, x19
	bl	_tm6000_set_audio_rinput
	add	x0, x19, #4
Lloh31:
	adrp	x8, _tuner@GOTPAGE
Lloh32:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
Lloh34:
	adrp	x8, _s_radio@GOTPAGE
Lloh35:
	ldr	x8, [x8, _s_radio@GOTPAGEOFF]
Lloh36:
	ldr	w3, [x8]
	mov	w1, #0
	bl	_v4l2_device_call_all
	mov	x0, x19
	bl	_tm6000_prepare_isoc
	mov	x0, x19
	bl	_tm6000_start_thread
	b	LBB0_15
LBB0_10:
	ldr	w8, [x19, #40]
	sub	w8, w8, #1
	str	w8, [x19, #40]
Lloh37:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_13:
	mov	x22, x0
	mov	x0, x20
	bl	_v4l2_fh_exit
	mov	x0, x21
	bl	_kfree
	b	LBB0_16
LBB0_14:
	add	x0, x21, #12
	add	x3, x19, #12
	ldr	w4, [x21, #4]
Lloh41:
	adrp	x8, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh42:
	ldr	x8, [x8, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh43:
	ldr	w5, [x8]
	add	x8, x19, #8
	str	x8, [sp]
Lloh44:
	adrp	x1, _tm6000_video_qops@GOTPAGE
Lloh45:
	ldr	x1, [x1, _tm6000_video_qops@GOTPAGEOFF]
	mov	x2, #0
	mov	w6, #4
	mov	x7, x21
	bl	_videobuf_queue_vmalloc_init
LBB0_15:
	mov	x0, x20
	bl	_v4l2_fh_add
	mov	w22, #0
LBB0_16:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_DEBUG_OPEN,4,2            ; @V4L2_DEBUG_OPEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tm6000: open called (dev=%s)\n"

	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,4,2  ; @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"open dev=%s type=%s users=%d\n"

	.comm	_v4l2_type_names,8,3            ; @v4l2_type_names
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_format,8,3                     ; @format
l_.str.2:                               ; @.str.2
	.asciz	"Open: fh=%p, dev=%p, dev->vidq=%p\n"

l_.str.3:                               ; @.str.3
	.asciz	"Open: list_empty queued=%d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Open: list_empty active=%d\n"

	.comm	_TM6000_MODE_ANALOG,4,2         ; @TM6000_MODE_ANALOG
	.comm	_tm6000_video_qops,4,2          ; @tm6000_video_qops
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
l_.str.5:                               ; @.str.5
	.asciz	"video_open: setting radio device\n"

	.comm	_tuner,4,2                      ; @tuner
	.comm	_s_radio,4,2                    ; @s_radio
	.no_dead_strip	___tm6000_open
.subsections_via_symbols
