	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function egl_sync_create
_egl_sync_create:                       ## @egl_sync_create
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_CLIENT_GET_THREAD_STATE
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movl	$48, %edi
	callq	_khrn_platform_malloc
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_rpc_get_client_id
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	%r15, 40(%rbx)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 32(%rbx)
	movq	%r12, 24(%rbx)
	movq	%r13, 16(%rbx)
	movq	(%rbx), %rsi
	movl	%eax, (%rsi)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 8(%rsi)
	movq	%rbx, %r13
	addq	$8, %r13
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_khronos_platform_semaphore_create
	movq	_KHR_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movq	_eglIntCreateSync_impl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_EGLINTCREATESYNC_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_RPC_UINT
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_RPC_UINT
	movl	%eax, %r15d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_RPC_INT
	movl	%eax, %r12d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_RPC_UINT
	movl	%eax, (%rsp)
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r15d, %r8d
	movl	%r12d, %r9d
	callq	_RPC_CALL4_RES
	movl	%eax, %edi
	callq	_RPC_UINT_RES
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r13, %rdi
	callq	_khronos_platform_semaphore_destroy
LBB0_4:
	movq	%rbx, %rdi
	callq	_khrn_platform_free
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EGL_SYNC_T"

	.comm	_KHR_SUCCESS,8,3                ## @KHR_SUCCESS
	.comm	_eglIntCreateSync_impl,4,2      ## @eglIntCreateSync_impl
	.comm	_EGLINTCREATESYNC_ID,4,2        ## @EGLINTCREATESYNC_ID
	.comm	_EGLINTCREATESYNCFENCE_ID,4,2   ## @EGLINTCREATESYNCFENCE_ID
	.comm	_EGL_SYNC_FENCE_KHR,8,3         ## @EGL_SYNC_FENCE_KHR
	.comm	_eglIntCreateSyncFence_impl,4,2 ## @eglIntCreateSyncFence_impl
	.no_dead_strip	_egl_sync_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function egl_sync_create
_egl_sync_create:                       ; @egl_sync_create
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x4
	mov	x22, x3
	mov	x24, x2
	mov	x25, x1
	mov	x21, x0
	bl	_CLIENT_GET_THREAD_STATE
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #48
	bl	_khrn_platform_malloc
	mov	x19, x0
	mov	x0, x20
	bl	_rpc_get_client_id
	cbz	x19, LBB0_5
; %bb.1:
	stp	x22, x24, [x19, #32]
	stp	x23, x25, [x19, #16]
	ldr	x1, [x19]
	str	w0, [x1]
	str	w21, [x1, #8]
	add	x23, x19, #8
	mov	x0, x23
	mov	w2, #0
	bl	_khronos_platform_semaphore_create
Lloh2:
	adrp	x8, _KHR_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KHR_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _eglIntCreateSync_impl@GOTPAGE
Lloh6:
	ldr	x8, [x8, _eglIntCreateSync_impl@GOTPAGEOFF]
Lloh7:
	ldr	w26, [x8]
Lloh8:
	adrp	x8, _EGLINTCREATESYNC_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EGLINTCREATESYNC_ID@GOTPAGEOFF]
Lloh10:
	ldr	w27, [x8]
	mov	x0, x25
	bl	_RPC_UINT
	mov	x25, x0
	mov	x0, x24
	bl	_RPC_UINT
	mov	x24, x0
	mov	x0, x22
	bl	_RPC_INT
	mov	x22, x0
	mov	x0, x21
	bl	_RPC_UINT
	mov	x6, x0
	mov	x0, x26
	mov	x1, x20
	mov	x2, x27
	mov	x3, x25
	mov	x4, x24
	mov	x5, x22
	bl	_RPC_CALL4_RES
	bl	_RPC_UINT_RES
	str	w0, [x19, #12]
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x23
	bl	_khronos_platform_semaphore_destroy
LBB0_4:
	mov	x0, x19
	bl	_khrn_platform_free
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EGL_SYNC_T"

	.comm	_KHR_SUCCESS,8,3                ; @KHR_SUCCESS
	.comm	_eglIntCreateSync_impl,4,2      ; @eglIntCreateSync_impl
	.comm	_EGLINTCREATESYNC_ID,4,2        ; @EGLINTCREATESYNC_ID
	.comm	_EGLINTCREATESYNCFENCE_ID,4,2   ; @EGLINTCREATESYNCFENCE_ID
	.comm	_EGL_SYNC_FENCE_KHR,8,3         ; @EGL_SYNC_FENCE_KHR
	.comm	_eglIntCreateSyncFence_impl,4,2 ; @eglIntCreateSyncFence_impl
	.no_dead_strip	_egl_sync_create
.subsections_via_symbols
