	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function VMR9_ImagePresenter_PresentOffscreenSurface
_VMR9_ImagePresenter_PresentOffscreenSurface: ## @VMR9_ImagePresenter_PresentOffscreenSurface
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	$0, -32(%rbp)
	movl	8(%rdi), %edi
	movq	_D3DBACKBUFFER_TYPE_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32(%rbp), %r8
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_IDirect3DDevice9_GetBackBuffer
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_ERR
	jmp	LBB0_5
LBB0_2:
	movq	(%r15), %rax
	movq	16(%rax), %rcx
	movq	32(%rax), %rdx
	subq	24(%rax), %rdx
	subq	8(%rax), %rcx
	leaq	-36(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_SetRect
	movl	8(%r15), %edi
	movq	(%r15), %rdx
	movq	-32(%rbp), %rcx
	movq	_D3DTEXF_LINEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r14, %rsi
	movq	%rbx, %r8
	callq	_IDirect3DDevice9_StretchRect
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_ERR
LBB0_4:
	movq	-32(%rbp), %rdi
	callq	_IDirect3DSurface9_Release
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DBACKBUFFER_TYPE_MONO,4,2    ## @D3DBACKBUFFER_TYPE_MONO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IDirect3DDevice9_GetBackBuffer -- %08x\n"

	.comm	_D3DTEXF_LINEAR,4,2             ## @D3DTEXF_LINEAR
L_.str.1:                               ## @.str.1
	.asciz	"IDirect3DDevice9_StretchRect -- %08x\n"

	.no_dead_strip	_VMR9_ImagePresenter_PresentOffscreenSurface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function VMR9_ImagePresenter_PresentOffscreenSurface
_VMR9_ImagePresenter_PresentOffscreenSurface: ; @VMR9_ImagePresenter_PresentOffscreenSurface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	str	xzr, [sp, #8]
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _D3DBACKBUFFER_TYPE_MONO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D3DBACKBUFFER_TYPE_MONO@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	add	x4, sp, #8
	mov	w1, #0
	mov	w2, #0
	bl	_IDirect3DDevice9_GetBackBuffer
	mov	x21, x0
	bl	_FAILED
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_ERR
	b	LBB0_5
LBB0_2:
	ldr	x8, [x20]
	ldp	x10, x9, [x8, #24]
	sub	x2, x9, x10
	ldp	x8, x9, [x8, #8]
	sub	x3, x9, x8
	add	x0, sp, #4
	mov	w1, #0
	mov	w4, #0
	bl	_SetRect
	ldr	w0, [x20, #8]
	ldr	x2, [x20]
	ldr	x3, [sp, #8]
Lloh5:
	adrp	x8, _D3DTEXF_LINEAR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _D3DTEXF_LINEAR@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
	add	x4, sp, #4
	mov	x1, x19
	bl	_IDirect3DDevice9_StretchRect
	mov	x21, x0
	bl	_FAILED
	cbz	x0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_ERR
LBB0_4:
	ldr	x0, [sp, #8]
	bl	_IDirect3DSurface9_Release
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DBACKBUFFER_TYPE_MONO,4,2    ; @D3DBACKBUFFER_TYPE_MONO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IDirect3DDevice9_GetBackBuffer -- %08x\n"

	.comm	_D3DTEXF_LINEAR,4,2             ; @D3DTEXF_LINEAR
l_.str.1:                               ; @.str.1
	.asciz	"IDirect3DDevice9_StretchRect -- %08x\n"

	.no_dead_strip	_VMR9_ImagePresenter_PresentOffscreenSurface
.subsections_via_symbols
