	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d8_init                      ## -- Begin function d3d8_init
	.p2align	4, 0x90
_d3d8_init:                             ## @d3d8_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_WINED3D_LEGACY_DEPTH_BIAS@GOTPCREL(%rip), %rax
	movq	_WINED3D_VIDMEM_ACCOUNTING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_WINED3D_HANDLE_RESTORE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_WINED3D_PIXEL_CENTER_INTEGER@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_WINED3D_NO_PRIMITIVE_RESTART@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_WINED3D_LEGACY_CUBEMAP_FILTERING@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_WINED3D_LIMIT_VIEWPORT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%rdi, %r14
	movq	_d3d8_vtbl@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rdi)
	movl	$1, (%rdi)
	xorl	%eax, %eax
	callq	_wined3d_mutex_lock
	movl	%ebx, %edi
	callq	_wined3d_create
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	callq	_wined3d_mutex_unlock
	cmpl	$0, 4(%r14)
	jne	LBB0_1
## %bb.2:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_LEGACY_DEPTH_BIAS,4,2  ## @WINED3D_LEGACY_DEPTH_BIAS
	.comm	_WINED3D_VIDMEM_ACCOUNTING,4,2  ## @WINED3D_VIDMEM_ACCOUNTING
	.comm	_WINED3D_HANDLE_RESTORE,4,2     ## @WINED3D_HANDLE_RESTORE
	.comm	_WINED3D_PIXEL_CENTER_INTEGER,4,2 ## @WINED3D_PIXEL_CENTER_INTEGER
	.comm	_WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR,4,2 ## @WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
	.comm	_WINED3D_NO_PRIMITIVE_RESTART,4,2 ## @WINED3D_NO_PRIMITIVE_RESTART
	.comm	_WINED3D_LEGACY_CUBEMAP_FILTERING,4,2 ## @WINED3D_LEGACY_CUBEMAP_FILTERING
	.comm	_WINED3D_LIMIT_VIEWPORT,4,2     ## @WINED3D_LIMIT_VIEWPORT
	.comm	_d3d8_vtbl,4,2                  ## @d3d8_vtbl
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d8_init                      ; -- Begin function d3d8_init
	.p2align	2
_d3d8_init:                             ; @d3d8_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _WINED3D_LEGACY_DEPTH_BIAS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_LEGACY_DEPTH_BIAS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _WINED3D_VIDMEM_ACCOUNTING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_VIDMEM_ACCOUNTING@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _WINED3D_HANDLE_RESTORE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3D_HANDLE_RESTORE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _WINED3D_PIXEL_CENTER_INTEGER@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WINED3D_PIXEL_CENTER_INTEGER@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh11:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _WINED3D_NO_PRIMITIVE_RESTART@GOTPAGE
Lloh16:
	ldr	x9, [x9, _WINED3D_NO_PRIMITIVE_RESTART@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _WINED3D_LEGACY_CUBEMAP_FILTERING@GOTPAGE
Lloh19:
	ldr	x10, [x10, _WINED3D_LEGACY_CUBEMAP_FILTERING@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh20:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _WINED3D_LIMIT_VIEWPORT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _WINED3D_LIMIT_VIEWPORT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w20, w8, w9
Lloh24:
	adrp	x8, _d3d8_vtbl@GOTPAGE
Lloh25:
	ldr	x8, [x8, _d3d8_vtbl@GOTPAGEOFF]
	str	x8, [x0, #8]
	mov	w8, #1
	str	w8, [x0]
	bl	_wined3d_mutex_lock
	mov	x0, x20
	bl	_wined3d_create
	str	w0, [x19, #4]
	bl	_wined3d_mutex_unlock
	ldr	w8, [x19, #4]
Lloh26:
	adrp	x9, _FALSE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
Lloh28:
	adrp	x10, _TRUE@GOTPAGE
Lloh29:
	ldr	x10, [x10, _TRUE@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_LEGACY_DEPTH_BIAS,4,2  ; @WINED3D_LEGACY_DEPTH_BIAS
	.comm	_WINED3D_VIDMEM_ACCOUNTING,4,2  ; @WINED3D_VIDMEM_ACCOUNTING
	.comm	_WINED3D_HANDLE_RESTORE,4,2     ; @WINED3D_HANDLE_RESTORE
	.comm	_WINED3D_PIXEL_CENTER_INTEGER,4,2 ; @WINED3D_PIXEL_CENTER_INTEGER
	.comm	_WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR,4,2 ; @WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
	.comm	_WINED3D_NO_PRIMITIVE_RESTART,4,2 ; @WINED3D_NO_PRIMITIVE_RESTART
	.comm	_WINED3D_LEGACY_CUBEMAP_FILTERING,4,2 ; @WINED3D_LEGACY_CUBEMAP_FILTERING
	.comm	_WINED3D_LIMIT_VIEWPORT,4,2     ; @WINED3D_LIMIT_VIEWPORT
	.comm	_d3d8_vtbl,4,2                  ; @d3d8_vtbl
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
