	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function demod_attach_stv0900
_demod_attach_stv0900:                  ## @demod_attach_stv0900
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	8(%rax), %r14
	callq	_i2c_adapter_from_chan
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	8(%rcx), %rcx
	movq	(%rcx,%rax,8), %r13
	movq	_stv090x_attach@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testb	$1, %al
	jne	LBB0_1
## %bb.2:
	movq	_STV090x_DEMODULATOR_0@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_STV090x_DEMODULATOR_1@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ecx
	xorl	%r12d, %r12d
	movq	%r13, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_dvb_attach
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	cmpq	$0, (%r13)
	je	LBB0_7
## %bb.6:
	movq	%rbx, (%rax)
LBB0_7:
	movq	_lnbh24_attach@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx,%rcx,4), %r9d
	xorl	%r12d, %r12d
	movq	%rax, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_dvb_attach
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	8(%rbx), %rdi
	callq	_dvb_frontend_detach
	movq	$0, 8(%rbx)
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stv090x_attach,4,2             ## @stv090x_attach
	.comm	_STV090x_DEMODULATOR_0,4,2      ## @STV090x_DEMODULATOR_0
	.comm	_STV090x_DEMODULATOR_1,4,2      ## @STV090x_DEMODULATOR_1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No STV0900 found!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_lnbh24_attach,4,2              ## @lnbh24_attach
L_.str.1:                               ## @.str.1
	.asciz	"No LNBH24 found!\n"

	.no_dead_strip	_demod_attach_stv0900
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function demod_attach_stv0900
_demod_attach_stv0900:                  ; @demod_attach_stv0900
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, [x8, #8]
	bl	_i2c_adapter_from_chan
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	x9, [x19]
	ldr	x22, [x8, x9, lsl #3]
Lloh0:
	adrp	x8, _stv090x_attach@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stv090x_attach@GOTPAGEOFF]
Lloh2:
	adrp	x10, _STV090x_DEMODULATOR_0@GOTPAGE
Lloh3:
	ldr	x10, [x10, _STV090x_DEMODULATOR_0@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _STV090x_DEMODULATOR_1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STV090x_DEMODULATOR_1@GOTPAGEOFF]
	tst	x9, #0x1
	csel	x8, x10, x8, eq
	ldr	w8, [x8]
	stp	x21, x8, [sp, #8]
	str	x22, [sp]
	bl	_dvb_attach
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x22]
	cbz	x8, LBB0_3
; %bb.2:
	str	x19, [x0]
LBB0_3:
Lloh7:
	adrp	x8, _lnbh24_attach@GOTPAGE
Lloh8:
	ldr	x8, [x8, _lnbh24_attach@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x10, [x19]
	ldr	w9, [x9, x10, lsl #2]
	stp	xzr, xzr, [sp, #16]
	str	x9, [sp, #32]
	stp	x0, x21, [sp]
	mov	x0, x8
	bl	_dvb_attach
	cbz	x0, LBB0_6
; %bb.4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #8]
	bl	_dvb_frontend_detach
	str	xzr, [x19, #8]
LBB0_7:
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_stv090x_attach,4,2             ; @stv090x_attach
	.comm	_STV090x_DEMODULATOR_0,4,2      ; @STV090x_DEMODULATOR_0
	.comm	_STV090x_DEMODULATOR_1,4,2      ; @STV090x_DEMODULATOR_1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No STV0900 found!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_lnbh24_attach,4,2              ; @lnbh24_attach
l_.str.1:                               ; @.str.1
	.asciz	"No LNBH24 found!\n"

	.no_dead_strip	_demod_attach_stv0900
.subsections_via_symbols
