	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bristol_tuner_attach
_bristol_tuner_attach:                  ## @bristol_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	%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	8(%rdi), %rax
	movq	16(%rdi), %r12
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_dib3000mc_get_tuner_i2c_master
	movq	%rax, %r14
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	movq	_USB_VID_HAUPPAUGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movl	$1220, %r15d                    ## imm = 0x4C4
	cmpq	%rax, %r13
	jne	LBB0_4
## %bb.1:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	8(%rax), %r13
	movq	_USB_PID_HAUPPAUGE_NOVA_T_500_2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	cmpq	%rax, %r13
	jne	LBB0_4
## %bb.2:
	addq	$8, %r12
	movq	(%rbx), %rsi
	addq	$89, %rsi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_eeprom_read
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	$1220, %r15d                    ## imm = 0x4C4
	addl	-44(%rbp), %r15d
LBB0_4:
	movq	_mt2060_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rcx
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movq	_bristol_mt2060_config@GOTPCREL(%rip), %rax
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movq	%r14, %rdx
	movl	%r15d, %r8d
	callq	_dvb_attach
	movq	_ENODEV@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	xorl	%edx, %edx
	testq	%rax, %rax
	cmovnel	%edx, %ecx
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_VID_HAUPPAUGE,4,2          ## @USB_VID_HAUPPAUGE
	.comm	_USB_PID_HAUPPAUGE_NOVA_T_500_2,4,2 ## @USB_PID_HAUPPAUGE_NOVA_T_500_2
	.comm	_mt2060_attach,4,2              ## @mt2060_attach
	.comm	_bristol_mt2060_config,8,3      ## @bristol_mt2060_config
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_bristol_tuner_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bristol_tuner_attach
_bristol_tuner_attach:                  ; @bristol_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	x19, x0
	ldp	x8, x21, [x0, #8]
	ldr	w0, [x8]
	mov	w1, #1
	bl	_dib3000mc_get_tuner_i2c_master
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x22, [x8]
Lloh0:
	adrp	x8, _USB_VID_HAUPPAUGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_VID_HAUPPAUGE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	cmp	x22, x0
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x22, [x8, #8]
Lloh3:
	adrp	x8, _USB_PID_HAUPPAUGE_NOVA_T_500_2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_PID_HAUPPAUGE_NOVA_T_500_2@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	cmp	x22, x0
	b.ne	LBB0_3
; %bb.2:
	add	x0, x21, #8
	ldr	x8, [x19]
	add	x1, x8, #89
	add	x2, sp, #12
	bl	_eeprom_read
	cbz	w0, LBB0_5
LBB0_3:
	mov	w4, #1220
LBB0_4:
Lloh6:
	adrp	x8, _mt2060_attach@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mt2060_attach@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x9, x8, [x19]
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _bristol_mt2060_config@GOTPAGE
Lloh10:
	ldr	x8, [x8, _bristol_mt2060_config@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x3, x8, x9, lsl #2
	mov	x2, x20
	bl	_dvb_attach
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w0, wzr, w8, ne
	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
LBB0_5:
	ldr	w8, [sp, #12]
	add	w4, w8, #1220
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_VID_HAUPPAUGE,4,2          ; @USB_VID_HAUPPAUGE
	.comm	_USB_PID_HAUPPAUGE_NOVA_T_500_2,4,2 ; @USB_PID_HAUPPAUGE_NOVA_T_500_2
	.comm	_mt2060_attach,4,2              ; @mt2060_attach
	.comm	_bristol_mt2060_config,8,3      ; @bristol_mt2060_config
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_bristol_tuner_attach
.subsections_via_symbols
