	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_image_type
_convert_image_type:                    ## @convert_image_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
                                        ## kill: def $edi killed $edi def $rdi
	leal	-128(%rdi), %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.convert_image_type(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rax
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.3:
	movl	$132, %ecx
	subl	%edi, %ecx
	movl	%ecx, (%rdx)
	jmp	LBB0_4
LBB0_1:
	xorl	%edi, %edi
	callq	_vcos_assert
	movl	$0, (%rbx)
	movq	_VCOS_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VG_sRGB_565,4,2                ## @VG_sRGB_565
	.comm	_VG_sRGBX_8888,4,2              ## @VG_sRGBX_8888
	.comm	_VG_sARGB_8888,4,2              ## @VG_sARGB_8888
	.comm	_VCOS_EINVAL,4,2                ## @VCOS_EINVAL
	.comm	_VCOS_SUCCESS,4,2               ## @VCOS_SUCCESS
	.no_dead_strip	_convert_image_type
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.convert_image_type
l_switch.table.convert_image_type:
	.quad	_VG_sARGB_8888
	.quad	_VG_sRGBX_8888
	.quad	_VG_sRGB_565

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_image_type
_convert_image_type:                    ; @convert_image_type
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	sub	w8, w0, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.convert_image_type@PAGE
Lloh1:
	add	x9, x9, l_switch.table.convert_image_type@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	str	w8, [x19]
	cbz	x2, LBB0_3
; %bb.2:
	mov	w8, #132
	sub	w8, w8, w0
	str	w8, [x2]
LBB0_3:
Lloh2:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	mov	w0, #0
	bl	_vcos_assert
	str	wzr, [x19]
Lloh4:
	adrp	x8, _VCOS_EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VCOS_EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VG_sRGB_565,4,2                ; @VG_sRGB_565
	.comm	_VG_sRGBX_8888,4,2              ; @VG_sRGBX_8888
	.comm	_VG_sARGB_8888,4,2              ; @VG_sARGB_8888
	.comm	_VCOS_EINVAL,4,2                ; @VCOS_EINVAL
	.comm	_VCOS_SUCCESS,4,2               ; @VCOS_SUCCESS
	.no_dead_strip	_convert_image_type
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.convert_image_type
l_switch.table.convert_image_type:
	.quad	_VG_sARGB_8888
	.quad	_VG_sRGBX_8888
	.quad	_VG_sRGB_565

.subsections_via_symbols
