	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function egl_surface_from_vg_image
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_egl_surface_from_vg_image
	.p2align	4, 0x90
_egl_surface_from_vg_image:             ## @egl_surface_from_vg_image
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -104(%rbp)                 ## 8-byte Spill
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, -112(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_CLIENT_GET_THREAD_STATE
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	callq	_egl_surface_pool_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	16(%rbp), %rax
	movl	%r12d, 148(%rbx)
	movq	_PBUFFER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 144(%rbx)
	movq	%r13, 136(%rbx)
	movq	$0, 128(%rbx)
	movl	$1, (%rbx)
	movq	%r15, 120(%rbx)
	movq	%r14, %r15
	movq	%r14, 112(%rbx)
	movq	$0, 104(%rbx)
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, 96(%rbx)
	movq	%rax, 88(%rbx)
	movq	$0, 80(%rbx)
	movq	72(%rbx), %rax
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255]
	movdqu	%xmm0, (%rax)
	movq	$0, 4(%rbx)
	movq	$0, 64(%rbx)
	decl	%r13d
	movl	%r13d, %edi
	callq	_egl_config_get_color_format
	movq	%rax, %r14
	movl	%r13d, %edi
	callq	_egl_config_get_depth_format
	movq	%rax, %r12
	movl	%r13d, %edi
	callq	_egl_config_get_mask_format
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	%r13d, %edi
	callq	_egl_config_get_multisample_format
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	_EGL_DEPTH_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-160(%rbp), %rdx
	movl	%r13d, %edi
	callq	_egl_config_get_attrib
	movq	_EGL_STENCIL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-152(%rbp), %rdx
	movl	%r13d, %edi
	callq	_egl_config_get_attrib
	movq	_IMAGE_FORMAT_INVALID@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %r14
	setne	%dil
	callq	_vcos_assert
	movl	$1, 16(%rbx)
	movq	_eglIntCreatePbufferFromVGImage_impl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -124(%rbp)                ## 4-byte Spill
	movq	_EGLINTCREATEPBUFFERFROMVGIMAGE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)                ## 4-byte Spill
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_RPC_UINT
	movl	%eax, -112(%rbp)                ## 4-byte Spill
	movq	%r14, %rdi
	callq	_RPC_UINT
	movl	%eax, -116(%rbp)                ## 4-byte Spill
	movq	%r12, %rdi
	callq	_RPC_UINT
	movl	%eax, %r13d
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_RPC_UINT
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	callq	_RPC_UINT
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_RPC_UINT
	movl	%eax, %r14d
	movq	-160(%rbp), %rdi
	callq	_RPC_UINT
	movl	%eax, %r15d
	movq	-152(%rbp), %rdi
	callq	_RPC_UINT
                                        ## kill: def $eax killed $eax def $rax
	leaq	-96(%rbp), %r10
	movl	-124(%rbp), %edi                ## 4-byte Reload
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	movl	-120(%rbp), %edx                ## 4-byte Reload
	movl	-112(%rbp), %ecx                ## 4-byte Reload
	movl	-116(%rbp), %r8d                ## 4-byte Reload
	movl	%r13d, %r9d
	pushq	%r10
	pushq	%rax
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	callq	_RPC_CALL9_OUT_CTRL
	addq	$48, %rsp
	movl	$0, 20(%rbx)
	movq	-96(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.3:
	movq	-64(%rbp), %rax
	movq	%rcx, 48(%rbx)
	pshufd	$78, -80(%rbp), %xmm0           ## xmm0 = mem[2,3,0,1]
	movdqu	%xmm0, 32(%rbx)
	movq	_IMAGE_FORMAT_LIN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	jne	LBB0_4
## %bb.5:
	movq	_SRGB@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	movq	_EGL_BAD_ALLOC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbp), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_11
LBB0_10:
	movq	-88(%rbp), %rax
	movq	24(%rbp), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	callq	_egl_surface_pool_free
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_4:
	movq	_LINEAR@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rbx)
	movq	_IMAGE_FORMAT_PRE@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	jne	LBB0_7
## %bb.8:
	movq	_NONPRE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_PRE@GOTPCREL(%rip), %rax
