	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib9000_attach                 ## -- Begin function dib9000_attach
	.p2align	4, 0x90
_dib9000_attach:                        ## @dib9000_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	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$152, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	movl	(%r14), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	%rax, %r14
	leaq	88(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcpy
	leaq	56(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, 64(%rbx)
	movl	%r13d, 56(%rbx)
	movq	144(%rbx), %rax
	movq	%rax, 72(%rbx)
	movq	_DIB9000_GPIO_DEFAULT_DIRECTIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 140(%rbx)
	movq	_DIB9000_GPIO_DEFAULT_VALUES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 136(%rbx)
	movq	_DIB9000_GPIO_DEFAULT_PWM_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 132(%rbx)
	leaq	116(%rbx), %r12
	leaq	128(%rbx), %rdi
	callq	_mutex_init
	leaq	124(%rbx), %rdi
	callq	_mutex_init
	leaq	120(%rbx), %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	callq	_mutex_init
	leaq	112(%rbx), %rdi
	callq	_mutex_init
	movq	$0, 104(%rbx)
	movl	$-2, (%rbx)
	movq	96(%rbx), %rax
	movq	%r14, (%rax)
	movq	%rbx, 8(%r14)
	movq	96(%rbx), %rax
	movq	(%rax), %rdi
	movq	_dib9000_ops@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	88(%rbx), %rax
	movq	_OUTMODE_MPEG2_SERIAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_OUTMODE_MPEG2_PAR_GATED_CLK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_OUTMODE_MPEG2_FIFO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dib9000_identify
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	leaq	80(%rbx), %rdi
	movq	_DIB7000MC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	64(%rbx), %rdx
	movl	56(%rbx), %ecx
	callq	_dibx000_init_i2c_master
	movl	(%r15), %eax
	leaq	8(%rbx), %r12
	movl	%eax, 28(%rbx)
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_dib9000_tuner_algo@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_i2c_set_adapdata
	movq	%r12, %rdi
	callq	_i2c_add_adapter
	testq	%rax, %rax
	js	LBB0_10
## %bb.7:
	movl	(%r15), %eax
	movq	%rbx, %r15
	addq	$32, %r15
	movl	%eax, 52(%rbx)
	movl	48(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_dib9000_component_bus_algo@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	$0, 32(%rbx)
	movl	$340, 4(%rbx)                   ## imm = 0x154
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_i2c_set_adapdata
	movq	%r15, %rdi
	callq	_i2c_add_adapter
	testq	%rax, %rax
	js	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_dib9000_fw_reset
	jmp	LBB0_12
LBB0_9:
	movq	%r12, %rdi
	callq	_i2c_del_adapter
LBB0_10:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_DIB9000_GPIO_DEFAULT_DIRECTIONS,4,2 ## @DIB9000_GPIO_DEFAULT_DIRECTIONS
	.comm	_DIB9000_GPIO_DEFAULT_VALUES,4,2 ## @DIB9000_GPIO_DEFAULT_VALUES
	.comm	_DIB9000_GPIO_DEFAULT_PWM_POS,4,2 ## @DIB9000_GPIO_DEFAULT_PWM_POS
	.comm	_dib9000_ops,4,2                ## @dib9000_ops
	.comm	_OUTMODE_MPEG2_SERIAL,8,3       ## @OUTMODE_MPEG2_SERIAL
	.comm	_OUTMODE_MPEG2_PAR_GATED_CLK,8,3 ## @OUTMODE_MPEG2_PAR_GATED_CLK
	.comm	_OUTMODE_MPEG2_FIFO,8,3         ## @OUTMODE_MPEG2_FIFO
	.comm	_DIB7000MC,4,2                  ## @DIB7000MC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DIB9000_FW TUNER ACCESS"

	.comm	_dib9000_tuner_algo,4,2         ## @dib9000_tuner_algo
L_.str.1:                               ## @.str.1
	.asciz	"DIB9000_FW COMPONENT BUS ACCESS"

	.comm	_dib9000_component_bus_algo,4,2 ## @dib9000_component_bus_algo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib9000_attach                 ; -- Begin function dib9000_attach
	.p2align	2
_dib9000_attach:                        ; @dib9000_attach
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x2
	mov	x24, x1
	mov	x21, x0
Lloh0:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #152
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	ldr	w1, [x20]
	mov	w0, #16
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.2:
	add	x22, x19, #88
	mov	x0, x22
	mov	x1, x23
	mov	w2, #4
	bl	_memcpy
	mov	x23, x19
	str	w24, [x23, #56]!
	str	x21, [x19, #64]
	ldr	d0, [x19, #144]
	str	d0, [x19, #72]
Lloh2:
	adrp	x8, _DIB9000_GPIO_DEFAULT_DIRECTIONS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DIB9000_GPIO_DEFAULT_DIRECTIONS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #140]
Lloh5:
	adrp	x8, _DIB9000_GPIO_DEFAULT_VALUES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DIB9000_GPIO_DEFAULT_VALUES@GOTPAGEOFF]
Lloh7:
	adrp	x9, _DIB9000_GPIO_DEFAULT_PWM_POS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DIB9000_GPIO_DEFAULT_PWM_POS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #132]
	add	x24, x19, #116
	add	x0, x19, #128
	bl	_mutex_init
	add	x0, x19, #124
	bl	_mutex_init
	add	x0, x19, #120
	bl	_mutex_init
	mov	x0, x24
	bl	_mutex_init
	add	x0, x19, #112
	bl	_mutex_init
	str	xzr, [x19, #104]
	mov	w8, #-2
	str	w8, [x19]
	ldr	x8, [x19, #96]
	str	x20, [x8]
	str	x19, [x20, #8]
	ldr	x8, [x19, #96]
	ldr	x0, [x8]
Lloh11:
	adrp	x1, _dib9000_ops@GOTPAGE
Lloh12:
	ldr	x1, [x1, _dib9000_ops@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x19, #88]
Lloh13:
	adrp	x9, _OUTMODE_MPEG2_SERIAL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _OUTMODE_MPEG2_SERIAL@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
Lloh16:
	adrp	x10, _OUTMODE_MPEG2_PAR_GATED_CLK@GOTPAGE
Lloh17:
	ldr	x10, [x10, _OUTMODE_MPEG2_PAR_GATED_CLK@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_4
; %bb.3:
Lloh19:
	adrp	x8, _OUTMODE_MPEG2_FIFO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _OUTMODE_MPEG2_FIFO@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	str	x8, [x22]
LBB0_4:
	mov	x0, x23
	bl	_dib9000_identify
	cbz	x0, LBB0_10
; %bb.5:
	add	x0, x19, #80
Lloh22:
	adrp	x8, _DIB7000MC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DIB7000MC@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	x2, [x19, #64]
	ldr	w3, [x19, #56]
	bl	_dibx000_init_i2c_master
	ldr	w8, [x21]
	str	w8, [x19, #28]
	ldr	w0, [x19, #24]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strscpy
	mov	x22, x19
	str	xzr, [x22, #8]!
Lloh27:
	adrp	x8, _dib9000_tuner_algo@GOTPAGE
Lloh28:
	ldr	x8, [x8, _dib9000_tuner_algo@GOTPAGEOFF]
	str	x8, [x19, #16]
	mov	x0, x22
	mov	x1, x19
	bl	_i2c_set_adapdata
	mov	x0, x22
	bl	_i2c_add_adapter
	tbnz	x0, #63, LBB0_10
; %bb.6:
	ldr	w8, [x21]
	str	w8, [x19, #52]
	ldr	w0, [x19, #48]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strscpy
Lloh31:
	adrp	x8, _dib9000_component_bus_algo@GOTPAGE
Lloh32:
	ldr	x8, [x8, _dib9000_component_bus_algo@GOTPAGEOFF]
	str	x8, [x19, #40]
	mov	x21, x19
	str	xzr, [x21, #32]!
	mov	w8, #340
	str	w8, [x19, #4]
	mov	x0, x21
	mov	x1, x19
	bl	_i2c_set_adapdata
	mov	x0, x21
	bl	_i2c_add_adapter
	tbnz	x0, #63, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_dib9000_fw_reset
	b	LBB0_12
LBB0_8:
	mov	x0, x19
	bl	_kfree
	b	LBB0_12
LBB0_9:
	mov	x0, x22
	bl	_i2c_del_adapter
LBB0_10:
	mov	x0, x19
	bl	_kfree
LBB0_11:
	mov	x20, #0
LBB0_12:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_DIB9000_GPIO_DEFAULT_DIRECTIONS,4,2 ; @DIB9000_GPIO_DEFAULT_DIRECTIONS
	.comm	_DIB9000_GPIO_DEFAULT_VALUES,4,2 ; @DIB9000_GPIO_DEFAULT_VALUES
	.comm	_DIB9000_GPIO_DEFAULT_PWM_POS,4,2 ; @DIB9000_GPIO_DEFAULT_PWM_POS
	.comm	_dib9000_ops,4,2                ; @dib9000_ops
	.comm	_OUTMODE_MPEG2_SERIAL,8,3       ; @OUTMODE_MPEG2_SERIAL
	.comm	_OUTMODE_MPEG2_PAR_GATED_CLK,8,3 ; @OUTMODE_MPEG2_PAR_GATED_CLK
	.comm	_OUTMODE_MPEG2_FIFO,8,3         ; @OUTMODE_MPEG2_FIFO
	.comm	_DIB7000MC,4,2                  ; @DIB7000MC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DIB9000_FW TUNER ACCESS"

	.comm	_dib9000_tuner_algo,4,2         ; @dib9000_tuner_algo
l_.str.1:                               ; @.str.1
	.asciz	"DIB9000_FW COMPONENT BUS ACCESS"

	.comm	_dib9000_component_bus_algo,4,2 ; @dib9000_component_bus_algo
.subsections_via_symbols
