	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_push_save_buffer           ## -- Begin function png_push_save_buffer
	.p2align	4, 0x90
_png_push_save_buffer:                  ## @png_push_save_buffer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r9
	testq	%r9, %r9
	je	LBB0_21
## %bb.1:
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	%rdx, %rax
	subq	%rcx, %rax
	je	LBB0_21
## %bb.2:
	testq	%r9, %r9
	jle	LBB0_21
## %bb.3:
	xorl	%r8d, %r8d
	cmpq	$8, %r9
	jb	LBB0_14
## %bb.4:
	cmpq	$32, %rax
	jb	LBB0_14
## %bb.5:
	movq	%r9, %r8
	andq	$-8, %r8
	leaq	-8(%r8), %rax
	movq	%rax, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r10d
	andl	$3, %r10d
	cmpq	$24, %rax
	jae	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	andq	$-4, %rdi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rcx,%rax,4), %xmm0
	movups	16(%rcx,%rax,4), %xmm1
	movups	%xmm0, (%rdx,%rax,4)
	movups	%xmm1, 16(%rdx,%rax,4)
	movups	32(%rcx,%rax,4), %xmm0
	movups	48(%rcx,%rax,4), %xmm1
	movups	%xmm0, 32(%rdx,%rax,4)
	movups	%xmm1, 48(%rdx,%rax,4)
	movups	64(%rcx,%rax,4), %xmm0
	movups	80(%rcx,%rax,4), %xmm1
	movups	%xmm0, 64(%rdx,%rax,4)
	movups	%xmm1, 80(%rdx,%rax,4)
	movups	96(%rcx,%rax,4), %xmm0
	movups	112(%rcx,%rax,4), %xmm1
	movups	%xmm0, 96(%rdx,%rax,4)
	movups	%xmm1, 112(%rdx,%rax,4)
	addq	$32, %rax
	addq	$-4, %rdi
	jne	LBB0_8
LBB0_9:
	testq	%r10, %r10
	je	LBB0_12
## %bb.10:
	leaq	(%rdx,%rax,4), %rdi
	addq	$16, %rdi
	leaq	(%rcx,%rax,4), %rax
	addq	$16, %rax
	shlq	$5, %r10
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rax,%rsi), %xmm0
	movups	(%rax,%rsi), %xmm1
	movups	%xmm0, -16(%rdi,%rsi)
	movups	%xmm1, (%rdi,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %r10
	jne	LBB0_11
LBB0_12:
	cmpq	%r8, %r9
	je	LBB0_21
## %bb.13:
	leaq	(%rcx,%r8,4), %rcx
	leaq	(%rdx,%r8,4), %rdx
LBB0_14:
	movq	%r8, %r10
	notq	%r10
	addq	%r9, %r10
	movq	%r9, %rax
	andq	$7, %rax
	je	LBB0_18
## %bb.15:
	negq	%rax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %edi
	movl	%edi, (%rdx)
	addq	$4, %rcx
	addq	$4, %rdx
	decq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_16
## %bb.17:
	subq	%rsi, %r8
LBB0_18:
	cmpq	$7, %r10
	jb	LBB0_21
## %bb.19:
	movq	%r9, %rax
	subq	%r8, %rax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,4), %edi
	movl	%edi, (%rdx,%rsi,4)
	movl	4(%rcx,%rsi,4), %edi
	movl	%edi, 4(%rdx,%rsi,4)
	movl	8(%rcx,%rsi,4), %edi
	movl	%edi, 8(%rdx,%rsi,4)
	movl	12(%rcx,%rsi,4), %edi
	movl	%edi, 12(%rdx,%rsi,4)
	movl	16(%rcx,%rsi,4), %edi
	movl	%edi, 16(%rdx,%rsi,4)
	movl	20(%rcx,%rsi,4), %edi
	movl	%edi, 20(%rdx,%rsi,4)
	movl	24(%rcx,%rsi,4), %edi
	movl	%edi, 24(%rdx,%rsi,4)
	movl	28(%rcx,%rsi,4), %edi
	movl	%edi, 28(%rdx,%rsi,4)
	addq	$8, %rsi
	cmpq	%rsi, %rax
	jne	LBB0_20
