	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib0070_reset
_dib0070_reset:                         ## @dib0070_reset
	.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	%rdi, %r14
	movq	(%rdi), %r15
	movq	%r15, %rdi
	callq	_HARD_RESET
	movq	%r15, %rdi
	movl	$34, %esi
	callq	_dib0070_read_reg
	testl	$512, %eax                      ## imm = 0x200
	jne	LBB0_1
## %bb.2:
	movq	_DIB0070S_P1A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_3
LBB0_1:
	movq	%r15, %rdi
	movl	$31, %esi
	callq	_dib0070_read_reg
	movzbl	%ah, %esi
LBB0_3:
	movl	%esi, (%r15)
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r15), %eax
	movq	_DIB0070_P1D@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_dib0070_p1f_defaults@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	%r12d, %edi
	callq	_pgm_read_word
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movl	%eax, %r13d
	addq	$4, %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movl	%r12d, %edi
	callq	_pgm_read_word
	movl	%eax, %ebx
	leal	4(%r12), %r14d
	addq	$8, %r12
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r14d, %edi
	callq	_pgm_read_word
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_dib0070_write_reg
	incl	%ebx
	addq	$4, %r12
	addl	$4, %r14d
	decl	%r13d
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%r14d, %edi
	callq	_pgm_read_word
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_7
LBB0_10:
	movq	8(%r15), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	jne	LBB0_12
## %bb.11:
	xorl	%edx, %edx
	cmpl	$24000, 8(%rax)                 ## imm = 0x5DC0
	setge	%dl
	movl	$2, %ecx
	subl	%edx, %ecx
LBB0_12:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	12(%rax), %edx
	shll	$3, %edx
	orl	%ecx, %edx
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_dib0070_write_reg
	movq	8(%r15), %rax
	movl	16(%rax), %eax
	shll	$5, %eax
	movzbl	%al, %edx
	orl	$256, %edx                      ## imm = 0x100
	movq	%r15, %rdi
	movl	$31, %esi
	callq	_dib0070_write_reg
	movq	8(%r15), %rax
	cmpq	$0, 32(%rax)
	je	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_dib0070_read_reg
	orl	$32, %eax
	movzwl	%ax, %edx
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_dib0070_write_reg
LBB0_14:
	movl	(%r15), %eax
	movq	_DIB0070S_P1A@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	$4, %edx
	movl	$3, %ecx
	xorl	%r8d, %r8d
	jmp	LBB0_17
LBB0_16:
	movq	8(%r15), %rax
	movl	20(%rax), %ecx
	movl	24(%rax), %r8d
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	$4, %edx
LBB0_17:
	callq	_dib0070_set_ctrl_lo5
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$27848, %edx                    ## imm = 0x6CC8
	callq	_dib0070_write_reg
	movq	%r15, %rdi
	callq	_dib0070_wbd_offset_calibration
	xorl	%ebx, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DIB0070S_P1A,4,2               ## @DIB0070S_P1A
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Revision: %x\n"

	.comm	_DIB0070_P1D,4,2                ## @DIB0070_P1D
L_.str.1:                               ## @.str.1
	.asciz	"Error: this driver is not to be used meant for P1D or earlier\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_dib0070_p1f_defaults,8,3       ## @dib0070_p1f_defaults
	.no_dead_strip	_dib0070_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib0070_reset
_dib0070_reset:                         ; @dib0070_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	ldr	x19, [x0]
	mov	x0, x19
	bl	_HARD_RESET
	mov	x0, x19
	mov	w1, #34
	bl	_dib0070_read_reg
Lloh0:
	adrp	x25, _DIB0070S_P1A@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DIB0070S_P1A@GOTPAGEOFF]
	tbnz	w0, #9, LBB0_2
; %bb.1:
	ldr	w8, [x25]
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	w1, #31
	bl	_dib0070_read_reg
	ubfx	w8, w0, #8, #8
LBB0_3:
	str	w8, [x19]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _DIB0070_P1D@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DIB0070_P1D@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_5:
Lloh12:
	adrp	x8, _dib0070_p1f_defaults@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dib0070_p1f_defaults@GOTPAGEOFF]
Lloh14:
	ldr	x22, [x8]
	mov	x0, x22
	bl	_pgm_read_word
	cbz	w0, LBB0_10
; %bb.6:
	mov	x21, x0
	add	x22, x22, #4
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x0, x22
	bl	_pgm_read_word
	mov	x23, x0
	add	w24, w22, #4
	add	x22, x22, #8
LBB0_8:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x24
	bl	_pgm_read_word
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_dib0070_write_reg
	add	w23, w23, #1
	add	x22, x22, #4
	add	w24, w24, #4
	subs	w21, w21, #1
	b.ne	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x24
	bl	_pgm_read_word
	mov	x21, x0
	cbnz	w0, LBB0_7
LBB0_10:
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	cbnz	x9, LBB0_12
; %bb.11:
	ldr	w9, [x8, #8]
	mov	w10, #23999
	cmp	w9, w10
	mov	w9, #1
	cinc	w9, w9, le
LBB0_12:
	ldr	w8, [x8, #12]
	orr	w2, w9, w8, lsl #3
	mov	x0, x19
	mov	w1, #16
	bl	_dib0070_write_reg
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #16]
	mov	w2, #256
	bfi	w2, w8, #5, #3
	mov	x0, x19
	mov	w1, #31
	bl	_dib0070_write_reg
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	w1, #2
	bl	_dib0070_read_reg
	and	w8, w0, #0xffff
	orr	w2, w8, #0x20
	mov	x0, x19
	mov	w1, #2
	bl	_dib0070_write_reg
LBB0_14:
	ldr	w8, [x19]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x20
	mov	w1, #2
	mov	w2, #4
	mov	w3, #3
	mov	w4, #0
	b	LBB0_17
LBB0_16:
	ldr	x8, [x19, #8]
	ldp	w3, w4, [x8, #20]
	mov	x0, x20
	mov	w1, #5
	mov	w2, #4
LBB0_17:
	bl	_dib0070_set_ctrl_lo5
	mov	x0, x19
	mov	w1, #1
	mov	w2, #27848
	bl	_dib0070_write_reg
	mov	x0, x19
	bl	_dib0070_wbd_offset_calibration
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DIB0070S_P1A,4,2               ; @DIB0070S_P1A
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Revision: %x\n"

	.comm	_DIB0070_P1D,4,2                ; @DIB0070_P1D
l_.str.1:                               ; @.str.1
	.asciz	"Error: this driver is not to be used meant for P1D or earlier\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_dib0070_p1f_defaults,8,3       ; @dib0070_p1f_defaults
	.no_dead_strip	_dib0070_reset
.subsections_via_symbols
