	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8723_fw_free_to_go          ## -- Begin function rtl8723_fw_free_to_go
	.p2align	4, 0x90
_rtl8723_fw_free_to_go:                 ## @rtl8723_fw_free_to_go
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_rtl_priv
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%r14d, %r14d
	movl	$0, %r15d
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	cmovgl	%r14d, %r15d
	movq	%rax, %r12
	leal	1(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_REG_MCUFWDL@GOTPCREL(%rip), %r14
	movq	_FWDL_CHKSUM_RPT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rtl_read_dword
	cmpl	%ebx, %r15d
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	testl	%eax, (%r13)
	je	LBB0_1
## %bb.4:
	cmpl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_5
LBB0_6:
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rtl_read_dword
	movq	_MCUFWDL_RDY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_WINTINI_RDY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rtl_write_dword
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_rtl8723be_firmware_selfreset
LBB0_8:
	incl	%r15d
	movq	_FW_8192C_POLLING_DELAY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rtl_read_dword
	movl	%eax, %ebx
	movq	_WINTINI_RDY@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r13), %edi
	callq	_mdelay
	decl	%r15d
	jne	LBB0_9
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	jmp	LBB0_13
LBB0_2:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	cmpl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	jl	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
LBB0_13:
	callq	_pr_err
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_14
LBB0_10:
	movq	_COMP_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	movl	%ebx, %r8d
	callq	_RT_TRACE
	xorl	%eax, %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_REG_MCUFWDL,4,2                ## @REG_MCUFWDL
	.comm	_FWDL_CHKSUM_RPT,4,2            ## @FWDL_CHKSUM_RPT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chksum report fail ! REG_MCUFWDL:0x%08x .\n"

	.comm	_MCUFWDL_RDY,4,2                ## @MCUFWDL_RDY
	.comm	_WINTINI_RDY,4,2                ## @WINTINI_RDY
	.comm	_COMP_FW,4,2                    ## @COMP_FW
	.comm	_DBG_TRACE,4,2                  ## @DBG_TRACE
L_.str.1:                               ## @.str.1
	.asciz	"Polling FW ready success!! REG_MCUFWDL:0x%08x .\n"

	.comm	_FW_8192C_POLLING_DELAY,4,2     ## @FW_8192C_POLLING_DELAY
L_.str.2:                               ## @.str.2
	.asciz	"Polling FW ready fail!! REG_MCUFWDL:0x%08x .\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8723_fw_free_to_go          ; -- Begin function rtl8723_fw_free_to_go
	.p2align	2
_rtl8723_fw_free_to_go:                 ; @rtl8723_fw_free_to_go
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
	bl	_rtl_priv
	mov	x20, x0
	mov	w26, #0
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	cmp	w23, #0
	csel	w25, w23, wzr, gt
	add	w27, w25, #1
Lloh3:
	adrp	x24, _REG_MCUFWDL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _REG_MCUFWDL@GOTPAGEOFF]
Lloh5:
	adrp	x28, _FWDL_CHKSUM_RPT@GOTPAGE
Lloh6:
	ldr	x28, [x28, _FWDL_CHKSUM_RPT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	bl	_rtl_read_dword
	mov	x1, x0
	cmp	w25, w26
	b.eq	LBB0_10
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w26, w26, #1
	ldr	w8, [x28]
	tst	w8, w1
	b.eq	LBB0_1
; %bb.3:
	cmp	w26, w23
	b.ge	LBB0_11
LBB0_4:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_rtl_read_dword
Lloh7:
	adrp	x8, _MCUFWDL_RDY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MCUFWDL_RDY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh10:
	adrp	x23, _WINTINI_RDY@GOTPAGE
Lloh11:
	ldr	x23, [x23, _WINTINI_RDY@GOTPAGEOFF]
	ldr	w9, [x23]
	bic	w2, w8, w9
	ldr	w1, [x24]
	mov	x0, x20
	bl	_rtl_write_dword
	cbz	w22, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_rtl8723be_firmware_selfreset
LBB0_6:
	add	w22, w25, #1
Lloh12:
	adrp	x25, _FW_8192C_POLLING_DELAY@GOTPAGE
Lloh13:
	ldr	x25, [x25, _FW_8192C_POLLING_DELAY@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	bl	_rtl_read_dword
	mov	x21, x0
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x25]
	bl	_mdelay
	subs	w22, w22, #1
	b.ne	LBB0_7
; %bb.9:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	b	LBB0_12
LBB0_10:
	mov	x26, x27
	cmp	w26, w23
	b.lt	LBB0_4
LBB0_11:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
LBB0_12:
	bl	_pr_err
	b	LBB0_14
LBB0_13:
Lloh18:
	adrp	x8, _COMP_FW@GOTPAGE
Lloh19:
	ldr	x8, [x8, _COMP_FW@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _DBG_TRACE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DBG_TRACE@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
Lloh24:
	adrp	x3, l_.str.1@PAGE
Lloh25:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x4, x21
	bl	_RT_TRACE
	mov	w19, #0
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_REG_MCUFWDL,4,2                ; @REG_MCUFWDL
	.comm	_FWDL_CHKSUM_RPT,4,2            ; @FWDL_CHKSUM_RPT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chksum report fail ! REG_MCUFWDL:0x%08x .\n"

	.comm	_MCUFWDL_RDY,4,2                ; @MCUFWDL_RDY
	.comm	_WINTINI_RDY,4,2                ; @WINTINI_RDY
	.comm	_COMP_FW,4,2                    ; @COMP_FW
	.comm	_DBG_TRACE,4,2                  ; @DBG_TRACE
l_.str.1:                               ; @.str.1
	.asciz	"Polling FW ready success!! REG_MCUFWDL:0x%08x .\n"

	.comm	_FW_8192C_POLLING_DELAY,4,2     ; @FW_8192C_POLLING_DELAY
l_.str.2:                               ; @.str.2
	.asciz	"Polling FW ready fail!! REG_MCUFWDL:0x%08x .\n"

.subsections_via_symbols