LBB0_21:
	movq	24(%rbx), %rdx
	leaq	(%rdx,%r9), %rax
	cmpq	32(%rbx), %rax
	jle	LBB0_25
## %bb.22:
	movq	_PNG_SIZE_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	%rdx, %rax
	addq	$-256, %rax
	cmpq	%rax, %r9
	jle	LBB0_24
## %bb.23:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_error
	movq	(%rbx), %r9
	movq	24(%rbx), %rdx
LBB0_24:
	leaq	(%r9,%rdx), %r14
	addq	$256, %r14                      ## imm = 0x100
	movq	16(%rbx), %r15
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_png_malloc
	movq	%rax, 16(%rbx)
	movq	(%rbx), %rdx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_png_memcpy
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_png_free
	movq	%r14, 32(%rbx)
	movq	24(%rbx), %rdx
LBB0_25:
	testq	%rdx, %rdx
	je	LBB0_27
## %bb.26:
	movq	(%rbx), %rdi
	movq	48(%rbx), %rsi
	addq	16(%rbx), %rdi
	callq	_png_memcpy
	movq	24(%rbx), %rax
	addq	%rax, (%rbx)
	movq	$0, 24(%rbx)
LBB0_27:
	movq	16(%rbx), %rax
	movq	%rax, 8(%rbx)
	movq	$0, 40(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_SIZE_MAX,8,3               ## @PNG_SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Potential overflow of save_buffer"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_push_save_buffer           ; -- Begin function png_push_save_buffer
	.p2align	2
_png_push_save_buffer:                  ; @png_push_save_buffer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_9
; %bb.1:
	ldp	x12, x13, [x19, #8]
	subs	x14, x13, x12
	ccmp	x8, #1, #8, ne
	b.lt	LBB0_9
; %bb.2:
	mov	x11, #0
	mov	x10, x13
	mov	x9, x12
	cmp	x8, #16
	b.lo	LBB0_7
; %bb.3:
	cmp	x14, #64
	b.lo	LBB0_7
; %bb.4:
	and	x11, x8, #0xfffffffffffffff0
	lsl	x10, x11, #2
	add	x9, x12, x10
	add	x10, x13, x10
	add	x13, x13, #32
	add	x12, x12, #32
	mov	x14, x11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	stp	q0, q1, [x13, #-32]
	stp	q2, q3, [x13], #64
	subs	x14, x14, #16
	b.ne	LBB0_5
; %bb.6:
	cmp	x8, x11
	b.eq	LBB0_9
LBB0_7:
	sub	x11, x8, x11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9], #4
	str	w12, [x10], #4
	subs	x11, x11, #1
	b.ne	LBB0_8
LBB0_9:
	ldp	x2, x9, [x19, #24]
	add	x10, x2, x8
	cmp	x10, x9
	b.le	LBB0_13
; %bb.10:
Lloh0:
	adrp	x9, _PNG_SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PNG_SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	sub	x9, x9, x2
	sub	x9, x9, #256
	cmp	x8, x9
	b.le	LBB0_12
; %bb.11:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_png_error
	ldr	x8, [x19]
	ldr	x2, [x19, #24]
LBB0_12:
	add	x8, x8, x2
	add	x20, x8, #256
	ldr	x21, [x19, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_png_malloc
	str	x0, [x19, #16]
	ldr	x2, [x19]
	mov	x1, x21
	bl	_png_memcpy
	mov	x0, x19
	mov	x1, x21
	bl	_png_free
	str	x20, [x19, #32]
	ldr	x2, [x19, #24]
LBB0_13:
	cbz	x2, LBB0_15
; %bb.14:
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	add	x0, x9, x8
	ldr	x1, [x19, #48]
	bl	_png_memcpy
	ldr	x8, [x19, #24]
	ldr	x9, [x19]
	add	x8, x9, x8
	str	x8, [x19]
	str	xzr, [x19, #24]
LBB0_15:
	ldr	x8, [x19, #16]
	str	x8, [x19, #8]
	str	xzr, [x19, #40]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_SIZE_MAX,8,3               ; @PNG_SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Potential overflow of save_buffer"

.subsections_via_symbols
