	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmstb_restart_handler
_brcmstb_restart_handler:               ## @brcmstb_restart_handler
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_regmap@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_rst_src_en@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_reset_masks@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	4(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movl	(%r14), %edi
	movl	(%rbx), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_5:
	movl	(%r14), %edi
	movq	_sw_mstr_rst@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	(%r15), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_7:
	movl	(%r14), %edi
	movl	(%rbx), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
LBB0_2:
	movl	%eax, %esi
	callq	_pr_err
	movq	_NOTIFY_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_regmap,4,2                     ## @regmap
	.comm	_rst_src_en,4,2                 ## @rst_src_en
	.comm	_reset_masks,8,3                ## @reset_masks
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write rst_src_en (%d)\n"

	.comm	_NOTIFY_DONE,4,2                ## @NOTIFY_DONE
L_.str.1:                               ## @.str.1
	.asciz	"failed to read rst_src_en (%d)\n"

	.comm	_sw_mstr_rst,4,2                ## @sw_mstr_rst
L_.str.2:                               ## @.str.2
	.asciz	"failed to write sw_mstr_rst (%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to read sw_mstr_rst (%d)\n"

	.no_dead_strip	_brcmstb_restart_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmstb_restart_handler
_brcmstb_restart_handler:               ; @brcmstb_restart_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x19, _regmap@GOTPAGE
Lloh1:
	ldr	x19, [x19, _regmap@GOTPAGEOFF]
Lloh2:
	adrp	x21, _rst_src_en@GOTPAGE
Lloh3:
	ldr	x21, [x21, _rst_src_en@GOTPAGEOFF]
	ldr	w0, [x19]
	ldr	w1, [x21]
Lloh4:
	adrp	x20, _reset_masks@GOTPAGE
Lloh5:
	ldr	x20, [x20, _reset_masks@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w2, [x8, #4]
	bl	_regmap_write
	cbz	w0, LBB0_2
; %bb.1:
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_2:
	ldr	w0, [x19]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_4
; %bb.3:
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_4:
	ldr	w0, [x19]
Lloh10:
	adrp	x21, _sw_mstr_rst@GOTPAGE
Lloh11:
	ldr	x21, [x21, _sw_mstr_rst@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	x8, [x20]
	ldr	w2, [x8]
	bl	_regmap_write
	cbz	w0, LBB0_6
; %bb.5:
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_9
; %bb.7:
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_8:
	bl	_pr_err
Lloh16:
	adrp	x8, _NOTIFY_DONE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NOTIFY_DONE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	b	LBB0_9
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_regmap,4,2                     ; @regmap
	.comm	_rst_src_en,4,2                 ; @rst_src_en
	.comm	_reset_masks,8,3                ; @reset_masks
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write rst_src_en (%d)\n"

	.comm	_NOTIFY_DONE,4,2                ; @NOTIFY_DONE
l_.str.1:                               ; @.str.1
	.asciz	"failed to read rst_src_en (%d)\n"

	.comm	_sw_mstr_rst,4,2                ; @sw_mstr_rst
l_.str.2:                               ; @.str.2
	.asciz	"failed to write sw_mstr_rst (%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to read sw_mstr_rst (%d)\n"

	.no_dead_strip	_brcmstb_restart_handler
.subsections_via_symbols
