	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dibusb_dib3000mc_tuner_attach  ## -- Begin function dibusb_dib3000mc_tuner_attach
	.p2align	4, 0x90
_dibusb_dib3000mc_tuner_attach:         ## @dibusb_dib3000mc_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	16(%rdi), %r13
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	callq	_le16_to_cpu
	movq	_USB_VID_LITEON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movq	_USB_PID_LITEON_DVB_T_WARM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.2:
	movq	8(%r12), %rdi
	leaq	-52(%rbp), %rdx
	movl	$126, %esi
	callq	_dibusb_read_eeprom_byte
	movq	8(%r12), %rdi
	leaq	-48(%rbp), %rdx
	movl	$127, %esi
	callq	_dibusb_read_eeprom_byte
	movl	-52(%rbp), %esi
	cmpl	$128, %esi
	je	LBB0_5
## %bb.3:
	testl	%esi, %esi
	jne	LBB0_6
## %bb.4:
	movl	$1220, %r14d                    ## imm = 0x4C4
	addl	-48(%rbp), %r14d
	jmp	LBB0_17
LBB0_7:
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	callq	_le16_to_cpu
	movq	_USB_VID_DIBCOM@GOTPCREL(%rip), %rcx
	movl	$1220, %r14d                    ## imm = 0x4C4
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.8:
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movq	_USB_PID_DIBCOM_MOD3001_WARM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.9:
	movq	8(%r12), %rdi
	leaq	-44(%rbp), %rdx
	movl	$7, %esi
	callq	_dibusb_read_eeprom_byte
	movl	$1220, %r14d                    ## imm = 0x4C4
	cmpl	$2, -44(%rbp)
	jne	LBB0_17
## %bb.10:
	movq	8(%r12), %rdi
	leaq	-44(%rbp), %r14
	movl	$127, %esi
	movq	%r14, %rdx
	callq	_dibusb_read_eeprom_byte
	movl	$126, -52(%rbp)
	movl	$126, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%r12), %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_dibusb_read_eeprom_byte
	leal	-1(%rbx), %eax
	movl	%eax, -52(%rbp)
	cmpl	$8, %ebx
	movl	%eax, %ebx
	jle	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %eax
	cmpl	$255, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	testl	%eax, %eax
	je	LBB0_13
LBB0_14:
	movl	-44(%rbp), %r14d
	testb	$-128, %r14b
	jne	LBB0_15
## %bb.16:
	addl	$1220, %r14d                    ## imm = 0x4C4
	jmp	LBB0_17
LBB0_5:
	movl	$1220, %r14d                    ## imm = 0x4C4
	subl	-48(%rbp), %r14d
	jmp	LBB0_17
LBB0_6:
	movl	-48(%rbp), %edx
	leaq	L_.str(%rip), %rdi
	callq	_warn
	movl	$1220, %r14d                    ## imm = 0x4C4
	jmp	LBB0_17
LBB0_15:
	addl	$965, %r14d                     ## imm = 0x3C5
LBB0_17:
	movq	(%r12), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_dib3000mc_get_tuner_i2c_master
	movq	%rax, %r15
	movq	_mt2060_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	_stk3000p_mt2060_config@GOTPCREL(%rip), %rcx
	movl	%r15d, %edx
	movl	%r14d, %r8d
	callq	_dvb_attach
	testq	%rax, %rax
	je	LBB0_18
## %bb.20:
	movl	$1, (%r13)
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	_stk3000p_dib3000p_config@GOTPCREL(%rip), %rsi
	callq	_dib3000mc_set_config
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_18:
	movq	_dvb_pll_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	_DVB_PLL_ENV57H1XD5@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$96, %edx
	movq	%r15, %rcx
	callq	_dvb_attach
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_21
## %bb.19:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_VID_LITEON,8,3             ## @USB_VID_LITEON
	.comm	_USB_PID_LITEON_DVB_T_WARM,8,3  ## @USB_PID_LITEON_DVB_T_WARM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LITE-ON DVB-T: Strange IF1 calibration :%2X %2X\n"

	.comm	_USB_VID_DIBCOM,8,3             ## @USB_VID_DIBCOM
	.comm	_USB_PID_DIBCOM_MOD3001_WARM,8,3 ## @USB_PID_DIBCOM_MOD3001_WARM
	.comm	_mt2060_attach,4,2              ## @mt2060_attach
	.comm	_stk3000p_mt2060_config,4,2     ## @stk3000p_mt2060_config
	.comm	_dvb_pll_attach,4,2             ## @dvb_pll_attach
	.comm	_DVB_PLL_ENV57H1XD5,4,2         ## @DVB_PLL_ENV57H1XD5
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_stk3000p_dib3000p_config,4,2   ## @stk3000p_dib3000p_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dibusb_dib3000mc_tuner_attach  ; -- Begin function dibusb_dib3000mc_tuner_attach
	.p2align	2
