	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_image
_update_image:                          ## @update_image
	.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
	movq	%r8, %r13
	movq	%rsi, %r12
	movl	(%rcx), %eax
	movl	(%rsi), %ebx
	subl	%edx, %ebx
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	testl	%edx, %edx
	jle	LBB0_1
## %bb.4:
	movq	24(%r12), %r8
	movl	%edx, %eax
	cmpl	$5, %edx
	jae	LBB0_6
## %bb.5:
	xorl	%r9d, %r9d
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_2
LBB0_6:
	movl	%eax, %ecx
	andl	$3, %ecx
	testq	%rcx, %rcx
	movl	$4, %esi
	cmovneq	%rcx, %rsi
	movq	%rax, %r9
	subq	%rsi, %r9
	leaq	40(%r8), %rsi
	pxor	%xmm0, %xmm0
	movq	%r9, %rcx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-32(%rsi), %xmm2
	movdqu	-16(%rsi), %xmm3
	punpcklqdq	%xmm3, %xmm2            ## xmm2 = xmm2[0],xmm3[0]
	paddq	%xmm2, %xmm0
	movdqu	(%rsi), %xmm2
	movdqu	16(%rsi), %xmm3
	punpcklqdq	%xmm3, %xmm2            ## xmm2 = xmm2[0],xmm3[0]
	paddq	%xmm2, %xmm1
	addq	$64, %rsi
	addq	$-4, %rcx
	jne	LBB0_7
## %bb.8:
	paddq	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddq	%xmm1, %xmm0
	movq	%xmm0, %r15
LBB0_9:
	subq	%r9, %rax
	shlq	$4, %r9
	leaq	(%r8,%r9), %rcx
	addq	$8, %rcx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rcx), %r15
	addq	$16, %rcx
	decq	%rax
	jne	LBB0_10
LBB0_2:
	testl	%ebx, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	jle	LBB0_3
## %bb.11:
	movq	24(%r12), %r8
	movslq	%edx, %r9
	movl	%ebx, %eax
	cmpl	$5, %ebx
	jae	LBB0_13
## %bb.12:
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_13:
	movl	%eax, %ecx
	andl	$3, %ecx
	testq	%rcx, %rcx
	movl	$4, %esi
	cmovneq	%rcx, %rsi
	movq	%rax, %rcx
	subq	%rsi, %rcx
	movq	%r9, %rsi
	shlq	$4, %rsi
	leaq	(%rsi,%r8), %rdi
	addq	$40, %rdi
	pxor	%xmm0, %xmm0
	movq	%rcx, %rsi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-32(%rdi), %xmm2
	movdqu	-16(%rdi), %xmm3
	punpcklqdq	%xmm3, %xmm2            ## xmm2 = xmm2[0],xmm3[0]
	paddq	%xmm2, %xmm0
	movdqu	(%rdi), %xmm2
	movdqu	16(%rdi), %xmm3
	punpcklqdq	%xmm3, %xmm2            ## xmm2 = xmm2[0],xmm3[0]
	paddq	%xmm2, %xmm1
	addq	$64, %rdi
	addq	$-4, %rsi
	jne	LBB0_14
## %bb.15:
	paddq	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rbx
LBB0_16:
	addq	%rcx, %r9
	shlq	$4, %r9
	leaq	(%r8,%r9), %rdx
	addq	$8, %rdx
	subq	%rcx, %rax
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rdx), %rbx
	addq	$16, %rdx
	decq	%rax
	jne	LBB0_17
LBB0_18:
	movq	8(%r13), %r14
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rdi
	movq	%rbx, %rsi
	callq	_st_sub
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_st_add3
	movl	%eax, %edi
	callq	_xmalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%r12), %rsi
	movq	%rax, %rdi
	movq	%r15, %rdx
	callq	_memcpy
	movq	%r13, %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15), %r13
	movq	8(%r14), %rdx
	movq	16(%r14), %rsi
	movq	%r13, %rdi
	callq	_memcpy
	addq	8(%r14), %r13
	addq	%rbx, %r15
	movq	16(%r12), %rsi
	addq	%r15, %rsi
	movq	8(%r12), %rdx
	subq	%r15, %rdx
	movq	%r13, %rdi
	movq	%r14, %r13
	callq	_memcpy
	movq	16(%r12), %rdi
	callq	_free
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 16(%r12)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subq	%rbx, %rax
	addq	8(%r12), %rax
	movq	%rax, 8(%r12)
	movb	$0, (%rcx,%rax)
	movl	(%r12), %r15d
	movl	(%r14), %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	subl	%ebx, %r15d
	addl	%eax, %r15d
	cmpl	%eax, %ebx
	jge	LBB0_20
