	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function demod_attach_lg330x
_demod_attach_lg330x:                   ## @demod_attach_lg330x
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r12
	movq	_lgdt330x_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %r15
	movq	_aver_m780@GOTPCREL(%rip), %rsi
	xorl	%r14d, %r14d
	movl	$89, %edx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_dvb_attach
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_mt2131_attach@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_m780_tunerconfig@GOTPCREL(%rip), %rcx
	movq	%rax, %rsi
	movl	%r15d, %edx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_dvb_attach
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	cmpq	$0, (%rbx)
	cmovel	%ecx, %r14d
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lgdt330x_attach,4,2            ## @lgdt330x_attach
	.comm	_aver_m780,4,2                  ## @aver_m780
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No LGDT330x found!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_mt2131_attach,4,2              ## @mt2131_attach
	.comm	_m780_tunerconfig,4,2           ## @m780_tunerconfig
	.no_dead_strip	_demod_attach_lg330x
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function demod_attach_lg330x
_demod_attach_lg330x:                   ; @demod_attach_lg330x
	.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	x19, x0
	ldr	x8, [x0, #16]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _lgdt330x_attach@GOTPAGE
Lloh1:
	ldr	x8, [x8, _lgdt330x_attach@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x20, x19, #8
Lloh3:
	adrp	x1, _aver_m780@GOTPAGE
Lloh4:
	ldr	x1, [x1, _aver_m780@GOTPAGEOFF]
	mov	w2, #89
	mov	x3, x20
	bl	_dvb_attach
	str	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x0
Lloh5:
	adrp	x8, _mt2131_attach@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mt2131_attach@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	str	xzr, [sp]
Lloh8:
	adrp	x3, _m780_tunerconfig@GOTPAGE
Lloh9:
	ldr	x3, [x3, _m780_tunerconfig@GOTPAGEOFF]
	mov	x2, x20
	bl	_dvb_attach
	ldr	x8, [x19]
Lloh10:
	adrp	x9, _ENODEV@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	x8, #0
	csneg	w0, wzr, w9, ne
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_lgdt330x_attach,4,2            ; @lgdt330x_attach
	.comm	_aver_m780,4,2                  ; @aver_m780
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No LGDT330x found!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_mt2131_attach,4,2              ; @mt2131_attach
	.comm	_m780_tunerconfig,4,2           ; @m780_tunerconfig
	.no_dead_strip	_demod_attach_lg330x
.subsections_via_symbols