LBB0_9:
	movq	24(%rbp), %rcx
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_EGL_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rcx)
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movq	%rbx, %rax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EGL_BAD_ALLOC,8,3              ## @EGL_BAD_ALLOC
	.comm	_PBUFFER,4,2                    ## @PBUFFER
	.comm	_EGL_DEPTH_SIZE,4,2             ## @EGL_DEPTH_SIZE
	.comm	_EGL_STENCIL_SIZE,4,2           ## @EGL_STENCIL_SIZE
	.comm	_IMAGE_FORMAT_INVALID,8,3       ## @IMAGE_FORMAT_INVALID
	.comm	_eglIntCreatePbufferFromVGImage_impl,4,2 ## @eglIntCreatePbufferFromVGImage_impl
	.comm	_EGLINTCREATEPBUFFERFROMVGIMAGE_ID,4,2 ## @EGLINTCREATEPBUFFERFROMVGIMAGE_ID
	.comm	_IMAGE_FORMAT_LIN,8,3           ## @IMAGE_FORMAT_LIN
	.comm	_LINEAR,4,2                     ## @LINEAR
	.comm	_SRGB,4,2                       ## @SRGB
	.comm	_IMAGE_FORMAT_PRE,8,3           ## @IMAGE_FORMAT_PRE
	.comm	_PRE,4,2                        ## @PRE
	.comm	_NONPRE,4,2                     ## @NONPRE
	.comm	_EGL_SUCCESS,8,3                ## @EGL_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function egl_surface_from_vg_image
lCPI0_0:
	.quad	0                               ; 0x0
	.quad	-1                              ; 0xffffffffffffffff
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_egl_surface_from_vg_image
	.p2align	2