## %bb.19:
	movq	24(%r12), %rdi
	movl	%r15d, %esi
	callq	_REALLOC_ARRAY
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	24(%r12), %rax
	movq	%rax, 32(%r12)
	movl	(%r13), %eax
LBB0_20:
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	movslq	%r8d, %r14
	cmpl	%eax, %ebx
	je	LBB0_22
## %bb.21:
	movq	%r14, %rcx
	shlq	$4, %rcx
	addq	24(%r12), %rcx
	movslq	%eax, %rdi
	shlq	$4, %rdi
	addq	%rcx, %rdi
	movslq	%ebx, %rsi
	shlq	$4, %rsi
	addq	%rcx, %rsi
	movl	(%r12), %edx
	addl	%ebx, %r8d
	subl	%r8d, %edx
	callq	_MOVE_ARRAY
	movl	(%r13), %ebx
LBB0_22:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	shlq	$4, %r14
	movq	24(%r12), %rdi
	addq	%r14, %rdi
	movq	24(%r13), %rsi
	movl	%ebx, %edx
	callq	_COPY_ARRAY
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	je	LBB0_23
LBB0_30:
	movl	%r15d, (%r12)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movl	(%r13), %ecx
	testl	%ecx, %ecx
	jle	LBB0_30
## %bb.24:
	movq	24(%r12), %r8
	cmpl	$1, %ecx
	jne	LBB0_26
## %bb.25:
	xorl	%edx, %edx
	jmp	LBB0_28
LBB0_26:
	movl	%ecx, %esi
	andl	$-2, %esi
	leaq	(%r14,%r8), %rdi
	addq	$16, %rdi
	xorl	%edx, %edx
	movq	_LINE_PATCHED@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %eax
	orl	%eax, -16(%rdi)
	movl	(%rbx), %eax
	orl	%eax, (%rdi)
	addq	$2, %rdx
	addq	$32, %rdi
	cmpq	%rdx, %rsi
	jne	LBB0_27
LBB0_28:
	testb	$1, %cl
	je	LBB0_30
## %bb.29:
	movq	_LINE_PATCHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	-56(%rbp), %rdx                 ## 8-byte Folded Reload
	shlq	$4, %rdx
	orl	%eax, (%r8,%rdx)
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.comm	_LINE_PATCHED,4,2               ## @LINE_PATCHED
	.no_dead_strip	_update_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_image
