	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hideep_nvm_unlock
_hideep_nvm_unlock:                     ## @hideep_nvm_unlock
	.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
	movq	%rdi, %rbx
	movq	_HIDEEP_FLASH_CFG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_HIDEEP_NVM_SFR_RPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hideep_pgm_w_reg
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$12, %esi
	callq	_hideep_pgm_r_reg
	movl	(%r14), %esi
	movq	_HIDEEP_NVM_DEFAULT_PAGE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_hideep_pgm_w_reg
	movq	_HIDEEP_PROT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	movl	(%rbx), %ecx
	cmpl	%ecx, %edx
	je	LBB0_2
## %bb.1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_2:
	movl	(%r14), %esi
	movq	_HIDEEP_NVM_SFR_WPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hideep_pgm_w_reg
	xorl	%edi, %edi
	callq	_SET_FLASH_PIO
	movq	_HIDEEP_NVM_MASK_OFS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_NVM_W_SFR
	xorl	%eax, %eax
	callq	_SET_FLASH_HWCONTROL
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_hideep_pgm_w_reg
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HIDEEP_FLASH_CFG,4,2           ## @HIDEEP_FLASH_CFG
	.comm	_HIDEEP_NVM_SFR_RPAGE,4,2       ## @HIDEEP_NVM_SFR_RPAGE
	.comm	_HIDEEP_NVM_DEFAULT_PAGE,4,2    ## @HIDEEP_NVM_DEFAULT_PAGE
	.comm	_HIDEEP_PROT_MODE,4,2           ## @HIDEEP_PROT_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read mask code different %#08x vs %#08x"

	.comm	_HIDEEP_NVM_SFR_WPAGE,4,2       ## @HIDEEP_NVM_SFR_WPAGE
	.comm	_HIDEEP_NVM_MASK_OFS,4,2        ## @HIDEEP_NVM_MASK_OFS
	.no_dead_strip	_hideep_nvm_unlock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hideep_nvm_unlock
_hideep_nvm_unlock:                     ; @hideep_nvm_unlock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _HIDEEP_FLASH_CFG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HIDEEP_FLASH_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _HIDEEP_NVM_SFR_RPAGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HIDEEP_NVM_SFR_RPAGE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_hideep_pgm_w_reg
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #12
	bl	_hideep_pgm_r_reg
	ldr	w1, [x20]
Lloh5:
	adrp	x21, _HIDEEP_NVM_DEFAULT_PAGE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _HIDEEP_NVM_DEFAULT_PAGE@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_hideep_pgm_w_reg
Lloh7:
	adrp	x8, _HIDEEP_PROT_MODE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HIDEEP_PROT_MODE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w3, [x19]
	cmp	w2, w3
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_2:
	ldr	w1, [x20]
Lloh12:
	adrp	x8, _HIDEEP_NVM_SFR_WPAGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HIDEEP_NVM_SFR_WPAGE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hideep_pgm_w_reg
	mov	w0, #0
	bl	_SET_FLASH_PIO
Lloh15:
	adrp	x8, _HIDEEP_NVM_MASK_OFS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HIDEEP_NVM_MASK_OFS@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_NVM_W_SFR
	bl	_SET_FLASH_HWCONTROL
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_hideep_pgm_w_reg
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_HIDEEP_FLASH_CFG,4,2           ; @HIDEEP_FLASH_CFG
	.comm	_HIDEEP_NVM_SFR_RPAGE,4,2       ; @HIDEEP_NVM_SFR_RPAGE
	.comm	_HIDEEP_NVM_DEFAULT_PAGE,4,2    ; @HIDEEP_NVM_DEFAULT_PAGE
	.comm	_HIDEEP_PROT_MODE,4,2           ; @HIDEEP_PROT_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read mask code different %#08x vs %#08x"

	.comm	_HIDEEP_NVM_SFR_WPAGE,4,2       ; @HIDEEP_NVM_SFR_WPAGE
	.comm	_HIDEEP_NVM_MASK_OFS,4,2        ; @HIDEEP_NVM_MASK_OFS
	.no_dead_strip	_hideep_nvm_unlock
.subsections_via_symbols
