	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d8_reset                     ## -- Begin function d3d8_reset
	.p2align	4, 0x90
_d3d8_reset:                            ## @d3d8_reset
	.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	%rdi, %rbx
	callq	_d3d8_reset_internal
	movl	$1, %r14d
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_RARCH_WARN
	movq	%rbx, %rdi
	callq	_d3d8_test_cooperative_level
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_2
## %bb.3:
	cltq
	leaq	l_reltable.d3d8_reset(%rip), %rcx
	movslq	(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str.4(%rip), %rsi
LBB0_4:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_RARCH_WARN
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[D3D]: Attempting to recover from dead state...\n"

L_.str.1:                               ## @.str.1
	.asciz	"DEVICELOST"

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

L_.str.3:                               ## @.str.3
	.asciz	"DRIVERINTERNALERROR"

L_.str.4:                               ## @.str.4
	.asciz	"Unknown"

L_.str.5:                               ## @.str.5
	.asciz	"[D3D]: recovering from dead state: (%s).\n"

	.section	__TEXT,__const
	.p2align	2                               ## @reltable.d3d8_reset
l_reltable.d3d8_reset:
	.long	L_.str.3-l_reltable.d3d8_reset
	.long	L_.str.2-l_reltable.d3d8_reset
	.long	L_.str.1-l_reltable.d3d8_reset

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d8_reset                     ; -- Begin function d3d8_reset
	.p2align	2
_d3d8_reset:                            ; @d3d8_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_d3d8_reset_internal
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_6
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_WARN
	mov	x0, x19
	bl	_d3d8_test_cooperative_level
	sub	w8, w0, #128
	cmp	w8, #2
	b.hi	LBB0_4
; %bb.3:
Lloh2:
	adrp	x9, l_switch.table.d3d8_reset@PAGE
Lloh3:
	add	x9, x9, l_switch.table.d3d8_reset@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, l_.str.4@PAGE
Lloh5:
	add	x8, x8, l_.str.4@PAGEOFF
LBB0_5:
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str.5@PAGE
Lloh7:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_RARCH_WARN
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[D3D]: Attempting to recover from dead state...\n"

l_.str.1:                               ; @.str.1
	.asciz	"DEVICELOST"

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

l_.str.3:                               ; @.str.3
	.asciz	"DRIVERINTERNALERROR"

l_.str.4:                               ; @.str.4
	.asciz	"Unknown"

l_.str.5:                               ; @.str.5
	.asciz	"[D3D]: recovering from dead state: (%s).\n"

	.section	__DATA,__const
	.p2align	3                               ; @switch.table.d3d8_reset
l_switch.table.d3d8_reset:
	.quad	l_.str.3
	.quad	l_.str.2
	.quad	l_.str.1

.subsections_via_symbols
