	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function surface_convert_format
_surface_convert_format:                ## @surface_convert_format
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %eax
	movq	%rdi, %rbx
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	divl	(%rdi)
	movl	%edx, %r12d
	movq	24(%rdi), %r14
	movq	32(%rdi), %r13
	movl	8(%r13), %edi
	movl	8(%r15), %esi
	callq	_find_converter
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	movq	_WINED3D_RTYPE_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -136(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -140(%rbp)
	movq	_WINED3D_MULTISAMPLE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -144(%rbp)
	movq	_WINED3DUSAGE_SCRATCH@GOTPCREL(%rip), %rax
	movq	_WINED3DUSAGE_PRIVATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -184(%rbp)
	movq	_WINED3D_RESOURCE_ACCESS_CPU@GOTPCREL(%rip), %rax
	movq	_WINED3D_RESOURCE_ACCESS_MAP_R@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_WINED3D_RESOURCE_ACCESS_MAP_W@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -180(%rbp)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_wined3d_texture_get_level_width
	movl	%eax, -168(%rbp)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_wined3d_texture_get_level_height
	movl	%eax, -172(%rbp)
	movl	$1, -176(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -160(%rbp)
	movq	_WINED3D_TEXTURE_CREATE_MAPPABLE@GOTPCREL(%rip), %rax
	movq	_WINED3D_TEXTURE_CREATE_DISCARD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	subq	$8, %rsp
	leaq	-48(%rbp), %rax
	movq	_wined3d_null_parent_ops@GOTPCREL(%rip), %r10
	leaq	-184(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%r10
	pushq	$0
	callq	_wined3d_texture_create
	addq	$32, %rsp
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_23
LBB0_1:
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.2:
	movl	24(%r13), %edi
	callq	_is_identity_fixup
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	cmpq	$0, 16(%r13)
	je	LBB0_4
LBB0_7:
	movl	8(%r13), %edi
	callq	_debug_d3dformat
	movl	%eax, %ebx
	movl	8(%r15), %edi
	callq	_debug_d3dformat
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_FIXME
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_10:
	cmpq	$0, (%r14)
	je	LBB0_11
## %bb.12:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_context_acquire
	movq	(%rax), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
LBB0_11:
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
LBB0_13:
	movl	16(%rbx), %r15d
	movq	%rbx, %rdi
	movl	-72(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdx
	movl	%r15d, %ecx
	callq	_wined3d_texture_load_location
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movl	%r15d, %edi
	callq	_wined3d_debug_location
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ERR
LBB0_15:
	leaq	-68(%rbp), %rdx
	leaq	-124(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_wined3d_texture_get_pitch
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %ecx
	callq	_wined3d_texture_get_memory
	cmpq	$0, -96(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_19
## %bb.16:
	movl	%r14d, %r12d
	movq	-48(%rbp), %rdi
	movl	16(%rdi), %r14d
	xorl	%esi, %esi
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_wined3d_texture_load_location
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movl	%r14d, %edi
	callq	_wined3d_debug_location
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ERR
LBB0_18:
	movq	-48(%rbp), %rdi
	leaq	-120(%rbp), %rdx
	leaq	-104(%rbp), %rcx
	xorl	%esi, %esi
	callq	_wined3d_texture_get_pitch
	movq	-48(%rbp), %rdi
	leaq	-56(%rbp), %rdx
	xorl	%esi, %esi
	movl	%r14d, %ecx
	callq	_wined3d_texture_get_memory
	movq	8(%rbx), %rax
	movl	%r12d, %ecx
	movl	4(%rax,%rcx,8), %edx
	movq	_GL_PIXEL_UNPACK_BUFFER@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	_WINED3D_MAP_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-64(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_context_map_bo_address
	movq	%rax, %rbx
	movq	-48(%rbp), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edx
	movl	(%r13), %ecx
	movq	_WINED3D_MAP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	leaq	-56(%rbp), %rsi
	callq	_context_map_bo_address
	movl	-68(%rbp), %edx
	movl	-120(%rbp), %ecx
	movl	-172(%rbp), %r9d
	movl	-168(%rbp), %r8d
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	movq	-48(%rbp), %rdi
	notl	%r14d
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_wined3d_texture_invalidate_location
	movl	(%r13), %edx
	movq	%r15, %rdi
	leaq	-56(%rbp), %rsi
	callq	_context_unmap_bo_address
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_context_unmap_bo_address
	testq	%r15, %r15
	je	LBB0_22
LBB0_21:
	movq	%r15, %rdi
	callq	_context_release
LBB0_22:
	movq	-48(%rbp), %rbx
LBB0_23:
	movq	%rbx, %rax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	$0, -120(%rbp)
	movq	-172(%rbp), %rax
	rolq	$32, %rax
	movq	%rax, -112(%rbp)
	movq	$0, -104(%rbp)
	leaq	L_.str.4(%rip), %rdi
	callq	_TRACE
	movq	-48(%rbp), %rdi
	movq	_FALSE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_wined3d_texture_prepare_texture
	movq	-48(%rbp), %rdi
	movl	(%r12), %edx
	movq	%r15, %rsi
	callq	_wined3d_texture_bind_and_dirtify
	movq	-48(%rbp), %rax
	movq	8(%rax), %rax
	movl	(%rax), %ebx
	movl	-68(%rbp), %r14d
	movl	(%r12), %r12d
	leaq	-64(%rbp), %rdi
	callq	_wined3d_const_bo_address
                                        ## kill: def $eax killed $eax def $rax
	leaq	-120(%rbp), %rcx
	leaq	-104(%rbp), %r9
	movl	%ebx, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	movl	%r14d, %r8d
	pushq	%rax
	pushq	%r12
	callq	_wined3d_surface_upload_data
	addq	$16, %rsp
	movq	-48(%rbp), %rdi
	movq	_WINED3D_LOCATION_TEXTURE_RGB@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%esi, %esi
	callq	_wined3d_texture_validate_location
	movq	-48(%rbp), %rdi
	movl	(%rbx), %edx
	notl	%edx
	xorl	%esi, %esi
	callq	_wined3d_texture_invalidate_location
	testq	%r15, %r15
	jne	LBB0_21
	jmp	LBB0_22
LBB0_4:
	movl	24(%r15), %edi
	callq	_is_identity_fixup
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	cmpq	$0, 16(%r15)
	jne	LBB0_7
## %bb.6:
	movq	(%r13), %rax
	movq	_WINED3D_GL_RES_TYPE_TEX_2D@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_WINED3DFMT_FLAG_COMPRESSED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,4)
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_GL_RES_TYPE_TEX_2D,8,3 ## @WINED3D_GL_RES_TYPE_TEX_2D
	.comm	_WINED3DFMT_FLAG_COMPRESSED,4,2 ## @WINED3DFMT_FLAG_COMPRESSED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot find a conversion function from format %s to %s.\n"

	.comm	_WINED3D_RTYPE_TEXTURE_2D,4,2   ## @WINED3D_RTYPE_TEXTURE_2D
	.comm	_WINED3D_MULTISAMPLE_NONE,4,2   ## @WINED3D_MULTISAMPLE_NONE
	.comm	_WINED3DUSAGE_SCRATCH,4,2       ## @WINED3DUSAGE_SCRATCH
	.comm	_WINED3DUSAGE_PRIVATE,4,2       ## @WINED3DUSAGE_PRIVATE
	.comm	_WINED3D_RESOURCE_ACCESS_CPU,4,2 ## @WINED3D_RESOURCE_ACCESS_CPU
	.comm	_WINED3D_RESOURCE_ACCESS_MAP_R,4,2 ## @WINED3D_RESOURCE_ACCESS_MAP_R
	.comm	_WINED3D_RESOURCE_ACCESS_MAP_W,4,2 ## @WINED3D_RESOURCE_ACCESS_MAP_W
	.comm	_WINED3D_TEXTURE_CREATE_MAPPABLE,4,2 ## @WINED3D_TEXTURE_CREATE_MAPPABLE
	.comm	_WINED3D_TEXTURE_CREATE_DISCARD,4,2 ## @WINED3D_TEXTURE_CREATE_DISCARD
	.comm	_wined3d_null_parent_ops,4,2    ## @wined3d_null_parent_ops
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create a destination texture for conversion.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to load the source sub-resource into %s.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to load the destination sub-resource into %s.\n"

	.comm	_GL_PIXEL_UNPACK_BUFFER,4,2     ## @GL_PIXEL_UNPACK_BUFFER
	.comm	_WINED3D_MAP_READ,4,2           ## @WINED3D_MAP_READ
	.comm	_WINED3D_MAP_WRITE,4,2          ## @WINED3D_MAP_WRITE
L_.str.4:                               ## @.str.4
	.asciz	"Using upload conversion.\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_WINED3D_LOCATION_TEXTURE_RGB,4,2 ## @WINED3D_LOCATION_TEXTURE_RGB
	.no_dead_strip	_surface_convert_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function surface_convert_format
_surface_convert_format:                ; @surface_convert_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x25, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w24, [x0]
	ldp	x23, x21, [x0, #24]
	ldr	w0, [x21, #8]
	ldr	w1, [x2, #8]
	bl	_find_converter
	mov	x19, x0
	cbz	x0, LBB0_3
LBB0_1:
	udiv	w8, w20, w24
	msub	w24, w8, w24, w20
Lloh0:
	adrp	x8, _WINED3D_RTYPE_TEXTURE_2D@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_RTYPE_TEXTURE_2D@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #96]
Lloh3:
	adrp	x8, _WINED3D_MULTISAMPLE_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WINED3D_MULTISAMPLE_NONE@GOTPAGEOFF]
	ldr	w9, [x25, #8]
Lloh5:
	ldr	w8, [x8]
	stp	w8, w9, [sp, #88]
Lloh6:
	adrp	x8, _WINED3DUSAGE_SCRATCH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WINED3DUSAGE_SCRATCH@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _WINED3DUSAGE_PRIVATE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WINED3DUSAGE_PRIVATE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _WINED3D_RESOURCE_ACCESS_CPU@GOTPAGE
Lloh13:
	ldr	x10, [x10, _WINED3D_RESOURCE_ACCESS_CPU@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh14:
	ldr	w9, [x10]
Lloh15:
	adrp	x10, _WINED3D_RESOURCE_ACCESS_MAP_R@GOTPAGE
Lloh16:
	ldr	x10, [x10, _WINED3D_RESOURCE_ACCESS_MAP_R@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh18:
	adrp	x10, _WINED3D_RESOURCE_ACCESS_MAP_W@GOTPAGE
Lloh19:
	ldr	x10, [x10, _WINED3D_RESOURCE_ACCESS_MAP_W@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w9, w9, w10
	stp	w8, w9, [sp, #48]
	mov	x0, x22
	mov	x1, x24
	bl	_wined3d_texture_get_level_width
	str	w0, [sp, #64]
	mov	x0, x22
	mov	x1, x24
	bl	_wined3d_texture_get_level_height
	mov	w8, #1
	stp	w8, w0, [sp, #56]
Lloh21:
	adrp	x8, _WINED3D_TEXTURE_CREATE_MAPPABLE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WINED3D_TEXTURE_CREATE_MAPPABLE@GOTPAGEOFF]
	stp	xzr, xzr, [sp, #72]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _WINED3D_TEXTURE_CREATE_DISCARD@GOTPAGE
Lloh25:
	ldr	x9, [x9, _WINED3D_TEXTURE_CREATE_DISCARD@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w4, w9, w8
	sub	x8, x29, #80
	str	x8, [sp]
Lloh27:
	adrp	x7, _wined3d_null_parent_ops@GOTPAGE
Lloh28:
	ldr	x7, [x7, _wined3d_null_parent_ops@GOTPAGEOFF]
	add	x1, sp, #48
	mov	x0, x23
	mov	w2, #1
	mov	w3, #1
	mov	x5, #0
	mov	x6, #0
	bl	_wined3d_texture_create
	bl	_FAILED
	cbz	x0, LBB0_7
; %bb.2:
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	mov	x0, #0
	b	LBB0_18
LBB0_3:
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w0, [x21, #24]
	bl	_is_identity_fixup
	cbz	w0, LBB0_6
; %bb.5:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_20
LBB0_6:
	ldr	w0, [x21, #8]
	bl	_debug_d3dformat
	mov	x19, x0
	ldr	w0, [x25, #8]
	bl	_debug_d3dformat
	mov	x2, x0
Lloh31:
	adrp	x0, l_.str@PAGE
Lloh32:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_FIXME
	mov	x0, #0
	b	LBB0_18
LBB0_7:
	ldr	x8, [x23]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x23
	mov	x1, #0
	mov	w2, #0
	bl	_context_acquire
	mov	x23, x0
	ldr	x25, [x0]
	b	LBB0_10
LBB0_9:
	mov	x25, #0
	mov	x23, #0
LBB0_10:
	ldr	w26, [x22, #16]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	mov	x3, x26
	bl	_wined3d_texture_load_location
	cbnz	w0, LBB0_12
; %bb.11:
	mov	x0, x26
	bl	_wined3d_debug_location
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh33:
	adrp	x0, l_.str.2@PAGE
Lloh34:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
LBB0_12:
	sub	x2, x29, #68
	sub	x3, x29, #72
	mov	x0, x22
	mov	x1, x24
	bl	_wined3d_texture_get_pitch
	sub	x2, x29, #88
	mov	x0, x22
	mov	x1, x20
	mov	x3, x26
	bl	_wined3d_texture_get_memory
	cbz	x19, LBB0_19
; %bb.13:
	ldur	x0, [x29, #-80]
	ldr	w21, [x0, #16]
	mov	w1, #0
	mov	x2, x23
	mov	x3, x21
	bl	_wined3d_texture_load_location
	cbnz	w0, LBB0_15
; %bb.14:
	mov	x0, x21
	bl	_wined3d_debug_location
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ERR
LBB0_15:
	ldur	x0, [x29, #-80]
	add	x2, sp, #24
	add	x3, sp, #16
	mov	w1, #0
	bl	_wined3d_texture_get_pitch
	ldur	x0, [x29, #-80]
	add	x2, sp, #40
	mov	w1, #0
	mov	x3, x21
	bl	_wined3d_texture_get_memory
	ldr	x8, [x22, #8]
	add	x8, x8, w20, uxtw #3
	ldr	w2, [x8, #4]
Lloh37:
	adrp	x22, _GL_PIXEL_UNPACK_BUFFER@GOTPAGE
Lloh38:
	ldr	x22, [x22, _GL_PIXEL_UNPACK_BUFFER@GOTPAGEOFF]
	ldr	w3, [x22]
Lloh39:
	adrp	x8, _WINED3D_MAP_READ@GOTPAGE
Lloh40:
	ldr	x8, [x8, _WINED3D_MAP_READ@GOTPAGEOFF]
Lloh41:
	ldr	w4, [x8]
	sub	x1, x29, #88
	mov	x0, x23
	bl	_context_map_bo_address
	mov	x20, x0
	ldur	x8, [x29, #-80]
	ldr	x8, [x8, #8]
	ldr	w2, [x8, #4]
	ldr	w3, [x22]
Lloh42:
	adrp	x8, _WINED3D_MAP_WRITE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _WINED3D_MAP_WRITE@GOTPAGEOFF]
Lloh44:
	ldr	w4, [x8]
	add	x1, sp, #40
	mov	x0, x23
	bl	_context_map_bo_address
	mov	x1, x0
	ldr	x8, [x19]
	ldur	w2, [x29, #-68]
	ldr	w3, [sp, #24]
	ldp	w5, w4, [sp, #60]
	mov	x0, x20
	blr	x8
	ldur	x0, [x29, #-80]
	mvn	w2, w21
	mov	w1, #0
	bl	_wined3d_texture_invalidate_location
	ldr	w2, [x22]
	add	x1, sp, #40
	mov	x0, x23
	bl	_context_unmap_bo_address
	ldr	w2, [x22]
	sub	x1, x29, #88
	mov	x0, x23
	bl	_context_unmap_bo_address
	cbz	x23, LBB0_17
LBB0_16:
	mov	x0, x23
	bl	_context_release
LBB0_17:
	ldur	x0, [x29, #-80]
LBB0_18:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_19:
	stp	xzr, xzr, [sp, #16]
	ldur	d0, [sp, #60]
	rev64.2s	v0, v0
	str	d0, [sp, #32]
Lloh45:
	adrp	x0, l_.str.4@PAGE
Lloh46:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_TRACE
	ldur	x0, [x29, #-80]
Lloh47:
	adrp	x22, _FALSE@GOTPAGE
Lloh48:
	ldr	x22, [x22, _FALSE@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x1, x23
	bl	_wined3d_texture_prepare_texture
	ldur	x0, [x29, #-80]
	ldr	w2, [x22]
	mov	x1, x23
	bl	_wined3d_texture_bind_and_dirtify
	ldur	x8, [x29, #-80]
	ldr	x8, [x8, #8]
	ldr	w19, [x8]
	ldur	w20, [x29, #-68]
	ldr	w22, [x22]
	sub	x0, x29, #88
	bl	_wined3d_const_bo_address
	mov	x7, x0
	add	x3, sp, #24
	add	x5, sp, #16
	mov	x0, x19
	mov	x1, x25
	mov	x2, x21
	mov	x4, x20
	mov	x6, x22
	bl	_wined3d_surface_upload_data
	ldur	x0, [x29, #-80]
Lloh49:
	adrp	x19, _WINED3D_LOCATION_TEXTURE_RGB@GOTPAGE
Lloh50:
	ldr	x19, [x19, _WINED3D_LOCATION_TEXTURE_RGB@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	w1, #0
	bl	_wined3d_texture_validate_location
	ldur	x0, [x29, #-80]
	ldr	w8, [x19]
	mvn	w2, w8
	mov	w1, #0
	bl	_wined3d_texture_invalidate_location
	cbnz	x23, LBB0_16
	b	LBB0_17
LBB0_20:
	ldr	w0, [x25, #24]
	bl	_is_identity_fixup
	cbz	w0, LBB0_6
; %bb.21:
	ldr	x8, [x25, #16]
	cbnz	x8, LBB0_6
; %bb.22:
	ldr	x8, [x21]
Lloh51:
	adrp	x9, _WINED3D_GL_RES_TYPE_TEX_2D@GOTPAGE
Lloh52:
	ldr	x9, [x9, _WINED3D_GL_RES_TYPE_TEX_2D@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh54:
	adrp	x9, _WINED3DFMT_FLAG_COMPRESSED@GOTPAGE
Lloh55:
	ldr	x9, [x9, _WINED3DFMT_FLAG_COMPRESSED@GOTPAGEOFF]
Lloh56:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
	b	LBB0_1
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_GL_RES_TYPE_TEX_2D,8,3 ; @WINED3D_GL_RES_TYPE_TEX_2D
	.comm	_WINED3DFMT_FLAG_COMPRESSED,4,2 ; @WINED3DFMT_FLAG_COMPRESSED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot find a conversion function from format %s to %s.\n"

	.comm	_WINED3D_RTYPE_TEXTURE_2D,4,2   ; @WINED3D_RTYPE_TEXTURE_2D
	.comm	_WINED3D_MULTISAMPLE_NONE,4,2   ; @WINED3D_MULTISAMPLE_NONE
	.comm	_WINED3DUSAGE_SCRATCH,4,2       ; @WINED3DUSAGE_SCRATCH
	.comm	_WINED3DUSAGE_PRIVATE,4,2       ; @WINED3DUSAGE_PRIVATE
	.comm	_WINED3D_RESOURCE_ACCESS_CPU,4,2 ; @WINED3D_RESOURCE_ACCESS_CPU
	.comm	_WINED3D_RESOURCE_ACCESS_MAP_R,4,2 ; @WINED3D_RESOURCE_ACCESS_MAP_R
	.comm	_WINED3D_RESOURCE_ACCESS_MAP_W,4,2 ; @WINED3D_RESOURCE_ACCESS_MAP_W
	.comm	_WINED3D_TEXTURE_CREATE_MAPPABLE,4,2 ; @WINED3D_TEXTURE_CREATE_MAPPABLE
	.comm	_WINED3D_TEXTURE_CREATE_DISCARD,4,2 ; @WINED3D_TEXTURE_CREATE_DISCARD
	.comm	_wined3d_null_parent_ops,4,2    ; @wined3d_null_parent_ops
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create a destination texture for conversion.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to load the source sub-resource into %s.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to load the destination sub-resource into %s.\n"

	.comm	_GL_PIXEL_UNPACK_BUFFER,4,2     ; @GL_PIXEL_UNPACK_BUFFER
	.comm	_WINED3D_MAP_READ,4,2           ; @WINED3D_MAP_READ
	.comm	_WINED3D_MAP_WRITE,4,2          ; @WINED3D_MAP_WRITE
l_.str.4:                               ; @.str.4
	.asciz	"Using upload conversion.\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_WINED3D_LOCATION_TEXTURE_RGB,4,2 ; @WINED3D_LOCATION_TEXTURE_RGB
	.no_dead_strip	_surface_convert_format
.subsections_via_symbols
