	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rtl92c_enable_fw_download
__rtl92c_enable_fw_download:            ## @_rtl92c_enable_fw_download
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_rtl_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	(%rax), %rax
	movq	_HARDWARE_TYPE_RTL8192CU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.7:
	movq	_REG_MCUFWDL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_rtl_read_dword
	movq	_MCUFWDL_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	orl	%eax, %ecx
	notl	%edx
	andl	%eax, %edx
	testl	%r15d, %r15d
	cmovnel	%ecx, %edx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl_write_dword                ## TAILCALL
LBB0_1:
	movq	_HARDWARE_TYPE_RTL8192CE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	movq	_REG_SYS_FUNC_EN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	incq	%rsi
	movq	%r14, %rdi
	callq	_rtl_read_byte
	movq	(%rbx), %rsi
	incq	%rsi
	orl	$4, %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_rtl_write_byte
	movq	_REG_MCUFWDL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_rtl_read_byte
	movq	(%rbx), %rsi
	orl	$1, %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_rtl_write_byte
	movq	(%rbx), %rsi
	addq	$2, %rsi
	movq	%r14, %rdi
	callq	_rtl_read_byte
	movq	(%rbx), %rsi
	addq	$2, %rsi
	andl	$247, %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	jmp	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_REG_MCUFWDL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_rtl_read_byte
	movq	(%rbx), %rsi
	andl	$254, %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_rtl_write_byte
	movq	(%rbx), %rsi
	incq	%rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl_write_byte                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HARDWARE_TYPE_RTL8192CU,8,3    ## @HARDWARE_TYPE_RTL8192CU
	.comm	_REG_MCUFWDL,8,3                ## @REG_MCUFWDL
	.comm	_MCUFWDL_EN,4,2                 ## @MCUFWDL_EN
	.comm	_HARDWARE_TYPE_RTL8192CE,8,3    ## @HARDWARE_TYPE_RTL8192CE
	.comm	_REG_SYS_FUNC_EN,8,3            ## @REG_SYS_FUNC_EN
	.no_dead_strip	__rtl92c_enable_fw_download
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _rtl92c_enable_fw_download
__rtl92c_enable_fw_download:            ; @_rtl92c_enable_fw_download
	.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	x20, x1
	mov	x21, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_hal
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _HARDWARE_TYPE_RTL8192CU@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HARDWARE_TYPE_RTL8192CU@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x21, _REG_MCUFWDL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _REG_MCUFWDL@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_rtl_read_dword
Lloh5:
	adrp	x8, _MCUFWDL_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MCUFWDL_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w9, w8, w0
	bic	w8, w0, w8
	cmp	w20, #0
	csel	w2, w8, w9, eq
	ldr	x1, [x21]
	mov	x0, x19
	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
	b	_rtl_write_dword
LBB0_2:
Lloh8:
	adrp	x9, _HARDWARE_TYPE_RTL8192CE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HARDWARE_TYPE_RTL8192CE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	cbz	w20, LBB0_6
; %bb.4:
Lloh11:
	adrp	x20, _REG_SYS_FUNC_EN@GOTPAGE
Lloh12:
	ldr	x20, [x20, _REG_SYS_FUNC_EN@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x1, x8, #1
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	x8, [x20]
	add	x1, x8, #1
	orr	w2, w0, #0x4
	mov	x0, x19
	bl	_rtl_write_byte
Lloh13:
	adrp	x20, _REG_MCUFWDL@GOTPAGE
Lloh14:
	ldr	x20, [x20, _REG_MCUFWDL@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	x1, [x20]
	orr	w2, w0, #0x1
	mov	x0, x19
	bl	_rtl_write_byte
	ldr	x8, [x20]
	add	x1, x8, #2
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	x8, [x20]
	add	x1, x8, #2
	mov	w8, #247
	and	w2, w0, w8
	mov	x0, x19
	b	LBB0_7
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
LBB0_6:
Lloh15:
	adrp	x20, _REG_MCUFWDL@GOTPAGE
Lloh16:
	ldr	x20, [x20, _REG_MCUFWDL@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	x1, [x20]
	and	w2, w0, #0xfe
	mov	x0, x19
	bl	_rtl_write_byte
	ldr	x8, [x20]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #0
LBB0_7:
	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
	b	_rtl_write_byte
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HARDWARE_TYPE_RTL8192CU,8,3    ; @HARDWARE_TYPE_RTL8192CU
	.comm	_REG_MCUFWDL,8,3                ; @REG_MCUFWDL
	.comm	_MCUFWDL_EN,4,2                 ; @MCUFWDL_EN
	.comm	_HARDWARE_TYPE_RTL8192CE,8,3    ; @HARDWARE_TYPE_RTL8192CE
	.comm	_REG_SYS_FUNC_EN,8,3            ; @REG_SYS_FUNC_EN
	.no_dead_strip	__rtl92c_enable_fw_download
.subsections_via_symbols
