	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_colorspace_set_endpoints   ## -- Begin function png_colorspace_set_endpoints
	.p2align	4, 0x90
_png_colorspace_set_endpoints:          ## @png_colorspace_set_endpoints
	.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
	movl	%ecx, %r15d
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movl	(%rdx), %eax
	movl	%eax, -28(%rbp)
	leaq	-32(%rbp), %rdi
	leaq	-28(%rbp), %rsi
	callq	_png_colorspace_check_XYZ
	cmpl	$1, %eax
	je	LBB0_3
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	leaq	-32(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	%r15d, %r8d
	callq	_png_colorspace_set_xy_and_XYZ
	jmp	LBB0_6
LBB0_3:
	movq	_PNG_COLORSPACE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_png_benign_error
	jmp	LBB0_5
LBB0_4:
	movq	_PNG_COLORSPACE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_png_error
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_COLORSPACE_INVALID,4,2     ## @PNG_COLORSPACE_INVALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid end points"

L_.str.1:                               ## @.str.1
	.asciz	"internal error checking chromaticities"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_colorspace_set_endpoints   ; -- Begin function png_colorspace_set_endpoints
	.p2align	2
_png_colorspace_set_endpoints:          ; @png_colorspace_set_endpoints
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x3
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x2]
	str	w8, [sp, #12]
	add	x0, sp, #8
	add	x1, sp, #12
	bl	_png_colorspace_check_XYZ
	cmp	w0, #1
	b.eq	LBB0_3
; %bb.1:
	cbnz	w0, LBB0_4
; %bb.2:
	add	x2, sp, #8
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	x4, x21
	bl	_png_colorspace_set_xy_and_XYZ
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _PNG_COLORSPACE_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNG_COLORSPACE_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_png_benign_error
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _PNG_COLORSPACE_INVALID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PNG_COLORSPACE_INVALID@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_png_error
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_COLORSPACE_INVALID,4,2     ; @PNG_COLORSPACE_INVALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid end points"

l_.str.1:                               ; @.str.1
	.asciz	"internal error checking chromaticities"

.subsections_via_symbols
