	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92ee_download_fw            ## -- Begin function rtl92ee_download_fw
	.p2align	4, 0x90
_rtl92ee_download_fw:                   ## @rtl92ee_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, %r12
	callq	_rtl_priv
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	24(%rax), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r13), %edi
	callq	_le16_to_cpu
	movl	%eax, 36(%r14)
	movl	12(%r13), %eax
	movl	%eax, 32(%r14)
	movq	16(%r14), %r15
	movq	24(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_COMP_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r15, %r8
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	%r13, %rdi
	callq	_IS_FW_HEADER_EXIST
	movq	_COMP_FW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movslq	8(%r13), %r8
	movq	(%r13), %r9
	movl	$16, (%rsp)
	leaq	L_.str.1(%rip), %rcx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$64, %rax
	addq	$-16, %r15
	movq	%rbx, %r13
	movq	%r15, %rbx
	movq	%rax, %r15
	cmpq	$0, 8(%r14)
	jne	LBB0_6
	jmp	LBB0_8
LBB0_1:
	movl	$1, %ebx
	jmp	LBB0_9
LBB0_4:
	movq	(%r13), %r8
	leaq	L_.str.2(%rip), %rcx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	%rbx, %r13
	movq	%r15, %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	cmpq	$0, 8(%r14)
	je	LBB0_8
LBB0_6:
	movq	_REG_MCUFWDL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_rtl_read_byte
	movq	%rbx, %r14
	movl	%eax, %ebx
	movl	$7, %edi
	callq	_BIT
	testl	%ebx, %eax
	movq	%r14, %rbx
	je	LBB0_8
## %bb.7:
	movq	_REG_MCUFWDL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_rtl_write_byte
	movq	%r12, %rdi
	callq	_rtl92ee_firmware_selfreset
LBB0_8:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	__rtl92ee_enable_fw_download
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	__rtl92ee_write_fw
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	__rtl92ee_enable_fw_download
	movq	%r12, %rdi
	callq	__rtl92ee_fw_free_to_go
LBB0_9:
	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	"normal Firmware SIZE %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Firmware Version(%d), Signature(%#x),Size(%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Firmware no Header, Signature(%#x)\n"

	.comm	_REG_MCUFWDL,4,2                ## @REG_MCUFWDL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92ee_download_fw            ; -- Begin function rtl92ee_download_fw
	.p2align	2
_rtl92ee_download_fw:                   ; @rtl92ee_download_fw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	bl	_rtl_priv
	mov	x21, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_hal
	ldr	x25, [x0, #24]
	cbz	x25, LBB0_3
; %bb.1:
	mov	x24, x0
	ldr	w20, [x0]
	ldr	w0, [x25, #8]
	bl	_le16_to_cpu
	ldr	w8, [x25, #12]
	stp	w8, w0, [x24, #32]
	ldp	x22, x23, [x24, #16]
Lloh0:
	adrp	x26, _COMP_FW@GOTPAGE
Lloh1:
	ldr	x26, [x26, _COMP_FW@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh2:
	adrp	x27, _DBG_DMESG@GOTPAGE
Lloh3:
	ldr	x27, [x27, _DBG_DMESG@GOTPAGEOFF]
	ldr	w2, [x27]
Lloh4:
	adrp	x3, l_.str@PAGE
Lloh5:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x21
	mov	x4, x22
	bl	_RT_TRACE
	mov	x0, x25
	bl	_IS_FW_HEADER_EXIST
	ldr	w1, [x26]
	ldr	w2, [x27]
	cbz	x0, LBB0_4
; %bb.2:
	ldrsw	x4, [x25, #8]
	ldr	x8, [x25]
	mov	w9, #16
Lloh6:
	adrp	x3, l_.str.1@PAGE
Lloh7:
	add	x3, x3, l_.str.1@PAGEOFF
	stp	x8, x9, [sp]
	mov	x0, x21
	bl	_RT_TRACE
	add	x23, x23, #64
	sub	x22, x22, #16
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_5
	b	LBB0_7
LBB0_3:
	mov	w0, #1
	b	LBB0_8
LBB0_4:
	ldr	x4, [x25]
Lloh8:
	adrp	x3, l_.str.2@PAGE
Lloh9:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_RT_TRACE
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_7
LBB0_5:
Lloh10:
	adrp	x25, _REG_MCUFWDL@GOTPAGE
Lloh11:
	ldr	x25, [x25, _REG_MCUFWDL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x21
	bl	_rtl_read_byte
	mov	x24, x0
	mov	w0, #7
	bl	_BIT
	tst	w0, w24
	b.eq	LBB0_7
; %bb.6:
	ldr	w1, [x25]
	mov	x0, x21
	mov	w2, #0
	bl	_rtl_write_byte
	mov	x0, x19
	bl	_rtl92ee_firmware_selfreset
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	__rtl92ee_enable_fw_download
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	__rtl92ee_write_fw
	mov	x0, x19
	mov	w1, #0
	bl	__rtl92ee_enable_fw_download
	mov	x0, x19
	bl	__rtl92ee_fw_free_to_go
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.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	"normal Firmware SIZE %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Firmware Version(%d), Signature(%#x),Size(%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Firmware no Header, Signature(%#x)\n"

	.comm	_REG_MCUFWDL,4,2                ; @REG_MCUFWDL
.subsections_via_symbols
