	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function readpng2_info_callback
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_readpng2_info_callback:                ## @readpng2_info_callback
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	callq	_png_get_progressive_ptr
	testq	%rax, %rax
	je	LBB0_28
## %bb.1:
	movq	%rax, %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movq	$0, 16(%rsp)
	leaq	-72(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	leaq	-52(%rbp), %r8
	leaq	-36(%rbp), %r9
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_png_get_IHDR
	movq	-72(%rbp), %rax
	movq	%rax, 56(%r15)
	movq	-64(%rbp), %rax
	movq	%rax, 48(%r15)
	cmpq	$0, 40(%r15)
	je	LBB0_15
## %bb.2:
	leaq	-48(%rbp), %rdx
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_png_get_bKGD
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:
	movl	-52(%rbp), %eax
	cmpl	$16, %eax
	jne	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rax
	movl	(%rax), %ecx
	sarl	$8, %ecx
	movl	%ecx, (%r15)
	movl	4(%rax), %ecx
	sarl	$8, %ecx
	movl	%ecx, 4(%r15)
	movl	8(%rax), %eax
	sarl	$8, %eax
	jmp	LBB0_14
LBB0_28:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	(%rbx), %edi
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fflush                         ## TAILCALL
LBB0_5:
	movl	-36(%rbp), %ecx
	movq	_PNG_COLOR_TYPE_GRAY@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_13
## %bb.6:
	cmpl	$7, %eax
	jg	LBB0_13
## %bb.7:
	cmpl	$2, %eax
	je	LBB0_11
## %bb.8:
	cmpl	$1, %eax
	jne	LBB0_12
## %bb.9:
	movq	-48(%rbp), %rax
	movl	12(%rax), %eax
	testl	%eax, %eax
	movl	$255, %ecx
	cmovel	%eax, %ecx
	jmp	LBB0_10
LBB0_13:
	movq	-48(%rbp), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	movl	4(%rax), %ecx
	movl	%ecx, 4(%r15)
	movl	8(%rax), %eax
LBB0_14:
	movl	%eax, 8(%r15)
LBB0_15:
	movl	-36(%rbp), %eax
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.16:
	movl	%ebx, %edi
	callq	_png_set_expand
	movl	-36(%rbp), %eax
LBB0_17:
	movq	_PNG_COLOR_TYPE_GRAY@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	jne	LBB0_20
## %bb.18:
	cmpl	$7, -52(%rbp)
	jg	LBB0_20
## %bb.19:
	movl	%ebx, %edi
	callq	_png_set_expand
LBB0_20:
	movq	_PNG_INFO_tRNS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_png_get_valid
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movl	%ebx, %edi
	callq	_png_set_expand
LBB0_22:
	movl	-36(%rbp), %eax
	cmpl	(%r12), %eax
	je	LBB0_24
## %bb.23:
	movq	_PNG_COLOR_TYPE_GRAY_ALPHA@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_25
LBB0_24:
	movl	%ebx, %edi
	callq	_png_set_gray_to_rgb
LBB0_25:
	leaq	-48(%rbp), %rdx
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_png_get_gAMA_fixed
	imull	$100000, 12(%r15), %ecx         ## imm = 0x186A0
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %esi
	movl	$45455, %edx                    ## imm = 0xB18F
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	movl	-48(%rbp), %edx
LBB0_27:
	movl	%ebx, %edi
	callq	_png_set_gamma_fixed
	movl	%ebx, %edi
	callq	_png_set_interlace_handling
	movl	%eax, 36(%r15)
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_png_read_update_info
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_png_get_rowbytes
	movl	%eax, 16(%r15)
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_png_get_channels
	movl	%eax, 32(%r15)
	xorl	%eax, %eax
	callq	*24(%r15)
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	-48(%rbp), %rax
	imull	$85, 12(%rax), %eax
	movl	%eax, 8(%r15)
	movl	%eax, 4(%r15)
	movl	%eax, (%r15)
	jmp	LBB0_15
LBB0_12:
	movq	-48(%rbp), %rax
	movl	12(%rax), %eax
	movl	%eax, %ecx
	shll	$4, %ecx
	addl	%eax, %ecx
LBB0_10:
	movl	%ecx, 8(%r15)
	movl	%ecx, 4(%r15)
	movl	%ecx, (%r15)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"readpng2 error:  main struct not recoverable in info_callback.\n"

	.comm	_PNG_COLOR_TYPE_GRAY,4,2        ## @PNG_COLOR_TYPE_GRAY
	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ## @PNG_COLOR_TYPE_PALETTE
	.comm	_PNG_INFO_tRNS,4,2              ## @PNG_INFO_tRNS
	.comm	_PNG_COLOR_TYPE_GRAY_ALPHA,4,2  ## @PNG_COLOR_TYPE_GRAY_ALPHA
	.no_dead_strip	_readpng2_info_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readpng2_info_callback
_readpng2_info_callback:                ; @readpng2_info_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
	mov	x21, x0
	bl	_png_get_progressive_ptr
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	str	xzr, [sp]
	add	x2, sp, #32
	add	x3, sp, #24
	add	x4, sp, #40
	sub	x5, x29, #36
	mov	x0, x21
	mov	x1, x19
	mov	x6, #0
	mov	x7, #0
	bl	_png_get_IHDR
	ldp	x9, x8, [sp, #24]
	stp	x9, x8, [x20, #48]
	ldr	x8, [x20, #40]
Lloh0:
	adrp	x22, _PNG_COLOR_TYPE_GRAY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PNG_COLOR_TYPE_GRAY@GOTPAGEOFF]
	cbz	x8, LBB0_15
; %bb.2:
	add	x2, sp, #16
	mov	x0, x21
	mov	x1, x19
	bl	_png_get_bKGD
	cbz	x0, LBB0_15
; %bb.3:
	ldr	w8, [sp, #40]
	cmp	w8, #16
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [sp, #16]
	ldr	d0, [x8]
	sshr.2s	v0, v0, #8
	str	d0, [x20]
	ldr	w8, [x8, #8]
	asr	w8, w8, #8
	b	LBB0_8
LBB0_5:
Lloh2:
	adrp	x19, _stderr@GOTPAGE
Lloh3:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	ldr	w0, [x19]
	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
	add	sp, sp, #96
	b	_fflush
LBB0_6:
	ldur	w9, [x29, #-36]
	ldr	w10, [x22]
	cmp	w9, w10
	ccmp	w8, #7, #0, eq
	b.le	LBB0_9
; %bb.7:
	ldr	x8, [sp, #16]
	ldr	d0, [x8]
	str	d0, [x20]
	ldr	w8, [x8, #8]
LBB0_8:
	str	w8, [x20, #8]
	b	LBB0_15
LBB0_9:
	cmp	w8, #2
	b.eq	LBB0_12
; %bb.10:
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.11:
	ldr	x8, [sp, #16]
	ldr	w8, [x8, #12]
	mov	w9, #255
	cmp	w8, #0
	csel	w8, wzr, w9, eq
	b	LBB0_14
LBB0_12:
	ldr	x8, [sp, #16]
	ldr	w8, [x8, #12]
	mov	w9, #85
	mul	w8, w8, w9
	b	LBB0_14
LBB0_13:
	ldr	x8, [sp, #16]
	ldr	w8, [x8, #12]
	add	w8, w8, w8, lsl #4
LBB0_14:
	stp	w8, w8, [x20, #4]
	str	w8, [x20]
LBB0_15:
	ldur	w8, [x29, #-36]
Lloh6:
	adrp	x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x21
	bl	_png_set_expand
	ldur	w8, [x29, #-36]
LBB0_17:
	ldr	w9, [x22]
	ldr	w10, [sp, #40]
	cmp	w8, w9
	ccmp	w10, #7, #0, eq
	b.gt	LBB0_19
; %bb.18:
	mov	x0, x21
	bl	_png_set_expand
LBB0_19:
Lloh9:
	adrp	x8, _PNG_INFO_tRNS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PNG_INFO_tRNS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x19
	bl	_png_get_valid
	cbz	x0, LBB0_21
; %bb.20:
	mov	x0, x21
	bl	_png_set_expand
LBB0_21:
	ldur	w8, [x29, #-36]
	ldr	w9, [x22]
Lloh12:
	adrp	x10, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_23
; %bb.22:
	mov	x0, x21
	bl	_png_set_gray_to_rgb
LBB0_23:
	add	x2, sp, #16
	mov	x0, x21
	mov	x1, x19
	bl	_png_get_gAMA_fixed
	ldr	w8, [x20, #12]
	mov	w9, #34464
	movk	w9, #1, lsl #16
	mul	w8, w8, w9
	scvtf	d0, w8
	fmov	d1, #0.50000000
	fadd	d0, d0, d1
	fcvtzs	w1, d0
	ldr	w8, [sp, #16]
	cmp	x0, #0
	mov	w9, #45455
	csel	w2, w9, w8, eq
	mov	x0, x21
	bl	_png_set_gamma_fixed
	mov	x0, x21
	bl	_png_set_interlace_handling
	str	w0, [x20, #36]
	mov	x0, x21
	mov	x1, x19
	bl	_png_read_update_info
	mov	x0, x21
	mov	x1, x19
	bl	_png_get_rowbytes
	str	w0, [x20, #16]
	mov	x0, x21
	mov	x1, x19
	bl	_png_get_channels
	str	w0, [x20, #32]
	ldr	x8, [x20, #24]
	blr	x8
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"readpng2 error:  main struct not recoverable in info_callback.\n"

	.comm	_PNG_COLOR_TYPE_GRAY,4,2        ; @PNG_COLOR_TYPE_GRAY
	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ; @PNG_COLOR_TYPE_PALETTE
	.comm	_PNG_INFO_tRNS,4,2              ; @PNG_INFO_tRNS
	.comm	_PNG_COLOR_TYPE_GRAY_ALPHA,4,2  ; @PNG_COLOR_TYPE_GRAY_ALPHA
	.no_dead_strip	_readpng2_info_callback
.subsections_via_symbols
