	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_del_photo_location_engine ## -- Begin function user_del_photo_location_engine
	.p2align	4, 0x90
_user_del_photo_location_engine:        ## @user_del_photo_location_engine
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r15d
	cmpb	$-1, %bl
	setne	%cl
	cmpb	$97, %bl
	setl	%dl
	leal	-4(%r13), %esi
	xorl	%eax, %eax
	cmpl	$-5, %esi
	jb	LBB0_22
## %bb.1:
	cmpb	$122, %bl
	jg	LBB0_22
## %bb.2:
	andb	%dl, %cl
	jne	LBB0_22
## %bb.3:
	movq	_write_only@GOTPCREL(%rip), %rcx
	movl	$1, %eax
	cmpq	$0, (%rcx)
	jne	LBB0_22
## %bb.4:
	movq	%rdi, %r14
	callq	_user_loaded
	movsbl	%al, %edi
	callq	_assert
	leaq	-48(%rbp), %r8
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	$1, %ecx
	callq	_user_photo_get_location
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rax, %r14
	movq	_location_buf@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	jle	LBB0_11
## %bb.6:
	movsbq	(%r14), %r12
	testq	%r12, %r12
	js	LBB0_10
## %bb.7:
	leaq	1(%rdx), %r15
	testb	%r12b, %r12b
	jg	LBB0_13
LBB0_8:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_20
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_10:
	movq	_mode@GOTPCREL(%rip), %rax
	movsbq	(%rax), %rax
	addq	%rax, %r12
	movl	$17, %r15d
	subq	%r12, %r15
	movq	%rdx, %rdi
	movq	%r14, %rsi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edx
	callq	_memcpy
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	_location_buf@GOTPCREL(%rip), %rcx
	negq	%r12
	addq	%r12, %rdx
	addq	$17, %rdx
	addq	%r15, %r14
	movl	-48(%rbp), %eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
LBB0_11:
	leaq	1(%rdx), %r15
	testl	%eax, %eax
	je	LBB0_20
## %bb.12:
	movb	(%r14), %r12b
	testb	%r12b, %r12b
	jle	LBB0_8
LBB0_13:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	incq	%r14
	movsbl	%r12b, %r12d
	incl	%r12d
	incl	%r13d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_save_location
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	decl	%r12d
	cmpl	$1, %r12d
	jle	LBB0_19
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_READ_CHAR
	xorl	%edi, %edi
	callq	_assert
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_READ_INT
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_READ_INT
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_READ_INT
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_READ_LONG
	cmpl	$1, %r13d
	ja	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpb	$-1, %bl
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpb	$96, %bl
	je	LBB0_15
	jmp	LBB0_14
LBB0_20:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_21
LBB0_19:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	_location_buf@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_21:
	movb	$0, (%rdx)
	movq	(%rcx), %rcx
	subl	%ecx, %r15d
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r15d, %r8d
	callq	_user_photo_set_location
LBB0_22:
	addq	$40, %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
	.comm	_location_buf,8,3               ## @location_buf
	.comm	_mode,1,0                       ## @mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_del_photo_location_engine ; -- Begin function user_del_photo_location_engine
	.p2align	2
_user_del_photo_location_engine:        ; @user_del_photo_location_engine
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
	mov	w0, #0
	cmn	w3, #1
	mov	w8, #97
	ccmp	w3, w8, #0, ne
	cset	w8, lt
	sub	w9, w4, #4
	cmn	w9, #5
	b.lo	LBB0_20
; %bb.1:
	mov	x23, x3
	cmp	w3, #122
	b.gt	LBB0_20
; %bb.2:
	tbnz	w8, #0, LBB0_20
; %bb.3:
Lloh0:
	adrp	x8, _write_only@GOTPAGE
Lloh1:
	ldr	x8, [x8, _write_only@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	w0, #1
	b	LBB0_20
LBB0_5:
	mov	x22, x4
	mov	x19, x2
	mov	x20, x1
	mov	x0, x21
	bl	_user_loaded
	bl	_assert
	add	x4, sp, #12
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #1
	bl	_user_photo_get_location
	cbz	x0, LBB0_20
; %bb.6:
	mov	x26, x0
Lloh3:
	adrp	x27, _location_buf@GOTPAGE
Lloh4:
	ldr	x27, [x27, _location_buf@GOTPAGEOFF]
	ldr	x24, [x27]
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	ldrsb	x8, [x26]
	tbnz	x8, #63, LBB0_9
; %bb.8:
	add	x25, x24, #1
	b	LBB0_12
LBB0_9:
Lloh5:
	adrp	x9, _mode@GOTPAGE
Lloh6:
	ldr	x9, [x9, _mode@GOTPAGEOFF]
Lloh7:
	ldrsb	x9, [x9]
	mov	w10, #17
	add	x8, x8, x9
	sub	x25, x10, x8
	mov	x0, x24
	mov	x1, x26
	mov	x2, x25
	bl	_memcpy
	add	x24, x24, x25
	add	x26, x26, x25
	ldr	w8, [sp, #12]
LBB0_10:
	add	x25, x24, #1
	cbz	w8, LBB0_19
; %bb.11:
	ldrb	w8, [x26]
LBB0_12:
	sxtb	w8, w8
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.13:
	add	x26, x26, #1
	add	w28, w8, #1
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x25
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_save_location
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	sub	w28, w28, #1
	cmp	w28, #1
	b.le	LBB0_19
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	mov	w1, #0
	bl	_READ_CHAR
	mov	w0, #0
	bl	_assert
	mov	x0, x26
	mov	w1, #0
	bl	_READ_INT
	mov	x0, x26
	mov	w1, #0
	bl	_READ_INT
	mov	x0, x26
	mov	w1, #0
	bl	_READ_INT
	mov	x0, x26
	mov	x1, #0
	bl	_READ_LONG
	add	w8, w22, #1
	cmp	w8, #1
	b.hi	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	cmn	w23, #1
	b.eq	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	cmp	w23, #96
	b.eq	LBB0_15
	b	LBB0_14
LBB0_19:
	strb	wzr, [x24]
	ldr	x3, [x27]
	sub	w4, w25, w3
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_user_photo_set_location
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_write_only,8,3                 ; @write_only
	.comm	_location_buf,8,3               ; @location_buf
	.comm	_mode,1,0                       ; @mode
.subsections_via_symbols
