	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hw_atl_utils_soft_reset        ## -- Begin function hw_atl_utils_soft_reset
	.p2align	4, 0x90
_hw_atl_utils_soft_reset:               ## @hw_atl_utils_soft_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
	movl	$1000, %ebx                     ## imm = 0x3E8
	movq	_HW_ATL_MPI_DAISY_CHAIN_STATUS@GOTPCREL(%rip), %r12
	movq	_HW_ATL_MPI_BOOT_EXIT_CODE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_aq_hw_read_reg
	movl	%eax, %r15d
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_aq_hw_read_reg
	cmpl	$100663296, %r15d               ## imm = 0x6000000
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	decl	%ebx
	jne	LBB0_1
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_aq_pr_err
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movl	%ecx, (%r14)
	movq	_HW_ATL_FW_VER_1X@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_HW_ATL_MPI_FW_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_aq_hw_read_reg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_hw_atl_utils_ver_match
	testl	%eax, %eax
	je	LBB0_7
LBB0_8:
	cmpl	$0, (%r14)
	je	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hw_atl_utils_soft_reset_rbl    ## TAILCALL
LBB0_7:
	movq	_MPI_DEINIT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_hw_atl_utils_mpi_set_state
	movq	_hw_atl_utils_mpi_get_state@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ecx, %ecx
	cmpl	$0, (%rbx)
	sete	%cl
	movq	%r14, %rsi
	movl	$10, %r8d
	movl	$10000, %r9d                    ## imm = 0x2710
	callq	_readx_poll_timeout_atomic
	testl	%eax, %eax
	jne	LBB0_5
	jmp	LBB0_8
LBB0_9:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hw_atl_utils_soft_reset_flb    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_ATL_MPI_DAISY_CHAIN_STATUS,4,2 ## @HW_ATL_MPI_DAISY_CHAIN_STATUS
	.comm	_HW_ATL_MPI_BOOT_EXIT_CODE,4,2  ## @HW_ATL_MPI_BOOT_EXIT_CODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Neither RBL nor FLB firmware started\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_HW_ATL_FW_VER_1X,4,2           ## @HW_ATL_FW_VER_1X
	.comm	_HW_ATL_MPI_FW_VERSION,4,2      ## @HW_ATL_MPI_FW_VERSION
	.comm	_MPI_DEINIT,4,2                 ## @MPI_DEINIT
	.comm	_hw_atl_utils_mpi_get_state,4,2 ## @hw_atl_utils_mpi_get_state
	.comm	_HW_ATL_MPI_STATE_MSK,4,2       ## @HW_ATL_MPI_STATE_MSK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hw_atl_utils_soft_reset        ; -- Begin function hw_atl_utils_soft_reset
	.p2align	2
_hw_atl_utils_soft_reset:               ; @hw_atl_utils_soft_reset
	.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	x19, x0
	mov	w21, #1000
Lloh0:
	adrp	x22, _HW_ATL_MPI_DAISY_CHAIN_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HW_ATL_MPI_DAISY_CHAIN_STATUS@GOTPAGEOFF]
Lloh2:
	adrp	x23, _HW_ATL_MPI_BOOT_EXIT_CODE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _HW_ATL_MPI_BOOT_EXIT_CODE@GOTPAGEOFF]
	mov	w24, #100663296
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_aq_hw_read_reg
	mov	x20, x0
	ldr	w1, [x23]
	mov	x0, x19
	bl	_aq_hw_read_reg
	cmp	w20, w24
	ccmp	w0, #0, #0, eq
	b.ne	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w21, w21, #1
	b.ne	LBB0_1
; %bb.3:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_aq_pr_err
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
LBB0_5:
	cmp	w0, #0
	cset	w8, ne
	str	w8, [x19]
Lloh9:
	adrp	x8, _HW_ATL_FW_VER_1X@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HW_ATL_FW_VER_1X@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
Lloh12:
	adrp	x8, _HW_ATL_MPI_FW_VERSION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HW_ATL_MPI_FW_VERSION@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_aq_hw_read_reg
	mov	x1, x0
	mov	x0, x20
	bl	_hw_atl_utils_ver_match
	cbz	w0, LBB0_8
LBB0_6:
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.7:
	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	_hw_atl_utils_soft_reset_rbl
LBB0_8:
Lloh15:
	adrp	x20, _MPI_DEINIT@GOTPAGE
Lloh16:
	ldr	x20, [x20, _MPI_DEINIT@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_hw_atl_utils_mpi_set_state
Lloh17:
	adrp	x8, _hw_atl_utils_mpi_get_state@GOTPAGE
Lloh18:
	ldr	x8, [x8, _hw_atl_utils_mpi_get_state@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w3, eq
	mov	x1, x19
	mov	w4, #10
	mov	w5, #10000
	bl	_readx_poll_timeout_atomic
	cbnz	w0, LBB0_4
	b	LBB0_6
LBB0_9:
	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	_hw_atl_utils_soft_reset_flb
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_ATL_MPI_DAISY_CHAIN_STATUS,4,2 ; @HW_ATL_MPI_DAISY_CHAIN_STATUS
	.comm	_HW_ATL_MPI_BOOT_EXIT_CODE,4,2  ; @HW_ATL_MPI_BOOT_EXIT_CODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Neither RBL nor FLB firmware started\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_HW_ATL_FW_VER_1X,4,2           ; @HW_ATL_FW_VER_1X
	.comm	_HW_ATL_MPI_FW_VERSION,4,2      ; @HW_ATL_MPI_FW_VERSION
	.comm	_MPI_DEINIT,4,2                 ; @MPI_DEINIT
	.comm	_hw_atl_utils_mpi_get_state,4,2 ; @hw_atl_utils_mpi_get_state
	.comm	_HW_ATL_MPI_STATE_MSK,4,2       ; @HW_ATL_MPI_STATE_MSK
.subsections_via_symbols
