	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_hdw_cx25840_vbi_hack
_pvr2_hdw_cx25840_vbi_hack:             ## @pvr2_hdw_cx25840_vbi_hack
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rdx
	movq	_PVR2_CLIENT_ID_CX25840@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	_PVR2_TRACE_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_pvr2_trace
	leaq	-32(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	_V4L2_SLICED_CAPTION_525@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rcx
	movq	(%rcx), %rdx
	movq	%rax, 168(%rdx)
	movq	8(%rcx), %rcx
	movq	%rax, 168(%rcx)
	movq	(%rbx), %rsi
	addq	$8, %rbx
	movq	_vbi@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_sliced_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %r8
	callq	_v4l2_device_call_all
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_CLIENT_ID_CX25840,8,3     ## @PVR2_CLIENT_ID_CX25840
	.comm	_PVR2_TRACE_INIT,4,2            ## @PVR2_TRACE_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Module ID %u: Executing cx25840 VBI hack"

	.comm	_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE,4,2 ## @V4L2_BUF_TYPE_SLICED_VBI_CAPTURE
	.comm	_V4L2_SLICED_CAPTION_525,8,3    ## @V4L2_SLICED_CAPTION_525
	.comm	_vbi,4,2                        ## @vbi
	.comm	_s_sliced_fmt,4,2               ## @s_sliced_fmt
	.no_dead_strip	_pvr2_hdw_cx25840_vbi_hack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_hdw_cx25840_vbi_hack
_pvr2_hdw_cx25840_vbi_hack:             ; @pvr2_hdw_cx25840_vbi_hack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x2, [x0]
Lloh0:
	adrp	x8, _PVR2_CLIENT_ID_CX25840@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVR2_CLIENT_ID_CX25840@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _PVR2_TRACE_INIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PVR2_TRACE_INIT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pvr2_trace
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh8:
	adrp	x8, _V4L2_BUF_TYPE_SLICED_VBI_CAPTURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_BUF_TYPE_SLICED_VBI_CAPTURE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh11:
	adrp	x8, _V4L2_SLICED_CAPTION_525@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_SLICED_CAPTION_525@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [sp]
	ldr	x10, [x9]
	str	x8, [x10, #168]
	ldr	x9, [x9, #8]
	str	x8, [x9, #168]
	ldr	x1, [x19], #8
Lloh14:
	adrp	x8, _vbi@GOTPAGE
Lloh15:
	ldr	x8, [x8, _vbi@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _s_sliced_fmt@GOTPAGE
Lloh18:
	ldr	x8, [x8, _s_sliced_fmt@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x4, sp
	mov	x0, x19
	bl	_v4l2_device_call_all
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_CLIENT_ID_CX25840,8,3     ; @PVR2_CLIENT_ID_CX25840
	.comm	_PVR2_TRACE_INIT,4,2            ; @PVR2_TRACE_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Module ID %u: Executing cx25840 VBI hack"

	.comm	_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE,4,2 ; @V4L2_BUF_TYPE_SLICED_VBI_CAPTURE
	.comm	_V4L2_SLICED_CAPTION_525,8,3    ; @V4L2_SLICED_CAPTION_525
	.comm	_vbi,4,2                        ; @vbi
	.comm	_s_sliced_fmt,4,2               ; @s_sliced_fmt
	.no_dead_strip	_pvr2_hdw_cx25840_vbi_hack
.subsections_via_symbols
