	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib8000_attach                 ## -- Begin function dib8000_attach
	.p2align	4, 0x90
_dib8000_attach:                        ## @dib8000_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	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r13
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	leaq	40(%rax), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_memcpy
	movq	%r13, 8(%rbx)
	movl	%r14d, (%rbx)
	movl	12(%r15), %eax
	movl	%eax, 52(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 48(%rbx)
	movq	40(%rbx), %rax
	movq	_OUTMODE_MPEG2_SERIAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_OUTMODE_MPEG2_PAR_GATED_CLK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_OUTMODE_MPEG2_FIFO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_4:
	leaq	24(%rbx), %r14
	movq	%rbx, 32(%rbx)
	movq	_dib8000_ops@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	%rbx, %rdi
	callq	_dib8000_identify
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	_DIB8000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rdx
	movl	(%rbx), %ecx
	callq	_dibx000_init_i2c_master
	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
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_7:
	xorl	%r14d, %r14d
LBB0_8:
	movq	%r14, %rax
	addq	$8, %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_attach"

	.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
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib8000_attach                 ; -- Begin function dib8000_attach
	.p2align	2
_dib8000_attach:                        ; @dib8000_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	x21, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	add	x23, x0, #40
	mov	x0, x23
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	str	x22, [x19, #8]
	str	w20, [x19]
	ldr	d0, [x21, #8]
	str	d0, [x19, #48]
	ldr	x8, [x19, #40]
Lloh5:
	adrp	x9, _OUTMODE_MPEG2_SERIAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OUTMODE_MPEG2_SERIAL@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _OUTMODE_MPEG2_PAR_GATED_CLK@GOTPAGE
Lloh9:
	ldr	x10, [x10, _OUTMODE_MPEG2_PAR_GATED_CLK@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_3
; %bb.2:
Lloh11:
	adrp	x8, _OUTMODE_MPEG2_FIFO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OUTMODE_MPEG2_FIFO@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x23]
LBB0_3:
	add	x20, x19, #24
	str	x19, [x19, #32]
Lloh14:
	adrp	x1, _dib8000_ops@GOTPAGE
Lloh15:
	ldr	x1, [x1, _dib8000_ops@GOTPAGEOFF]
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x21]
	ldr	w8, [x8]
	str	w8, [x19, #20]
	mov	x0, x19
	bl	_dib8000_identify
	cbz	x0, LBB0_5
; %bb.4:
	add	x0, x19, #16
Lloh16:
	adrp	x8, _DIB8000@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DIB8000@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	ldr	w3, [x19]
	bl	_dibx000_init_i2c_master
	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
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_kfree
LBB0_6:
	mov	x20, #0
LBB0_7:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dib8000_attach"

	.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
.subsections_via_symbols
