	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function egl_surface_pool_alloc
_egl_surface_pool_alloc:                ## @egl_surface_pool_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_surface_pool@GOTPCREL(%rip), %r8
	movl	(%r8), %esi
	movq	$-4, %rax
	movl	$-1, %ecx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ecx
	movl	$1, %edi
	shll	%cl, %edi
	addq	$4, %rax
	btl	%ecx, %esi
	jb	LBB0_1
## %bb.2:
	movq	_EGL_SURFACE_POOL_SIZE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_4
## %bb.3:
	orl	%edi, %esi
	movl	%esi, (%r8)
	addq	8(%r8), %rax
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	callq	_khrn_platform_malloc
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_surface_pool,16,3              ## @surface_pool
	.comm	_EGL_SURFACE_POOL_SIZE,4,2      ## @EGL_SURFACE_POOL_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EGL_SURFACE_T"

	.no_dead_strip	_egl_surface_pool_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function egl_surface_pool_alloc
_egl_surface_pool_alloc:                ; @egl_surface_pool_alloc
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _surface_pool@GOTPAGE
Lloh1:
	ldr	x8, [x8, _surface_pool@GOTPAGEOFF]
	ldr	w10, [x8]
	mov	x9, #-4
	mov	w11, #-1
	mov	w13, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w11, #1
	lsl	w12, w13, w11
	add	x9, x9, #4
	tst	w10, w12
	b.ne	LBB0_1
; %bb.2:
Lloh2:
	adrp	x13, _EGL_SURFACE_POOL_SIZE@GOTPAGE
Lloh3:
	ldr	x13, [x13, _EGL_SURFACE_POOL_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w13, [x13]
	cmp	w11, w13
	b.ge	LBB0_4
; %bb.3:
	orr	w10, w10, w12
	str	w10, [x8]
	ldr	x8, [x8, #8]
	add	x0, x8, x9
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_khrn_platform_malloc
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_surface_pool,16,3              ; @surface_pool
	.comm	_EGL_SURFACE_POOL_SIZE,4,2      ; @EGL_SURFACE_POOL_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EGL_SURFACE_T"

	.no_dead_strip	_egl_surface_pool_alloc
.subsections_via_symbols