_dibusb_dib3000mc_tuner_attach:         ; @dibusb_dib3000mc_tuner_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldp	x8, x22, [x0, #8]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	bl	_le16_to_cpu
Lloh0:
	adrp	x8, _USB_VID_LITEON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_VID_LITEON@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_le16_to_cpu
Lloh3:
	adrp	x8, _USB_PID_LITEON_DVB_T_WARM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_PID_LITEON_DVB_T_WARM@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
	ldr	x0, [x19, #8]
	add	x2, sp, #12
	mov	w1, #126
	bl	_dibusb_read_eeprom_byte
	ldr	x0, [x19, #8]
	add	x2, sp, #8
	mov	w1, #127
	bl	_dibusb_read_eeprom_byte
	ldr	w1, [sp, #12]
	cmp	w1, #128
	b.eq	LBB0_12
; %bb.3:
	cbnz	w1, LBB0_13
; %bb.4:
	ldr	w8, [sp, #8]
	add	w20, w8, #1220
	b	LBB0_15
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	bl	_le16_to_cpu
Lloh6:
	adrp	x8, _USB_VID_DIBCOM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_VID_DIBCOM@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.6:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_le16_to_cpu
Lloh9:
	adrp	x8, _USB_PID_DIBCOM_MOD3001_WARM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _USB_PID_DIBCOM_MOD3001_WARM@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.7:
	ldr	x0, [x19, #8]
	add	x2, sp, #4
	mov	w1, #7
	bl	_dibusb_read_eeprom_byte
	ldr	w8, [sp, #4]
	cmp	w8, #2
	b.ne	LBB0_14
; %bb.8:
	ldr	x0, [x19, #8]
	add	x2, sp, #4
	mov	w1, #127
	bl	_dibusb_read_eeprom_byte
	mov	w20, #126
	str	w20, [sp, #12]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #4]
	cmp	w8, #255
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x0, [x19, #8]
	add	x2, sp, #4
	mov	x1, x20
	bl	_dibusb_read_eeprom_byte
	sub	w8, w20, #1
	str	w8, [sp, #12]
	cmp	w20, #8
	mov	x20, x8
	b.gt	LBB0_9
LBB0_11:
	ldr	w8, [sp, #4]
	add	w9, w8, #1220
	add	w10, w8, #965
	tst	w8, #0x80
	csel	w20, w9, w10, eq
	b	LBB0_15
LBB0_12:
	ldr	w8, [sp, #8]
	mov	w9, #1220
	sub	w20, w9, w8
	b	LBB0_15
LBB0_13:
	ldr	w2, [sp, #8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
LBB0_14:
	mov	w20, #1220
LBB0_15:
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	w23, #1
	mov	w1, #1
	bl	_dib3000mc_get_tuner_i2c_master
	mov	x21, x0
Lloh14:
	adrp	x8, _mt2060_attach@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mt2060_attach@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x8, [x19]
	ldr	w1, [x8]
Lloh17:
	adrp	x3, _stk3000p_mt2060_config@GOTPAGE
Lloh18:
	ldr	x3, [x3, _stk3000p_mt2060_config@GOTPAGEOFF]
	mov	x2, x21
	mov	x4, x20
	bl	_dvb_attach
	cbz	x0, LBB0_17
; %bb.16:
	str	w23, [x22]
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh19:
	adrp	x1, _stk3000p_dib3000p_config@GOTPAGE
Lloh20:
	ldr	x1, [x1, _stk3000p_dib3000p_config@GOTPAGEOFF]
	bl	_dib3000mc_set_config
	b	LBB0_18
LBB0_17:
Lloh21:
	adrp	x8, _dvb_pll_attach@GOTPAGE
Lloh22:
	ldr	x8, [x8, _dvb_pll_attach@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	x8, [x19]
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _DVB_PLL_ENV57H1XD5@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DVB_PLL_ENV57H1XD5@GOTPAGEOFF]
Lloh26:
	ldr	w4, [x8]
	mov	w2, #96
	mov	x3, x21
	bl	_dvb_attach
	cbz	x0, LBB0_20
LBB0_18:
	mov	w0, #0
LBB0_19:
	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
	add	sp, sp, #80
	ret
LBB0_20:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_VID_LITEON,8,3             ; @USB_VID_LITEON
	.comm	_USB_PID_LITEON_DVB_T_WARM,8,3  ; @USB_PID_LITEON_DVB_T_WARM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LITE-ON DVB-T: Strange IF1 calibration :%2X %2X\n"

	.comm	_USB_VID_DIBCOM,8,3             ; @USB_VID_DIBCOM
	.comm	_USB_PID_DIBCOM_MOD3001_WARM,8,3 ; @USB_PID_DIBCOM_MOD3001_WARM
	.comm	_mt2060_attach,4,2              ; @mt2060_attach
	.comm	_stk3000p_mt2060_config,4,2     ; @stk3000p_mt2060_config
	.comm	_dvb_pll_attach,4,2             ; @dvb_pll_attach
	.comm	_DVB_PLL_ENV57H1XD5,4,2         ; @DVB_PLL_ENV57H1XD5
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_stk3000p_dib3000p_config,4,2   ; @stk3000p_dib3000p_config
.subsections_via_symbols
