	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_fw_checksum
_check_fw_checksum:                     ## @check_fw_checksum
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_REG_MCUFW_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_rtw_read8
	movl	%eax, %ebx
	movq	_REG_DDMA_CH0CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_rtw_read32
	movq	_BIT_DDMACH0_CHKSUM_STS@GOTPCREL(%rip), %rdx
	movq	_OCPBASE_DMEM_88XX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%eax, (%rdx)
	je	LBB0_2
## %bb.1:
	cmpq	%r15, %rcx
	movq	_BIT_DMEM_DW_OK@GOTPCREL(%rip), %rax
	cmovgq	_BIT_IMEM_DW_OK@GOTPCREL(%rip), %rax
	movq	_BIT_DMEM_CHKSUM_OK@GOTPCREL(%rip), %rcx
	cmovgq	_BIT_IMEM_CHKSUM_OK@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	movl	(%rcx), %edx
	notl	%edx
	andl	%ebx, %edx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_rtw_write8
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_rtw_err
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	cmpq	%r15, %rcx
	jle	LBB0_4
## %bb.3:
	movq	_BIT_IMEM_DW_OK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_BIT_IMEM_CHKSUM_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_BIT_DMEM_DW_OK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_BIT_DMEM_CHKSUM_OK@GOTPCREL(%rip), %rax
LBB0_5:
	orl	(%rax), %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_rtw_write8
	movl	$1, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_MCUFW_CTRL,4,2             ## @REG_MCUFW_CTRL
	.comm	_REG_DDMA_CH0CTRL,4,2           ## @REG_DDMA_CH0CTRL
	.comm	_BIT_DDMACH0_CHKSUM_STS,4,2     ## @BIT_DDMACH0_CHKSUM_STS
	.comm	_OCPBASE_DMEM_88XX,8,3          ## @OCPBASE_DMEM_88XX
	.comm	_BIT_IMEM_DW_OK,4,2             ## @BIT_IMEM_DW_OK
	.comm	_BIT_IMEM_CHKSUM_OK,4,2         ## @BIT_IMEM_CHKSUM_OK
	.comm	_BIT_DMEM_DW_OK,4,2             ## @BIT_DMEM_DW_OK
	.comm	_BIT_DMEM_CHKSUM_OK,4,2         ## @BIT_DMEM_CHKSUM_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid fw checksum\n"

	.no_dead_strip	_check_fw_checksum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_fw_checksum
_check_fw_checksum:                     ; @check_fw_checksum
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _REG_MCUFW_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_MCUFW_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_rtw_read8
	mov	x20, x0
Lloh2:
	adrp	x8, _REG_DDMA_CH0CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_DDMA_CH0CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtw_read32
Lloh5:
	adrp	x8, _BIT_DDMACH0_CHKSUM_STS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BIT_DDMACH0_CHKSUM_STS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x8]
Lloh8:
	adrp	x8, _OCPBASE_DMEM_88XX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _OCPBASE_DMEM_88XX@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	tst	w9, w0
	b.eq	LBB0_2
; %bb.1:
Lloh11:
	adrp	x9, _BIT_IMEM_DW_OK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BIT_IMEM_DW_OK@GOTPAGEOFF]
Lloh13:
	adrp	x10, _BIT_DMEM_DW_OK@GOTPAGE
Lloh14:
	ldr	x10, [x10, _BIT_DMEM_DW_OK@GOTPAGEOFF]
	cmp	x8, x21
	csel	x8, x9, x10, gt
	ldr	w8, [x8]
	orr	w8, w8, w20
Lloh15:
	adrp	x9, _BIT_IMEM_CHKSUM_OK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BIT_IMEM_CHKSUM_OK@GOTPAGEOFF]
Lloh17:
	adrp	x10, _BIT_DMEM_CHKSUM_OK@GOTPAGE
Lloh18:
	ldr	x10, [x10, _BIT_DMEM_CHKSUM_OK@GOTPAGEOFF]
	csel	x9, x9, x10, gt
	ldr	w9, [x9]
	bic	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtw_write8
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_rtw_err
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	cmp	x8, x21
	b.le	LBB0_4
; %bb.3:
Lloh21:
	adrp	x8, _BIT_IMEM_DW_OK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BIT_IMEM_DW_OK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _BIT_IMEM_CHKSUM_OK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BIT_IMEM_CHKSUM_OK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh26:
	adrp	x8, _BIT_DMEM_DW_OK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _BIT_DMEM_DW_OK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _BIT_DMEM_CHKSUM_OK@GOTPAGE
Lloh30:
	ldr	x9, [x9, _BIT_DMEM_CHKSUM_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w9, [x9]
	orr	w8, w8, w20
	orr	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtw_write8
	mov	w0, #1
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_MCUFW_CTRL,4,2             ; @REG_MCUFW_CTRL
	.comm	_REG_DDMA_CH0CTRL,4,2           ; @REG_DDMA_CH0CTRL
	.comm	_BIT_DDMACH0_CHKSUM_STS,4,2     ; @BIT_DDMACH0_CHKSUM_STS
	.comm	_OCPBASE_DMEM_88XX,8,3          ; @OCPBASE_DMEM_88XX
	.comm	_BIT_IMEM_DW_OK,4,2             ; @BIT_IMEM_DW_OK
	.comm	_BIT_IMEM_CHKSUM_OK,4,2         ; @BIT_IMEM_CHKSUM_OK
	.comm	_BIT_DMEM_DW_OK,4,2             ; @BIT_DMEM_DW_OK
	.comm	_BIT_DMEM_CHKSUM_OK,4,2         ; @BIT_DMEM_CHKSUM_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid fw checksum\n"

	.no_dead_strip	_check_fw_checksum
.subsections_via_symbols
