	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_image_texture_load             ## -- Begin function image_texture_load
	.p2align	4, 0x90
_image_texture_load:                    ## @image_texture_load
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	movq	%rsi, %rdi
	callq	_image_texture_get_type
	movl	%eax, %r14d
	leaq	-40(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	movq	%r15, %r8
	callq	_image_texture_set_color_shifts
	movq	_IMAGE_TYPE_NONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_7
## %bb.1:
	movq	_NBIO_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_nbio_open
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	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	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nbio_get_ptr
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	-48(%rbp), %rdx
	movl	-28(%rbp), %r8d
	movl	-40(%rbp), %r9d
	movl	-36(%rbp), %r10d
	movl	-32(%rbp), %r11d
	movl	%r14d, %edi
	movq	%rax, %rsi
	movq	%r15, %rcx
	pushq	%r11
	pushq	%r10
	callq	_image_texture_load_internal
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_nbio_free
	movl	$1, %eax
	jmp	LBB0_10
LBB0_7:
	movl	$0, (%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movq	$0, 24(%r15)
	jmp	LBB0_9
LBB0_8:
	movl	$0, (%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movq	$0, 24(%r15)
	movq	%rbx, %rdi
	callq	_nbio_free
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMAGE_TYPE_NONE,4,2            ## @IMAGE_TYPE_NONE
	.comm	_NBIO_READ,4,2                  ## @NBIO_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_image_texture_load             ; -- Begin function image_texture_load
	.p2align	2
_image_texture_load:                    ; @image_texture_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	mov	x19, x0
	str	xzr, [sp, #8]
	mov	x0, x1
	bl	_image_texture_get_type
	mov	x20, x0
	add	x0, sp, #28
	add	x1, sp, #24
	add	x2, sp, #20
	add	x3, sp, #16
	mov	x4, x19
	bl	_image_texture_set_color_shifts
Lloh0:
	adrp	x8, _IMAGE_TYPE_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMAGE_TYPE_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.eq	LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _NBIO_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NBIO_READ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_nbio_open
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
	bl	_nbio_begin_read
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_nbio_iterate
	cbz	w0, LBB0_3
; %bb.4:
	add	x1, sp, #8
	mov	x0, x21
	bl	_nbio_get_ptr
	cbz	x0, LBB0_8
; %bb.5:
	mov	x1, x0
	ldr	x2, [sp, #8]
	ldp	w4, w7, [sp, #16]
	ldp	w6, w5, [sp, #24]
	mov	x0, x20
	mov	x3, x19
	bl	_image_texture_load_internal
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_nbio_free
	mov	w0, #1
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	str	wzr, [x19]
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #8]
	b	LBB0_9
LBB0_8:
	str	wzr, [x19]
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #8]
	mov	x0, x21
	bl	_nbio_free
	mov	w0, #0
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IMAGE_TYPE_NONE,4,2            ; @IMAGE_TYPE_NONE
	.comm	_NBIO_READ,4,2                  ; @NBIO_READ
.subsections_via_symbols
