	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_store_for_read
_set_store_for_read:                    ## @set_store_for_read
	.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	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	44(%rdi), %edi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_safecat
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_png_error
LBB0_2:
	movq	%rbx, %rdi
	callq	_store_read_reset
	movq	_PNG_LIBPNG_VER_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_store_error@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_store_warning@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	callq	_png_create_read_struct
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_store_log
LBB0_4:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_store_read_set
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	8(%rbx), %rdi
	callq	_png_create_info_struct
	movl	%eax, 16(%rbx)
	movl	%eax, (%r14)
LBB0_6:
	movq	8(%rbx), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read store already in use"

	.comm	_PNG_LIBPNG_VER_STRING,4,2      ## @PNG_LIBPNG_VER_STRING
	.comm	_store_error,4,2                ## @store_error
	.comm	_store_warning,4,2              ## @store_warning
L_.str.1:                               ## @.str.1
	.asciz	"png_create_read_struct returned NULL (unexpected)"

	.comm	_PNG_OPTION_INVALID,8,3         ## @PNG_OPTION_INVALID
	.comm	_store_free,4,2                 ## @store_free
	.comm	_store_malloc,4,2               ## @store_malloc
	.no_dead_strip	_set_store_for_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_store_for_read
_set_store_for_read:                    ; @set_store_for_read
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #44]
	mov	w1, #4
	mov	w2, #0
	bl	_safecat
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_png_error
LBB0_2:
	mov	x0, x19
	bl	_store_read_reset
Lloh2:
	adrp	x8, _PNG_LIBPNG_VER_STRING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PNG_LIBPNG_VER_STRING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _store_error@GOTPAGE
Lloh6:
	ldr	x8, [x8, _store_error@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _store_warning@GOTPAGE
Lloh9:
	ldr	x8, [x8, _store_warning@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x1, x19
	bl	_png_create_read_struct
	str	x0, [x19, #8]
	cbnz	x0, LBB0_4
; %bb.3:
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, #0
	mov	w3, #1
	bl	_store_log
LBB0_4:
	mov	x0, x19
	mov	x1, x21
	bl	_store_read_set
	cbz	x20, LBB0_6
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_png_create_info_struct
	str	w0, [x19, #16]
	str	w0, [x20]
LBB0_6:
	ldr	x0, [x19, #8]
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read store already in use"

	.comm	_PNG_LIBPNG_VER_STRING,4,2      ; @PNG_LIBPNG_VER_STRING
	.comm	_store_error,4,2                ; @store_error
	.comm	_store_warning,4,2              ; @store_warning
l_.str.1:                               ; @.str.1
	.asciz	"png_create_read_struct returned NULL (unexpected)"

	.comm	_PNG_OPTION_INVALID,8,3         ; @PNG_OPTION_INVALID
	.comm	_store_free,4,2                 ; @store_free
	.comm	_store_malloc,4,2               ; @store_malloc
	.no_dead_strip	_set_store_for_read
.subsections_via_symbols
