	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tuner_attach_stv6110
_tuner_attach_stv6110:                  ## @tuner_attach_stv6110
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	16(%rax), %rcx
	movq	(%rax), %rsi
	movq	8(%rax), %rax
	movl	(%rdi), %r13d
	andl	$1, %r13d
	testq	%r13, %r13
	jne	LBB0_1
## %bb.2:
	movq	_stv6110a@GOTPCREL(%rip), %rdx
	jmp	LBB0_3
LBB0_1:
	movq	_stv6110b@GOTPCREL(%rip), %rdx
LBB0_3:
	movq	(%rsi), %r12
	movq	_stv6110x_attach@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	movl	(%rax,%r13,4), %esi
	callq	_dvb_attach
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movl	(%r15), %edx
	testl	%r13d, %r13d
	jne	LBB0_6
## %bb.7:
	movq	_stv6110a@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_6:
	movq	_stv6110b@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
	movl	40(%rbx), %ecx
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.10:
	movq	_stv0900@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_stv0900_aa@GOTPCREL(%rip), %rax
LBB0_11:
	movl	%ecx, 40(%rax)
	movl	36(%rbx), %ecx
	movl	%ecx, 36(%rax)
	movl	32(%rbx), %ecx
	movl	%ecx, 32(%rax)
	movl	28(%rbx), %ecx
	movl	%ecx, 28(%rax)
	movl	24(%rbx), %ecx
	movl	%ecx, 24(%rax)
	movl	20(%rbx), %ecx
	movl	%ecx, 20(%rax)
	movl	16(%rbx), %ecx
	movl	%ecx, 16(%rax)
	movl	12(%rbx), %ecx
	movl	%ecx, 12(%rax)
	movl	8(%rbx), %ecx
	movl	%ecx, 8(%rax)
	movl	4(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, (%rax)
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stv0900_aa,44,2                ## @stv0900_aa
	.comm	_stv0900,44,2                   ## @stv0900
	.comm	_stv6110b,4,2                   ## @stv6110b
	.comm	_stv6110a,4,2                   ## @stv6110a
	.comm	_stv6110x_attach,4,2            ## @stv6110x_attach
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No STV6110X found!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"attach tuner input %d adr %02x\n"

	.no_dead_strip	_tuner_attach_stv6110
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tuner_attach_stv6110
_tuner_attach_stv6110:                  ; @tuner_attach_stv6110
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	w9, [x0]
	and	x23, x9, #0x1
	ldp	x9, x3, [x8, #8]
	ldr	x8, [x8]
	ldr	x21, [x8]
Lloh0:
	adrp	x24, _stv6110b@GOTPAGE
Lloh1:
	ldr	x24, [x24, _stv6110b@GOTPAGEOFF]
Lloh2:
	adrp	x25, _stv6110a@GOTPAGE
Lloh3:
	ldr	x25, [x25, _stv6110a@GOTPAGEOFF]
	cmp	w23, #0
	csel	x2, x25, x24, eq
Lloh4:
	adrp	x8, _stv6110x_attach@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stv6110x_attach@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w1, [x9, x23, lsl #2]
	bl	_dvb_attach
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w2, [x22]
	cmp	w23, #0
	csel	x8, x25, x24, eq
	ldr	w3, [x8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_info
	mov	w0, #0
	ldr	w8, [x20, #40]
Lloh9:
	adrp	x9, _stv0900_aa@GOTPAGE
Lloh10:
	ldr	x9, [x9, _stv0900_aa@GOTPAGEOFF]
	cmp	w19, #0
Lloh11:
	adrp	x10, _stv0900@GOTPAGE
Lloh12:
	ldr	x10, [x10, _stv0900@GOTPAGEOFF]
	csel	x9, x10, x9, eq
	str	w8, [x9, #40]
	ldr	x8, [x20, #32]
	str	x8, [x9, #32]
	ldr	x8, [x20, #24]
	str	x8, [x9, #24]
	ldur	q0, [x20, #8]
	stur	q0, [x9, #8]
	ldp	w10, w8, [x20]
	stp	w10, w8, [x9]
	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, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_stv0900_aa,44,2                ; @stv0900_aa
	.comm	_stv0900,44,2                   ; @stv0900
	.comm	_stv6110b,4,2                   ; @stv6110b
	.comm	_stv6110a,4,2                   ; @stv6110a
	.comm	_stv6110x_attach,4,2            ; @stv6110x_attach
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No STV6110X found!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"attach tuner input %d adr %02x\n"

	.no_dead_strip	_tuner_attach_stv6110
.subsections_via_symbols
