	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_egl_surface_free               ## -- Begin function egl_surface_free
	.p2align	4, 0x90
_egl_surface_free:                      ## @egl_surface_free
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_trace
	xorl	%eax, %eax
	callq	_CLIENT_GET_THREAD_STATE
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	_WINDOW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_trace
	movl	24(%rbx), %edi
	movq	8(%rbx), %rsi
	callq	_platform_destroy_winhandle
LBB0_2:
	movl	16(%rbx), %edx
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_vcos_log_trace
	movq	_eglIntDestroySurface_impl@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_EGLINTDESTROYSURFACE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	16(%rbx), %rdi
	callq	_RPC_UINT
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_RPC_CALL1_RES
	movl	%eax, %edi
	callq	_RPC_INT_RES
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_trace
	movq	%rbx, %rdi
	callq	_egl_surface_pool_free
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vcos_log_trace                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"egl_surface_free"

	.comm	_WINDOW,8,3                     ## @WINDOW
L_.str.1:                               ## @.str.1
	.asciz	"egl_surface_free: calling platform_destroy_winhandle..."

L_.str.2:                               ## @.str.2
	.asciz	"egl_surface_free: calling eglIntDestroySurface_impl via RPC...; thread = 0x%X; serverbuffer = 0x%X"

	.comm	_eglIntDestroySurface_impl,4,2  ## @eglIntDestroySurface_impl
	.comm	_EGLINTDESTROYSURFACE_ID,4,2    ## @EGLINTDESTROYSURFACE_ID
L_.str.3:                               ## @.str.3
	.asciz	"egl_surface_free: calling egl_surface_pool_free..."

L_.str.4:                               ## @.str.4
	.asciz	"egl_surface_free: end"

	.comm	_PLATFORM_WIN_NONE,8,3          ## @PLATFORM_WIN_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_egl_surface_free               ; -- Begin function egl_surface_free
	.p2align	2
_egl_surface_free:                      ; @egl_surface_free
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vcos_log_trace
	bl	_CLIENT_GET_THREAD_STATE
	mov	x20, x0
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _WINDOW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WINDOW@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_trace
	ldr	w0, [x19, #24]
	ldr	x1, [x19, #8]
	bl	_platform_destroy_winhandle
LBB0_2:
	ldr	x8, [x19, #16]
	stp	x20, x8, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_vcos_log_trace
Lloh9:
	adrp	x8, _eglIntDestroySurface_impl@GOTPAGE
Lloh10:
	ldr	x8, [x8, _eglIntDestroySurface_impl@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
Lloh12:
	adrp	x8, _EGLINTDESTROYSURFACE_ID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EGLINTDESTROYSURFACE_ID@GOTPAGEOFF]
Lloh14:
	ldr	w22, [x8]
	ldr	x0, [x19, #16]
	bl	_RPC_UINT
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_RPC_CALL1_RES
	bl	_RPC_INT_RES
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_vcos_log_trace
	mov	x0, x19
	bl	_egl_surface_pool_free
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	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
	b	_vcos_log_trace
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"egl_surface_free"

	.comm	_WINDOW,8,3                     ; @WINDOW
l_.str.1:                               ; @.str.1
	.asciz	"egl_surface_free: calling platform_destroy_winhandle..."

l_.str.2:                               ; @.str.2
	.asciz	"egl_surface_free: calling eglIntDestroySurface_impl via RPC...; thread = 0x%X; serverbuffer = 0x%X"

	.comm	_eglIntDestroySurface_impl,4,2  ; @eglIntDestroySurface_impl
	.comm	_EGLINTDESTROYSURFACE_ID,4,2    ; @EGLINTDESTROYSURFACE_ID
l_.str.3:                               ; @.str.3
	.asciz	"egl_surface_free: calling egl_surface_pool_free..."

l_.str.4:                               ; @.str.4
	.asciz	"egl_surface_free: end"

	.comm	_PLATFORM_WIN_NONE,8,3          ; @PLATFORM_WIN_NONE
.subsections_via_symbols
