	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92c_download_fw             ## -- Begin function rtl92c_download_fw
	.p2align	4, 0x90
_rtl92c_download_fw:                    ## @rtl92c_download_fw
	.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
	movq	%rdi, %r14
	callq	_rtl_priv
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	24(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	16(%r13), %r15
	movq	%rbx, %rdi
	callq	_IS_FW_HEADER_EXIST
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_COMP_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%rbx), %r8d
	movl	8(%rbx), %r9d
	movl	$12, (%rsp)
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	callq	_RT_TRACE
	movl	4(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, 8(%r13)
	movl	(%rbx), %eax
	movl	%eax, 4(%r13)
	addq	$48, %rbx
	addq	$-12, %r15
LBB0_4:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	__rtl92c_enable_fw_download
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	__rtl92c_write_fw
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	__rtl92c_enable_fw_download
	movq	%r14, %rdi
	callq	__rtl92c_fw_free_to_go
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_6
LBB0_1:
	movl	$1, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMP_FW,4,2                    ## @COMP_FW
	.comm	_DBG_DMESG,4,2                  ## @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Firmware Version(%d), Signature(%#x),Size(%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Firmware is not ready to run!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92c_download_fw             ; -- Begin function rtl92c_download_fw
	.p2align	2
_rtl92c_download_fw:                    ; @rtl92c_download_fw
	.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
	bl	_rtl_priv
	mov	x24, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_hal
	ldr	x20, [x0, #24]
	cbz	x20, LBB0_5
; %bb.1:
	mov	x23, x0
	ldr	w21, [x0]
	ldr	x22, [x0, #16]
	mov	x0, x20
	bl	_IS_FW_HEADER_EXIST
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _COMP_FW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMP_FW@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _DBG_DMESG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DBG_DMESG@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldp	w4, w5, [x20, #4]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x24
	mov	w6, #12
	bl	_RT_TRACE
	ldr	w0, [x20, #4]
	bl	_le16_to_cpu
	ldr	w8, [x20], #48
	stp	w8, w0, [x23, #4]
	sub	x22, x22, #12
LBB0_3:
	mov	x0, x19
	mov	w1, #1
	bl	__rtl92c_enable_fw_download
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	bl	__rtl92c_write_fw
	mov	x0, x19
	mov	w1, #0
	bl	__rtl92c_enable_fw_download
	mov	x0, x19
	bl	__rtl92c_fw_free_to_go
	cbz	w0, LBB0_6
; %bb.4:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	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
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_COMP_FW,4,2                    ; @COMP_FW
	.comm	_DBG_DMESG,4,2                  ; @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Firmware Version(%d), Signature(%#x),Size(%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Firmware is not ready to run!\n"

.subsections_via_symbols
