	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_handle_tEXt                ## -- Begin function png_handle_tEXt
	.p2align	4, 0x90
_png_handle_tEXt:                       ## @png_handle_tEXt
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movl	4(%r12), %eax
	movq	_PNG_HAVE_IHDR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_png_chunk_error
	movl	4(%r12), %eax
LBB0_2:
	movq	_PNG_HAVE_IDAT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_PNG_AFTER_IDAT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%r12)
LBB0_4:
	leal	1(%r15), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_png_read_buffer
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	callq	_png_crc_read
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_png_crc_finish
	testq	%rax, %rax
	jne	LBB0_10
## %bb.6:
	movl	%r15d, %ecx
	movq	$0, (%rbx,%rcx,8)
	movq	%rbx, %rax
	addq	$-8, %rax
	leaq	8(,%rcx,8), %rcx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	addq	$-8, %rcx
	cmpq	$0, 8(%rax)
	leaq	8(%rax), %rax
	jne	LBB0_7
## %bb.8:
	xorl	%edx, %edx
	testq	%rcx, %rcx
	setne	%dl
	leaq	(%rax,%rdx,8), %rdi
	movq	_PNG_TEXT_COMPRESSION_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	%rbx, -48(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -72(%rbp)
	movq	$0, -56(%rbp)
	movq	%rdi, -80(%rbp)
	callq	_strlen
	movl	%eax, -88(%rbp)
	leaq	-88(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_png_set_text_2
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_png_warning
LBB0_10:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_chunk_benign_error         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_handle_tEXt"

	.comm	_PNG_HAVE_IHDR,4,2              ## @PNG_HAVE_IHDR
L_.str.1:                               ## @.str.1
	.asciz	"missing IHDR"

	.comm	_PNG_HAVE_IDAT,4,2              ## @PNG_HAVE_IDAT
	.comm	_PNG_AFTER_IDAT,4,2             ## @PNG_AFTER_IDAT
L_.str.2:                               ## @.str.2
	.asciz	"out of memory"

	.comm	_PNG_TEXT_COMPRESSION_NONE,4,2  ## @PNG_TEXT_COMPRESSION_NONE
L_.str.3:                               ## @.str.3
	.asciz	"Insufficient memory to process text chunk"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_handle_tEXt                ; -- Begin function png_handle_tEXt
	.p2align	2
_png_handle_tEXt:                       ; @png_handle_tEXt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	ldr	w8, [x19, #4]
Lloh2:
	adrp	x9, _PNG_HAVE_IHDR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PNG_HAVE_IHDR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_error
	ldr	w8, [x19, #4]
LBB0_2:
Lloh7:
	adrp	x9, _PNG_HAVE_IDAT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PNG_HAVE_IDAT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh10:
	adrp	x9, _PNG_AFTER_IDAT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PNG_AFTER_IDAT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_4:
	add	w1, w21, #1
	mov	x0, x19
	mov	w2, #1
	bl	_png_read_buffer
	cbz	x0, LBB0_11
; %bb.5:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_png_crc_read
	mov	x0, x19
	mov	w1, #0
	bl	_png_crc_finish
	cbnz	x0, LBB0_10
; %bb.6:
	mov	x8, #0
	str	xzr, [x22, w21, uxtw #3]
	mov	w9, w21
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x22, x8]
	add	x8, x8, #8
	cbnz	x10, LBB0_7
; %bb.8:
	lsl	x9, x9, #3
	add	x9, x9, #8
Lloh13:
	adrp	x10, _PNG_TEXT_COMPRESSION_NONE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _PNG_TEXT_COMPRESSION_NONE@GOTPAGEOFF]
	cmp	x9, x8
Lloh15:
	ldr	w9, [x10]
	str	w9, [sp, #56]
	cset	w9, ne
	add	x9, x22, w9, uxtw #3
	stp	xzr, x22, [sp, #40]
	add	x8, x9, x8
	sub	x0, x8, #8
	stp	xzr, xzr, [sp, #24]
	str	x0, [sp, #16]
	bl	_strlen
	str	w0, [sp, #8]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_png_set_text_2
	cbz	x0, LBB0_10
; %bb.9:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_png_warning
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
	add	sp, sp, #112
	ret
LBB0_11:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	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
	add	sp, sp, #112
	b	_png_chunk_benign_error
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_handle_tEXt"

	.comm	_PNG_HAVE_IHDR,4,2              ; @PNG_HAVE_IHDR
l_.str.1:                               ; @.str.1
	.asciz	"missing IHDR"

	.comm	_PNG_HAVE_IDAT,4,2              ; @PNG_HAVE_IDAT
	.comm	_PNG_AFTER_IDAT,4,2             ; @PNG_AFTER_IDAT
l_.str.2:                               ; @.str.2
	.asciz	"out of memory"

	.comm	_PNG_TEXT_COMPRESSION_NONE,4,2  ; @PNG_TEXT_COMPRESSION_NONE
l_.str.3:                               ; @.str.3
	.asciz	"Insufficient memory to process text chunk"

.subsections_via_symbols
