	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_sf2_sw_rst
_bcm_sf2_sw_rst:                        ## @bcm_sf2_sw_rst
	.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, %r12
	movq	_CORE_WATCHDOG_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_core_readl
	movq	_SOFTWARE_RESET@GOTPCREL(%rip), %r15
	movq	_EN_CHIP_RST@GOTPCREL(%rip), %rcx
	orl	(%r15), %eax
	orl	(%rcx), %eax
	movq	_EN_SW_RESET@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_core_writel
	movl	$1001, %ebx                     ## imm = 0x3E9
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_core_readl
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	decl	%ebx
	jne	LBB0_1
## %bb.3:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	xorl	%ecx, %ecx
	cmpl	$1, %ebx
	cmovnel	%ecx, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CORE_WATCHDOG_CTRL,4,2         ## @CORE_WATCHDOG_CTRL
	.comm	_SOFTWARE_RESET,4,2             ## @SOFTWARE_RESET
	.comm	_EN_CHIP_RST,4,2                ## @EN_CHIP_RST
	.comm	_EN_SW_RESET,4,2                ## @EN_SW_RESET
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_bcm_sf2_sw_rst
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_sf2_sw_rst
_bcm_sf2_sw_rst:                        ; @bcm_sf2_sw_rst
	.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
Lloh0:
	adrp	x20, _CORE_WATCHDOG_CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CORE_WATCHDOG_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_core_readl
Lloh2:
	adrp	x21, _SOFTWARE_RESET@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SOFTWARE_RESET@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh4:
	adrp	x9, _EN_CHIP_RST@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EN_CHIP_RST@GOTPAGEOFF]
Lloh6:
	adrp	x10, _EN_SW_RESET@GOTPAGE
Lloh7:
	ldr	x10, [x10, _EN_SW_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w1, w8, w10
	ldr	w2, [x20]
	mov	x0, x19
	bl	_core_writel
	mov	w22, #1001
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_core_readl
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	subs	w22, w22, #1
	b.ne	LBB0_1
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w22, #1
	csneg	w0, wzr, w8, ne
LBB0_5:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CORE_WATCHDOG_CTRL,4,2         ; @CORE_WATCHDOG_CTRL
	.comm	_SOFTWARE_RESET,4,2             ; @SOFTWARE_RESET
	.comm	_EN_CHIP_RST,4,2                ; @EN_CHIP_RST
	.comm	_EN_SW_RESET,4,2                ; @EN_SW_RESET
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_bcm_sf2_sw_rst
.subsections_via_symbols
