	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8000_init
_dib8000_init:                          ## @dib8000_init
	.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, %r15
	movl	%esi, %r13d
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$120, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movl	(%r14), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r14
	leaq	88(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_memcpy
	leaq	40(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, 40(%rbx)
	movl	%r13d, 48(%rbx)
	movq	108(%rbx), %rax
	movq	%rax, 64(%rbx)
	leaq	104(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_init
	movq	%r12, 56(%rbx)
	movl	12(%r15), %eax
	movl	%eax, 100(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 96(%rbx)
	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	80(%rbx), %rax
	movq	%r14, (%rax)
	movq	%rbx, 8(%r14)
	movq	80(%rbx), %rax
	movq	(%rax), %rdi
	movq	_dib8000_ops@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 76(%rbx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dib8000_identify
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	72(%rbx), %rdi
	movq	_DIB8000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	40(%rbx), %rdx
	movl	48(%rbx), %ecx
	callq	_dibx000_init_i2c_master
	movq	%rbx, %r15
	addq	$8, %r15
	movl	32(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_dib8096p_tuner_xfer_algo@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	40(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_i2c_set_adapdata
	movq	%r15, %rdi
	callq	_i2c_add_adapter
	movq	%r14, %rdi
	callq	_dib8000_reset
	movq	%rbx, %rdi
	movl	$285, %esi                      ## imm = 0x11D
	callq	_dib8000_read_word
	orl	$96, %eax
	movq	%rbx, %rdi
	movl	$285, %esi                      ## imm = 0x11D
	movl	%eax, %edx
	callq	_dib8000_write_word
	movl	$6000, (%rbx)                   ## imm = 0x1770
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_8:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dib8000_init\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.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	_dib8000_ops,16,3               ## @dib8000_ops
	.comm	_DIB8000,4,2                    ## @DIB8000
L_.str.1:                               ## @.str.1
	.asciz	"DiB8096P tuner interface"

	.comm	_dib8096p_tuner_xfer_algo,4,2   ## @dib8096p_tuner_xfer_algo
	.no_dead_strip	_dib8000_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8000_init
_dib8000_init:                          ; @dib8000_init
	.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	x21, x2
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh2:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #120
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w1, [x20]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	add	x25, x19, #88
	mov	x0, x25
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	mov	x22, x19
	str	x24, [x22, #40]!
	str	w23, [x22, #8]
	ldur	d0, [x22, #68]
	str	d0, [x22, #24]
	add	x23, x22, #64
	mov	x0, x23
	bl	_mutex_init
	str	x23, [x22, #16]
	ldr	d0, [x21, #8]
	str	d0, [x22, #56]
	ldr	x8, [x19, #88]
Lloh4:
	adrp	x9, _OUTMODE_MPEG2_SERIAL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _OUTMODE_MPEG2_SERIAL@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
Lloh7:
	adrp	x10, _OUTMODE_MPEG2_PAR_GATED_CLK@GOTPAGE
Lloh8:
	ldr	x10, [x10, _OUTMODE_MPEG2_PAR_GATED_CLK@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _OUTMODE_MPEG2_FIFO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OUTMODE_MPEG2_FIFO@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x25]
LBB0_4:
	ldr	x8, [x19, #80]
	str	x20, [x8]
	str	x19, [x20, #8]
	ldr	x8, [x19, #80]
	ldr	x0, [x8]
Lloh13:
	adrp	x1, _dib8000_ops@GOTPAGE
Lloh14:
	ldr	x1, [x1, _dib8000_ops@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x21]
	ldr	w8, [x8]
	str	w8, [x19, #76]
	mov	x0, x22
	bl	_dib8000_identify
	cbz	x0, LBB0_6
; %bb.5:
	add	x0, x19, #72
Lloh15:
	adrp	x8, _DIB8000@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DIB8000@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	x2, [x19, #40]
	ldr	w3, [x19, #48]
	bl	_dibx000_init_i2c_master
	ldr	w0, [x19, #32]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strscpy
Lloh20:
	adrp	x8, _dib8096p_tuner_xfer_algo@GOTPAGE
Lloh21:
	ldr	x8, [x8, _dib8096p_tuner_xfer_algo@GOTPAGEOFF]
	stp	xzr, x8, [x19, #16]
	ldr	x8, [x19, #40]
	ldr	w8, [x8]
	mov	x21, x19
	str	w8, [x21, #8]!
	mov	x0, x21
	mov	x1, x19
	bl	_i2c_set_adapdata
	mov	x0, x21
	bl	_i2c_add_adapter
	mov	x0, x20
	bl	_dib8000_reset
	mov	x0, x19
	mov	w1, #285
	bl	_dib8000_read_word
	orr	w2, w0, #0x60
	mov	x0, x19
	mov	w1, #285
	bl	_dib8000_write_word
	mov	w8, #6000
	str	w8, [x19]
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_kfree
LBB0_7:
	mov	x20, #0
LBB0_8:
	mov	x0, x20
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dib8000_init\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.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	_dib8000_ops,16,3               ; @dib8000_ops
	.comm	_DIB8000,4,2                    ; @DIB8000
l_.str.1:                               ; @.str.1
	.asciz	"DiB8096P tuner interface"

	.comm	_dib8096p_tuner_xfer_algo,4,2   ; @dib8096p_tuner_xfer_algo
	.no_dead_strip	_dib8000_init
.subsections_via_symbols
