	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bdx_hw_reset
_bdx_hw_reset:                          ## @bdx_hw_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	cmpq	$0, (%rdi)
	jne	LBB0_2
## %bb.1:
	movq	_regCLKPLL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_READ_REG
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r14), %esi
	movq	_CLKPLL_SFTRST@GOTPCREL(%rip), %rbx
	orl	(%rbx), %eax
	leal	8(%rax), %edx
	movq	%r15, %rdi
	callq	_WRITE_REG
	movl	$50, %edi
	callq	_udelay
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_READ_REG
	movl	(%r14), %esi
	movl	(%rbx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r15, %rdi
	callq	_WRITE_REG
LBB0_2:
	movl	$70, %ebx
	movq	_regCLKPLL@GOTPCREL(%rip), %r14
	movq	_CLKPLL_LKD@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_READ_REG
	notl	%eax
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$10, %edi
	callq	_mdelay
	decl	%ebx
	jne	LBB0_3
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movl	$1, %eax
	jmp	LBB0_7
LBB0_4:
	movq	_regRXD_CFG0_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_READ_REG
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENTER,4,2                      ## @ENTER
	.comm	_regCLKPLL,4,2                  ## @regCLKPLL
	.comm	_CLKPLL_SFTRST,4,2              ## @CLKPLL_SFTRST
	.comm	_CLKPLL_LKD,4,2                 ## @CLKPLL_LKD
	.comm	_regRXD_CFG0_0,4,2              ## @regRXD_CFG0_0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HW reset failed\n"

	.no_dead_strip	_bdx_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bdx_hw_reset
_bdx_hw_reset:                          ; @bdx_hw_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _regCLKPLL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _regCLKPLL@GOTPAGEOFF]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ_REG
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _CLKPLL_SFTRST@GOTPAGE
Lloh3:
	ldr	x21, [x21, _CLKPLL_SFTRST@GOTPAGEOFF]
	ldr	w8, [x21]
	orr	w8, w8, w0
	add	w2, w8, #8
	mov	x0, x19
	bl	_WRITE_REG
	mov	w0, #50
	bl	_udelay
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ_REG
	ldr	w1, [x20]
	ldr	w8, [x21]
	bic	w2, w0, w8
	mov	x0, x19
	bl	_WRITE_REG
LBB0_2:
	mov	w21, #70
Lloh4:
	adrp	x22, _CLKPLL_LKD@GOTPAGE
Lloh5:
	ldr	x22, [x22, _CLKPLL_LKD@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ_REG
	ldr	w8, [x22]
	bics	wzr, w8, w0
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10
	bl	_mdelay
	subs	w21, w21, #1
	b.ne	LBB0_3
; %bb.5:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	mov	w0, #1
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _regRXD_CFG0_0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _regRXD_CFG0_0@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_READ_REG
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENTER,4,2                      ; @ENTER
	.comm	_regCLKPLL,4,2                  ; @regCLKPLL
	.comm	_CLKPLL_SFTRST,4,2              ; @CLKPLL_SFTRST
	.comm	_CLKPLL_LKD,4,2                 ; @CLKPLL_LKD
	.comm	_regRXD_CFG0_0,4,2              ; @regRXD_CFG0_0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HW reset failed\n"

	.no_dead_strip	_bdx_hw_reset
.subsections_via_symbols
