	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_create_album              ## -- Begin function user_create_album
	.p2align	4, 0x90
_user_create_album:                     ## @user_create_album
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_write_only@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	_user_loaded
	movl	%eax, %edi
	callq	_assert
	movq	%rbx, %rdi
	callq	_user_get_albums_count
	movq	_MAX_ALBUMS@GOTPCREL(%rip), %rcx
	movl	(%rbx), %esi
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_user_create_album_internal
	movl	%eax, %ecx
	movl	(%rbx), %eax
	leal	1(%rax), %edx
	testl	%ecx, %ecx
	movl	%edx, (%rbx)
	cmovel	%ecx, %eax
	jmp	LBB0_5
LBB0_3:
	incl	%esi
	movl	%esi, (%rbx)
	xorl	%eax, %eax
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_write_only,8,3                 ## @write_only
	.comm	_MAX_ALBUMS,8,3                 ## @MAX_ALBUMS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_create_album              ; -- Begin function user_create_album
	.p2align	2
_user_create_album:                     ; @user_create_album
	.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
Lloh0:
	adrp	x8, _write_only@GOTPAGE
Lloh1:
	ldr	x8, [x8, _write_only@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	add	w8, w0, #1
	b	LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_user_loaded
	bl	_assert
	mov	x0, x19
	bl	_user_get_albums_count
Lloh3:
	adrp	x8, _MAX_ALBUMS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_ALBUMS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w1, [x19]
	cmp	x0, x8
	b.ge	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_user_create_album_internal
	ldr	w8, [x19]
	add	w9, w8, #1
	str	w9, [x19]
	cmp	w0, #0
	csel	w0, wzr, w8, eq
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	add	w8, w1, #1
LBB0_5:
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_write_only,8,3                 ; @write_only
	.comm	_MAX_ALBUMS,8,3                 ; @MAX_ALBUMS
.subsections_via_symbols
