	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d8_renderchain_blit_to_texture
_d3d8_renderchain_blit_to_texture:      ## @d3d8_renderchain_blit_to_texture
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	20(%rdi), %r12d
	callq	_d3d8_frame_postprocess
	cmpl	%r15d, (%rbx)
	jne	LBB0_2
## %bb.1:
	cmpl	%r14d, 4(%rbx)
	je	LBB0_3
LBB0_2:
	movl	8(%rbx), %edi
	movl	16(%rbx), %r8d
	movq	_D3DLOCK_NOSYSLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-44(%rbp), %rdx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_d3d8_lock_rectangle
	movl	8(%rbx), %edi
	movl	16(%rbx), %r8d
	movq	_D3DLOCK_NOSYSLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%esi, %esi
	leaq	-44(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_d3d8_lock_rectangle_clear
LBB0_3:
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_d3d8_set_texture
	movl	8(%rbx), %edi
	leaq	-44(%rbp), %rdx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_d3d8_lock_rectangle
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	leaq	-44(%rbp), %rdx
	movq	%r13, %rcx
	movl	%r15d, %r8d
	movl	%r14d, %r9d
	callq	_d3d8_texture_blit
	movl	8(%rbx), %edi
	callq	_d3d8_unlock_rectangle
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DLOCK_NOSYSLOCK,4,2          ## @D3DLOCK_NOSYSLOCK
	.no_dead_strip	_d3d8_renderchain_blit_to_texture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d8_renderchain_blit_to_texture
_d3d8_renderchain_blit_to_texture:      ; @d3d8_renderchain_blit_to_texture
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	ldr	w24, [x0, #20]
	bl	_d3d8_frame_postprocess
	ldr	w8, [x20]
	cmp	w8, w22
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x20, #4]
	cmp	w8, w21
	b.eq	LBB0_3
LBB0_2:
	ldr	w0, [x20, #8]
	ldr	w4, [x20, #16]
Lloh0:
	adrp	x25, _D3DLOCK_NOSYSLOCK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _D3DLOCK_NOSYSLOCK@GOTPAGEOFF]
	ldr	w5, [x25]
	add	x2, sp, #12
	mov	w1, #0
	mov	x3, #0
	bl	_d3d8_lock_rectangle
	ldr	w0, [x20, #8]
	ldr	w4, [x20, #16]
	ldr	w5, [x25]
	add	x2, sp, #12
	mov	w1, #0
	mov	x3, #0
	bl	_d3d8_lock_rectangle_clear
LBB0_3:
	mov	x0, x24
	mov	w1, #0
	mov	x2, #0
	bl	_d3d8_set_texture
	ldr	w0, [x20, #8]
	add	x2, sp, #12
	mov	w1, #0
	mov	x3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_d3d8_lock_rectangle
	cbz	x0, LBB0_5
; %bb.4:
	ldp	w1, w0, [x20, #8]
	add	x2, sp, #12
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x6, x19
	bl	_d3d8_texture_blit
	ldr	w0, [x20, #8]
	bl	_d3d8_unlock_rectangle
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DLOCK_NOSYSLOCK,4,2          ; @D3DLOCK_NOSYSLOCK
	.no_dead_strip	_d3d8_renderchain_blit_to_texture
.subsections_via_symbols
