	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_restore_photo             ## -- Begin function user_restore_photo
	.p2align	4, 0x90
_user_restore_photo:                    ## @user_restore_photo
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_write_only@GOTPCREL(%rip), %rax
	movl	$1, %r13d
	cmpq	$0, (%rax)
	je	LBB0_1
LBB0_6:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_user_get_aid_by_pid
	xorl	%r13d, %r13d
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_user_get_photo_data
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdi
	movl	%r14d, %esi
	callq	_data_get_hidden_state
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r12, %rdi
	callq	_data_get_cnt
	movq	%rax, %rbx
	movl	%r15d, %edi
	callq	_GET_MAX_PHOTOS
	cmpq	%rax, %rbx
	jge	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_data_restore
	notl	%eax
	shrl	$31, %eax
	movl	%eax, %edi
	callq	_assert
	movl	$1, %r13d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_write_only,8,3                 ## @write_only
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_restore_photo             ; -- Begin function user_restore_photo
	.p2align	2
_user_restore_photo:                    ; @user_restore_photo
	.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
Lloh0:
	adrp	x8, _write_only@GOTPAGE
Lloh1:
	ldr	x8, [x8, _write_only@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
LBB0_1:
	mov	w0, #1
LBB0_2:
	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_3:
	mov	x19, x1
	mov	x21, x0
	bl	_user_get_aid_by_pid
	cbz	w0, LBB0_2
; %bb.4:
	mov	x20, x0
	mov	x0, x21
	mov	x1, x20
	bl	_user_get_photo_data
	cbz	x0, LBB0_2
; %bb.5:
	mov	x21, x0
	mov	x1, x19
	bl	_data_get_hidden_state
	cbz	x0, LBB0_2
; %bb.6:
	mov	x0, x21
	bl	_data_get_cnt
	mov	x22, x0
	mov	x0, x20
	bl	_GET_MAX_PHOTOS
	cmp	x22, x0
	b.ge	LBB0_8
; %bb.7:
	mov	x0, x21
	mov	x1, x19
	bl	_data_restore
	mvn	w8, w0
	lsr	w0, w8, #31
	bl	_assert
	b	LBB0_1
LBB0_8:
	mov	w0, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_write_only,8,3                 ; @write_only
.subsections_via_symbols
