	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl2831u_tuner_attach
_rtl2831u_tuner_attach:                 ## @rtl2831u_tuner_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
	callq	_adap_to_d
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_d_to_priv
	movq	%rax, %rbx
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%rbx), %edx
	cmpl	$130, %edx
	je	LBB0_7
## %bb.1:
	cmpl	$129, %edx
	je	LBB0_5
## %bb.2:
	cmpl	$128, %edx
	jne	LBB0_6
## %bb.3:
	movq	_qt1010_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	_rtl28xxu_qt1010_config@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_7:
	movq	_mt2060_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	_rtl28xxu_mt2060_config@GOTPCREL(%rip), %rcx
	movl	$1220, %r8d                     ## imm = 0x4C4
	xorl	%eax, %eax
	callq	_dvb_attach
	jmp	LBB0_8
LBB0_5:
	movq	_mxl5005s_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	_rtl28xxu_mxl5005s_config@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	callq	_dvb_attach
LBB0_8:
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_9
LBB0_6:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_qt1010_attach,4,2              ## @qt1010_attach
	.comm	_rtl28xxu_qt1010_config,4,2     ## @rtl28xxu_qt1010_config
	.comm	_mt2060_attach,4,2              ## @mt2060_attach
	.comm	_rtl28xxu_mt2060_config,4,2     ## @rtl28xxu_mt2060_config
	.comm	_mxl5005s_attach,4,2            ## @mxl5005s_attach
	.comm	_rtl28xxu_mxl5005s_config,4,2   ## @rtl28xxu_mxl5005s_config
L_.str.1:                               ## @.str.1
	.asciz	"unknown tuner %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl2831u_tuner_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl2831u_tuner_attach
_rtl2831u_tuner_attach:                 ; @rtl2831u_tuner_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_adap_to_d
	mov	x19, x0
	bl	_d_to_priv
	mov	x21, x0
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w2, [x21]
	cmp	w2, #130
	b.eq	LBB0_4
; %bb.1:
	cmp	w2, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w2, #128
	b.ne	LBB0_7
; %bb.3:
Lloh2:
	adrp	x8, _qt1010_attach@GOTPAGE
Lloh3:
	ldr	x8, [x8, _qt1010_attach@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
Lloh5:
	adrp	x3, _rtl28xxu_qt1010_config@GOTPAGE
Lloh6:
	ldr	x3, [x3, _rtl28xxu_qt1010_config@GOTPAGEOFF]
	bl	_dvb_attach
	cbnz	x0, LBB0_6
	b	LBB0_8
LBB0_4:
Lloh7:
	adrp	x8, _mt2060_attach@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mt2060_attach@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
	mov	w8, #1220
	str	x8, [sp]
Lloh10:
	adrp	x3, _rtl28xxu_mt2060_config@GOTPAGE
Lloh11:
	ldr	x3, [x3, _rtl28xxu_mt2060_config@GOTPAGEOFF]
	bl	_dvb_attach
	cbnz	x0, LBB0_6
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _mxl5005s_attach@GOTPAGE
Lloh13:
	ldr	x8, [x8, _mxl5005s_attach@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
Lloh15:
	adrp	x3, _rtl28xxu_mxl5005s_config@GOTPAGE
Lloh16:
	ldr	x3, [x3, _rtl28xxu_mxl5005s_config@GOTPAGEOFF]
	bl	_dvb_attach
	cbz	x0, LBB0_8
LBB0_6:
	mov	w20, #0
	b	LBB0_9
LBB0_7:
	ldr	x0, [x19]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_8:
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	x0, [x19]
	str	x20, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_qt1010_attach,4,2              ; @qt1010_attach
	.comm	_rtl28xxu_qt1010_config,4,2     ; @rtl28xxu_qt1010_config
	.comm	_mt2060_attach,4,2              ; @mt2060_attach
	.comm	_rtl28xxu_mt2060_config,4,2     ; @rtl28xxu_mt2060_config
	.comm	_mxl5005s_attach,4,2            ; @mxl5005s_attach
	.comm	_rtl28xxu_mxl5005s_config,4,2   ; @rtl28xxu_mxl5005s_config
l_.str.1:                               ; @.str.1
	.asciz	"unknown tuner %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl2831u_tuner_attach
.subsections_via_symbols
