	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readpng_init                   ## -- Begin function readpng_init
	.p2align	4, 0x90
_readpng_init:                          ## @readpng_init
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-80(%rbp), %rbx
	movl	$1, %r13d
	movl	$8, %r15d
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	movq	%r14, %rcx
	callq	_fread
	xorl	%esi, %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_png_sig_cmp
	testq	%rax, %rax
	je	LBB0_1
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	movl	%eax, %ebx
	movq	%rbx, %rdi
	callq	_png_get_libpng_ver
	movl	%eax, %edi
	movq	%rbx, %rsi
	movq	%rbx, %rdx
	movq	%rbx, %rcx
	callq	_png_create_read_struct
	movq	_png_ptr@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movl	$4, %r13d
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movl	%eax, %edi
	callq	_png_create_info_struct
	movq	_info_ptr@GOTPCREL(%rip), %r15
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edi
	callq	_png_jmpbuf
	movl	%eax, %edi
	callq	_setjmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_png_ptr@GOTPCREL(%rip), %rdi
	movq	_info_ptr@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	movl	%eax, %edx
	callq	_png_destroy_read_struct
	movl	$2, %r13d
	jmp	LBB0_7
LBB0_3:
	movq	_png_ptr@GOTPCREL(%rip), %rdi
	xorl	%eax, %eax
	movl	%eax, %edx
	movq	%rdx, %rsi
	callq	_png_destroy_read_struct
	jmp	LBB0_7
LBB0_6:
	movl	(%rbx), %edi
	movq	%r14, %rsi
	callq	_png_init_io
	movl	(%rbx), %edi
	movl	$8, %esi
	callq	_png_set_sig_bytes
	movl	(%rbx), %edi
	movl	(%r15), %esi
	callq	_png_read_info
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movq	%rsp, %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	$0, 16(%rax)
	movq	_width@GOTPCREL(%rip), %rbx
	movq	_height@GOTPCREL(%rip), %r14
	movq	_bit_depth@GOTPCREL(%rip), %r8
	movq	_color_type@GOTPCREL(%rip), %r9
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_png_get_IHDR
	movl	(%rbx), %eax
	movl	%eax, (%r12)
	movl	(%r14), %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_png_ptr,4,2                    ## @png_ptr
	.comm	_info_ptr,4,2                   ## @info_ptr
	.comm	_width,4,2                      ## @width
	.comm	_height,4,2                     ## @height
	.comm	_bit_depth,4,2                  ## @bit_depth
	.comm	_color_type,4,2                 ## @color_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readpng_init                   ; -- Begin function readpng_init
	.p2align	2
_readpng_init:                          ; @readpng_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	add	x22, sp, #8
	mov	w23, #1
	mov	w24, #8
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	mov	x3, x21
	bl	_fread
	mov	w1, #0
	mov	x0, x22
	mov	x2, x24
	bl	_png_sig_cmp
	cbz	x0, LBB0_3
LBB0_1:
	ldr	x8, [sp, #40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.2:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	mov	x22, #0
	bl	_png_get_libpng_ver
	mov	x1, x22
	mov	x2, x22
	mov	x3, x22
	bl	_png_create_read_struct
Lloh6:
	adrp	x22, _png_ptr@GOTPAGE
Lloh7:
	ldr	x22, [x22, _png_ptr@GOTPAGEOFF]
	str	w0, [x22]
	cbz	w0, LBB0_7
; %bb.4:
	bl	_png_create_info_struct
Lloh8:
	adrp	x23, _info_ptr@GOTPAGE
Lloh9:
	ldr	x23, [x23, _info_ptr@GOTPAGEOFF]
	str	w0, [x23]
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x22]
	bl	_png_jmpbuf
	bl	_setjmp
	cbz	x0, LBB0_9
; %bb.6:
	mov	x2, #0
Lloh10:
	adrp	x0, _png_ptr@GOTPAGE
Lloh11:
	ldr	x0, [x0, _png_ptr@GOTPAGEOFF]
Lloh12:
	adrp	x1, _info_ptr@GOTPAGE
Lloh13:
	ldr	x1, [x1, _info_ptr@GOTPAGEOFF]
	bl	_png_destroy_read_struct
	mov	w23, #2
	b	LBB0_1
LBB0_7:
	mov	w23, #4
	b	LBB0_1
LBB0_8:
	mov	x1, #0
Lloh14:
	adrp	x0, _png_ptr@GOTPAGE
Lloh15:
	ldr	x0, [x0, _png_ptr@GOTPAGEOFF]
	mov	x2, #0
	bl	_png_destroy_read_struct
	mov	w23, #4
	b	LBB0_1
LBB0_9:
	ldr	w0, [x22]
	mov	x1, x21
	bl	_png_init_io
	ldr	w0, [x22]
	mov	w1, #8
	bl	_png_set_sig_bytes
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_png_read_info
	ldr	w0, [x22]
	ldr	w1, [x23]
	mov	x8, sp
	mov	x6, #0
	str	xzr, [x8]
Lloh16:
	adrp	x21, _width@GOTPAGE
Lloh17:
	ldr	x21, [x21, _width@GOTPAGEOFF]
Lloh18:
	adrp	x22, _height@GOTPAGE
Lloh19:
	ldr	x22, [x22, _height@GOTPAGEOFF]
Lloh20:
	adrp	x4, _bit_depth@GOTPAGE
Lloh21:
	ldr	x4, [x4, _bit_depth@GOTPAGEOFF]
Lloh22:
	adrp	x5, _color_type@GOTPAGE
Lloh23:
	ldr	x5, [x5, _color_type@GOTPAGEOFF]
	mov	x2, x21
	mov	x3, x22
	mov	x7, #0
	bl	_png_get_IHDR
	mov	w23, #0
	ldr	w8, [x21]
	str	w8, [x20]
	ldr	w8, [x22]
	str	w8, [x19]
	b	LBB0_1
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_png_ptr,4,2                    ; @png_ptr
	.comm	_info_ptr,4,2                   ; @info_ptr
	.comm	_width,4,2                      ; @width
	.comm	_height,4,2                     ; @height
	.comm	_bit_depth,4,2                  ; @bit_depth
	.comm	_color_type,4,2                 ; @color_type
.subsections_via_symbols
