	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_sCAL_s               ## -- Begin function png_write_sCAL_s
	.p2align	4, 0x90
_png_write_sCAL_s:                      ## @png_write_sCAL_s
	.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	$536, %rsp                      ## imm = 0x218
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, -568(%rbp)                ## 4-byte Spill
	movl	%edi, -564(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movl	%r12d, %edi
	callq	_strlen
	movl	%eax, %r14d
	movl	%r15d, %edi
	callq	_strlen
	movl	%eax, %r13d
	leal	(%r14,%r13), %ebx
	cmpl	$63, %ebx
	jl	LBB0_3
## %bb.1:
	movl	-564(%rbp), %edi                ## 4-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_warning                    ## TAILCALL
LBB0_3:
	addl	$2, %ebx
	movslq	-568(%rbp), %rax                ## 4-byte Folded Reload
	movq	%rax, -560(%rbp)
	leaq	-552(%rbp), %rdi
	leal	1(%r14), %edx
	movl	%r12d, %esi
	callq	_memcpy
	movslq	%r14d, %rax
	leaq	-544(,%rax,8), %rdi
	addq	%rbp, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_memcpy
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	movl	%ebx, %edx
	callq	_png_debug1
	movq	_png_sCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-560(%rbp), %rdx
	movl	-564(%rbp), %edi                ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_png_write_complete_chunk
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_write_sCAL_s"

L_.str.1:                               ## @.str.1
	.asciz	"Can't write sCAL (buffer too small)"

L_.str.2:                               ## @.str.2
	.asciz	"sCAL total length = %u"

	.comm	_png_sCAL,4,2                   ## @png_sCAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_sCAL_s               ; -- Begin function png_write_sCAL_s
	.p2align	2
_png_write_sCAL_s:                      ; @png_write_sCAL_s
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #528
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	mov	x0, x21
	bl	_strlen
	mov	x23, x0
	mov	x0, x20
	bl	_strlen
	add	w8, w0, w23
	cmp	w8, #63
	b.lt	LBB0_3
; %bb.1:
	ldur	x8, [x29, #-72]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	add	sp, sp, #528
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_png_warning
LBB0_3:
	mov	x24, x0
	add	w25, w8, #2
	sxtw	x8, w22
	str	x8, [sp, #8]
	add	x22, sp, #8
	add	x0, x22, #8
	add	w2, w23, #1
	mov	x1, x21
	bl	_memcpy
	add	x8, x22, w23, sxtw #3
	add	x0, x8, #16
	mov	x1, x20
	mov	x2, x24
	bl	_memcpy
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	mov	x2, x25
	bl	_png_debug1
Lloh12:
	adrp	x8, _png_sCAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _png_sCAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	x3, x25
	bl	_png_write_complete_chunk
	ldur	x8, [x29, #-72]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	add	sp, sp, #528
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_write_sCAL_s"

l_.str.1:                               ; @.str.1
	.asciz	"Can't write sCAL (buffer too small)"

l_.str.2:                               ; @.str.2
	.asciz	"sCAL total length = %u"

	.comm	_png_sCAL,4,2                   ; @png_sCAL
.subsections_via_symbols