_update_image:                          ; @update_image
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x4
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w8, [x3]
	ldr	w9, [x1]
	sub	w9, w9, w2
	cmp	w8, w9
	csel	w22, w8, w9, lt
	cmp	w2, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	x9, [x19, #24]
	mov	w8, w23
	cmp	w23, #9
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	x24, #0
	b	LBB0_7
LBB0_3:
	mov	x24, #0
	b	LBB0_9
LBB0_4:
	ands	x10, x8, #0x7
	mov	w11, #8
	csel	x10, x11, x10, eq
	sub	x10, x8, x10
	add	x12, x9, #72
	movi.2d	v0, #0000000000000000
	mov	x11, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x13, x12, #64
	ld2.2d	{ v4, v5 }, [x13]
	sub	x13, x12, #32
	ld2.2d	{ v6, v7 }, [x13]
	add	x13, x12, #128
	ld2.2d	{ v16, v17 }, [x12], #32
	ld2.2d	{ v18, v19 }, [x12]
	add.2d	v0, v4, v0
	add.2d	v1, v6, v1
	add.2d	v2, v16, v2
	add.2d	v3, v18, v3
	mov	x12, x13
	subs	x11, x11, #8
	b.ne	LBB0_5
; %bb.6:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x24, d0
LBB0_7:
	add	x9, x9, x10, lsl #4
	add	x9, x9, #8
	sub	x8, x8, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #16
	add	x24, x10, x24
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
	cmp	w22, #1
	b.lt	LBB0_12
; %bb.10:
	ldr	x8, [x19, #24]
	sxtw	x9, w23
	cmp	w22, #9
	b.hs	LBB0_13
; %bb.11:
	mov	x10, #0
	mov	x25, #0
	b	LBB0_16
LBB0_12:
	mov	x25, #0
	b	LBB0_18
LBB0_13:
	ands	x10, x22, #0x7
	mov	w11, #8
	csel	x10, x11, x10, eq
	sub	x10, x22, x10
	add	x11, x8, x9, lsl #4
	add	x12, x11, #72
	movi.2d	v0, #0000000000000000
	mov	x11, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	sub	x13, x12, #64
	ld2.2d	{ v4, v5 }, [x13]
	sub	x13, x12, #32
	ld2.2d	{ v6, v7 }, [x13]
	add	x13, x12, #128
	ld2.2d	{ v16, v17 }, [x12], #32
	ld2.2d	{ v18, v19 }, [x12]
	add.2d	v0, v4, v0
	add.2d	v1, v6, v1
	add.2d	v2, v16, v2
	add.2d	v3, v18, v3
	mov	x12, x13
	subs	x11, x11, #8
	b.ne	LBB0_14
; %bb.15:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x25, d0
LBB0_16:
	add	x9, x10, x9
	add	x8, x8, x9, lsl #4
	add	x8, x8, #8
	sub	x9, x22, x10
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8], #16
	add	x25, x10, x25
	subs	x9, x9, #1
	b.ne	LBB0_17
LBB0_18:
	ldr	x26, [x20, #8]
	ldr	x0, [x19, #8]
	mov	x1, x25
	bl	_st_sub
	mov	x1, x26
	mov	w2, #1
	bl	_st_add3
	bl	_xmalloc
	mov	x27, x0
	ldr	x1, [x19, #16]
	mov	x2, x24
	bl	_memcpy
	add	x28, x27, x24
	ldp	x2, x1, [x20, #8]
	mov	x0, x28
	bl	_memcpy
	ldr	x8, [x20, #8]
	add	x0, x28, x8
	ldp	x9, x8, [x19, #8]
	add	x10, x25, x24
	add	x1, x8, x10
	sub	x2, x9, x10
	bl	_memcpy
	ldr	x0, [x19, #16]
	bl	_free
	ldr	x8, [x19, #8]
	sub	x9, x26, x25
	add	x8, x8, x9
	stp	x8, x27, [x19, #8]
	strb	wzr, [x27, x8]
	ldr	w9, [x19]
	ldr	w8, [x20]
	sub	w9, w9, w22
	add	w24, w9, w8
	cmp	w22, w8
	b.lt	LBB0_21
; %bb.19:
	cmp	w22, w8
	b.ne	LBB0_22
LBB0_20:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sxtw	x25, w23
	b	LBB0_23
LBB0_21:
	ldr	x0, [x19, #24]
	mov	x1, x24
	bl	_REALLOC_ARRAY
	ldr	x8, [x19, #24]
	str	x8, [x19, #32]
	ldr	w8, [x20]
	cmp	w22, w8
	b.eq	LBB0_20
LBB0_22:
	ldr	x9, [x19, #24]
	mov	x10, x23
	sxtw	x25, w10
	add	x9, x9, w23, sxtw #4
	add	x0, x9, w8, sxtw #4
	add	x1, x9, w22, sxtw #4
	ldr	w8, [x19]
	add	w9, w22, w23
	sub	w2, w8, w9
	bl	_MOVE_ARRAY
	ldr	w22, [x20]
LBB0_23:
	ldr	x8, [x19, #24]
	add	x0, x8, x25, lsl #4
	ldr	x1, [x20, #24]
	mov	x2, x22
	bl	_COPY_ARRAY
	ldr	w8, [x21]
	cbnz	w8, LBB0_27
; %bb.24:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.25:
	ldr	x9, [x19, #24]
	add	x9, x9, x25, lsl #4
Lloh0:
	adrp	x10, _LINE_PATCHED@GOTPAGE
Lloh1:
	ldr	x10, [x10, _LINE_PATCHED@GOTPAGEOFF]
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	ldr	w12, [x9]
	orr	w11, w12, w11
	str	w11, [x9], #16
	subs	x8, x8, #1
	b.ne	LBB0_26
LBB0_27:
	str	w24, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_LINE_PATCHED,4,2               ; @LINE_PATCHED
	.no_dead_strip	_update_image
.subsections_via_symbols
