	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_create_photo              ## -- Begin function user_create_photo
	.p2align	4, 0x90
_user_create_photo:                     ## @user_create_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_check_album_id
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_write_only@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movl	(%r15), %eax
	movl	%eax, %r13d
	jmp	LBB0_10
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_4:
	movq	%r15, %rdi
	callq	_user_loaded
	movl	%eax, %edi
	callq	_assert
	movl	(%r15), %r12d
	testl	%ebx, %ebx
	jns	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_user_create_album_force
LBB0_6:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_user_get_photo_data
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_data_get_cnt
	movslq	%r14d, %r12
	addq	%rax, %r12
	movl	%ebx, %edi
	callq	_GET_MAX_PHOTOS
	cmpq	%rax, %r12
	jg	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_user_create_photo_internal
	xorl	%edi, %edi
	cmpl	%r14d, %eax
	sete	%dil
	callq	_assert
LBB0_9:
	movl	(%r15), %eax
LBB0_10:
	addl	%r14d, %eax
	movl	%eax, (%r15)
LBB0_11:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_create_photo              ; -- Begin function user_create_photo
	.p2align	2
_user_create_photo:                     ; @user_create_photo
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	mov	x0, x1
	bl	_check_album_id
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _write_only@GOTPAGE
Lloh1:
	ldr	x8, [x8, _write_only@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x20]
	mov	x21, x8
	b	LBB0_11
LBB0_3:
	mov	w21, #0
	b	LBB0_12
LBB0_4:
	mov	x0, x20
	bl	_user_loaded
	bl	_assert
	ldr	w21, [x20]
	tbz	w22, #31, LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x22
	bl	_user_create_album_force
LBB0_6:
	mov	x0, x20
	mov	x1, x22
	bl	_user_get_photo_data
	cbz	x0, LBB0_8
; %bb.7:
	mov	x23, x0
	bl	_data_get_cnt
	add	x24, x0, w19, sxtw
	mov	x0, x22
	bl	_GET_MAX_PHOTOS
	cmp	x24, x0
	b.le	LBB0_9
LBB0_8:
	mov	w21, #0
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	mov	x3, x19
	mov	x4, x21
	bl	_user_create_photo_internal
	cmp	w0, w19
	cset	w0, eq
	bl	_assert
LBB0_10:
	ldr	w8, [x20]
LBB0_11:
	add	w8, w8, w19
	str	w8, [x20]
LBB0_12:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_write_only,8,3                 ; @write_only
.subsections_via_symbols
