	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CreateInternalDeviceData
_CreateInternalDeviceData:              ## @CreateInternalDeviceData
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movl	%esi, %r12d
	movl	%edi, %r13d
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	$0, (%r14)
LBB0_2:
	testq	%r8, %r8
	je	LBB0_4
## %bb.3:
	movq	$0, (%r8)
LBB0_4:
	movq	_D3DDEVTYPE_HAL@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_8
## %bb.5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movl	$32, %edx
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_OsThunkDdCreateDirectDrawObject
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movl	24(%rbx), %edi
	movq	_CCHDEVICENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	callq	_SafeCopyString
	movq	%r15, 16(%rbx)
	movl	$4, -44(%rbp)
	movq	_REG_DWORD@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leal	12(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	leaq	-44(%rbp), %r15
	movq	%r15, %rcx
	callq	_ReadRegistryValue
	movl	$4, -44(%rbp)
	movl	(%r12), %edi
	leal	8(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rcx
	callq	_ReadRegistryValue
	movq	_g_NumDevices@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	%rbx, (%r14)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPRINT1                        ## TAILCALL
LBB0_10:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HeapFree                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DDEVTYPE_HAL,8,3             ## @D3DDEVTYPE_HAL
	.comm	_UNIMPLEMENTED,4,2              ## @UNIMPLEMENTED
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory"

	.comm	_CCHDEVICENAME,4,2              ## @CCHDEVICENAME
	.comm	_REG_DWORD,4,2                  ## @REG_DWORD
L_.str.1:                               ## @.str.1
	.asciz	"ForceDriverFlagsOn"

L_.str.2:                               ## @.str.2
	.asciz	"ForceDriverFlagsOff"

	.comm	_g_NumDevices,4,2               ## @g_NumDevices
	.no_dead_strip	_CreateInternalDeviceData
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CreateInternalDeviceData
_CreateInternalDeviceData:              ; @CreateInternalDeviceData
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	cbz	x2, LBB0_2
; %bb.1:
	str	xzr, [x19]
LBB0_2:
	cbz	x4, LBB0_4
; %bb.3:
	str	xzr, [x4]
LBB0_4:
Lloh0:
	adrp	x8, _D3DDEVTYPE_HAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D3DDEVTYPE_HAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_8
; %bb.5:
	bl	_GetProcessHeap
Lloh3:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #32
	bl	_HeapAlloc
	cbz	x0, LBB0_9
; %bb.6:
	mov	x20, x0
	mov	x0, x23
	bl	_OsThunkDdCreateDirectDrawObject
	str	x0, [x20]
	cbz	x0, LBB0_10
; %bb.7:
	ldr	w0, [x20, #24]
Lloh6:
	adrp	x8, _CCHDEVICENAME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CCHDEVICENAME@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_SafeCopyString
	str	x21, [x20, #16]
	mov	w21, #4
	str	w21, [sp, #12]
Lloh9:
	adrp	x22, _REG_DWORD@GOTPAGE
Lloh10:
	ldr	x22, [x22, _REG_DWORD@GOTPAGEOFF]
	ldr	w0, [x22]
	add	w2, w20, #12
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x3, sp, #12
	bl	_ReadRegistryValue
	str	w21, [sp, #12]
	ldr	w0, [x22]
	add	w2, w20, #8
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x3, sp, #12
	bl	_ReadRegistryValue
Lloh15:
	adrp	x8, _g_NumDevices@GOTPAGE
Lloh16:
	ldr	x8, [x8, _g_NumDevices@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	str	x20, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_DPRINT1
LBB0_10:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_HeapFree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DDEVTYPE_HAL,8,3             ; @D3DDEVTYPE_HAL
	.comm	_UNIMPLEMENTED,4,2              ; @UNIMPLEMENTED
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory"

	.comm	_CCHDEVICENAME,4,2              ; @CCHDEVICENAME
	.comm	_REG_DWORD,4,2                  ; @REG_DWORD
l_.str.1:                               ; @.str.1
	.asciz	"ForceDriverFlagsOn"

l_.str.2:                               ; @.str.2
	.asciz	"ForceDriverFlagsOff"

	.comm	_g_NumDevices,4,2               ; @g_NumDevices
	.no_dead_strip	_CreateInternalDeviceData
.subsections_via_symbols
