	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_zTXt                 ## -- Begin function png_write_zTXt
	.p2align	4, 0x90
_png_write_zTXt:                        ## @png_write_zTXt
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movl	%edi, %r15d
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	leaq	-56(%rbp), %rdx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_png_check_keyword
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	testq	%r13, %r13
	je	LBB0_6
## %bb.4:
	cmpb	$0, (%r13)
	je	LBB0_6
## %bb.5:
	movq	%rax, %r12
	movq	_PNG_TEXT_COMPRESSION_NONE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_6
## %bb.7:
	movq	%r13, %rdi
	callq	_png_strlen
	leaq	-96(%rbp), %rbx
	movl	%r15d, %edi
	movq	%r13, %rsi
	movq	%rax, %rdx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	callq	_png_text_compress
	movq	_png_zTXt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leal	(%rax,%r12), %edx
	addl	$2, %edx
	movl	%r15d, %edi
	callq	_png_write_chunk_start
	movl	-56(%rbp), %esi
	incq	%r12
	movl	%r15d, %edi
	movq	%r12, %rdx
	callq	_png_write_chunk_data
	movq	-56(%rbp), %rsi
	movl	%r15d, %edi
	callq	_png_free
	movb	%r14b, -41(%rbp)
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	movl	%r15d, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_png_write_chunk_data
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_png_write_compressed_data_out
	movl	%r15d, %edi
	callq	_png_write_chunk_end
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	callq	_png_warning
	jmp	LBB0_8
LBB0_6:
	movq	-56(%rbp), %rsi
	movl	%r15d, %edi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	callq	_png_write_tEXt
	movq	-56(%rbp), %rsi
	movl	%r15d, %edi
	callq	_png_free
LBB0_8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_write_zTXt\n"

L_.str.1:                               ## @.str.1
	.asciz	"Empty keyword in zTXt chunk"

	.comm	_PNG_TEXT_COMPRESSION_NONE,4,2  ## @PNG_TEXT_COMPRESSION_NONE
	.comm	_png_zTXt,4,2                   ## @png_zTXt
	.comm	_PNG_zTXt,4,2                   ## @PNG_zTXt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_zTXt                 ; -- Begin function png_write_zTXt
	.p2align	2
_png_write_zTXt:                        ; @png_write_zTXt
	.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	x20, x4
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	str	xzr, [sp, #32]
	cbz	x22, LBB0_6
; %bb.1:
	add	x2, sp, #48
	mov	x0, x19
	mov	x1, x22
	bl	_png_check_keyword
	cbz	x0, LBB0_6
; %bb.2:
	cbz	x21, LBB0_7
; %bb.3:
	ldrb	w8, [x21]
	cbz	w8, LBB0_7
; %bb.4:
Lloh2:
	adrp	x8, _PNG_TEXT_COMPRESSION_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PNG_TEXT_COMPRESSION_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_7
; %bb.5:
	mov	x22, x0
	mov	x0, x21
	bl	_png_strlen
	mov	x2, x0
	mov	x4, sp
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_png_text_compress
Lloh5:
	adrp	x8, _png_zTXt@GOTPAGE
Lloh6:
	ldr	x8, [x8, _png_zTXt@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	w8, w0, w22
	add	w2, w8, #2
	mov	x0, x19
	bl	_png_write_chunk_start
	ldr	w1, [sp, #48]
	add	x2, x22, #1
	mov	x0, x19
	bl	_png_write_chunk_data
	ldr	x1, [sp, #48]
	mov	x0, x19
	bl	_png_free
	sturb	w20, [x29, #-33]
	sub	x1, x29, #33
	mov	x0, x19
	mov	w2, #1
	bl	_png_write_chunk_data
	mov	x1, sp
	mov	x0, x19
	bl	_png_write_compressed_data_out
	mov	x0, x19
	bl	_png_write_chunk_end
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_png_warning
	b	LBB0_8
LBB0_7:
	ldr	x1, [sp, #48]
	mov	x0, x19
	mov	x2, x21
	mov	x3, #0
	bl	_png_write_tEXt
	ldr	x1, [sp, #48]
	mov	x0, x19
	bl	_png_free
LBB0_8:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_write_zTXt\n"

l_.str.1:                               ; @.str.1
	.asciz	"Empty keyword in zTXt chunk"

	.comm	_PNG_TEXT_COMPRESSION_NONE,4,2  ; @PNG_TEXT_COMPRESSION_NONE
	.comm	_png_zTXt,4,2                   ; @png_zTXt
	.comm	_PNG_zTXt,4,2                   ; @PNG_zTXt
.subsections_via_symbols
