	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function surface_load_renderbuffer
_surface_load_renderbuffer:             ## @surface_load_renderbuffer
	.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	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %r13
	callq	_surface_get_sub_resource_idx
	xorl	%edx, %edx
	divl	(%r13)
	movl	%edx, %ebx
	movq	$0, -56(%rbp)
	movq	%r13, %rdi
	movl	%edx, %esi
	callq	_wined3d_texture_get_level_width
	movl	%eax, -48(%rbp)
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_wined3d_texture_get_level_height
	movl	%eax, -44(%rbp)
	movq	%r12, %rdi
	callq	_surface_get_sub_resource
	movl	(%rax), %edi
	movq	_WINED3DUSAGE_DEPTHSTENCIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_2
## %bb.1:
	callq	_wined3d_debug_location
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_FIXME
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_WINED3D_LOCATION_RB_MULTISAMPLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%edi, %r8d
	jne	LBB0_6
## %bb.3:
	movq	_WINED3D_LOCATION_RB_RESOLVED@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%edi, %r8d
	jne	LBB0_6
## %bb.4:
	movq	_WINED3D_LOCATION_TEXTURE_SRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%edi, %r8d
	jne	LBB0_6
## %bb.5:
	movq	_WINED3D_LOCATION_TEXTURE_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_6:
	movl	8(%r13), %edi
	movq	_WINED3D_TEXF_POINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subq	$8, %rsp
	leaq	-56(%rbp), %r9
	movq	%r15, %rsi
	movq	%r12, %rcx
	pushq	%r9
	pushq	%r14
	pushq	%r12
	callq	_surface_blt_fbo
	addq	$32, %rsp
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3DUSAGE_DEPTHSTENCIL,4,2  ## @WINED3DUSAGE_DEPTHSTENCIL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unimplemented copy from %s for depth/stencil buffers.\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_WINED3D_LOCATION_RB_MULTISAMPLE,4,2 ## @WINED3D_LOCATION_RB_MULTISAMPLE
	.comm	_WINED3D_LOCATION_RB_RESOLVED,4,2 ## @WINED3D_LOCATION_RB_RESOLVED
	.comm	_WINED3D_LOCATION_TEXTURE_SRGB,4,2 ## @WINED3D_LOCATION_TEXTURE_SRGB
	.comm	_WINED3D_LOCATION_TEXTURE_RGB,4,2 ## @WINED3D_LOCATION_TEXTURE_RGB
	.comm	_WINED3D_TEXF_POINT,4,2         ## @WINED3D_TEXF_POINT
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_surface_load_renderbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function surface_load_renderbuffer
_surface_load_renderbuffer:             ; @surface_load_renderbuffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x22, [x0]
	bl	_surface_get_sub_resource_idx
	ldr	w8, [x22]
	udiv	w9, w0, w8
	msub	w23, w9, w8, w0
	str	xzr, [sp, #16]
	mov	x0, x22
	mov	x1, x23
	bl	_wined3d_texture_get_level_width
	str	w0, [sp, #24]
	mov	x0, x22
	mov	x1, x23
	bl	_wined3d_texture_get_level_height
	str	w0, [sp, #28]
	mov	x0, x20
	bl	_surface_get_sub_resource
	ldr	w0, [x0]
	ldr	w8, [x22, #4]
Lloh0:
	adrp	x9, _WINED3DUSAGE_DEPTHSTENCIL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3DUSAGE_DEPTHSTENCIL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	bl	_wined3d_debug_location
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
Lloh5:
	adrp	x8, _FALSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
Lloh7:
	adrp	x8, _WINED3D_LOCATION_RB_MULTISAMPLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WINED3D_LOCATION_RB_MULTISAMPLE@GOTPAGEOFF]
Lloh9:
	ldr	w4, [x8]
	tst	w4, w0
	b.ne	LBB0_5
; %bb.3:
Lloh10:
	adrp	x8, _WINED3D_LOCATION_RB_RESOLVED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WINED3D_LOCATION_RB_RESOLVED@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	tst	w4, w0
	b.ne	LBB0_5
; %bb.4:
Lloh13:
	adrp	x8, _WINED3D_LOCATION_TEXTURE_SRGB@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WINED3D_LOCATION_TEXTURE_SRGB@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _WINED3D_LOCATION_TEXTURE_RGB@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WINED3D_LOCATION_TEXTURE_RGB@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w8, w0
	csel	w4, w9, w8, eq
LBB0_5:
	ldr	w0, [x22, #8]
Lloh19:
	adrp	x8, _WINED3D_TEXF_POINT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WINED3D_TEXF_POINT@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	add	x8, sp, #16
	str	x8, [sp]
	add	x5, sp, #16
	mov	x1, x21
	mov	x3, x20
	mov	x6, x20
	mov	x7, x19
	bl	_surface_blt_fbo
Lloh22:
	adrp	x8, _TRUE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3DUSAGE_DEPTHSTENCIL,4,2  ; @WINED3DUSAGE_DEPTHSTENCIL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unimplemented copy from %s for depth/stencil buffers.\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_WINED3D_LOCATION_RB_MULTISAMPLE,4,2 ; @WINED3D_LOCATION_RB_MULTISAMPLE
	.comm	_WINED3D_LOCATION_RB_RESOLVED,4,2 ; @WINED3D_LOCATION_RB_RESOLVED
	.comm	_WINED3D_LOCATION_TEXTURE_SRGB,4,2 ; @WINED3D_LOCATION_TEXTURE_SRGB
	.comm	_WINED3D_LOCATION_TEXTURE_RGB,4,2 ; @WINED3D_LOCATION_TEXTURE_RGB
	.comm	_WINED3D_TEXF_POINT,4,2         ; @WINED3D_TEXF_POINT
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_surface_load_renderbuffer
.subsections_via_symbols