_egl_surface_from_vg_image:             ; @egl_surface_from_vg_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x7
	mov	x25, x6
	mov	x26, x5
	mov	x22, x4
	mov	x27, x3
	mov	x24, x2
	mov	x28, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_CLIENT_GET_THREAD_STATE
	mov	x21, x0
	bl	_egl_surface_pool_alloc
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	str	x20, [sp, #40]                  ; 8-byte Folded Spill
Lloh3:
	adrp	x8, _PBUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PBUFFER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w8, w28, [x19, #144]
	stp	xzr, x24, [x19, #128]
	stp	x22, x27, [x19, #112]
	stp	x26, xzr, [x19, #96]
	stp	xzr, x25, [x19, #80]
	ldr	x8, [x19, #72]
Lloh6:
	adrp	x9, lCPI0_0@PAGE
Lloh7:
	ldr	q0, [x9, lCPI0_0@PAGEOFF]
	str	q0, [x8]
Lloh8:
	adrp	x8, lCPI0_1@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x19]
	str	xzr, [x19, #64]
	str	wzr, [x19, #8]
	sub	w24, w24, #1
	mov	x0, x24
	bl	_egl_config_get_color_format
	mov	x25, x0
	mov	x0, x24
	bl	_egl_config_get_depth_format
	mov	x26, x0
	mov	x0, x24
	bl	_egl_config_get_mask_format
	mov	x27, x0
	mov	x0, x24
	bl	_egl_config_get_multisample_format
	mov	x28, x0
Lloh10:
	adrp	x8, _EGL_DEPTH_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EGL_DEPTH_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x2, sp, #56
	mov	x0, x24
	bl	_egl_config_get_attrib
Lloh13:
	adrp	x8, _EGL_STENCIL_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EGL_STENCIL_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x2, sp, #48
	mov	x0, x24
	bl	_egl_config_get_attrib
Lloh16:
	adrp	x8, _IMAGE_FORMAT_INVALID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IMAGE_FORMAT_INVALID@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x25, x8
	cset	w0, ne
	bl	_vcos_assert
	mov	w8, #1
	str	w8, [x19, #16]
Lloh19:
	adrp	x8, _eglIntCreatePbufferFromVGImage_impl@GOTPAGE
Lloh20:
	ldr	x8, [x8, _eglIntCreatePbufferFromVGImage_impl@GOTPAGEOFF]
Lloh21:
	ldr	w24, [x8]
Lloh22:
	adrp	x8, _EGLINTCREATEPBUFFERFROMVGIMAGE_ID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EGLINTCREATEPBUFFERFROMVGIMAGE_ID@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
	mov	x0, x23
	bl	_RPC_UINT
	mov	x23, x0
	mov	x0, x25
	bl	_RPC_UINT
	mov	x25, x0
	mov	x0, x26
	bl	_RPC_UINT
	mov	x26, x0
	mov	x0, x27
	bl	_RPC_UINT
	mov	x27, x0
	mov	x0, x28
	bl	_RPC_UINT
	mov	x28, x0
	mov	x0, x22
	bl	_RPC_UINT
	mov	x22, x0
	ldr	x0, [sp, #56]
	bl	_RPC_UINT
	mov	x20, x21
	mov	x21, x0
	ldr	x0, [sp, #48]
	bl	_RPC_UINT
	add	x8, sp, #64
	str	x8, [sp, #16]
	stp	w21, w0, [sp, #4]
	str	w22, [sp]
	mov	x0, x24
	mov	x1, x20
	ldr	w2, [sp, #36]                   ; 4-byte Folded Reload
	mov	x3, x23
	mov	x4, x25
	mov	x5, x26
	mov	x6, x27
	mov	x7, x28
	bl	_RPC_CALL9_OUT_CTRL
	str	wzr, [x19, #20]
	ldr	x8, [sp, #64]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x9, [sp, #96]
	str	x8, [x19, #48]
	ldr	q0, [sp, #80]
	ext.16b	v0, v0, v0, #8
	str	q0, [x19, #32]
Lloh25:
	adrp	x8, _IMAGE_FORMAT_LIN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IMAGE_FORMAT_LIN@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x10, _LINEAR@GOTPAGE
Lloh29:
	ldr	x10, [x10, _LINEAR@GOTPAGEOFF]
Lloh30:
	adrp	x11, _SRGB@GOTPAGE
Lloh31:
	ldr	x11, [x11, _SRGB@GOTPAGEOFF]
	tst	x8, x9
	csel	x8, x11, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #28]
Lloh32:
	adrp	x8, _IMAGE_FORMAT_PRE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IMAGE_FORMAT_PRE@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
Lloh35:
	adrp	x10, _PRE@GOTPAGE
Lloh36:
	ldr	x10, [x10, _PRE@GOTPAGEOFF]
Lloh37:
	adrp	x11, _NONPRE@GOTPAGE
Lloh38:
	ldr	x11, [x11, _NONPRE@GOTPAGEOFF]
	tst	x8, x9
	csel	x8, x11, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh39:
	adrp	x8, _EGL_SUCCESS@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EGL_SUCCESS@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	str	x8, [x9]
	b	LBB0_5
LBB0_3:
Lloh42:
	adrp	x8, _EGL_BAD_ALLOC@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EGL_BAD_ALLOC@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	str	x8, [x20]
	b	LBB0_5
LBB0_4:
	ldr	x8, [sp, #72]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	str	x8, [x9]
	mov	x0, x19
	bl	_egl_surface_pool_free
	mov	x19, #0
LBB0_5:
	ldur	x8, [x29, #-88]
Lloh45:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh46:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_EGL_BAD_ALLOC,8,3              ; @EGL_BAD_ALLOC
	.comm	_PBUFFER,4,2                    ; @PBUFFER
	.comm	_EGL_DEPTH_SIZE,4,2             ; @EGL_DEPTH_SIZE
	.comm	_EGL_STENCIL_SIZE,4,2           ; @EGL_STENCIL_SIZE
	.comm	_IMAGE_FORMAT_INVALID,8,3       ; @IMAGE_FORMAT_INVALID
	.comm	_eglIntCreatePbufferFromVGImage_impl,4,2 ; @eglIntCreatePbufferFromVGImage_impl
	.comm	_EGLINTCREATEPBUFFERFROMVGIMAGE_ID,4,2 ; @EGLINTCREATEPBUFFERFROMVGIMAGE_ID
	.comm	_IMAGE_FORMAT_LIN,8,3           ; @IMAGE_FORMAT_LIN
	.comm	_LINEAR,4,2                     ; @LINEAR
	.comm	_SRGB,4,2                       ; @SRGB
	.comm	_IMAGE_FORMAT_PRE,8,3           ; @IMAGE_FORMAT_PRE
	.comm	_PRE,4,2                        ; @PRE
	.comm	_NONPRE,4,2                     ; @NONPRE
	.comm	_EGL_SUCCESS,8,3                ; @EGL_SUCCESS
.subsections_via_symbols
