	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_png
_read_png:                              ## @read_png
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_PNG_LIBPNG_VER_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_no_warnings@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	movl	%ebx, %esi
	movl	%ebx, %edx
	callq	_png_create_read_struct
	movq	%rax, -56(%rbp)
	movq	$0, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_png_jmpbuf
	movl	%eax, %edi
	callq	_setjmp
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_png_init_io
	movq	%rbx, %rdi
	callq	_png_create_info_struct
	movq	%rax, %r13
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	testl	%r12d, %r12d
	js	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	movl	%eax, %ecx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_png_read_png
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_error
	testl	%r12d, %r12d
	jns	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	callq	_read_by_row
LBB0_7:
	movl	$1, %ecx
LBB0_8:
	movl	%ecx, %ebx
	xorl	%eax, %eax
	movl	%eax, %edx
	leaq	-56(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_png_destroy_read_struct
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_LIBPNG_VER_STRING,4,2      ## @PNG_LIBPNG_VER_STRING
	.comm	_no_warnings,4,2                ## @no_warnings
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OOM allocating info structure"

	.no_dead_strip	_read_png
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_png
_read_png:                              ; @read_png
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _PNG_LIBPNG_VER_STRING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNG_LIBPNG_VER_STRING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _no_warnings@GOTPAGE
Lloh4:
	ldr	x8, [x8, _no_warnings@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	w22, #0
	mov	w1, #0
	mov	w2, #0
	bl	_png_create_read_struct
	mov	x8, #0
	stp	xzr, x0, [sp]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	bl	_png_jmpbuf
	bl	_setjmp
	cbz	x0, LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_10
LBB0_3:
	mov	x0, x22
	b	LBB0_11
LBB0_4:
	mov	x0, x22
	mov	x1, x21
	bl	_png_init_io
	mov	x0, x22
	bl	_png_create_info_struct
	mov	x23, x0
	str	x0, [sp]
	cbz	x0, LBB0_7
; %bb.5:
	tbnz	w19, #31, LBB0_8
LBB0_6:
	mov	x3, #0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x19
	bl	_png_read_png
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_png_error
	tbz	w19, #31, LBB0_6
LBB0_8:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x20
	mov	x3, x21
	bl	_read_by_row
LBB0_9:
	mov	w0, #1
LBB0_10:
	mov	x19, x0
	mov	x2, #0
	add	x0, sp, #8
	mov	x1, sp
	bl	_png_destroy_read_struct
	mov	x0, x19
LBB0_11:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_LIBPNG_VER_STRING,4,2      ; @PNG_LIBPNG_VER_STRING
	.comm	_no_warnings,4,2                ; @no_warnings
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OOM allocating info structure"

	.no_dead_strip	_read_png
.subsections_via_symbols
