	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_texture_memory
_get_texture_memory:                    ## @get_texture_memory
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	_IID_IDirectDraw7@GOTPCREL(%rip), %rdx
	leaq	-16(%rbp), %rsi
	xorl	%ecx, %ecx
	callq	_DirectDrawCreateEx
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_DDSCAPS_LOCALVIDMEM@GOTPCREL(%rip), %rax
	movq	_DDSCAPS_VIDEOMEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -48(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -40(%rbp)
	movq	$0, -24(%rbp)
	movq	-16(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_IDirectDraw7_GetAvailableVidMem
	movl	%eax, %ebx
	movq	-16(%rbp), %rdi
	callq	_IDirectDraw7_Release
	movl	%ebx, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IID_IDirectDraw7,4,2           ## @IID_IDirectDraw7
	.comm	_DDSCAPS_LOCALVIDMEM,4,2        ## @DDSCAPS_LOCALVIDMEM
	.comm	_DDSCAPS_VIDEOMEMORY,4,2        ## @DDSCAPS_VIDEOMEMORY
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_get_texture_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_texture_memory
_get_texture_memory:                    ; @get_texture_memory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x2, _IID_IDirectDraw7@GOTPAGE
Lloh1:
	ldr	x2, [x2, _IID_IDirectDraw7@GOTPAGEOFF]
	sub	x1, x29, #24
	mov	x3, #0
	bl	_DirectDrawCreateEx
	bl	_SUCCEEDED
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _DDSCAPS_LOCALVIDMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DDSCAPS_LOCALVIDMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _DDSCAPS_VIDEOMEMORY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DDSCAPS_VIDEOMEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #8]
	stp	xzr, xzr, [sp, #24]
	str	xzr, [sp, #16]
	ldur	x0, [x29, #-24]
	add	x1, sp, #8
	mov	x2, x19
	mov	x3, #0
	bl	_IDirectDraw7_GetAvailableVidMem
	mov	x19, x0
	ldur	x0, [x29, #-24]
	bl	_IDirectDraw7_Release
	mov	x0, x19
	bl	_SUCCEEDED
	cbz	x0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _TRUE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IID_IDirectDraw7,4,2           ; @IID_IDirectDraw7
	.comm	_DDSCAPS_LOCALVIDMEM,4,2        ; @DDSCAPS_LOCALVIDMEM
	.comm	_DDSCAPS_VIDEOMEMORY,4,2        ; @DDSCAPS_VIDEOMEMORY
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_get_texture_memory
.subsections_via_symbols
