	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxb_attach
_mxb_attach:                            ## @mxb_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_DEB_EE
	movq	_vv_data@GOTPCREL(%rip), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_saa7146_vv_init
	movq	%r15, %rdi
	callq	_mxb_probe
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	(%r15), %r14
	movq	_vidioc_enum_input@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_vidioc_g_input@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_vidioc_s_input@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_vidioc_querystd@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_vidioc_g_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_vidioc_s_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_vidioc_g_frequency@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_vidioc_s_frequency@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_vidioc_enumaudio@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_vidioc_g_audio@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_vidioc_s_audio@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	leaq	4(%r14), %rdi
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rsi
	callq	_saa7146_register_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_ERR
LBB0_1:
	movq	%r15, %rdi
	callq	_saa7146_vv_release
	movl	$-1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %rdi
	callq	_MXB_BOARD_CAN_DO_VBI
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_VFL_TYPE_VBI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_saa7146_register_device
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	callq	_ERR
LBB0_7:
	movq	_mxb_num@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_info
	incl	(%rbx)
	movq	%r15, %rdi
	callq	_mxb_init_done
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dev:%p\n"

	.comm	_vv_data,52,2                   ## @vv_data
	.comm	_vidioc_enum_input,4,2          ## @vidioc_enum_input
	.comm	_vidioc_g_input,4,2             ## @vidioc_g_input
	.comm	_vidioc_s_input,4,2             ## @vidioc_s_input
	.comm	_vidioc_querystd,4,2            ## @vidioc_querystd
	.comm	_vidioc_g_tuner,4,2             ## @vidioc_g_tuner
	.comm	_vidioc_s_tuner,4,2             ## @vidioc_s_tuner
	.comm	_vidioc_g_frequency,4,2         ## @vidioc_g_frequency
	.comm	_vidioc_s_frequency,4,2         ## @vidioc_s_frequency
	.comm	_vidioc_enumaudio,4,2           ## @vidioc_enumaudio
	.comm	_vidioc_g_audio,4,2             ## @vidioc_g_audio
	.comm	_vidioc_s_audio,4,2             ## @vidioc_s_audio
L_.str.1:                               ## @.str.1
	.asciz	"mxb"

	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
L_.str.2:                               ## @.str.2
	.asciz	"cannot register capture v4l2 device. skipping.\n"

	.comm	_VFL_TYPE_VBI,4,2               ## @VFL_TYPE_VBI
L_.str.3:                               ## @.str.3
	.asciz	"cannot register vbi v4l2 device. skipping.\n"

L_.str.4:                               ## @.str.4
	.asciz	"found Multimedia eXtension Board #%d\n"

	.comm	_mxb_num,4,2                    ## @mxb_num
	.comm	_vidioc_g_register,4,2          ## @vidioc_g_register
	.comm	_vidioc_s_register,4,2          ## @vidioc_s_register
	.no_dead_strip	_mxb_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxb_attach
_mxb_attach:                            ; @mxb_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DEB_EE
Lloh2:
	adrp	x21, _vv_data@GOTPAGE
