	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_nc_lid_resume_store
_sony_nc_lid_resume_store:              ## @sony_nc_lid_resume_store
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$32, %rcx
	jae	LBB0_1
## %bb.3:
	movq	%rcx, %r15
	movq	%rsi, %r14
	movq	_LID_RESUME_S5@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-32(%rbp), %rax
	movq	%rdx, %rdi
	movl	$10, %esi
	movq	%rax, %rdx
	callq	_kstrtoul
	testq	%rax, %rax
	jne	LBB0_1
## %bb.4:
	movq	-32(%rbp), %rax
	cmpq	$1, %rax
	ja	LBB0_1
## %bb.5:
	movq	_LID_RESUME_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %ebx
	jae	LBB0_9
## %bb.6:
	movq	_lid_ctl@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	8(%rdx), %rdx
	leaq	(%rdx,%rbx,4), %rdx
	addq	$-4, %rdx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	addq	$4, %rdx
	cmpq	%r14, %rdx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	LBB0_7
	jmp	LBB0_1
LBB0_9:
	cmpl	%ecx, %ebx
	jne	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subq	(%rax), %r15
LBB0_13:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_lid_ctl@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movl	(%rcx), %edx
	movl	%edx, %esi
	btrl	%ebx, %esi
	btsl	%ebx, %edx
	testq	%rax, %rax
	cmovel	%esi, %edx
	movslq	%edx, %rsi
	movq	%rsi, -32(%rbp)
	movl	4(%rcx), %edi
	shlq	$16, %rsi
	orq	$256, %rsi                      ## imm = 0x100
	leaq	-36(%rbp), %rdx
	callq	_sony_call_snc_handle
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_12:
	movl	-32(%rbp), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_LID_RESUME_S5,4,2              ## @LID_RESUME_S5
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_LID_RESUME_MAX,4,2             ## @LID_RESUME_MAX
	.comm	_lid_ctl,8,3                    ## @lid_ctl
	.comm	_EIO,8,3                        ## @EIO
	.no_dead_strip	_sony_nc_lid_resume_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_nc_lid_resume_store
_sony_nc_lid_resume_store:              ; @sony_nc_lid_resume_store
	.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
	cmp	x3, #32
	b.hs	LBB0_8
; %bb.1:
	mov	x19, x3
	mov	x0, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _LID_RESUME_S5@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LID_RESUME_S5@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x2, sp
	mov	w1, #10
	bl	_kstrtoul
	cbnz	x0, LBB0_8
; %bb.2:
	ldr	x8, [sp]
	cmp	x8, #1
	b.hi	LBB0_8
; %bb.3:
Lloh3:
	adrp	x9, _LID_RESUME_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LID_RESUME_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w21, w9
	b.hs	LBB0_7
; %bb.4:
Lloh6:
	adrp	x10, _lid_ctl@GOTPAGE
Lloh7:
	ldr	x10, [x10, _lid_ctl@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	ldr	x10, [x10, #8]
	add	x10, x10, x21, lsl #2
	sub	x10, x10, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x10, x10, #4
	cmp	x10, x20
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	cmp	x9, x21
	b.ne	LBB0_5
	b	LBB0_8
LBB0_7:
	cmp	w21, w9
	b.ne	LBB0_11
LBB0_8:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_10:
	mov	x0, x19
	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
LBB0_11:
Lloh11:
	adrp	x20, _lid_ctl@GOTPAGE
Lloh12:
	ldr	x20, [x20, _lid_ctl@GOTPAGEOFF]
	ldr	x9, [x20]
	mov	w10, #1
	lsl	w10, w10, w21
	ldp	w11, w0, [x9]
	bic	w9, w11, w10
	orr	w10, w11, w10
	cmp	x8, #0
	csel	w8, w9, w10, eq
	sxtw	x8, w8
	str	x8, [sp]
	mov	w1, #256
	bfi	x1, x8, #16, #48
	add	x2, sp, #12
	bl	_sony_call_snc_handle
	cbz	x0, LBB0_13
; %bb.12:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_13:
	ldr	x8, [sp]
	ldr	x9, [x20]
	str	w8, [x9]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LID_RESUME_S5,4,2              ; @LID_RESUME_S5
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_LID_RESUME_MAX,4,2             ; @LID_RESUME_MAX
	.comm	_lid_ctl,8,3                    ; @lid_ctl
	.comm	_EIO,8,3                        ; @EIO
	.no_dead_strip	_sony_nc_lid_resume_store
.subsections_via_symbols
