	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d8_frame
_d3d8_frame:                            ## @d3d8_frame
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$1, %r15d
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movq	24(%rbp), %rax
	movl	(%rax), %r13d
	movl	4(%rax), %r14d
	cmpq	$0, 72(%rdi)
	je	LBB0_6
## %bb.2:
	xorl	%eax, %eax
	callq	_win32_get_window
	movl	%eax, %edi
	callq	_IsIconic
	testq	%rax, %rax
	jne	LBB0_17
## %bb.3:
	movq	%rbx, %rdi
	callq	_d3d8_restore
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	cmpl	$0, (%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_d3d8_set_viewport
	movl	$0, (%rbx)
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	movl	$1, -96(%rbp)
	movl	%r13d, -92(%rbp)
	movl	%r14d, -88(%rbp)
	movl	8(%rbx), %edi
	leaq	-96(%rbp), %rsi
	callq	_d3d8_set_viewports
	movl	8(%rbx), %edi
	movq	_D3DCLEAR_TARGET@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movl	$0, (%rsp)
	movl	$1, %r15d
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_d3d8_clear
	movq	24(%rbp), %r13
	cmpq	$0, 32(%r13)
	je	LBB0_12
## %bb.9:
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_d3d8_swap
	testl	%eax, %eax
	je	LBB0_17
## %bb.10:
	cmpq	$0, 72(%rbx)
	jne	LBB0_17
## %bb.11:
	movl	8(%rbx), %edi
	movl	(%r14), %ecx
	movl	$0, (%rsp)
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_d3d8_clear
LBB0_12:
	movl	64(%rbx), %r9d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_d3d8_renderchain_render
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movq	16(%rbp), %r14
	movq	%r14, %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movl	8(%rbx), %edi
	leaq	-96(%rbp), %rsi
	callq	_d3d8_set_viewports
	movl	8(%rbx), %edi
	callq	_d3d8_begin_scene
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_font_driver_render_msg
	movl	8(%rbx), %edi
	callq	_d3d8_end_scene
LBB0_16:
	movq	%r13, %rdi
	callq	_d3d8_update_title
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_d3d8_swap
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
LBB0_5:
	callq	_RARCH_ERR
	xorl	%r15d, %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[D3D8]: Failed to restore.\n"

	.comm	_D3DCLEAR_TARGET,4,2            ## @D3DCLEAR_TARGET
L_.str.1:                               ## @.str.1
	.asciz	"[D3D8]: Failed to render scene.\n"

	.no_dead_strip	_d3d8_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d8_frame
_d3d8_frame:                            ; @d3d8_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	cbz	x1, LBB0_14
; %bb.1:
	mov	x19, x7
	mov	x21, x6
	mov	x22, x5
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x20, x0
	ldp	w26, w27, [x7]
	ldr	x8, [x0, #72]
	cbz	x8, LBB0_4
; %bb.2:
	bl	_win32_get_window
	bl	_IsIconic
	cbnz	x0, LBB0_14
; %bb.3:
	mov	x0, x20
	bl	_d3d8_restore
	cbz	w0, LBB0_17
LBB0_4:
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x26
	mov	x2, x27
	mov	w3, #0
	mov	w4, #1
	bl	_d3d8_set_viewport
	str	wzr, [x20]
LBB0_6:
	stp	xzr, xzr, [sp, #24]
	str	xzr, [sp, #40]
	mov	w8, #1
	stp	w8, w26, [sp, #8]
	str	w27, [sp, #16]
	ldr	w0, [x20, #8]
	add	x1, sp, #8
	bl	_d3d8_set_viewports
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x26, _D3DCLEAR_TARGET@GOTPAGE
Lloh1:
	ldr	x26, [x26, _D3DCLEAR_TARGET@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	w1, #0
	mov	w2, #0
	mov	w4, #0
	mov	w5, #1
	mov	w6, #0
	bl	_d3d8_clear
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.7:
	ldr	w1, [x20, #8]
	mov	x0, x20
	bl	_d3d8_swap
	cbz	w0, LBB0_14
; %bb.8:
	ldr	x8, [x20, #72]
	cbnz	x8, LBB0_14
; %bb.9:
	ldr	w0, [x20, #8]
	ldr	w3, [x26]
	mov	w1, #0
	mov	w2, #0
	mov	w4, #0
	mov	w5, #1
	mov	w6, #0
	bl	_d3d8_clear
LBB0_10:
	ldr	w5, [x20, #64]
	mov	x0, x20
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	bl	_d3d8_renderchain_render
	cbz	w0, LBB0_16
; %bb.11:
	mov	x0, x21
	bl	_string_is_empty
	cbnz	w0, LBB0_13
; %bb.12:
	ldr	w0, [x20, #8]
	add	x1, sp, #8
	bl	_d3d8_set_viewports
	ldr	w0, [x20, #8]
	bl	_d3d8_begin_scene
	mov	x0, x19
	mov	x1, #0
	mov	x2, x21
	mov	x3, #0
	bl	_font_driver_render_msg
	ldr	w0, [x20, #8]
	bl	_d3d8_end_scene
LBB0_13:
	mov	x0, x19
	bl	_d3d8_update_title
	ldr	w1, [x20, #8]
	mov	x0, x20
	bl	_d3d8_swap
LBB0_14:
	mov	w0, #1
LBB0_15:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_16:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_17:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
LBB0_18:
	bl	_RARCH_ERR
	mov	w0, #0
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[D3D8]: Failed to restore.\n"

	.comm	_D3DCLEAR_TARGET,4,2            ; @D3DCLEAR_TARGET
l_.str.1:                               ; @.str.1
	.asciz	"[D3D8]: Failed to render scene.\n"

	.no_dead_strip	_d3d8_frame
.subsections_via_symbols
