	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_g_tuner
_vidioc_g_tuner:                        ## @vidioc_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	cmpq	$0, 32(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	movq	%rax, %r14
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_bands@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	12(%rax), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	4(%rax), %ecx
	movl	%ecx, 4(%rbx)
	movl	20(%rax), %eax
	movl	%eax, 8(%rbx)
	cmpq	$0, 16(%r14)
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_cadet_getstereo
	movl	%eax, 20(%rbx)
	movq	8(%r14), %rsi
	movl	$3, %edi
	callq	_outb
	movq	8(%r14), %rdi
	incq	%rdi
	callq	_inb
	andl	$127, %eax
	movq	8(%r14), %rsi
	incq	%rsi
	movl	%eax, %edi
	callq	_outb
	movl	$100, %edi
	callq	_mdelay
	movq	8(%r14), %rsi
	movl	$3, %edi
	callq	_outb
	movq	8(%r14), %rdi
	incq	%rdi
	callq	_inb
	testb	$-128, %al
	je	LBB0_6
## %bb.4:
	movq	_V4L2_TUNER_SUB_RDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%rbx)
	jmp	LBB0_6
LBB0_5:
	movabsq	$113387136622720, %rax          ## imm = 0x672000002080
	movq	%rax, 4(%rbx)
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
LBB0_6:
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	(%r14), %eax
	movl	%eax, 12(%rbx)
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_TUNER_RADIO,4,2           ## @V4L2_TUNER_RADIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Radio"

	.comm	_bands,8,3                      ## @bands
	.comm	_V4L2_TUNER_SUB_RDS,4,2         ## @V4L2_TUNER_SUB_RDS
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ## @V4L2_TUNER_MODE_STEREO
	.no_dead_strip	_vidioc_g_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vidioc_g_tuner
lCPI0_0:
	.long	8320                            ; 0x2080
	.long	26400                           ; 0x6720
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vidioc_g_tuner:                        ; @vidioc_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
	mov	x19, x2
	bl	_video_drvdata
	ldr	x8, [x19, #32]
	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_8
LBB0_2:
	mov	x20, x0
Lloh3:
	adrp	x8, _V4L2_TUNER_RADIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	ldr	w0, [x19, #24]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strscpy
Lloh8:
	adrp	x8, _bands@GOTPAGE
Lloh9:
	ldr	x8, [x8, _bands@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w9, [x8, #12]
	ldp	w10, w11, [x8]
	orr	w9, w9, w10
	stp	w9, w11, [x19]
	ldr	w8, [x8, #20]
	str	w8, [x19, #8]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_cadet_getstereo
	str	w0, [x19, #20]
	ldr	x1, [x20, #8]
	mov	w0, #3
	bl	_outb
	ldr	x8, [x20, #8]
	add	x0, x8, #1
	bl	_inb
	and	w0, w0, #0x7f
	ldr	x8, [x20, #8]
	add	x1, x8, #1
	bl	_outb
	mov	w0, #100
	bl	_mdelay
	ldr	x1, [x20, #8]
	mov	w0, #3
	bl	_outb
	ldr	x8, [x20, #8]
	add	x0, x8, #1
	bl	_inb
	tbz	w0, #7, LBB0_7
; %bb.4:
Lloh11:
	adrp	x8, _V4L2_TUNER_SUB_RDS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_TUNER_SUB_RDS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	b	LBB0_6
LBB0_5:
Lloh14:
	adrp	x8, lCPI0_0@PAGE
Lloh15:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #4]
Lloh16:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
LBB0_6:
	str	w8, [x19, #20]
LBB0_7:
	mov	w0, #0
Lloh19:
	adrp	x8, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x20]
	stp	w9, w8, [x19, #12]
LBB0_8:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdrp	Lloh14, Lloh16
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_TUNER_RADIO,4,2           ; @V4L2_TUNER_RADIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Radio"

	.comm	_bands,8,3                      ; @bands
	.comm	_V4L2_TUNER_SUB_RDS,4,2         ; @V4L2_TUNER_SUB_RDS
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ; @V4L2_TUNER_MODE_STEREO
	.no_dead_strip	_vidioc_g_tuner
.subsections_via_symbols
