	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perform_gamma_test
_perform_gamma_test:                    ## @perform_gamma_test
	.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	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdi), %r15d
	cmpl	$0, 96(%rdi)
	je	LBB0_1
LBB0_3:
	cmpq	$0, 80(%rbx)
	je	LBB0_13
## %bb.4:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	leaq	L_str(%rip), %rdi
	callq	_puts
	leaq	L_str.12(%rip), %rdi
	callq	_puts
	leaq	L_str.13(%rip), %rdi
	callq	_puts
	leaq	L_str.14(%rip), %rdi
	callq	_puts
	leaq	L_str.15(%rip), %rdi
	callq	_puts
	leaq	L_str.16(%rip), %rdi
	callq	_puts
	leaq	L_str.17(%rip), %rdi
	callq	_puts
	leaq	L_str.18(%rip), %rdi
	callq	_puts
	leaq	L_str.19(%rip), %rdi
	callq	_puts
	leaq	L_str.20(%rip), %rdi
	callq	_puts
	leaq	L_str.21(%rip), %rdi
	callq	_puts
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
LBB0_6:
	movq	%rbx, %rdi
	callq	_init_gamma_errors
	cmpq	$0, 40(%rbx)
	je	LBB0_8
## %bb.7:
	movl	$1, (%rbx)
LBB0_8:
	movq	%rbx, %rdi
	callq	_perform_gamma_transform_tests
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.10:
	testl	%r14d, %r14d
	je	LBB0_12
LBB0_11:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_summarize_gamma_errors
LBB0_12:
	movq	%rbx, %rdi
	callq	_fail
	testq	%rax, %rax
	jne	LBB0_17
LBB0_13:
	cmpq	$0, 72(%rbx)
	je	LBB0_17
