	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function download_firmware_end_flow
_download_firmware_end_flow:            ## @download_firmware_end_flow
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_REG_TXDMA_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BTI_PAGE_OVF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_rtw_write32
	movq	_REG_MCUFW_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rtw_read16
	movq	_BIT_CHECK_SUM_OK@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	notl	%edx
	testl	%edx, (%rcx)
	jne	LBB0_1
## %bb.2:
	movq	_BIT_FW_DW_RDY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_BIT_MCUFWDL_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rtw_write16                    ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_TXDMA_STATUS,4,2           ## @REG_TXDMA_STATUS
	.comm	_BTI_PAGE_OVF,4,2               ## @BTI_PAGE_OVF
	.comm	_REG_MCUFW_CTRL,4,2             ## @REG_MCUFW_CTRL
	.comm	_BIT_CHECK_SUM_OK,4,2           ## @BIT_CHECK_SUM_OK
	.comm	_BIT_FW_DW_RDY,4,2              ## @BIT_FW_DW_RDY
	.comm	_BIT_MCUFWDL_EN,4,2             ## @BIT_MCUFWDL_EN
	.no_dead_strip	_download_firmware_end_flow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function download_firmware_end_flow
_download_firmware_end_flow:            ; @download_firmware_end_flow
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _REG_TXDMA_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_TXDMA_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BTI_PAGE_OVF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BTI_PAGE_OVF@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_rtw_write32
Lloh6:
	adrp	x20, _REG_MCUFW_CTRL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _REG_MCUFW_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtw_read16
Lloh8:
	adrp	x8, _BIT_CHECK_SUM_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BIT_CHECK_SUM_OK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	bics	wzr, w8, w0
	b.ne	LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, _BIT_FW_DW_RDY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BIT_FW_DW_RDY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh14:
	adrp	x9, _BIT_MCUFWDL_EN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BIT_MCUFWDL_EN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	bic	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rtw_write16
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_TXDMA_STATUS,4,2           ; @REG_TXDMA_STATUS
	.comm	_BTI_PAGE_OVF,4,2               ; @BTI_PAGE_OVF
	.comm	_REG_MCUFW_CTRL,4,2             ; @REG_MCUFW_CTRL
	.comm	_BIT_CHECK_SUM_OK,4,2           ; @BIT_CHECK_SUM_OK
	.comm	_BIT_FW_DW_RDY,4,2              ; @BIT_FW_DW_RDY
	.comm	_BIT_MCUFWDL_EN,4,2             ; @BIT_MCUFWDL_EN
	.no_dead_strip	_download_firmware_end_flow
.subsections_via_symbols
