	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function surface_blt_fbo
_surface_blt_fbo:                       ## @surface_blt_fbo
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%r8d, %ebx
	movq	%rcx, %r14
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	16(%rbp), %rdi
	callq	_surface_get_sub_resource_idx
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_surface_get_sub_resource_idx
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	16(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movl	%r12d, %edi
	callq	_debug_d3dtexturefiltertype
	leaq	L_.str(%rip), %rdi
	movq	%r15, -168(%rbp)                ## 8-byte Spill
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_TRACE
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_wined3d_debug_location
	movl	%eax, %ebx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_wine_dbgstr_rect
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_TRACE
	movl	24(%rbp), %edi
	callq	_wined3d_debug_location
	movl	%eax, %ebx
	movq	32(%rbp), %r14
	movq	%r14, %rdi
	callq	_wine_dbgstr_rect
	leaq	L_.str.2(%rip), %rdi
	movq	16(%rbp), %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_TRACE
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movaps	%xmm0, -160(%rbp)
	movaps	%xmm1, -144(%rbp)
	movups	(%r14), %xmm0
	movups	16(%r14), %xmm1
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm1, -96(%rbp)
	leal	-128(%r12), %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.surface_blt_fbo(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_3
LBB0_1:
	movl	%r12d, %edi
	callq	_debug_d3dtexturefiltertype
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	callq	_FIXME
	movq	_GL_NEAREST@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	movl	-64(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %esi
	callq	_is_multisample_location
	testq	%rax, %rax
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	movq	16(%r14), %rax
	movq	(%rax), %rax
	movq	16(%r12), %rcx
	cmpq	(%rcx), %rax
	movq	%r14, %rdi
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	jne	LBB0_8
## %bb.6:
	movq	-160(%rbp), %rax
	subq	-144(%rbp), %rax
	movq	%rax, %rcx
	negq	%rcx
	cmovsq	%rax, %rcx
	movq	-112(%rbp), %rax
	subq	-96(%rbp), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovsq	%rax, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_8
## %bb.7:
	movq	-152(%rbp), %rax
	subq	-136(%rbp), %rax
	movq	%rax, %rcx
	negq	%rcx
	cmovsq	%rax, %rcx
	movq	-104(%rbp), %rax
	subq	-88(%rbp), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovsq	%rax, %rdx
	cmpq	%rdx, %rcx
	je	LBB0_9
LBB0_8:
	movq	_WINED3D_LOCATION_RB_RESOLVED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_9
LBB0_4:
	movq	%r14, %rdi
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
LBB0_9:
	movq	%r13, %rdx
	movl	%r15d, %ecx
	callq	_wined3d_texture_load_location
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	(%r12)
	leaq	-112(%rbp), %rax
	movq	%r12, %rdi
	movl	%edx, %esi
	movq	%rax, %rdx
	callq	_texture2d_is_full_rect
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	movl	24(%rbp), %ebx
	movl	%ebx, %ecx
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	callq	_wined3d_texture_prepare_location
	jmp	LBB0_12
LBB0_10:
	callq	_wined3d_texture_load_location
LBB0_12:
	movq	16(%rbp), %rcx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	_WINED3D_LOCATION_DRAWABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	cmpl	%ebx, %eax
	movl	$0, %ebx
	cmoveq	%rcx, %rbx
	cmpl	%eax, %r15d
	cmoveq	%r12, %rbx
	movq	%r13, %rdi
	callq	_context_get_rt_surface
	cmpq	%rbx, %rax
	je	LBB0_17
## %bb.13:
	movq	%rax, %r14
	movl	%r15d, %r12d
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.15:
	movq	(%rbx), %r15
	movq	%rbx, %rdi
	callq	_surface_get_sub_resource_idx
	movl	%eax, %edx
	jmp	LBB0_16
LBB0_14:
	xorl	%r15d, %r15d
	xorl	%edx, %edx
LBB0_16:
	movq	-168(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_context_acquire
	movq	%rax, %r13
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r15d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_17:
	cmpl	$0, 16(%r13)
	je	LBB0_18
## %bb.19:
	movq	8(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_WINED3D_LOCATION_DRAWABLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_21
## %bb.20:
	leaq	L_.str.5(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	callq	_wined3d_texture_get_gl_buffer
	movl	%eax, %ebx
	movl	(%r13), %esi
	leaq	-160(%rbp), %rdx
	movq	%r12, %rdi
	callq	_surface_translate_drawable_coords
	jmp	LBB0_22
LBB0_18:
	movq	%r13, %rdi
	callq	_context_release
	leaq	L_.str.4(%rip), %rdi
	callq	_WARN
	jmp	LBB0_33
LBB0_21:
	leaq	L_.str.6(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_GL_COLOR_ATTACHMENT0@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_22:
	movq	_GL_READ_FRAMEBUFFER@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	movl	%r15d, %r8d
	callq	_context_apply_fbo_state_blit
	movl	%ebx, %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	callq	*24(%rax)
	leaq	L_.str.7(%rip), %rdi
	callq	_checkGLcall
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_context_check_fbo_status
	movq	_WINED3D_LOCATION_DRAWABLE@GOTPCREL(%rip), %rax
	movl	24(%rbp), %ecx
	cmpl	%ecx, (%rax)
	jne	LBB0_24
## %bb.23:
	leaq	L_.str.8(%rip), %rdi
	movq	16(%rbp), %r15
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_wined3d_texture_get_gl_buffer
	movl	%eax, %r14d
	movl	(%r13), %esi
	leaq	-112(%rbp), %rdx
	movq	%r15, %rdi
	callq	_surface_translate_drawable_coords
	jmp	LBB0_25
LBB0_24:
	leaq	L_.str.9(%rip), %rdi
	movq	16(%rbp), %r15
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_GL_COLOR_ATTACHMENT0@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_25:
	movq	_GL_DRAW_FRAMEBUFFER@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	movl	24(%rbp), %r8d
	callq	_context_apply_fbo_state_blit
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_context_set_draw_buffer
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_context_check_fbo_status
	movq	_STATE_FRAMEBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_context_invalidate_state
	movq	_GL_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edi
	movl	%ecx, %esi
	movl	%ecx, %edx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	callq	*16(%r15)
	movq	_MAX_RENDER_TARGETS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_27
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_WINED3D_RS_COLORWRITE
	movl	%eax, %edi
	callq	_STATE_RENDER
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_context_invalidate_state
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_26
LBB0_27:
	movq	_GL_SCISSOR_TEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	*8(%r15)
	movq	_WINED3D_RS_SCISSORTESTENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_RENDER
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_context_invalidate_state
	movq	-136(%rbp), %rdi
	movq	-144(%rbp), %rsi
	movq	-160(%rbp), %rcx
	movq	-152(%rbp), %rdx
	movq	-88(%rbp), %r8
	movq	-96(%rbp), %r9
	movq	_GL_COLOR_BUFFER_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	pushq	-112(%rbp)
	pushq	-104(%rbp)
	callq	*32(%r15)
	addq	$32, %rsp
	leaq	L_.str.10(%rip), %rdi
	callq	_checkGLcall
	movq	_wined3d_settings@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_28
LBB0_30:
	xorl	%eax, %eax
	callq	*(%r15)
	jmp	LBB0_31
LBB0_28:
	movl	24(%rbp), %eax
	movq	_WINED3D_LOCATION_DRAWABLE@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_31
## %bb.29:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	cmpq	%rcx, (%rax)
	je	LBB0_30
LBB0_31:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_33
## %bb.32:
	movq	%r13, %rdi
	callq	_context_restore
LBB0_33:
	addq	$136, %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	"device %p, filter %s,\n"

L_.str.1:                               ## @.str.1
	.asciz	"src_surface %p, src_location %s, src_rect %s,\n"

L_.str.2:                               ## @.str.2
	.asciz	"dst_surface %p, dst_location %s, dst_rect %s.\n"

	.comm	_GL_LINEAR,4,2                  ## @GL_LINEAR
L_.str.3:                               ## @.str.3
	.asciz	"Unsupported filter mode %s (%#x).\n"

	.comm	_GL_NEAREST,4,2                 ## @GL_NEAREST
	.comm	_WINED3D_LOCATION_RB_RESOLVED,4,2 ## @WINED3D_LOCATION_RB_RESOLVED
	.comm	_WINED3D_LOCATION_DRAWABLE,4,2  ## @WINED3D_LOCATION_DRAWABLE
L_.str.4:                               ## @.str.4
	.asciz	"Invalid context, skipping blit.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Source surface %p is onscreen.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Source surface %p is offscreen.\n"

	.comm	_GL_COLOR_ATTACHMENT0,4,2       ## @GL_COLOR_ATTACHMENT0
	.comm	_GL_READ_FRAMEBUFFER,4,2        ## @GL_READ_FRAMEBUFFER
L_.str.7:                               ## @.str.7
	.asciz	"glReadBuffer()"

L_.str.8:                               ## @.str.8
	.asciz	"Destination surface %p is onscreen.\n"

L_.str.9:                               ## @.str.9
	.asciz	"Destination surface %p is offscreen.\n"

	.comm	_GL_DRAW_FRAMEBUFFER,4,2        ## @GL_DRAW_FRAMEBUFFER
	.comm	_STATE_FRAMEBUFFER,4,2          ## @STATE_FRAMEBUFFER
	.comm	_GL_TRUE,4,2                    ## @GL_TRUE
	.comm	_MAX_RENDER_TARGETS,4,2         ## @MAX_RENDER_TARGETS
	.comm	_GL_SCISSOR_TEST,4,2            ## @GL_SCISSOR_TEST
	.comm	_WINED3D_RS_SCISSORTESTENABLE,4,2 ## @WINED3D_RS_SCISSORTESTENABLE
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ## @GL_COLOR_BUFFER_BIT
L_.str.10:                              ## @.str.10
	.asciz	"glBlitFramebuffer()"

	.comm	_wined3d_settings,8,3           ## @wined3d_settings
	.no_dead_strip	_surface_blt_fbo
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.surface_blt_fbo
l_switch.table.surface_blt_fbo:
	.quad	_GL_NEAREST
	.quad	_GL_NEAREST
	.quad	_GL_LINEAR

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function surface_blt_fbo
_surface_blt_fbo:                       ; @surface_blt_fbo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	mov	x26, x7
	mov	x22, x6
	mov	x20, x5
	mov	x23, x4
	mov	x24, x3
	mov	x27, x2
	mov	x21, x1
	mov	x28, x0
	ldr	x19, [x29, #16]
	mov	x0, x6
	bl	_surface_get_sub_resource_idx
	mov	x25, x0
	mov	x0, x24
	bl	_surface_get_sub_resource_idx
	str	w0, [sp, #36]                   ; 4-byte Folded Spill
	ldr	x9, [x22]
	ldr	x8, [x24]
	stp	x8, x9, [sp, #40]               ; 16-byte Folded Spill
	mov	x0, x27
	bl	_debug_d3dtexturefiltertype
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	str	x28, [sp, #24]                  ; 8-byte Folded Spill
	mov	x1, x28
	bl	_TRACE
	mov	x0, x23
	bl	_wined3d_debug_location
	mov	x28, x0
	mov	x0, x20
	bl	_wine_dbgstr_rect
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x28, x0, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
	bl	_TRACE
	str	w26, [sp, #60]                  ; 4-byte Folded Spill
	mov	x0, x26
	bl	_wined3d_debug_location
	mov	x28, x0
	mov	x0, x19
	bl	_wine_dbgstr_rect
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x28, x0, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	bl	_TRACE
	ldp	q0, q1, [x20]
	stp	q0, q1, [sp, #96]
	ldp	q0, q1, [x19]
	stp	q0, q1, [sp, #64]
	sub	w8, w27, #128
	cmp	w8, #3
	b.hs	LBB0_2
; %bb.1:
Lloh6:
	adrp	x9, l_switch.table.surface_blt_fbo@PAGE
Lloh7:
	add	x9, x9, l_switch.table.surface_blt_fbo@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_3
LBB0_2:
	mov	x0, x27
	bl	_debug_d3dtexturefiltertype
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x27
	bl	_FIXME
Lloh10:
	adrp	x8, _GL_NEAREST@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GL_NEAREST@GOTPAGEOFF]
LBB0_3:
	ldr	w28, [x8]
	ldr	x26, [sp, #40]                  ; 8-byte Folded Reload
	mov	x0, x26
	mov	x1, x23
	bl	_is_multisample_location
	ldr	w19, [sp, #60]                  ; 4-byte Folded Reload
	ldr	x20, [sp, #48]                  ; 8-byte Folded Reload
	cbz	x0, LBB0_8
; %bb.4:
	ldr	x8, [x26, #16]
	ldr	x8, [x8]
	ldr	x9, [x20, #16]
	ldr	x9, [x9]
	cmp	x8, x9
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [sp, #96]
	ldr	x9, [sp, #112]
	subs	x8, x8, x9
	cneg	x8, x8, mi
	ldr	x9, [sp, #64]
	ldr	x10, [sp, #80]
	subs	x9, x9, x10
	cneg	x9, x9, mi
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [sp, #104]
	ldr	x9, [sp, #120]
	subs	x8, x8, x9
	cneg	x8, x8, mi
	ldr	x9, [sp, #72]
	ldr	x10, [sp, #88]
	subs	x9, x9, x10
	cneg	x9, x9, mi
	cmp	x8, x9
	b.eq	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _WINED3D_LOCATION_RB_RESOLVED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WINED3D_LOCATION_RB_RESOLVED@GOTPAGEOFF]
Lloh14:
	ldr	w23, [x8]
	b	LBB0_9
LBB0_8:
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
LBB0_9:
	mov	x0, x26
	mov	x2, x21
	mov	x3, x23
	bl	_wined3d_texture_load_location
	ldr	w8, [x20]
	udiv	w9, w25, w8
	msub	w1, w9, w8, w25
	add	x2, sp, #64
	mov	x0, x20
	bl	_texture2d_is_full_rect
	cbz	w0, LBB0_11
; %bb.10:
	mov	x0, x20
	mov	x1, x25
	mov	x2, x21
	mov	x3, x19
	bl	_wined3d_texture_prepare_location
	b	LBB0_12
LBB0_11:
	mov	x0, x20
	mov	x1, x25
	mov	x2, x21
	mov	x3, x19
	bl	_wined3d_texture_load_location
LBB0_12:
Lloh15:
	adrp	x26, _WINED3D_LOCATION_DRAWABLE@GOTPAGE
Lloh16:
	ldr	x26, [x26, _WINED3D_LOCATION_DRAWABLE@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, w19
	csel	x9, x22, xzr, eq
	cmp	w23, w8
	csel	x20, x24, x9, eq
	mov	x0, x21
	bl	_context_get_rt_surface
	cmp	x0, x20
	b.eq	LBB0_15
; %bb.13:
	mov	x25, x0
	cbz	x20, LBB0_17
; %bb.14:
	ldr	x19, [x20]
	mov	x0, x20
	bl	_surface_get_sub_resource_idx
	mov	x2, x0
	b	LBB0_18
LBB0_15:
	mov	x25, #0
	ldr	w8, [x21, #16]
	cbnz	w8, LBB0_19
LBB0_16:
	mov	x0, x21
	bl	_context_release
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_WARN
	b	LBB0_34
LBB0_17:
	mov	x19, #0
	mov	w2, #0
LBB0_18:
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x1, x19
	bl	_context_acquire
	mov	x21, x0
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_16
LBB0_19:
	ldr	x20, [x21, #8]
	ldr	w8, [x26]
Lloh19:
	adrp	x27, _GL_COLOR_ATTACHMENT0@GOTPAGE
Lloh20:
	ldr	x27, [x27, _GL_COLOR_ATTACHMENT0@GOTPAGEOFF]
	cmp	w23, w8
	b.ne	LBB0_21
; %bb.20:
Lloh21:
	adrp	x0, l_.str.5@PAGE
Lloh22:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x24
	bl	_TRACE
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	bl	_wined3d_texture_get_gl_buffer
	mov	x19, x0
	ldr	w1, [x21]
	add	x2, sp, #96
	mov	x0, x24
	bl	_surface_translate_drawable_coords
	b	LBB0_22
LBB0_21:
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x24
	bl	_TRACE
	ldr	w19, [x27]
LBB0_22:
Lloh25:
	adrp	x26, _GL_READ_FRAMEBUFFER@GOTPAGE
Lloh26:
	ldr	x26, [x26, _GL_READ_FRAMEBUFFER@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x21
	mov	x2, x24
	mov	x3, #0
	mov	x4, x23
	bl	_context_apply_fbo_state_blit
	ldr	x8, [x20, #24]
	mov	x0, x19
	blr	x8
Lloh27:
	adrp	x0, l_.str.7@PAGE
Lloh28:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_checkGLcall
	ldr	w1, [x26]
	mov	x0, x21
	bl	_context_check_fbo_status
Lloh29:
	adrp	x8, _WINED3D_LOCATION_DRAWABLE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WINED3D_LOCATION_DRAWABLE@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [sp, #60]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.ne	LBB0_24
; %bb.23:
Lloh32:
	adrp	x0, l_.str.8@PAGE
Lloh33:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	x1, x22
	bl	_TRACE
	ldr	x26, [sp, #48]                  ; 8-byte Folded Reload
	mov	x0, x26
	bl	_wined3d_texture_get_gl_buffer
	mov	x19, x0
	ldr	w1, [x21]
	add	x2, sp, #64
	mov	x0, x22
	bl	_surface_translate_drawable_coords
	b	LBB0_25
LBB0_24:
Lloh34:
	adrp	x0, l_.str.9@PAGE
Lloh35:
	add	x0, x0, l_.str.9@PAGEOFF
	mov	x1, x22
	bl	_TRACE
	ldr	w19, [x27]
	ldr	x26, [sp, #48]                  ; 8-byte Folded Reload
LBB0_25:
Lloh36:
	adrp	x23, _GL_DRAW_FRAMEBUFFER@GOTPAGE
Lloh37:
	ldr	x23, [x23, _GL_DRAW_FRAMEBUFFER@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	mov	x2, x22
	mov	x3, #0
	ldr	w24, [sp, #60]                  ; 4-byte Folded Reload
	mov	x4, x24
	bl	_context_apply_fbo_state_blit
	mov	x0, x21
	mov	x1, x19
	bl	_context_set_draw_buffer
	ldr	w1, [x23]
	mov	x0, x21
	bl	_context_check_fbo_status
Lloh38:
	adrp	x8, _STATE_FRAMEBUFFER@GOTPAGE
Lloh39:
	ldr	x8, [x8, _STATE_FRAMEBUFFER@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_context_invalidate_state
	ldr	x8, [x20, #16]
Lloh41:
	adrp	x9, _GL_TRUE@GOTPAGE
Lloh42:
	ldr	x9, [x9, _GL_TRUE@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x9]
	mov	x1, x0
	mov	x2, x0
	mov	x3, x0
	blr	x8
Lloh44:
	adrp	x22, _MAX_RENDER_TARGETS@GOTPAGE
Lloh45:
	ldr	x22, [x22, _MAX_RENDER_TARGETS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.26:
	mov	w19, #0
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_WINED3D_RS_COLORWRITE
	bl	_STATE_RENDER
	mov	x1, x0
	mov	x0, x21
	bl	_context_invalidate_state
	add	w19, w19, #1
	ldr	w8, [x22]
	cmp	w19, w8
	b.lt	LBB0_27
LBB0_28:
	ldr	x8, [x20, #8]
Lloh46:
	adrp	x9, _GL_SCISSOR_TEST@GOTPAGE
Lloh47:
	ldr	x9, [x9, _GL_SCISSOR_TEST@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x9]
	blr	x8
Lloh49:
	adrp	x8, _WINED3D_RS_SCISSORTESTENABLE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _WINED3D_RS_SCISSORTESTENABLE@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	bl	_STATE_RENDER
	mov	x1, x0
	mov	x0, x21
	bl	_context_invalidate_state
	ldr	x8, [x20, #32]
	ldp	x1, x0, [sp, #112]
	ldp	x3, x2, [sp, #96]
	ldp	x5, x4, [sp, #80]
	ldp	x7, x6, [sp, #64]
Lloh52:
	adrp	x9, _GL_COLOR_BUFFER_BIT@GOTPAGE
Lloh53:
	ldr	x9, [x9, _GL_COLOR_BUFFER_BIT@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x9]
	stp	w9, w28, [sp]
	blr	x8
Lloh55:
	adrp	x0, l_.str.10@PAGE
Lloh56:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_checkGLcall
Lloh57:
	adrp	x8, _wined3d_settings@GOTPAGE
Lloh58:
	ldr	x8, [x8, _wined3d_settings@GOTPAGEOFF]
Lloh59:
	ldr	x8, [x8]
	cbz	x8, LBB0_30
LBB0_29:
	ldr	x8, [x20]
	blr	x8
	b	LBB0_32
LBB0_30:
Lloh60:
	adrp	x8, _WINED3D_LOCATION_DRAWABLE@GOTPAGE
Lloh61:
	ldr	x8, [x8, _WINED3D_LOCATION_DRAWABLE@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	cmp	w8, w24
	b.ne	LBB0_32
; %bb.31:
	ldr	x8, [x26, #8]
	ldr	x8, [x8]
	cmp	x8, x26
	b.eq	LBB0_29
LBB0_32:
	cbz	x25, LBB0_34
; %bb.33:
	mov	x0, x21
	mov	x1, x25
	bl	_context_restore
LBB0_34:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device %p, filter %s,\n"

l_.str.1:                               ; @.str.1
	.asciz	"src_surface %p, src_location %s, src_rect %s,\n"

l_.str.2:                               ; @.str.2
	.asciz	"dst_surface %p, dst_location %s, dst_rect %s.\n"

	.comm	_GL_LINEAR,4,2                  ; @GL_LINEAR
l_.str.3:                               ; @.str.3
	.asciz	"Unsupported filter mode %s (%#x).\n"

	.comm	_GL_NEAREST,4,2                 ; @GL_NEAREST
	.comm	_WINED3D_LOCATION_RB_RESOLVED,4,2 ; @WINED3D_LOCATION_RB_RESOLVED
	.comm	_WINED3D_LOCATION_DRAWABLE,4,2  ; @WINED3D_LOCATION_DRAWABLE
l_.str.4:                               ; @.str.4
	.asciz	"Invalid context, skipping blit.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Source surface %p is onscreen.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Source surface %p is offscreen.\n"

	.comm	_GL_COLOR_ATTACHMENT0,4,2       ; @GL_COLOR_ATTACHMENT0
	.comm	_GL_READ_FRAMEBUFFER,4,2        ; @GL_READ_FRAMEBUFFER
l_.str.7:                               ; @.str.7
	.asciz	"glReadBuffer()"

l_.str.8:                               ; @.str.8
	.asciz	"Destination surface %p is onscreen.\n"

l_.str.9:                               ; @.str.9
	.asciz	"Destination surface %p is offscreen.\n"

	.comm	_GL_DRAW_FRAMEBUFFER,4,2        ; @GL_DRAW_FRAMEBUFFER
	.comm	_STATE_FRAMEBUFFER,4,2          ; @STATE_FRAMEBUFFER
	.comm	_GL_TRUE,4,2                    ; @GL_TRUE
	.comm	_MAX_RENDER_TARGETS,4,2         ; @MAX_RENDER_TARGETS
	.comm	_GL_SCISSOR_TEST,4,2            ; @GL_SCISSOR_TEST
	.comm	_WINED3D_RS_SCISSORTESTENABLE,4,2 ; @WINED3D_RS_SCISSORTESTENABLE
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ; @GL_COLOR_BUFFER_BIT
l_.str.10:                              ; @.str.10
	.asciz	"glBlitFramebuffer()"

	.comm	_wined3d_settings,8,3           ; @wined3d_settings
	.no_dead_strip	_surface_blt_fbo
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.surface_blt_fbo
l_switch.table.surface_blt_fbo:
	.quad	_GL_NEAREST
	.quad	_GL_NEAREST
	.quad	_GL_LINEAR

.subsections_via_symbols
