	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_querycap
_bttv_querycap:                         ## @bttv_querycap
	.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	_v4l2@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	(%rsi), %r15
	movl	12(%rdx), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movl	8(%rbx), %edi
	movq	40(%r15), %rsi
	movl	$4, %edx
	callq	_strscpy
	movl	4(%rbx), %r14d
	movl	32(%r15), %edi
	callq	_pci_name
	leaq	L_.str.1(%rip), %rdx
	movl	%r14d, %edi
	movl	$4, %esi
	movq	%rax, %rcx
	callq	_snprintf
	movq	_V4L2_CAP_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	movq	_V4L2_CAP_READWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_V4L2_CAP_STREAMING@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_V4L2_CAP_DEVICE_CAPS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	_no_overlay@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	jg	LBB0_4
## %bb.3:
	movq	_V4L2_CAP_VIDEO_OVERLAY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_4:
	leaq	28(%r15), %rdi
	callq	_video_is_registered
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_V4L2_CAP_VBI_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_6:
	leaq	24(%r15), %rdi
	callq	_video_is_registered
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	_V4L2_CAP_RADIO@GOTPCREL(%rip), %rcx
	movl	(%rbx), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	cmpq	$0, 16(%r15)
	je	LBB0_9
## %bb.8:
	movq	_V4L2_CAP_HW_FREQ_SEEK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_9:
	cmpq	$0, 8(%r15)
	je	LBB0_11
## %bb.10:
	movq	_V4L2_CAP_RDS_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_11:
	movq	(%r15), %rcx
	movq	_TUNER_ABSENT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_13
## %bb.12:
	movq	_V4L2_CAP_TUNER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rbx)
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_v4l2,8,3                       ## @v4l2
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bttv"

L_.str.1:                               ## @.str.1
	.asciz	"PCI:%s"

	.comm	_V4L2_CAP_VIDEO_CAPTURE,4,2     ## @V4L2_CAP_VIDEO_CAPTURE
	.comm	_V4L2_CAP_READWRITE,4,2         ## @V4L2_CAP_READWRITE
	.comm	_V4L2_CAP_STREAMING,4,2         ## @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_DEVICE_CAPS,4,2       ## @V4L2_CAP_DEVICE_CAPS
	.comm	_no_overlay,8,3                 ## @no_overlay
	.comm	_V4L2_CAP_VIDEO_OVERLAY,4,2     ## @V4L2_CAP_VIDEO_OVERLAY
	.comm	_V4L2_CAP_VBI_CAPTURE,4,2       ## @V4L2_CAP_VBI_CAPTURE
	.comm	_V4L2_CAP_RADIO,4,2             ## @V4L2_CAP_RADIO
	.comm	_V4L2_CAP_HW_FREQ_SEEK,4,2      ## @V4L2_CAP_HW_FREQ_SEEK
	.comm	_V4L2_CAP_RDS_CAPTURE,4,2       ## @V4L2_CAP_RDS_CAPTURE
	.comm	_TUNER_ABSENT,8,3               ## @TUNER_ABSENT
	.comm	_V4L2_CAP_TUNER,4,2             ## @V4L2_CAP_TUNER
	.no_dead_strip	_bttv_querycap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bttv_querycap
_bttv_querycap:                         ; @bttv_querycap
	.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
Lloh0:
	adrp	x8, _v4l2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _v4l2@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.1:
	mov	x19, x2
	ldr	x21, [x1]
	ldr	w0, [x2, #12]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strscpy
	ldr	w0, [x19, #8]
	ldr	x1, [x21, #40]
	mov	w2, #4
	bl	_strscpy
	ldr	w20, [x19, #4]
	ldr	w0, [x21, #32]
	bl	_pci_name
	mov	x3, x0
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w1, #4
	bl	_snprintf
Lloh7:
	adrp	x8, _V4L2_CAP_VIDEO_CAPTURE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _V4L2_CAP_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _V4L2_CAP_READWRITE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V4L2_CAP_READWRITE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _V4L2_CAP_STREAMING@GOTPAGE
Lloh14:
	ldr	x10, [x10, _V4L2_CAP_STREAMING@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh15:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _V4L2_CAP_DEVICE_CAPS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _V4L2_CAP_DEVICE_CAPS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
Lloh19:
	adrp	x9, _no_overlay@GOTPAGE
Lloh20:
	ldr	x9, [x9, _no_overlay@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, #0
	b.gt	LBB0_3
; %bb.2:
Lloh22:
	adrp	x9, _V4L2_CAP_VIDEO_OVERLAY@GOTPAGE
Lloh23:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_OVERLAY@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_3:
	add	x0, x21, #28
	bl	_video_is_registered
	cbz	x0, LBB0_5
; %bb.4:
Lloh25:
	adrp	x8, _V4L2_CAP_VBI_CAPTURE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _V4L2_CAP_VBI_CAPTURE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_5:
	add	x0, x21, #24
	bl	_video_is_registered
	cbz	x0, LBB0_8
; %bb.6:
Lloh28:
	adrp	x8, _V4L2_CAP_RADIO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _V4L2_CAP_RADIO@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x9, [x21, #16]
	cbz	x9, LBB0_8
; %bb.7:
Lloh31:
	adrp	x9, _V4L2_CAP_HW_FREQ_SEEK@GOTPAGE
Lloh32:
	ldr	x9, [x9, _V4L2_CAP_HW_FREQ_SEEK@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_8:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_10
; %bb.9:
Lloh34:
	adrp	x8, _V4L2_CAP_RDS_CAPTURE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _V4L2_CAP_RDS_CAPTURE@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_10:
	ldr	x8, [x21]
Lloh37:
	adrp	x9, _TUNER_ABSENT@GOTPAGE
Lloh38:
	ldr	x9, [x9, _TUNER_ABSENT@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.11:
	mov	w0, #0
	b	LBB0_14
LBB0_12:
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_13:
	mov	w0, #0
Lloh43:
	adrp	x8, _V4L2_CAP_TUNER@GOTPAGE
Lloh44:
	ldr	x8, [x8, _V4L2_CAP_TUNER@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_v4l2,8,3                       ; @v4l2
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bttv"

l_.str.1:                               ; @.str.1
	.asciz	"PCI:%s"

	.comm	_V4L2_CAP_VIDEO_CAPTURE,4,2     ; @V4L2_CAP_VIDEO_CAPTURE
	.comm	_V4L2_CAP_READWRITE,4,2         ; @V4L2_CAP_READWRITE
	.comm	_V4L2_CAP_STREAMING,4,2         ; @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_DEVICE_CAPS,4,2       ; @V4L2_CAP_DEVICE_CAPS
	.comm	_no_overlay,8,3                 ; @no_overlay
	.comm	_V4L2_CAP_VIDEO_OVERLAY,4,2     ; @V4L2_CAP_VIDEO_OVERLAY
	.comm	_V4L2_CAP_VBI_CAPTURE,4,2       ; @V4L2_CAP_VBI_CAPTURE
	.comm	_V4L2_CAP_RADIO,4,2             ; @V4L2_CAP_RADIO
	.comm	_V4L2_CAP_HW_FREQ_SEEK,4,2      ; @V4L2_CAP_HW_FREQ_SEEK
	.comm	_V4L2_CAP_RDS_CAPTURE,4,2       ; @V4L2_CAP_RDS_CAPTURE
	.comm	_TUNER_ABSENT,8,3               ; @TUNER_ABSENT
	.comm	_V4L2_CAP_TUNER,4,2             ; @V4L2_CAP_TUNER
	.no_dead_strip	_bttv_querycap
.subsections_via_symbols
