	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetDeviceData                  ## -- Begin function GetDeviceData
	.p2align	4, 0x90
_GetDeviceData:                         ## @GetDeviceData
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	$0, -64(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	88(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	_FALSE@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	callq	_CanReenableDirectDrawObject
	cmpq	%rax, %rbx
	jne	LBB0_12
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	callq	_DPRINT1
	movq	(%r14), %rax
	jmp	LBB0_20
LBB0_3:
	leaq	88(%r15), %r14
	movl	100(%r15), %edi
	movl	76(%r15), %esi
	movl	96(%r15), %ecx
	leaq	72(%r15), %r8
	movq	%r14, %rdx
	callq	_CreateInternalDeviceData
	cmpq	$0, 88(%r15)
	je	LBB0_14
## %bb.4:
	cmpq	$0, 32(%r15)
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	32(%r15), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	movq	$0, 32(%r15)
LBB0_6:
	cmpq	$0, 16(%r15)
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	16(%r15), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	movq	$0, 16(%r15)
LBB0_8:
	cmpq	$0, (%r15)
	je	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	(%r15), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	movq	$0, (%r15)
LBB0_10:
	movq	_FALSE@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	movq	(%r14), %rdi
	callq	_CanReenableDirectDrawObject
	cmpq	%rax, %rbx
	jne	LBB0_17
## %bb.11:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_19
LBB0_12:
	movq	88(%r15), %rdi
	movl	72(%r15), %r8d
	movl	76(%r15), %ecx
	subq	$80, %rsp
	leaq	-48(%rbp), %rax
	movq	%rax, 64(%rsp)
	leaq	-56(%rbp), %rax
	movq	%rax, 56(%rsp)
	leaq	-88(%rbp), %rax
	movq	%rax, 48(%rsp)
	leaq	-64(%rbp), %rax
	movq	%rax, 40(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rsp)
	movups	%xmm0, 8(%rsp)
	leaq	-68(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-184(%rbp), %rsi
	leaq	-108(%rbp), %rdx
	leaq	-72(%rbp), %r9
	callq	_GetD3D9DriverInfo
	addq	$80, %rsp
	movq	_TRUE@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_20
## %bb.13:
	movl	-120(%rbp), %ecx
	movl	%ecx, 64(%r15)
	movups	-136(%rbp), %xmm0
	movups	%xmm0, 48(%r15)
	jmp	LBB0_20
LBB0_14:
	leaq	L_.str(%rip), %rdi
	callq	_DPRINT1
LBB0_15:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_16:
	movq	(%rax), %rax
	jmp	LBB0_20
LBB0_17:
	movq	88(%r15), %rdi
	leaq	80(%r15), %rbx
	movl	72(%r15), %r8d
	movl	76(%r15), %ecx
	subq	$80, %rsp
	leaq	-48(%rbp), %rax
	movq	%rax, 64(%rsp)
	leaq	-56(%rbp), %rax
	movq	%rax, 56(%rsp)
	leaq	-88(%rbp), %rax
	movq	%rax, 48(%rsp)
	leaq	-64(%rbp), %rax
	movq	%rax, 40(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rsp)
	movups	%xmm0, 8(%rsp)
	leaq	-68(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-72(%rbp), %r9
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_GetD3D9DriverInfo
	addq	$80, %rsp
	cmpq	%rax, (%r12)
	jne	LBB0_21
## %bb.18:
	leaq	L_.str.2(%rip), %rdi
LBB0_19:
	callq	_DPRINT1
	movq	%r15, %rdi
	callq	_ReleaseInternalDeviceData
	movq	(%r12), %rax
LBB0_20:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, %r14d
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r12d
	movq	-64(%rbp), %rdi
	movl	$1, %esi
	callq	_max
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %edx
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_HeapAlloc
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %r14d
	movl	(%rbx), %r13d
	movq	-88(%rbp), %rdi
	movl	$1, %esi
	callq	_max
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %edx
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_HeapAlloc
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %r14d
	movl	(%rbx), %r13d
	movq	-56(%rbp), %rdi
	movl	$1, %esi
	callq	_max
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %edx
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_HeapAlloc
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %r14d
	movl	(%rbx), %r12d
	movq	-48(%rbp), %rdi
	movl	$1, %esi
	callq	_max
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %edx
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_HeapAlloc
	movq	%rax, %r14
	movq	88(%r15), %rdi
	movl	72(%r15), %r8d
	movl	76(%r15), %ecx
	subq	$8, %rsp
	leaq	-72(%rbp), %r9
	movq	%r15, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	leaq	-48(%rbp), %rax
	pushq	%rax
	leaq	-56(%rbp), %rax
	pushq	%rax
	leaq	-88(%rbp), %rax
	pushq	%rax
	leaq	-64(%rbp), %rax
	pushq	%rax
	pushq	%r14
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	pushq	%r13
	movq	%rbx, %r13
	pushq	%rbx
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, %r12
	pushq	%rax
	leaq	-68(%rbp), %rax
	pushq	%rax
	callq	_GetD3D9DriverInfo
	addq	$80, %rsp
	movq	_FALSE@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_23
## %bb.22:
	leaq	L_.str.2(%rip), %rdi
	callq	_DPRINT1
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_HeapFree
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_HeapFree
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_HeapFree
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapFree
	movq	%r15, %rdi
	callq	_ReleaseInternalDeviceData
	jmp	LBB0_15
LBB0_23:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rax
	movq	%rax, 40(%r15)
	testq	%rax, %rax
	jle	LBB0_25
## %bb.24:
	movq	%r12, 32(%r15)
LBB0_25:
	movq	-56(%rbp), %rax
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	jle	LBB0_27
## %bb.26:
	movq	%rdx, 16(%r15)
LBB0_27:
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	jle	LBB0_29
## %bb.28:
	movq	%r14, (%r15)
LBB0_29:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_HeapFree
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create DirectDrawObject for Direct3D9"

	.comm	_FALSE,8,3                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to re-enable DirectDrawObject"

	.comm	_TRUE,8,3                       ## @TRUE
L_.str.2:                               ## @.str.2
	.asciz	"Could not query DirectDrawObject, aborting"

	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetDeviceData                  ; -- Begin function GetDeviceData
	.p2align	2
_GetDeviceData:                         ; @GetDeviceData
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #288
	.cfi_def_cfa_offset 288
	stp	x28, x27, [sp, #192]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #208]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #224]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #240]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #256]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #272]            ; 16-byte Folded Spill
	add	x29, sp, #272
	.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	x19, x0
	stp	xzr, xzr, [x29, #-112]
	stp	xzr, xzr, [x29, #-128]
	mov	x20, x0
	ldr	x0, [x20, #88]!
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x20, _FALSE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FALSE@GOTPAGEOFF]
	ldr	x21, [x20]
	bl	_CanReenableDirectDrawObject
	cmp	x21, x0
	b.ne	LBB0_12
; %bb.2:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINT1
	ldr	x0, [x20]
	b	LBB0_20
LBB0_3:
	ldr	w1, [x19, #76]
	add	x4, x19, #72
	ldp	w3, w0, [x19, #96]
	mov	x2, x20
	bl	_CreateInternalDeviceData
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_14
; %bb.4:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_6
; %bb.5:
	bl	_GetProcessHeap
	ldr	x2, [x19, #32]
	mov	w1, #0
	bl	_HeapFree
	str	xzr, [x19, #32]
LBB0_6:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.7:
	bl	_GetProcessHeap
	ldr	x2, [x19, #16]
	mov	w1, #0
	bl	_HeapFree
	str	xzr, [x19, #16]
LBB0_8:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
	bl	_GetProcessHeap
	ldr	x2, [x19]
	mov	w1, #0
	bl	_HeapFree
	str	xzr, [x19]
LBB0_10:
Lloh4:
	adrp	x26, _FALSE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _FALSE@GOTPAGEOFF]
	ldr	x21, [x26]
	ldr	x0, [x20]
	bl	_CanReenableDirectDrawObject
	cmp	x21, x0
	b.ne	LBB0_16
; %bb.11:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_12:
	ldr	x0, [x19, #88]
	ldp	w4, w3, [x19, #72]
	stp	xzr, xzr, [sp]
	sub	x8, x29, #128
	str	x8, [sp, #48]
	sub	x8, x29, #120
	sub	x9, x29, #112
	sub	x10, x29, #104
	add	x1, sp, #72
	add	x2, sp, #68
	stp	x9, x8, [sp, #32]
	stp	xzr, x10, [sp, #16]
	sub	x5, x29, #92
	sub	x6, x29, #96
	mov	x7, #0
	bl	_GetD3D9DriverInfo
Lloh8:
	adrp	x8, _TRUE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ne	LBB0_20
; %bb.13:
	ldr	w8, [sp, #136]
	str	w8, [x19, #64]
	ldur	q0, [sp, #120]
	str	q0, [x19, #48]
	b	LBB0_20
LBB0_14:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINT1
Lloh13:
	adrp	x8, _FALSE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_15:
	ldr	x0, [x8]
	b	LBB0_20
LBB0_16:
	ldr	x0, [x19, #88]
	add	x20, x19, #80
	ldp	w4, w3, [x19, #72]
	stp	xzr, xzr, [sp]
	sub	x8, x29, #128
	str	x8, [sp, #48]
	sub	x27, x29, #120
	sub	x28, x29, #112
	sub	x8, x29, #104
	sub	x5, x29, #92
	sub	x6, x29, #96
	stp	x28, x27, [sp, #32]
	stp	xzr, x8, [sp, #16]
	mov	x1, x19
	mov	x2, x20
	mov	x7, #0
	bl	_GetD3D9DriverInfo
	ldr	x8, [x26]
	cmp	x8, x0
	b.ne	LBB0_21
; %bb.17:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_18:
	bl	_DPRINT1
LBB0_19:
	mov	x0, x19
	bl	_ReleaseInternalDeviceData
	ldr	x0, [x26]
LBB0_20:
	ldp	x29, x30, [sp, #272]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #256]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #240]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #224]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #208]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #192]            ; 16-byte Folded Reload
	add	sp, sp, #288
	ret
LBB0_21:
	bl	_GetProcessHeap
	mov	x21, x0
Lloh17:
	adrp	x25, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh18:
	ldr	x25, [x25, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
	ldr	w22, [x25]
	ldur	x0, [x29, #-104]
	mov	w1, #1
	bl	_max
	lsl	w2, w0, #2
	mov	x0, x21
	mov	x1, x22
	bl	_HeapAlloc
	mov	x22, x0
	bl	_GetProcessHeap
	mov	x21, x0
	ldr	w23, [x25]
	ldur	x0, [x29, #-112]
	mov	w1, #1
	bl	_max
	lsl	w2, w0, #2
	mov	x0, x21
	mov	x1, x23
	bl	_HeapAlloc
	mov	x21, x0
	bl	_GetProcessHeap
	mov	x23, x0
	ldr	w24, [x25]
	ldur	x0, [x29, #-120]
	mov	w1, #1
	bl	_max
	lsl	w2, w0, #2
	mov	x0, x23
	mov	x1, x24
	bl	_HeapAlloc
	mov	x23, x0
	bl	_GetProcessHeap
	mov	x24, x0
	ldr	w25, [x25]
	ldur	x0, [x29, #-128]
	mov	w1, #1
	bl	_max
	lsl	w2, w0, #2
	mov	x0, x24
	mov	x1, x25
	bl	_HeapAlloc
	mov	x24, x0
	ldr	x0, [x19, #88]
	ldp	w4, w3, [x19, #72]
	sub	x8, x29, #128
	stp	x27, x8, [sp, #40]
	sub	x5, x29, #92
	sub	x6, x29, #96
	sub	x8, x29, #104
	stp	x8, x28, [sp, #24]
	stp	x23, x24, [sp, #8]
	str	x21, [sp]
	mov	x1, x19
	mov	x2, x20
	mov	x7, x22
	bl	_GetD3D9DriverInfo
	ldr	x8, [x26]
	cmp	x8, x0
	b.ne	LBB0_23
; %bb.22:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DPRINT1
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x22
	bl	_HeapFree
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x21
	bl	_HeapFree
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x23
	bl	_HeapFree
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x24
	bl	_HeapFree
	b	LBB0_19
LBB0_23:
	ldur	x8, [x29, #-104]
	str	x8, [x19, #40]
	cmp	x8, #1
	b.lt	LBB0_25
; %bb.24:
	str	x22, [x19, #32]
LBB0_25:
	ldur	x8, [x29, #-120]
	str	x8, [x19, #24]
	cmp	x8, #1
	b.lt	LBB0_27
; %bb.26:
	str	x23, [x19, #16]
LBB0_27:
	ldur	x8, [x29, #-128]
	str	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_29
; %bb.28:
	str	x24, [x19]
LBB0_29:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x21
	bl	_HeapFree
Lloh21:
	adrp	x8, _TRUE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create DirectDrawObject for Direct3D9"

	.comm	_FALSE,8,3                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to re-enable DirectDrawObject"

	.comm	_TRUE,8,3                       ; @TRUE
l_.str.2:                               ; @.str.2
	.asciz	"Could not query DirectDrawObject, aborting"

	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
.subsections_via_symbols