## %bb.14:
	movq	%rbx, %rdi
	callq	_init_gamma_errors
	movq	%rbx, %rdi
	callq	_perform_gamma_sbit_tests
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.15:
	xorl	%edx, %edx
	cmpl	$8, 16(%rbx)
	setb	%dl
	leaq	L_.str.11(%rip), %rsi
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_summarize_gamma_errors
LBB0_16:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fail                           ## TAILCALL
LBB0_1:
	cmpq	$0, 88(%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_perform_gamma_threshold_tests
	movq	%rbx, %rdi
	callq	_fail
	testq	%rax, %rax
	je	LBB0_3
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$0, (%rbx)
	testl	%r14d, %r14d
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.comm	_stdout,4,2                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str.11:                              ## @.str.11
	.asciz	"sBIT"

	.comm	_ALPHA_MODE_OFFSET,4,2          ## @ALPHA_MODE_OFFSET
	.comm	_PNG_ALPHA_BROKEN,4,2           ## @PNG_ALPHA_BROKEN
	.comm	_PNG_ALPHA_STANDARD,4,2         ## @PNG_ALPHA_STANDARD
	.comm	_PNG_BACKGROUND_GAMMA_UNIQUE,4,2 ## @PNG_BACKGROUND_GAMMA_UNIQUE
L_str:                                  ## @str
	.asciz	"Gamma correction error summary\n"

L_str.12:                               ## @str.12
	.asciz	"The printed value is the maximum error in the pixel values"

L_str.13:                               ## @str.13
	.asciz	"calculated by the libpng gamma correction code.  The error"

L_str.14:                               ## @str.14
	.asciz	"is calculated as the difference between the output pixel"

L_str.15:                               ## @str.15
	.asciz	"value (always an integer) and the ideal value from the"

L_str.16:                               ## @str.16
	.asciz	"libpng specification (typically not an integer).\n"

L_str.17:                               ## @str.17
	.asciz	"Expect this value to be less than .5 for 8 bit formats,"

L_str.18:                               ## @str.18
	.asciz	"less than 1 for formats with fewer than 8 bits and a small"

L_str.19:                               ## @str.19
	.asciz	"number (typically less than 5) for the 16 bit formats."

L_str.20:                               ## @str.20
	.asciz	"For performance reasons the value for 16 bit formats"

L_str.21:                               ## @str.21
	.asciz	"increases when the image file includes an sBIT chunk."

	.no_dead_strip	_perform_gamma_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perform_gamma_test
_perform_gamma_test:                    ; @perform_gamma_test
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x19, x0
	ldr	w21, [x0]
	ldr	w8, [x0, #96]
	cbz	w8, LBB0_14
LBB0_1:
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_10
; %bb.2:
	cbz	w20, LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_fflush
Lloh3:
	adrp	x0, l_str@PAGE
Lloh4:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh5:
	adrp	x0, l_str.12@PAGE
Lloh6:
	add	x0, x0, l_str.12@PAGEOFF
	bl	_puts
Lloh7:
	adrp	x0, l_str.13@PAGE
Lloh8:
	add	x0, x0, l_str.13@PAGEOFF
	bl	_puts
Lloh9:
	adrp	x0, l_str.14@PAGE
Lloh10:
	add	x0, x0, l_str.14@PAGEOFF
	bl	_puts
Lloh11:
	adrp	x0, l_str.15@PAGE
Lloh12:
	add	x0, x0, l_str.15@PAGEOFF
	bl	_puts
Lloh13:
	adrp	x0, l_str.16@PAGE
Lloh14:
	add	x0, x0, l_str.16@PAGEOFF
	bl	_puts
Lloh15:
	adrp	x0, l_str.17@PAGE
Lloh16:
	add	x0, x0, l_str.17@PAGEOFF
	bl	_puts
Lloh17:
	adrp	x0, l_str.18@PAGE
Lloh18:
	add	x0, x0, l_str.18@PAGEOFF
	bl	_puts
Lloh19:
	adrp	x0, l_str.19@PAGE
Lloh20:
	add	x0, x0, l_str.19@PAGEOFF
	bl	_puts
Lloh21:
	adrp	x0, l_str.20@PAGE
Lloh22:
	add	x0, x0, l_str.20@PAGEOFF
	bl	_puts
Lloh23:
	adrp	x0, l_str.21@PAGE
Lloh24:
	add	x0, x0, l_str.21@PAGEOFF
	bl	_puts
Lloh25:
	adrp	x8, _stdout@GOTPAGE
Lloh26:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_fflush
LBB0_4:
	mov	x0, x19
	bl	_init_gamma_errors
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x19]
LBB0_6:
	mov	x0, x19
	bl	_perform_gamma_transform_tests
	cbz	w21, LBB0_17
; %bb.7:
	cbz	w20, LBB0_9
LBB0_8:
	mov	x0, x19
	mov	x1, #0
	mov	w2, #1
	mov	w3, #1
	bl	_summarize_gamma_errors
LBB0_9:
	mov	x0, x19
	bl	_fail
	cbnz	x0, LBB0_16
LBB0_10:
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_16
; %bb.11:
	mov	x0, x19
	bl	_init_gamma_errors
	mov	x0, x19
	bl	_perform_gamma_sbit_tests
	cbz	w20, LBB0_13
; %bb.12:
	ldr	w8, [x19, #16]
	cmp	w8, #8
	cset	w2, lo
Lloh28:
	adrp	x1, l_.str.11@PAGE
Lloh29:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x19
	mov	w3, #1
	bl	_summarize_gamma_errors
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fail
LBB0_14:
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_1
; %bb.15:
	mov	x0, x19
	bl	_perform_gamma_threshold_tests
	mov	x0, x19
	bl	_fail
	cbz	x0, LBB0_1
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_17:
	str	wzr, [x19]
	cbnz	w20, LBB0_8
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.comm	_stdout,4,2                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str.11:                              ; @.str.11
	.asciz	"sBIT"

	.comm	_ALPHA_MODE_OFFSET,4,2          ; @ALPHA_MODE_OFFSET
	.comm	_PNG_ALPHA_BROKEN,4,2           ; @PNG_ALPHA_BROKEN
	.comm	_PNG_ALPHA_STANDARD,4,2         ; @PNG_ALPHA_STANDARD
	.comm	_PNG_BACKGROUND_GAMMA_UNIQUE,4,2 ; @PNG_BACKGROUND_GAMMA_UNIQUE
l_str:                                  ; @str
	.asciz	"Gamma correction error summary\n"

l_str.12:                               ; @str.12
	.asciz	"The printed value is the maximum error in the pixel values"

l_str.13:                               ; @str.13
	.asciz	"calculated by the libpng gamma correction code.  The error"

l_str.14:                               ; @str.14
	.asciz	"is calculated as the difference between the output pixel"

l_str.15:                               ; @str.15
	.asciz	"value (always an integer) and the ideal value from the"

l_str.16:                               ; @str.16
	.asciz	"libpng specification (typically not an integer).\n"

l_str.17:                               ; @str.17
	.asciz	"Expect this value to be less than .5 for 8 bit formats,"

l_str.18:                               ; @str.18
	.asciz	"less than 1 for formats with fewer than 8 bits and a small"

l_str.19:                               ; @str.19
	.asciz	"number (typically less than 5) for the 16 bit formats."

l_str.20:                               ; @str.20
	.asciz	"For performance reasons the value for 16 bit formats"

l_str.21:                               ; @str.21
	.asciz	"increases when the image file includes an sBIT chunk."

	.no_dead_strip	_perform_gamma_test
.subsections_via_symbols
