	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb_image_upload_generic
_cb_image_upload_generic:               ## @cb_image_upload_generic
	.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	8(%rdi), %rbx
	movl	$-1, %eax
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %ecx
	andl	$-2, %ecx
	cmpl	$128, %ecx
	je	LBB0_3
## %bb.2:
	movq	%rdi, %r15
	leaq	16(%rbx), %r14
	leaq	-40(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	movq	%r14, %r8
	callq	_image_texture_set_color_shifts
	movl	-40(%rbp), %edi
	movl	-36(%rbp), %esi
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	%r14, %r8
	callq	_image_texture_color_convert
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, 4(%rbx)
	movl	$1, 12(%rbx)
	movl	$1, (%r15)
	xorl	%eax, %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_cb_image_upload_generic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cb_image_upload_generic
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cb_image_upload_generic:               ; @cb_image_upload_generic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #-1
	b	LBB0_4
LBB0_3:
	mov	x19, x0
	add	x20, x21, #16
	add	x0, sp, #12
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x3, sp
	mov	x4, x20
	bl	_image_texture_set_color_shifts
	ldp	w1, w0, [sp, #8]
	ldp	w3, w2, [sp]
	mov	x4, x20
	bl	_image_texture_color_convert
	mov	w0, #0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x21, #4]
	mov	w8, #1
	str	w8, [x21, #12]
	str	w8, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_cb_image_upload_generic
.subsections_via_symbols
