	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function d3d9_init_internal
LCPI0_0:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1
LCPI0_1:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	4294967295                      ## 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_d3d9_init_internal:                    ## @d3d9_init_internal
	.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	$200, %rsp
	.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, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -200(%rbp)
	movl	$0, -196(%rbp)
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, -224(%rbp)                ## 8-byte Spill
	movl	$1, %edi
	movl	$16, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%r12, -208(%rbp)                ## 8-byte Spill
	movq	%r15, -216(%rbp)                ## 8-byte Spill
	movq	%rax, 24(%rbx)
	movl	$0, 12(%rbx)
	movq	(%rax), %rcx
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,1,1]
	movups	%xmm0, (%rcx)
	movq	8(%rax), %rax
	movaps	LCPI0_1(%rip), %xmm0            ## xmm0 = [0,1,1,4294967295]
	movups	%xmm0, (%rax)
	leaq	-200(%rbp), %r15
	leaq	-196(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_d3d9_get_video_size
	leaq	4(%r14), %rax
	cmpl	$0, 8(%r14)
	cmoveq	%r14, %r15
	movl	(%r15), %ecx
	movl	%ecx, -176(%rbp)
	cmovneq	%r12, %rax
	movl	(%rax), %eax
	movl	%eax, -192(%rbp)
	leaq	-176(%rbp), %rdi
	leaq	-192(%rbp), %rsi
	callq	_video_driver_set_size
	movl	8(%r14), %eax
	movl	%eax, 8(%rbx)
	movq	(%r14), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_d3d9_initialize
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	_d3d9_get_flags@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_d3d9_fake_context@GOTPCREL(%rip), %rdi
	movl	%eax, (%rdi)
	callq	_video_context_driver_set
	movq	-224(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edi
	movl	%edi, %esi
	movq	-208(%rbp), %rdx                ## 8-byte Reload
	movq	-216(%rbp), %rcx                ## 8-byte Reload
	callq	_d3d_input_driver
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -192(%rbp)
	movq	_g_pD3D9@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-192(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_IDirect3D9_GetAdapterIdentifier
	movb	$0, -176(%rbp)
	movl	-184(%rbp), %edi
	callq	_HIWORD
	movl	%eax, %r15d
	movl	-184(%rbp), %edi
	callq	_LOWORD
	movl	%eax, %r12d
	movl	-188(%rbp), %edi
	callq	_HIWORD
	movl	%eax, %ebx
	movl	-188(%rbp), %edi
	callq	_LOWORD
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdx
	leaq	-176(%rbp), %r14
	movq	%r14, %rdi
	movl	$128, %esi
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	movl	%ebx, %r9d
	callq	_snprintf
	movl	-192(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movl	-192(%rbp), %edi
	callq	_video_driver_set_gpu_device_string
	movq	%r14, %rdi
	callq	_video_driver_set_gpu_api_version_string
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movl	$1, %r13d
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r13d, %eax
	addq	$200, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_d3d9_get_flags,4,2             ## @d3d9_get_flags
	.comm	_d3d9_fake_context,4,2          ## @d3d9_fake_context
	.comm	_g_pD3D9,4,2                    ## @g_pD3D9
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%u.%u.%u.%u"

L_.str.1:                               ## @.str.1
	.asciz	"[D3D9]: Using GPU: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"[D3D9]: GPU API Version: %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"[D3D9]: Init complete.\n"

	.comm	_WndProcD3D,4,2                 ## @WndProcD3D
	.comm	_g_win32_resize_height,4,2      ## @g_win32_resize_height
	.comm	_g_win32_resize_width,4,2       ## @g_win32_resize_width
	.no_dead_strip	_d3d9_init_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function d3d9_init_internal
lCPI0_0:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	1                               ; 0x1
lCPI0_1:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_d3d9_init_internal:                    ; @d3d9_init_internal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	x26, x25, [sp, #176]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #192]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	str	xzr, [sp, #32]
	bl	_config_get_ptr
	mov	x21, x0
	mov	w0, #1
	mov	w1, #16
	bl	_calloc
	cbz	x0, LBB0_3
; %bb.1:
	str	x0, [x22, #24]
	str	wzr, [x22, #12]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x9, lCPI0_0@PAGEOFF]
	str	q0, [x8]
	ldr	x8, [x0, #8]
Lloh5:
	adrp	x9, lCPI0_1@PAGE
Lloh6:
	ldr	q0, [x9, lCPI0_1@PAGEOFF]
	str	q0, [x8]
	add	x24, sp, #36
	add	x25, sp, #32
	add	x1, sp, #36
	add	x2, sp, #32
	mov	x0, x22
	bl	_d3d9_get_video_size
	ldr	w8, [x23, #8]
	cmp	w8, #0
	csel	x8, x23, x24, eq
	ldr	w8, [x8]
	str	w8, [sp, #40]
	add	x8, x23, #4
	csel	x8, x8, x25, eq
	ldr	w8, [x8]
	str	w8, [sp, #16]
	add	x24, sp, #40
	add	x0, sp, #40
	add	x1, sp, #16
	bl	_video_driver_set_size
	ldr	x8, [x23]
	ldr	w9, [x23, #8]
	str	w9, [x22, #8]
	str	x8, [x22]
	mov	x0, x22
	mov	x1, x22
	bl	_d3d9_initialize
	cbz	w0, LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _d3d9_get_flags@GOTPAGE
Lloh8:
	ldr	x8, [x8, _d3d9_get_flags@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x0, _d3d9_fake_context@GOTPAGE
Lloh11:
	ldr	x0, [x0, _d3d9_fake_context@GOTPAGEOFF]
	str	w8, [x0]
	bl	_video_context_driver_set
	ldr	w0, [x21]
	mov	x1, x0
	mov	x2, x20
	mov	x3, x19
	bl	_d3d_input_driver
	stp	xzr, xzr, [sp, #16]
Lloh12:
	adrp	x8, _g_pD3D9@GOTPAGE
Lloh13:
	ldr	x8, [x8, _g_pD3D9@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	add	x3, sp, #16
	mov	w1, #0
	mov	w2, #0
	bl	_IDirect3D9_GetAdapterIdentifier
	strb	wzr, [sp, #40]
	ldr	w0, [sp, #24]
	bl	_HIWORD
	mov	x19, x0
	ldr	w0, [sp, #24]
	bl	_LOWORD
	mov	x20, x0
	ldr	w0, [sp, #20]
	bl	_HIWORD
	mov	x21, x0
	ldr	w0, [sp, #20]
	bl	_LOWORD
	mov	x6, x0
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #40
	mov	w1, #128
	mov	x3, x19
	mov	x4, x20
	mov	x5, x21
	bl	_snprintf
	ldr	w8, [sp, #16]
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_LOG
	str	x24, [sp]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_RARCH_LOG
	ldr	w0, [sp, #16]
	bl	_video_driver_set_gpu_device_string
	add	x0, sp, #40
	bl	_video_driver_set_gpu_api_version_string
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_RARCH_LOG
	mov	w0, #1
LBB0_3:
	ldur	x8, [x29, #-72]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #192]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_d3d9_get_flags,4,2             ; @d3d9_get_flags
	.comm	_d3d9_fake_context,4,2          ; @d3d9_fake_context
	.comm	_g_pD3D9,4,2                    ; @g_pD3D9
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u.%u.%u.%u"

l_.str.1:                               ; @.str.1
	.asciz	"[D3D9]: Using GPU: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"[D3D9]: GPU API Version: %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"[D3D9]: Init complete.\n"

	.comm	_WndProcD3D,4,2                 ; @WndProcD3D
	.comm	_g_win32_resize_height,4,2      ; @g_win32_resize_height
	.comm	_g_win32_resize_width,4,2       ; @g_win32_resize_width
	.no_dead_strip	_d3d9_init_internal
.subsections_via_symbols
