	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c_unlock_all
_s3c_unlock_all:                        ## @s3c_unlock_all
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	_ONENAND_HAS_UNLOCK_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_1
## %bb.2:
	movq	_ONENAND_CMD_UNLOCK_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	*24(%rbx)
	movq	_FL_LOCKING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	*16(%rbx)
	movq	%rbx, %rdi
	callq	_ONENAND_IS_DDP
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	(%rbx), %rsi
	shrq	%rsi
	movq	%rsi, %rdx
	jmp	LBB0_4
LBB0_1:
	movq	(%rbx), %rdx
	xorl	%esi, %esi
LBB0_4:
	movq	_ONENAND_CMD_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_s3c_onenand_do_lock_cmd
LBB0_5:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_s3c_onenand_check_lock_status  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ONENAND_HAS_UNLOCK_ALL,4,2     ## @ONENAND_HAS_UNLOCK_ALL
	.comm	_ONENAND_CMD_UNLOCK_ALL,4,2     ## @ONENAND_CMD_UNLOCK_ALL
	.comm	_FL_LOCKING,4,2                 ## @FL_LOCKING
	.comm	_ONENAND_CMD_UNLOCK,4,2         ## @ONENAND_CMD_UNLOCK
	.no_dead_strip	_s3c_unlock_all
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c_unlock_all
_s3c_unlock_all:                        ; @s3c_unlock_all
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0]
	ldr	w8, [x20, #8]
Lloh0:
	adrp	x9, _ONENAND_HAS_UNLOCK_ALL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ONENAND_HAS_UNLOCK_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x20, #24]
Lloh3:
	adrp	x9, _ONENAND_CMD_UNLOCK_ALL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ONENAND_CMD_UNLOCK_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	blr	x8
	ldr	x8, [x20, #16]
Lloh6:
	adrp	x9, _FL_LOCKING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FL_LOCKING@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
	mov	x0, x20
	bl	_ONENAND_IS_DDP
	cbz	w0, LBB0_5
; %bb.2:
	ldr	x8, [x20]
	lsr	x1, x8, #1
	mov	x2, x1
	b	LBB0_4
LBB0_3:
	mov	w1, #0
	ldr	x2, [x20]
LBB0_4:
Lloh9:
	adrp	x8, _ONENAND_CMD_UNLOCK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ONENAND_CMD_UNLOCK@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_s3c_onenand_do_lock_cmd
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_s3c_onenand_check_lock_status
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ONENAND_HAS_UNLOCK_ALL,4,2     ; @ONENAND_HAS_UNLOCK_ALL
	.comm	_ONENAND_CMD_UNLOCK_ALL,4,2     ; @ONENAND_CMD_UNLOCK_ALL
	.comm	_FL_LOCKING,4,2                 ; @FL_LOCKING
	.comm	_ONENAND_CMD_UNLOCK,4,2         ; @ONENAND_CMD_UNLOCK
	.no_dead_strip	_s3c_unlock_all
.subsections_via_symbols
