	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tl_do_change_album             ## -- Begin function tl_do_change_album
	.p2align	4, 0x90
_tl_do_change_album:                    ## @tl_do_change_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
	movl	8(%rbx), %edi
	callq	_check_album_id
	xorl	%edi, %edi
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%rbx), %rax
	testq	%rax, %rax
	jle	LBB0_3
## %bb.2:
	movq	_MAX_EVENT_SIZE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
LBB0_3:
	callq	_assert
	movq	_ALBUM_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%rbx), %esi
	movl	16(%rbx), %edx
	movq	(%rbx), %rcx
	callq	_rpc_get_fields
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movq	_field_changes_n@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.7:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	movq	_LEV_PHOTO_CHANGE_ALBUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_do_change_data
	testb	$1, %al
	sete	%bl
	jmp	LBB0_8
LBB0_4:
	movq	_TL_ERROR_BAD_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_tl_fetch_set_error_format
	movl	$-1, %eax
	jmp	LBB0_12
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movq	_location_changes_n@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	callq	_assert
	testb	%bl, %bl
	je	LBB0_9
## %bb.10:
	movq	_TL_BOOL_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_TL_BOOL_TRUE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %edi
	callq	_tl_store_int
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_EVENT_SIZE,8,3             ## @MAX_EVENT_SIZE
	.comm	_ALBUM_TYPE,4,2                 ## @ALBUM_TYPE
	.comm	_TL_ERROR_BAD_VALUE,4,2         ## @TL_ERROR_BAD_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't parse changes"

	.comm	_field_changes_n,8,3            ## @field_changes_n
	.comm	_LEV_PHOTO_CHANGE_ALBUM,4,2     ## @LEV_PHOTO_CHANGE_ALBUM
	.comm	_location_changes_n,8,3         ## @location_changes_n
	.comm	_TL_BOOL_TRUE,4,2               ## @TL_BOOL_TRUE
	.comm	_TL_BOOL_FALSE,4,2              ## @TL_BOOL_FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tl_do_change_album             ; -- Begin function tl_do_change_album
	.p2align	2
_tl_do_change_album:                    ; @tl_do_change_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
	ldr	x19, [x0]
	ldr	w0, [x19, #8]
	bl	_check_album_id
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.2:
Lloh0:
	adrp	x9, _MAX_EVENT_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_EVENT_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, lt
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	bl	_assert
Lloh3:
	adrp	x8, _ALBUM_TYPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ALBUM_TYPE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	w2, w1, [x19, #16]
	ldr	x3, [x19]
	bl	_rpc_get_fields
	tbnz	x0, #63, LBB0_7
; %bb.5:
Lloh6:
	adrp	x8, _field_changes_n@GOTPAGE
Lloh7:
	ldr	x8, [x8, _field_changes_n@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.6:
	ldp	w1, w0, [x19, #8]
Lloh9:
	adrp	x8, _LEV_PHOTO_CHANGE_ALBUM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LEV_PHOTO_CHANGE_ALBUM@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_do_change_data
	tst	w0, #0x1
	cset	w19, eq
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _TL_ERROR_BAD_VALUE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TL_ERROR_BAD_VALUE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_tl_fetch_set_error_format
	mov	w0, #-1
	b	LBB0_10
LBB0_8:
	mov	w19, #0
LBB0_9:
Lloh17:
	adrp	x8, _location_changes_n@GOTPAGE
Lloh18:
	ldr	x8, [x8, _location_changes_n@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
Lloh20:
	adrp	x8, _TL_BOOL_TRUE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TL_BOOL_TRUE@GOTPAGEOFF]
Lloh22:
	adrp	x9, _TL_BOOL_FALSE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _TL_BOOL_FALSE@GOTPAGEOFF]
	cmp	w19, #0
	csel	x8, x9, x8, ne
	ldr	w0, [x8]
	bl	_tl_store_int
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_EVENT_SIZE,8,3             ; @MAX_EVENT_SIZE
	.comm	_ALBUM_TYPE,4,2                 ; @ALBUM_TYPE
	.comm	_TL_ERROR_BAD_VALUE,4,2         ; @TL_ERROR_BAD_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't parse changes"

	.comm	_field_changes_n,8,3            ; @field_changes_n
	.comm	_LEV_PHOTO_CHANGE_ALBUM,4,2     ; @LEV_PHOTO_CHANGE_ALBUM
	.comm	_location_changes_n,8,3         ; @location_changes_n
	.comm	_TL_BOOL_TRUE,4,2               ; @TL_BOOL_TRUE
	.comm	_TL_BOOL_FALSE,4,2              ; @TL_BOOL_FALSE
.subsections_via_symbols