Lloh3:
	ldr	x21, [x21, _vv_data@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x21
	bl	_saa7146_vv_init
	mov	x0, x19
	bl	_mxb_probe
	cbnz	x0, LBB0_3
; %bb.1:
	ldr	x20, [x19]
Lloh4:
	adrp	x8, _vidioc_enum_input@GOTPAGE
Lloh5:
	ldr	x8, [x8, _vidioc_enum_input@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x21, #48]
Lloh7:
	adrp	x8, _vidioc_g_input@GOTPAGE
Lloh8:
	ldr	x8, [x8, _vidioc_g_input@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _vidioc_s_input@GOTPAGE
Lloh11:
	ldr	x9, [x9, _vidioc_s_input@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #40]
Lloh13:
	adrp	x8, _vidioc_querystd@GOTPAGE
Lloh14:
	ldr	x8, [x8, _vidioc_querystd@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _vidioc_g_tuner@GOTPAGE
Lloh17:
	ldr	x9, [x9, _vidioc_g_tuner@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #32]
Lloh19:
	adrp	x8, _vidioc_s_tuner@GOTPAGE
Lloh20:
	ldr	x8, [x8, _vidioc_s_tuner@GOTPAGEOFF]
Lloh21:
	adrp	x9, _vidioc_g_frequency@GOTPAGE
Lloh22:
	ldr	x9, [x9, _vidioc_g_frequency@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #24]
Lloh25:
	adrp	x8, _vidioc_s_frequency@GOTPAGE
Lloh26:
	ldr	x8, [x8, _vidioc_s_frequency@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _vidioc_enumaudio@GOTPAGE
Lloh29:
	ldr	x9, [x9, _vidioc_enumaudio@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #16]
Lloh31:
	adrp	x8, _vidioc_g_audio@GOTPAGE
Lloh32:
	ldr	x8, [x8, _vidioc_g_audio@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _vidioc_s_audio@GOTPAGE
Lloh35:
	ldr	x9, [x9, _vidioc_s_audio@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #8]
	add	x0, x20, #4
Lloh37:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh38:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh39:
	ldr	w3, [x8]
Lloh40:
	adrp	x2, l_.str.1@PAGE
Lloh41:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_saa7146_register_device
	cbz	x0, LBB0_5
; %bb.2:
Lloh42:
	adrp	x0, l_.str.2@PAGE
Lloh43:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
LBB0_3:
	mov	x0, x19
	bl	_saa7146_vv_release
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x19
	bl	_MXB_BOARD_CAN_DO_VBI
	cbz	x0, LBB0_8
; %bb.6:
Lloh44:
	adrp	x8, _VFL_TYPE_VBI@GOTPAGE
Lloh45:
	ldr	x8, [x8, _VFL_TYPE_VBI@GOTPAGEOFF]
Lloh46:
	ldr	w3, [x8]
Lloh47:
	adrp	x2, l_.str.1@PAGE
Lloh48:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_saa7146_register_device
	cbz	x0, LBB0_8
; %bb.7:
Lloh49:
	adrp	x0, l_.str.3@PAGE
Lloh50:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ERR
LBB0_8:
Lloh51:
	adrp	x20, _mxb_num@GOTPAGE
Lloh52:
	ldr	x20, [x20, _mxb_num@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh53:
	adrp	x0, l_.str.4@PAGE
Lloh54:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_info
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	mov	x0, x19
	bl	_mxb_init_done
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dev:%p\n"

	.comm	_vv_data,52,2                   ; @vv_data
	.comm	_vidioc_enum_input,4,2          ; @vidioc_enum_input
	.comm	_vidioc_g_input,4,2             ; @vidioc_g_input
	.comm	_vidioc_s_input,4,2             ; @vidioc_s_input
	.comm	_vidioc_querystd,4,2            ; @vidioc_querystd
	.comm	_vidioc_g_tuner,4,2             ; @vidioc_g_tuner
	.comm	_vidioc_s_tuner,4,2             ; @vidioc_s_tuner
	.comm	_vidioc_g_frequency,4,2         ; @vidioc_g_frequency
	.comm	_vidioc_s_frequency,4,2         ; @vidioc_s_frequency
	.comm	_vidioc_enumaudio,4,2           ; @vidioc_enumaudio
	.comm	_vidioc_g_audio,4,2             ; @vidioc_g_audio
	.comm	_vidioc_s_audio,4,2             ; @vidioc_s_audio
l_.str.1:                               ; @.str.1
	.asciz	"mxb"

	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
l_.str.2:                               ; @.str.2
	.asciz	"cannot register capture v4l2 device. skipping.\n"

	.comm	_VFL_TYPE_VBI,4,2               ; @VFL_TYPE_VBI
l_.str.3:                               ; @.str.3
	.asciz	"cannot register vbi v4l2 device. skipping.\n"

l_.str.4:                               ; @.str.4
	.asciz	"found Multimedia eXtension Board #%d\n"

	.comm	_mxb_num,4,2                    ; @mxb_num
	.comm	_vidioc_g_register,4,2          ; @vidioc_g_register
	.comm	_vidioc_s_register,4,2          ; @vidioc_s_register
	.no_dead_strip	_mxb_attach
.subsections_via_symbols
