	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_add_photo_location        ## -- Begin function user_add_photo_location
	.p2align	4, 0x90
_user_add_photo_location:               ## @user_add_photo_location
	.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, %ebx
	movq	_write_only@GOTPCREL(%rip), %rdx
	movl	$1, %eax
	cmpq	$0, (%rdx)
	jne	LBB0_11
## %bb.1:
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%r9d, -64(%rbp)                 ## 4-byte Spill
	movq	24(%rbp), %r12
	callq	_user_loaded
	movl	%eax, %edi
	callq	_assert
	movq	%r12, %rdi
	callq	_strlen
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_check_photo
	movl	%eax, %edi
	callq	_assert
	leaq	-44(%rbp), %r8
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	$1, %ecx
	callq	_user_photo_get_location
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	_location_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	jle	LBB0_4
## %bb.5:
	movsbq	(%r12), %rcx
	testq	%rcx, %rcx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	jns	LBB0_7
## %bb.6:
	movq	_mode@GOTPCREL(%rip), %rdx
	movsbq	(%rdx), %rdx
	addq	%rdx, %rcx
	movl	$17, %edx
	subq	%rcx, %rdx
	subl	%edx, %eax
	movl	%eax, -44(%rbp)
	addq	%rdx, %r12
	jmp	LBB0_7
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_4:
	movl	-52(%rbp), %esi                 ## 4-byte Reload
LBB0_7:
	movq	_mode@GOTPCREL(%rip), %rax
	addb	(%rax), %r15b
	negb	%r15b
	leaq	1(%rbx), %r13
	movb	%r15b, (%rbx)
	movq	%r13, %rdi
	callq	_WRITE_INT
	movq	%r13, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_INT
	movq	%r13, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_INT
	movq	%r13, %rdi
	movl	16(%rbp), %esi
	callq	_WRITE_INT
	movq	%r13, %rdi
	movq	24(%rbp), %rsi
	callq	_WRITE_STRING
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_8
## %bb.9:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_memcpy
	jmp	LBB0_10
LBB0_8:
	movb	$0, 1(%rbx)
	addq	$2, %rbx
	movq	%rbx, %r13
LBB0_10:
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	_location_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	subl	%ecx, %r13d
	addl	-44(%rbp), %r13d
	movq	%r14, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_user_photo_set_location
LBB0_11:
	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
	.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_add_photo_location        ; -- Begin function user_add_photo_location
	.p2align	2
_user_add_photo_location:               ; @user_add_photo_location
	.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
Lloh0:
	adrp	x8, _write_only@GOTPAGE
Lloh1:
	ldr	x8, [x8, _write_only@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_10
LBB0_2:
	mov	x22, x7
	mov	x23, x6
	mov	x24, x5
	mov	x25, x4
	mov	x26, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_user_loaded
	bl	_assert
	mov	x0, x22
	bl	_strlen
	mov	x28, x0
	mov	x0, x22
	mov	x1, x28
	bl	_check_photo
	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_10
; %bb.3:
	mov	x27, x0
Lloh3:
	adrp	x8, _location_buf@GOTPAGE
Lloh4:
	ldr	x8, [x8, _location_buf@GOTPAGEOFF]
Lloh5:
	ldr	x13, [x8]
	ldr	w9, [sp, #12]
Lloh6:
	adrp	x8, _mode@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mode@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.4:
	ldrsb	x10, [x27]
	tbz	x10, #63, LBB0_6
; %bb.5:
	ldrsb	x11, [x8]
	mov	w12, #17
	add	x10, x10, x11
	sub	x10, x12, x10
	sub	w9, w9, w10
	str	w9, [sp, #12]
	add	x27, x27, x10
LBB0_6:
	ldrb	w8, [x8]
	add	w8, w8, w28
	neg	w8, w8
	mov	x28, x13
	strb	w8, [x28], #1
	mov	x0, x28
	mov	x1, x26
	mov	x26, x13
	bl	_WRITE_INT
	mov	x0, x28
	mov	x1, x25
	bl	_WRITE_INT
	mov	x0, x28
	mov	x1, x24
	bl	_WRITE_INT
	mov	x0, x28
	mov	x1, x23
	bl	_WRITE_INT
	mov	x0, x28
	mov	x1, x22
	bl	_WRITE_STRING
	ldr	w2, [sp, #12]
	cbz	w2, LBB0_8
; %bb.7:
	mov	x0, x28
	mov	x1, x27
	bl	_memcpy
	b	LBB0_9
LBB0_8:
	add	x28, x26, #2
	strb	wzr, [x26, #1]
LBB0_9:
Lloh8:
	adrp	x8, _location_buf@GOTPAGE
Lloh9:
	ldr	x8, [x8, _location_buf@GOTPAGEOFF]
Lloh10:
	ldr	x3, [x8]
	ldr	w8, [sp, #12]
	sub	w9, w28, w3
	add	w4, w8, w9
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_user_photo_set_location
LBB0_10:
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.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
