	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpng_load_image_argb
_rpng_load_image_argb:                  ## @rpng_load_image_argb
	.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	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	_NBIO_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nbio_open
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_nbio_begin_read
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_nbio_iterate
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nbio_get_ptr
	testq	%rax, %rax
	je	LBB0_15
## %bb.5:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_rpng_alloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_rpng_set_buf_ptr
	testl	%eax, %eax
	je	LBB0_16
## %bb.7:
	movq	%r13, %rdi
	callq	_rpng_start
	testl	%eax, %eax
	je	LBB0_16
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_rpng_iterate_image
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:
	movq	%r13, %rdi
	callq	_rpng_is_valid
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	%r15, %r14
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r12, %rcx
	movq	%r14, %r8
	callq	_rpng_process_image
	movq	_IMAGE_PROCESS_NEXT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.13:
	movq	_IMAGE_PROCESS_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%cl
	movq	_IMAGE_PROCESS_ERROR_END@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	sete	%r14b
	orb	%cl, %r14b
	movl	%r14d, %eax
	xorb	$1, %al
	movzbl	%al, %r15d
	jmp	LBB0_14
LBB0_15:
	movq	%rbx, %rdi
	callq	_nbio_free
	jmp	LBB0_17
LBB0_1:
	movl	$1, %r15d
	jmp	LBB0_19
LBB0_16:
	movq	%rbx, %rdi
	callq	_nbio_free
	movq	%r13, %rdi
	callq	_rpng_free
LBB0_17:
	xorl	%r15d, %r15d
LBB0_18:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_free
LBB0_19:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%r15d, %r15d
	movb	$1, %r14b
LBB0_14:
	movq	%rbx, %rdi
	callq	_nbio_free
	movq	%r13, %rdi
	callq	_rpng_free
	testb	%r14b, %r14b
	jne	LBB0_18
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_NBIO_READ,4,2                  ## @NBIO_READ
	.comm	_IMAGE_PROCESS_NEXT,4,2         ## @IMAGE_PROCESS_NEXT
	.comm	_IMAGE_PROCESS_ERROR,4,2        ## @IMAGE_PROCESS_ERROR
	.comm	_IMAGE_PROCESS_ERROR_END,4,2    ## @IMAGE_PROCESS_ERROR_END
	.no_dead_strip	_rpng_load_image_argb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpng_load_image_argb
_rpng_load_image_argb:                  ; @rpng_load_image_argb
	.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	x21, x3
	mov	x22, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _NBIO_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NBIO_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nbio_open
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
	bl	_nbio_begin_read
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_nbio_iterate
	cbz	w0, LBB0_2
; %bb.3:
	add	x1, sp, #8
	mov	x0, x20
	bl	_nbio_get_ptr
	cbz	x0, LBB0_12
; %bb.4:
	mov	x24, x0
	bl	_rpng_alloc
	cbz	x0, LBB0_12
; %bb.5:
	mov	x23, x0
	mov	x1, x24
	bl	_rpng_set_buf_ptr
	cbz	w0, LBB0_14
; %bb.6:
	mov	x0, x23
	bl	_rpng_start
	cbz	w0, LBB0_14
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_rpng_iterate_image
	cbnz	x0, LBB0_7
; %bb.8:
	mov	x0, x23
	bl	_rpng_is_valid
	cbz	w0, LBB0_18
; %bb.9:
Lloh3:
	adrp	x24, _IMAGE_PROCESS_NEXT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _IMAGE_PROCESS_NEXT@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x2, [sp, #8]
	mov	x0, x23
	mov	x1, x19
	mov	x3, x22
	mov	x4, x21
	bl	_rpng_process_image
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_10
; %bb.11:
Lloh5:
	adrp	x8, _IMAGE_PROCESS_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IMAGE_PROCESS_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
Lloh8:
	adrp	x8, _IMAGE_PROCESS_ERROR_END@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IMAGE_PROCESS_ERROR_END@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ccmp	w0, w8, #4, ne
	cset	w22, eq
	eor	w21, w22, #0x1
	b	LBB0_19
LBB0_12:
	mov	x0, x20
	bl	_nbio_free
	b	LBB0_15
LBB0_13:
	mov	w21, #1
	b	LBB0_17
LBB0_14:
	mov	x0, x20
	bl	_nbio_free
	mov	x0, x23
	bl	_rpng_free
LBB0_15:
	mov	w21, #0
LBB0_16:
	ldr	x0, [x19]
	bl	_free
LBB0_17:
	mov	x0, x21
	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
LBB0_18:
	mov	w21, #0
	mov	w22, #1
LBB0_19:
	mov	x0, x20
	bl	_nbio_free
	mov	x0, x23
	bl	_rpng_free
	cbnz	w22, LBB0_16
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NBIO_READ,4,2                  ; @NBIO_READ
	.comm	_IMAGE_PROCESS_NEXT,4,2         ; @IMAGE_PROCESS_NEXT
	.comm	_IMAGE_PROCESS_ERROR,4,2        ; @IMAGE_PROCESS_ERROR
	.comm	_IMAGE_PROCESS_ERROR_END,4,2    ; @IMAGE_PROCESS_ERROR_END
	.no_dead_strip	_rpng_load_image_argb
.subsections_via_symbols
