	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib0090_fw_reset_digital
_dib0090_fw_reset_digital:              ## @dib0090_fw_reset_digital
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	(%rdi), %r15
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movq	%r15, %rdi
	callq	_HARD_RESET
	movq	_EN_PLL@GOTPCREL(%rip), %rbx
	movq	_EN_CRYSTAL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	(%rbx), %edx
	movq	%r15, %rdi
	movl	$36, %esi
	callq	_dib0090_fw_write_reg
	movq	_EN_DIGCLK@GOTPCREL(%rip), %rax
	movl	(%rbx), %edx
	orl	(%rax), %edx
	orl	(%r12), %edx
	movq	%r15, %rdi
	movl	$27, %esi
	callq	_dib0090_fw_write_reg
	movl	(%r13), %edx
	movl	16(%r13), %eax
	shll	$11, %eax
	addl	$-2048, %eax                    ## imm = 0xF800
	shll	$4, %edx
	orl	%eax, %edx
	orl	4(%r13), %edx
	orl	$768, %edx                      ## imm = 0x300
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_dib0090_fw_write_reg
	xorl	%eax, %eax
	cmpl	$0, 36(%r13)
	sete	%al
	shll	$14, %eax
	movl	8(%r13), %ecx
	movl	12(%r13), %edx
	shll	$4, %ecx
	movl	%edx, %esi
	shll	$5, %esi
	testl	%edx, %edx
	movl	$224, %edx
	cmovnel	%esi, %edx
	orl	%ecx, %edx
	orl	%eax, %edx
	orl	$2560, %edx                     ## imm = 0xA00
	movq	%r15, %rdi
	movl	$35, %esi
	callq	_dib0090_fw_write_reg
	movq	%r15, %rdi
	movl	$33, %esi
	callq	_dib0090_fw_read_reg
	movl	%eax, %r12d
	andl	$8191, %eax                     ## imm = 0x1FFF
	movl	20(%r13), %ecx
	movl	24(%r13), %edx
	shll	$12, %ecx
	shll	$6, %edx
	orl	%ecx, %edx
	orl	28(%r13), %edx
	cmpl	%edx, %eax
	je	LBB0_8
## %bb.1:
	cmpl	$0, 32(%r13)
	je	LBB0_2
LBB0_8:
	movl	32(%r13), %edx
	testl	%edx, %edx
	je	LBB0_10
## %bb.9:
	shll	$15, %edx
	orl	%r12d, %edx
	movq	%r15, %rdi
	movl	$33, %esi
	callq	_dib0090_fw_write_reg
LBB0_10:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dib0090_fw_identify            ## TAILCALL
LBB0_2:
	orl	$32768, %r12d                   ## imm = 0x8000
	movq	%r15, %rdi
	movl	$33, %esi
	movl	%r12d, %edx
	callq	_dib0090_fw_write_reg
	andl	$-8193, %r12d                   ## imm = 0xDFFF
	movq	%r15, %rdi
	movl	$33, %esi
	movl	%r12d, %edx
	callq	_dib0090_fw_write_reg
	movl	20(%r13), %eax
	movl	24(%r13), %r12d
	shll	$12, %eax
	shll	$6, %r12d
	orl	%eax, %r12d
	orl	28(%r13), %r12d
	movl	%r12d, %edx
	orl	$32768, %edx                    ## imm = 0x8000
	movq	%r15, %rdi
	movl	$33, %esi
	callq	_dib0090_fw_write_reg
	orl	$40960, %r12d                   ## imm = 0xA000
	movq	%r15, %rdi
	movl	$33, %esi
	movl	%r12d, %edx
	callq	_dib0090_fw_write_reg
	movl	$-100, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$26, %esi
	callq	_dib0090_fw_read_reg
	testl	$2048, %eax                     ## imm = 0x800
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	jne	LBB0_3
	jmp	LBB0_5
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.7:
	andl	$-32769, %r12d                  ## imm = 0xFFFF7FFF
	movq	%r15, %rdi
	movl	$33, %esi
	movl	%r12d, %edx
	callq	_dib0090_fw_write_reg
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_dprintk
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	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	"fw reset digital\n"

	.comm	_EN_PLL,4,2                     ## @EN_PLL
	.comm	_EN_CRYSTAL,4,2                 ## @EN_CRYSTAL
	.comm	_EN_DIGCLK,4,2                  ## @EN_DIGCLK
