	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dibusb_tuner_probe_and_attach
_dibusb_tuner_probe_and_attach:         ## @dibusb_tuner_probe_and_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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	$0, -80(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$2, -56(%rbp)
	movl	$0, -48(%rbp)
	leaq	-68(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	$1, -32(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	16(%rdi), %rax
	movl	$96, (%rax)
	movl	$96, -28(%rbp)
	movl	$96, -52(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$1, %esi
	callq	*%rax
LBB0_2:
	movq	8(%rbx), %rdi
	leaq	-64(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_4:
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	xorl	%esi, %esi
	callq	*%rax
LBB0_6:
	cmpl	$254, -68(%rbp)
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	callq	_info
	movq	%rbx, %rdi
	callq	_dibusb_thomson_tuner_attach
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	_info
	movq	%rbx, %rdi
	callq	_dibusb_panasonic_tuner_attach
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tuner i2c write failed."

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.1:                               ## @.str.1
	.asciz	"This device has the Thomson Cable onboard. Which is default."

L_.str.2:                               ## @.str.2
	.asciz	"This device has the Panasonic ENV77H11D5 onboard."

	.no_dead_strip	_dibusb_tuner_probe_and_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dibusb_tuner_probe_and_attach
lCPI0_0:
	.long	1                               ; 0x1
	.long	96                              ; 0x60
lCPI0_1:
	.long	2                               ; 0x2
	.long	96                              ; 0x60
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dibusb_tuner_probe_and_attach:         ; @dibusb_tuner_probe_and_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	add	x8, sp, #16
	stp	xzr, x8, [sp, #16]
	str	wzr, [sp, #40]
	add	x8, sp, #12
	str	x8, [sp, #48]
Lloh3:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #64]
	ldr	x8, [x0, #16]
	mov	w9, #96
	str	w9, [x8]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
Lloh8:
	adrp	x8, lCPI0_1@PAGE
Lloh9:
	ldr	d1, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #56]
	str	d1, [sp, #32]
	ldr	x8, [x0]
	ldr	x0, [x8]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w1, #1
	blr	x8
LBB0_2:
	ldr	x0, [x19, #8]
	add	x1, sp, #24
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.eq	LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_4:
	ldr	x8, [x19]
	ldr	x0, [x8]
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.5:
	mov	w1, #0
	blr	x8
LBB0_6:
	ldr	w8, [sp, #12]
	cmp	w8, #254
	b.ne	LBB0_8
; %bb.7:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_info
	mov	x0, x19
	bl	_dibusb_thomson_tuner_attach
	b	LBB0_9
LBB0_8:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_info
	mov	x0, x19
	bl	_dibusb_panasonic_tuner_attach
LBB0_9:
	ldur	x8, [x29, #-24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpAdrp	Lloh6, Lloh8
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tuner i2c write failed."

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.1:                               ; @.str.1
	.asciz	"This device has the Thomson Cable onboard. Which is default."

l_.str.2:                               ; @.str.2
	.asciz	"This device has the Panasonic ENV77H11D5 onboard."

	.no_dead_strip	_dibusb_tuner_probe_and_attach
.subsections_via_symbols
