	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_global_image_egl_image
_check_global_image_egl_image:          ## @check_global_image_egl_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_CLIENT_GET_PROCESS_STATE
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_CLIENT_LOCK
	cmpq	$0, 8(%r14)
	je	LBB0_1
## %bb.2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_khrn_global_image_map_lookup
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_CLIENT_UNLOCK
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:
	movslq	%ebx, %rdi
	movq	%rdi, (%r12)
	leaq	-80(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	leaq	-64(%rbp), %r8
	callq	_platform_get_global_image_info
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_OPENGL_ES_11@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM@GOTPCREL(%rip), %rax
	cmoveq	_EGL_PIXEL_FORMAT_RENDER_GLES_BRCM@GOTPCREL(%rip), %rax
	movq	_EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM@GOTPCREL(%rip), %rcx
	cmoveq	_EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM@GOTPCREL(%rip), %rcx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	cmovneq	%rax, %rcx
	movq	(%rcx), %rax
	testq	%rax, -80(%rbp)
	setne	%al
	cmpq	$0, -72(%rbp)
	setne	%cl
	cmpq	$0, -64(%rbp)
	setne	%dl
	andb	%cl, %dl
	andb	%al, %dl
	movzbl	%dl, %r15d
	jmp	LBB0_4
LBB0_1:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_CLIENT_UNLOCK
LBB0_4:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OPENGL_ES_11,8,3               ## @OPENGL_ES_11
	.comm	_EGL_PIXEL_FORMAT_RENDER_GLES_BRCM,8,3 ## @EGL_PIXEL_FORMAT_RENDER_GLES_BRCM
	.comm	_EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM,8,3 ## @EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM
	.comm	_EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM,8,3 ## @EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM
	.comm	_EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM,8,3 ## @EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM
	.no_dead_strip	_check_global_image_egl_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_global_image_egl_image
_check_global_image_egl_image:          ; @check_global_image_egl_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_CLIENT_GET_PROCESS_STATE
	mov	x23, x0
	bl	_CLIENT_LOCK
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x23
	mov	x1, x22
	bl	_khrn_global_image_map_lookup
	mov	x22, x0
	bl	_CLIENT_UNLOCK
	cbz	w22, LBB0_4
; %bb.2:
	sxtw	x0, w22
	str	x0, [x21]
	add	x2, sp, #24
	add	x3, sp, #16
	add	x4, sp, #8
	bl	_platform_get_global_image_info
	ldr	x8, [sp, #24]
	ldr	x9, [x20]
	ldr	x9, [x9]
Lloh0:
	adrp	x10, _OPENGL_ES_11@GOTPAGE
Lloh1:
	ldr	x10, [x10, _OPENGL_ES_11@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x11, _EGL_PIXEL_FORMAT_RENDER_GLES_BRCM@GOTPAGE
Lloh4:
	ldr	x11, [x11, _EGL_PIXEL_FORMAT_RENDER_GLES_BRCM@GOTPAGEOFF]
Lloh5:
	adrp	x12, _EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM@GOTPAGE
Lloh6:
	ldr	x12, [x12, _EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM@GOTPAGEOFF]
	cmp	x9, x10
	csel	x9, x11, x12, eq
Lloh7:
	adrp	x10, _EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM@GOTPAGE
Lloh8:
	ldr	x10, [x10, _EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM@GOTPAGEOFF]
Lloh9:
	adrp	x11, _EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM@GOTPAGE
Lloh10:
	ldr	x11, [x11, _EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	cmp	w19, #0
	csel	x9, x10, x9, eq
	ldr	x9, [x9]
	tst	x9, x8
	ldr	x8, [sp, #16]
	ccmp	x8, #0, #4, ne
	ldr	x8, [sp, #8]
	ccmp	x8, #0, #4, ne
	cset	w0, ne
	b	LBB0_5
LBB0_3:
	bl	_CLIENT_UNLOCK
LBB0_4:
	mov	w0, #0
LBB0_5:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_OPENGL_ES_11,8,3               ; @OPENGL_ES_11
	.comm	_EGL_PIXEL_FORMAT_RENDER_GLES_BRCM,8,3 ; @EGL_PIXEL_FORMAT_RENDER_GLES_BRCM
	.comm	_EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM,8,3 ; @EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM
	.comm	_EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM,8,3 ; @EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM
	.comm	_EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM,8,3 ; @EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM
	.no_dead_strip	_check_global_image_egl_image
.subsections_via_symbols
