	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_atl_utils_soft_reset_rbl
_hw_atl_utils_soft_reset_rbl:           ## @hw_atl_utils_soft_reset_rbl
	.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, %r14
	movl	$1028, %esi                     ## imm = 0x404
	movl	$16609, %edx                    ## imm = 0x40E1
	callq	_aq_hw_write_reg
	movq	%r14, %rdi
	movl	$928, %esi                      ## imm = 0x3A0
	movl	$1, %edx
	callq	_aq_hw_write_reg
	movq	%r14, %rdi
	movl	$12968, %esi                    ## imm = 0x32A8
	xorl	%edx, %edx
	callq	_aq_hw_write_reg
	movq	%r14, %rdi
	movl	$904, %esi                      ## imm = 0x388
	movl	$57005, %edx                    ## imm = 0xDEAD
	callq	_aq_hw_write_reg
	movq	%r14, %rdi
	movl	$1340, %esi                     ## imm = 0x53C
	callq	_aq_hw_read_reg
	orl	$16, %eax
	movq	%r14, %rdi
	movl	$1340, %esi                     ## imm = 0x53C
	movl	%eax, %edx
	callq	_aq_hw_write_reg
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_hw_atl_rx_rx_reg_res_dis_set
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_hw_atl_tx_tx_reg_res_dis_set
	movq	_HW_ATL_MAC_PHY_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_HW_ATL_MAC_PHY_MPI_RESET_BIT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_BIT
	movl	(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%r8d, %r8d
	callq	_aq_hw_write_reg_bit
	movq	_HW_ATL_GLB_SOFT_RES_ADR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_aq_hw_read_reg
                                        ## kill: def $eax killed $eax def $rax
	movl	(%rbx), %esi
	andl	$-49153, %eax                   ## imm = 0xFFFF3FFF
	leal	32768(%rax), %edx
	movq	%r14, %rdi
	callq	_aq_hw_write_reg
	movq	_FORCE_FLASHLESS@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$1332, %esi                     ## imm = 0x534
	xorl	%edx, %edx
	callq	_aq_hw_write_reg
LBB0_2:
	movq	%r14, %rdi
	movl	$1028, %esi                     ## imm = 0x404
	movl	$16608, %edx                    ## imm = 0x40E0
	callq	_aq_hw_write_reg
	movl	$1000, %ebx                     ## imm = 0x3E8
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$10, %edi
	callq	_AQ_HW_SLEEP
	decl	%ebx
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$904, %esi                      ## imm = 0x388
	callq	_aq_hw_read_reg
	movl	%eax, %r12d
	testw	%r12w, %r12w
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movzwl	%r12w, %eax
	cmpl	$57005, %eax                    ## imm = 0xDEAD
	je	LBB0_5
LBB0_6:
	testw	%r12w, %r12w
	je	LBB0_8
## %bb.7:
	movzwl	%r12w, %ebx
	cmpl	$57005, %ebx                    ## imm = 0xDEAD
	jne	LBB0_11
LBB0_8:
	leaq	L_.str(%rip), %rdi
LBB0_9:
	callq	_aq_pr_err
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	cmpq	$0, (%r15)
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	movl	$1332, %esi                     ## imm = 0x534
	movl	$160, %edx
	callq	_aq_hw_write_reg
LBB0_13:
	cmpl	$61863, %ebx                    ## imm = 0xF1A7
	jne	LBB0_14
## %bb.20:
	leaq	L_.str.1(%rip), %rdi
	callq	_aq_pr_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_14:
	movl	$1000, %ebx                     ## imm = 0x3E8
	movq	_HW_ATL_MPI_FW_VERSION@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_aq_hw_read_reg
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	$10, %edi
	callq	_AQ_HW_SLEEP
	decl	%ebx
	jne	LBB0_15
## %bb.17:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_9
LBB0_18:
	movl	$15, %edi
	callq	_AQ_HW_SLEEP
	xorl	%eax, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_ATL_MAC_PHY_CONTROL,4,2     ## @HW_ATL_MAC_PHY_CONTROL
	.comm	_HW_ATL_MAC_PHY_MPI_RESET_BIT,4,2 ## @HW_ATL_MAC_PHY_MPI_RESET_BIT
	.comm	_HW_ATL_GLB_SOFT_RES_ADR,4,2    ## @HW_ATL_GLB_SOFT_RES_ADR
	.comm	_FORCE_FLASHLESS,8,3            ## @FORCE_FLASHLESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RBL Restart failed"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"No FW detected. Dynamic FW load not implemented\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_HW_ATL_MPI_FW_VERSION,4,2      ## @HW_ATL_MPI_FW_VERSION
L_.str.2:                               ## @.str.2
	.asciz	"FW kickstart failed\n"

	.no_dead_strip	_hw_atl_utils_soft_reset_rbl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_atl_utils_soft_reset_rbl
_hw_atl_utils_soft_reset_rbl:           ; @hw_atl_utils_soft_reset_rbl
	.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	w1, #1028
	mov	w2, #16609
	bl	_aq_hw_write_reg
	mov	x0, x19
	mov	w1, #928
	mov	w2, #1
	bl	_aq_hw_write_reg
	mov	x0, x19
	mov	w1, #12968
	mov	w2, #0
	bl	_aq_hw_write_reg
	mov	w21, #57005
	mov	x0, x19
	mov	w1, #904
	mov	w2, #57005
	bl	_aq_hw_write_reg
	mov	x0, x19
	mov	w1, #1340
	bl	_aq_hw_read_reg
	orr	w2, w0, #0x10
	mov	x0, x19
	mov	w1, #1340
	bl	_aq_hw_write_reg
	mov	x0, x19
	mov	w1, #0
	bl	_hw_atl_rx_rx_reg_res_dis_set
	mov	x0, x19
	mov	w1, #0
	bl	_hw_atl_tx_tx_reg_res_dis_set
Lloh0:
	adrp	x8, _HW_ATL_MAC_PHY_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HW_ATL_MAC_PHY_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x22, _HW_ATL_MAC_PHY_MPI_RESET_BIT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _HW_ATL_MAC_PHY_MPI_RESET_BIT@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_BIT
	mov	x2, x0
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	bl	_aq_hw_write_reg_bit
Lloh5:
	adrp	x20, _HW_ATL_GLB_SOFT_RES_ADR@GOTPAGE
Lloh6:
	ldr	x20, [x20, _HW_ATL_GLB_SOFT_RES_ADR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_aq_hw_read_reg
	ldr	w1, [x20]
	and	w8, w0, #0xffff3fff
	orr	w2, w8, #0x8000
	mov	x0, x19
	bl	_aq_hw_write_reg
Lloh7:
	adrp	x20, _FORCE_FLASHLESS@GOTPAGE
Lloh8:
	ldr	x20, [x20, _FORCE_FLASHLESS@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1332
	mov	w2, #0
	bl	_aq_hw_write_reg
LBB0_2:
	mov	x0, x19
	mov	w1, #1028
	mov	w2, #16608
	bl	_aq_hw_write_reg
	mov	w23, #1000
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #904
	bl	_aq_hw_read_reg
	and	w22, w0, #0xffff
	cmp	w22, w21
	ccmp	w22, #0, #4, ne
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10
	bl	_AQ_HW_SLEEP
	subs	w23, w23, #1
	b.ne	LBB0_3
LBB0_5:
	mov	w8, #57005
	cmp	w22, w8
	ccmp	w22, #0, #4, ne
	b.ne	LBB0_10
; %bb.6:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_aq_pr_err
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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_10:
	ldr	x8, [x20]
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	w1, #1332
	mov	w2, #160
	bl	_aq_hw_write_reg
LBB0_12:
	mov	w8, #61863
	cmp	w22, w8
	b.ne	LBB0_14
; %bb.13:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_aq_pr_err
Lloh15:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
	b	LBB0_8
LBB0_14:
	mov	w20, #1000
Lloh17:
	adrp	x21, _HW_ATL_MPI_FW_VERSION@GOTPAGE
Lloh18:
	ldr	x21, [x21, _HW_ATL_MPI_FW_VERSION@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_aq_hw_read_reg
	cbnz	w0, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w0, #10
	bl	_AQ_HW_SLEEP
	subs	w20, w20, #1
	b.ne	LBB0_15
; %bb.17:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_18:
	mov	w0, #15
	bl	_AQ_HW_SLEEP
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_ATL_MAC_PHY_CONTROL,4,2     ; @HW_ATL_MAC_PHY_CONTROL
	.comm	_HW_ATL_MAC_PHY_MPI_RESET_BIT,4,2 ; @HW_ATL_MAC_PHY_MPI_RESET_BIT
	.comm	_HW_ATL_GLB_SOFT_RES_ADR,4,2    ; @HW_ATL_GLB_SOFT_RES_ADR
	.comm	_FORCE_FLASHLESS,8,3            ; @FORCE_FLASHLESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RBL Restart failed"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"No FW detected. Dynamic FW load not implemented\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_HW_ATL_MPI_FW_VERSION,4,2      ; @HW_ATL_MPI_FW_VERSION
l_.str.2:                               ; @.str.2
	.asciz	"FW kickstart failed\n"

	.no_dead_strip	_hw_atl_utils_soft_reset_rbl
.subsections_via_symbols
