	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_g_tuner
_bttv_g_tuner:                          ## @bttv_g_tuner
	.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
	cmpq	$0, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movq	%rdx, %r15
	movq	(%rsi), %r14
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdx)
	movq	_V4L2_TUNER_CAP_NORM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdx)
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_g_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_bttv_call_all
	movl	16(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_V4L2_TUNER_ANALOG_TV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	_BT848_DSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_btread
	movq	_BT848_DSTATUS_HLOC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movl	$65535, 8(%r15)                 ## imm = 0xFFFF
LBB0_4:
	movq	(%r14), %rcx
	xorl	%ebx, %ebx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	*%rcx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_V4L2_TUNER_CAP_NORM,4,2        ## @V4L2_TUNER_CAP_NORM
	.comm	_tuner,4,2                      ## @tuner
	.comm	_g_tuner,4,2                    ## @g_tuner
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Television"

	.comm	_V4L2_TUNER_ANALOG_TV,4,2       ## @V4L2_TUNER_ANALOG_TV
	.comm	_BT848_DSTATUS,4,2              ## @BT848_DSTATUS
	.comm	_BT848_DSTATUS_HLOC,4,2         ## @BT848_DSTATUS_HLOC
	.no_dead_strip	_bttv_g_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bttv_g_tuner
_bttv_g_tuner:                          ; @bttv_g_tuner
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x2]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x19, x2
	ldr	x20, [x1]
Lloh3:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _V4L2_TUNER_CAP_NORM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_TUNER_CAP_NORM@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x2, #20]
Lloh9:
	adrp	x8, _tuner@GOTPAGE
Lloh10:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _g_tuner@GOTPAGE
Lloh13:
	ldr	x8, [x8, _g_tuner@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x19
	bl	_bttv_call_all
	ldr	w0, [x19, #16]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strscpy
Lloh17:
	adrp	x8, _V4L2_TUNER_ANALOG_TV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_TUNER_ANALOG_TV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh20:
	adrp	x8, _BT848_DSTATUS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BT848_DSTATUS@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_btread
Lloh23:
	adrp	x8, _BT848_DSTATUS_HLOC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BT848_DSTATUS_HLOC@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	mov	w8, #65535
	str	w8, [x19, #8]
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	blr	x8
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_V4L2_TUNER_CAP_NORM,4,2        ; @V4L2_TUNER_CAP_NORM
	.comm	_tuner,4,2                      ; @tuner
	.comm	_g_tuner,4,2                    ; @g_tuner
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Television"

	.comm	_V4L2_TUNER_ANALOG_TV,4,2       ; @V4L2_TUNER_ANALOG_TV
	.comm	_BT848_DSTATUS,4,2              ; @BT848_DSTATUS
	.comm	_BT848_DSTATUS_HLOC,4,2         ; @BT848_DSTATUS_HLOC
	.no_dead_strip	_bttv_g_tuner
.subsections_via_symbols
