	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apng_write_chunk
_apng_write_chunk:                      ## @apng_write_chunk
	.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	%rcx, %r13
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_AV_CRC_32_IEEE_LE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_av_crc_get_table
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_av_assert0
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_avio_wb32
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_AV_WB32
	movl	$4294967295, %esi               ## imm = 0xFFFFFFFF
	movl	$4, %ecx
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_av_crc
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_avio_wb32
	testq	%r13, %r13
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r13, %rcx
	callq	_av_crc
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_avio_write
LBB0_2:
	notq	%r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_avio_wb32
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CRC_32_IEEE_LE,4,2          ## @AV_CRC_32_IEEE_LE
	.no_dead_strip	_apng_write_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apng_write_chunk
_apng_write_chunk:                      ; @apng_write_chunk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x3
	mov	x21, x2
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _AV_CRC_32_IEEE_LE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_CRC_32_IEEE_LE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_av_crc_get_table
	mov	x22, x0
	bl	_av_assert0
	mov	x0, x19
	mov	x1, x20
	bl	_avio_wb32
	add	x0, sp, #8
	mov	x1, x24
	bl	_AV_WB32
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #-1
	mov	w3, #4
	bl	_av_crc
	mov	x23, x0
	mov	x0, x19
	mov	x1, x24
	bl	_avio_wb32
	cbz	x20, LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	mov	x3, x20
	bl	_av_crc
	mov	x23, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_avio_write
LBB0_2:
	mvn	x1, x23
	mov	x0, x19
	bl	_avio_wb32
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	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
	add	sp, sp, #96
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CRC_32_IEEE_LE,4,2          ; @AV_CRC_32_IEEE_LE
	.no_dead_strip	_apng_write_chunk
.subsections_via_symbols
