	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_open
_bttv_open:                             ## @bttv_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, %r13
	callq	_video_devdata
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_video_drvdata
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_video_device_node_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	(%r12), %rax
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_VFL_TYPE_VBI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.3:
	movq	_V4L2_BUF_TYPE_VBI_CAPTURE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	movl	32(%r15), %esi
	movq	_v4l2_type_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dprintk
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kmalloc
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %eax
	jmp	LBB0_7
LBB0_6:
	incl	72(%r15)
	movq	%rbx, (%r13)
	movups	40(%r15), %xmm0
	movups	56(%r15), %xmm1
	movups	%xmm1, 16(%rbx)
	movups	%xmm0, (%rbx)
	leaq	16(%rbx), %r13
	leaq	8(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	callq	_v4l2_fh_init
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movq	$0, 24(%rbx)
	leaq	20(%rbx), %rdi
	movq	24(%r15), %rdx
	leaq	16(%r15), %r12
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r15, %r14
	addq	$12, %r14
	subq	$8, %rsp
	movq	_bttv_video_qops@GOTPCREL(%rip), %rsi
	movq	%r12, %rcx
	pushq	%r14
	pushq	%rbx
	pushq	$4
	callq	_videobuf_queue_sg_init
	addq	$32, %rsp
	movq	24(%r15), %rdx
	movq	_V4L2_BUF_TYPE_VBI_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_V4L2_FIELD_SEQ_TB@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	_bttv_vbi_qops@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rcx
	pushq	%r14
	pushq	%rbx
	pushq	$4
	callq	_videobuf_queue_sg_init
	addq	$32, %rsp
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_set_tvnorm
	movl	(%r15), %edx
	movl	8(%r15), %esi
	movq	%r15, %rdi
	callq	_set_input
	movl	4(%r15), %esi
	movq	%r15, %rdi
	callq	_audio_mute
	movq	_reset_crop@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	$0, (%rax)
	sete	%cl
	movl	%ecx, 4(%rbx)
	addq	$12, %rbx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_bttv_vbi_fmt_reset
	movq	%r15, %rdi
	callq	_bttv_field_count
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_v4l2_fh_add
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_8:
	movl	$1, %edi
	callq	_WARN_ON
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open dev=%s\n"

	.comm	_VFL_TYPE_GRABBER,8,3           ## @VFL_TYPE_GRABBER
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_VFL_TYPE_VBI,8,3               ## @VFL_TYPE_VBI
	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,4,2  ## @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"%d: open called (type=%s)\n"

	.comm	_v4l2_type_names,8,3            ## @v4l2_type_names
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_bttv_video_qops,4,2            ## @bttv_video_qops
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_bttv_vbi_qops,4,2              ## @bttv_vbi_qops
	.comm	_V4L2_FIELD_SEQ_TB,4,2          ## @V4L2_FIELD_SEQ_TB
	.comm	_reset_crop,4,2                 ## @reset_crop
	.no_dead_strip	_bttv_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bttv_open
_bttv_open:                             ; @bttv_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x0
	mov	x0, x22
	bl	_video_drvdata
	mov	x19, x0
	mov	x0, x21
	bl	_video_device_node_name
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh2:
	adrp	x9, _VFL_TYPE_GRABBER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VFL_TYPE_GRABBER@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh4:
	ldr	x10, [x9]
Lloh5:
	adrp	x24, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	mov	x9, x24
	cmp	x8, x10
	b.eq	LBB0_3
; %bb.1:
Lloh7:
	adrp	x9, _VFL_TYPE_VBI@GOTPAGE
Lloh8:
	ldr	x9, [x9, _VFL_TYPE_VBI@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
Lloh10:
	adrp	x9, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGEOFF]
LBB0_3:
	ldr	w25, [x9]
	ldr	w1, [x19, #32]
Lloh12:
	adrp	x8, _v4l2_type_names@GOTPAGE
Lloh13:
	ldr	x8, [x8, _v4l2_type_names@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w8, [x8, x25, lsl #2]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
Lloh17:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kmalloc
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	w8, [x19, #72]
	add	w8, w8, #1
	str	w8, [x19, #72]
	str	x20, [x22]
	ldur	q0, [x19, #40]
	ldur	q1, [x19, #56]
	stp	q0, q1, [x20]
	add	x23, x20, #16
	add	x22, x20, #8
	mov	x0, x22
	mov	x1, x21
	bl	_v4l2_fh_init
	str	w25, [x20]
	str	xzr, [x20, #24]
	add	x0, x20, #20
	ldr	x2, [x19, #24]
	add	x21, x19, #16
	ldr	w4, [x24]
Lloh22:
	adrp	x8, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh24:
	ldr	w5, [x8]
	add	x24, x19, #12
	str	x24, [sp]
Lloh25:
	adrp	x1, _bttv_video_qops@GOTPAGE
Lloh26:
	ldr	x1, [x1, _bttv_video_qops@GOTPAGEOFF]
	mov	x3, x21
	mov	w6, #4
	mov	x7, x20
	bl	_videobuf_queue_sg_init
	ldr	x2, [x19, #24]
Lloh27:
	adrp	x8, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGEOFF]
Lloh29:
	ldr	w4, [x8]
Lloh30:
	adrp	x8, _V4L2_FIELD_SEQ_TB@GOTPAGE
Lloh31:
	ldr	x8, [x8, _V4L2_FIELD_SEQ_TB@GOTPAGEOFF]
Lloh32:
	ldr	w5, [x8]
	str	x24, [sp]
Lloh33:
	adrp	x1, _bttv_vbi_qops@GOTPAGE
Lloh34:
	ldr	x1, [x1, _bttv_vbi_qops@GOTPAGEOFF]
	mov	x0, x23
	mov	x3, x21
	mov	w6, #4
	mov	x7, x20
	bl	_videobuf_queue_sg_init
	ldr	w1, [x19]
	mov	x0, x19
	bl	_set_tvnorm
	ldr	w1, [x19, #8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_set_input
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_audio_mute
Lloh35:
	adrp	x8, _reset_crop@GOTPAGE
Lloh36:
	ldr	x8, [x8, _reset_crop@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x20, #4]
	add	x0, x20, #12
	ldr	w1, [x19]
	bl	_bttv_vbi_fmt_reset
	mov	x0, x19
	bl	_bttv_field_count
	mov	x0, x22
	bl	_v4l2_fh_add
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	mov	w0, #1
	bl	_WARN_ON
Lloh38:
	adrp	x8, _ENODEV@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open dev=%s\n"

	.comm	_VFL_TYPE_GRABBER,8,3           ; @VFL_TYPE_GRABBER
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_VFL_TYPE_VBI,8,3               ; @VFL_TYPE_VBI
	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,4,2  ; @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"%d: open called (type=%s)\n"

	.comm	_v4l2_type_names,8,3            ; @v4l2_type_names
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_bttv_video_qops,4,2            ; @bttv_video_qops
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_bttv_vbi_qops,4,2              ; @bttv_vbi_qops
	.comm	_V4L2_FIELD_SEQ_TB,4,2          ; @V4L2_FIELD_SEQ_TB
	.comm	_reset_crop,4,2                 ; @reset_crop
	.no_dead_strip	_bttv_open
.subsections_via_symbols