L_.str.1:                               ## @.str.1
	.asciz	"Pll: Unable to lock Pll\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dib0090_fw_reset_digital
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib0090_fw_reset_digital
_dib0090_fw_reset_digital:              ; @dib0090_fw_reset_digital
	.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, x1
	mov	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	mov	x0, x20
	bl	_HARD_RESET
Lloh2:
	adrp	x22, _EN_PLL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _EN_PLL@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh4:
	adrp	x23, _EN_CRYSTAL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _EN_CRYSTAL@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w2, w9, w8
	mov	x0, x20
	mov	w1, #36
	bl	_dib0090_fw_write_reg
Lloh6:
	adrp	x8, _EN_DIGCLK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EN_DIGCLK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w2, w8, w9
	mov	x0, x20
	mov	w1, #27
	bl	_dib0090_fw_write_reg
	ldr	w8, [x21, #16]
	lsl	w8, w8, #11
	sub	w8, w8, #2048
	ldp	w9, w10, [x21]
	orr	w8, w8, w9, lsl #4
	orr	w8, w8, w10
	orr	w2, w8, #0x300
	mov	x0, x20
	mov	w1, #32
	bl	_dib0090_fw_write_reg
	ldr	w8, [x21, #36]
	mov	w9, #512
	mov	w10, #16896
	cmp	w8, #0
	csel	w8, w10, w9, eq
	ldp	w9, w10, [x21, #8]
	lsl	w11, w10, #5
	mov	w12, #224
	cmp	w10, #0
	csel	w10, w12, w11, eq
	orr	w8, w8, w9, lsl #4
	orr	w8, w8, w10
	orr	w2, w8, #0x800
	mov	x0, x20
	mov	w1, #35
	bl	_dib0090_fw_write_reg
	mov	x0, x20
	mov	w1, #33
	bl	_dib0090_fw_read_reg
	mov	x22, x0
	and	w8, w0, #0x1fff
	ldp	w9, w10, [x21, #20]
	lsl	w10, w10, #6
	orr	w9, w10, w9, lsl #12
	ldr	w10, [x21, #28]
	orr	w9, w9, w10
	cmp	w8, w9
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x21, #32]
	cbz	w8, LBB0_5
LBB0_2:
	ldr	w8, [x21, #32]
	cbz	w8, LBB0_4
LBB0_3:
	orr	w2, w22, w8, lsl #15
	mov	x0, x20
	mov	w1, #33
	bl	_dib0090_fw_write_reg
LBB0_4:
	mov	x0, x19
	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
	b	_dib0090_fw_identify
LBB0_5:
	orr	w22, w22, #0x8000
	mov	x0, x20
	mov	w1, #33
	mov	x2, x22
	bl	_dib0090_fw_write_reg
	and	w2, w22, #0xffffdfff
	mov	x0, x20
	mov	w1, #33
	bl	_dib0090_fw_write_reg
	ldp	w8, w9, [x21, #20]
	lsl	w9, w9, #6
	orr	w8, w9, w8, lsl #12
	ldr	w9, [x21, #28]
	orr	w22, w8, w9
	orr	w2, w22, #0x8000
	mov	x0, x20
	mov	w1, #33
	bl	_dib0090_fw_write_reg
	mov	w8, #40960
	orr	w22, w22, w8
	mov	x0, x20
	mov	w1, #33
	mov	x2, x22
	bl	_dib0090_fw_write_reg
	mov	w23, #-100
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #26
	bl	_dib0090_fw_read_reg
	tbnz	w0, #11, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	adds	w23, w23, #1
	b.lo	LBB0_6
	b	LBB0_10
LBB0_8:
	cbz	w23, LBB0_10
; %bb.9:
	and	w22, w22, #0xffff7fff
	mov	x0, x20
	mov	w1, #33
	mov	x2, x22
	bl	_dib0090_fw_write_reg
	ldr	w8, [x21, #32]
	cbnz	w8, LBB0_3
	b	LBB0_4
LBB0_10:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fw reset digital\n"

	.comm	_EN_PLL,4,2                     ; @EN_PLL
	.comm	_EN_CRYSTAL,4,2                 ; @EN_CRYSTAL
	.comm	_EN_DIGCLK,4,2                  ; @EN_DIGCLK
l_.str.1:                               ; @.str.1
	.asciz	"Pll: Unable to lock Pll\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dib0090_fw_reset_digital
.subsections_via_symbols
