	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function context_set_fbo_key_for_render_target
_context_set_fbo_key_for_render_target: ## @context_set_fbo_key_for_render_target
	.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, %r13d
	movq	%rsi, %r14
	movq	24(%rcx), %r15
	testq	%r15, %r15
	je	LBB0_7
## %bb.1:
	movq	%rcx, %rbx
	movq	%rdi, %rsi
	movq	(%r15), %rdi
	movq	8(%r15), %rax
	movq	(%rax), %rcx
	movq	_WINED3DFMT_NULL@GOTPCREL(%rip), %rdx
	movq	_WINED3D_RTYPE_BUFFER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.5:
	cmpq	%rax, %rdi
	movq	%rax, %rdi
	je	LBB0_6
	jmp	LBB0_7
LBB0_2:
	cmpq	%rax, %rdi
	jne	LBB0_3
LBB0_6:
	callq	_debug_d3dresourcetype
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_FIXME
LBB0_7:
	movq	8(%r14), %rax
	movl	%r13d, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	movq	$0, 16(%rax,%rcx,8)
	movl	$0, 8(%rax,%rcx,8)
	movq	$0, (%rax,%rcx,8)
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	8(%r14), %rcx
	movl	%r13d, %edx
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rax, 16(%rcx,%rdx,8)
	movl	8(%rbx), %eax
	movl	%eax, 8(%rcx,%rdx,8)
	movl	$0, (%rcx,%rdx,8)
	movq	_WINED3D_ALL_LAYERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rcx,%rdx,8)
	jmp	LBB0_21
LBB0_8:
	movl	%r8d, %r12d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_wined3d_texture_from_resource
	movq	%rax, %rdi
	movq	(%r15), %rax
	movq	_WINED3D_RTYPE_TEXTURE_2D@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.9:
	movq	24(%rdi), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	(%rax), %rax
	movq	8(%r14), %rdx
	movl	%r13d, %ecx
	leaq	(%rcx,%rcx,2), %rsi
	movq	%rax, 16(%rdx,%rsi,8)
	movl	$0, 8(%rdx,%rsi,8)
	movl	$1, %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	movq	$0, (%rdx,%rsi,8)
	orl	%eax, (%r14)
	jmp	LBB0_21
LBB0_11:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_wined3d_texture_get_sub_resource_target
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%r14), %rcx
	movl	%r13d, %edx
	leaq	(%rdx,%rdx,2), %r8
	movl	%eax, 8(%rcx,%r8,8)
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	(%rdi)
	movl	%edx, (%rcx,%r8,8)
	leaq	(%rcx,%r8,8), %rdx
	addq	$4, %rdx
	movl	%eax, 4(%rcx,%r8,8)
	cmpl	$1, 4(%rbx)
	je	LBB0_13
## %bb.12:
	movq	_WINED3D_ALL_LAYERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx)
LBB0_13:
	addl	$-128, %r12d
	cmpl	$3, %r12d
	ja	LBB0_21
## %bb.14:
	leaq	(%rcx,%r8,8), %rax
	addq	$8, %rax
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%r12,4), %rbx
	addq	%rsi, %rbx
	jmpq	*%rbx
LBB0_17:
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r8, %rbx
	callq	_wined3d_texture_get_texture_name
	movq	8(%r14), %rcx
	movq	%rax, 16(%rcx,%rbx,8)
	jmp	LBB0_21
LBB0_19:
	movq	8(%rdi), %rsi
	jmp	LBB0_20
LBB0_18:
	movq	16(%rdi), %rsi
LBB0_20:
	movq	%rsi, 16(%rcx,%r8,8)
	movl	$0, (%rax)
	movl	$0, (%rdx)
	movl	$1, %edx
	movl	%r13d, %ecx
	shll	%cl, %edx
	movl	$0, -8(%rax)
	orl	%edx, (%r14)
	jmp	LBB0_21
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_17
	.long	L0_0_set_15
	.long	L0_0_set_19
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.comm	_WINED3DFMT_NULL,8,3            ## @WINED3DFMT_NULL
	.comm	_WINED3D_RTYPE_BUFFER,8,3       ## @WINED3D_RTYPE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not implemented for %s resources.\n"

	.comm	_WINED3D_ALL_LAYERS,8,3         ## @WINED3D_ALL_LAYERS
	.comm	_WINED3D_RTYPE_TEXTURE_2D,8,3   ## @WINED3D_RTYPE_TEXTURE_2D
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_context_set_fbo_key_for_render_target
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function context_set_fbo_key_for_render_target
_context_set_fbo_key_for_render_target: ; @context_set_fbo_key_for_render_target
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x19, x1
	ldr	x26, [x3, #24]
	cbz	x26, LBB0_5
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _WINED3DFMT_NULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3DFMT_NULL@GOTPAGEOFF]
	ldp	x0, x9, [x26]
	ldr	x9, [x9]
Lloh2:
	ldr	x10, [x8]
Lloh3:
	adrp	x8, _WINED3D_RTYPE_BUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WINED3D_RTYPE_BUFFER@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.2:
	cmp	x0, x8
	mov	x0, x8
	b.eq	LBB0_4
	b	LBB0_5
LBB0_3:
	cmp	x0, x8
	b.ne	LBB0_7
LBB0_4:
	bl	_debug_d3dresourcetype
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
LBB0_5:
	ldr	x8, [x19, #8]
	mov	w9, #24
	umaddl	x8, w20, w9, x8
	str	xzr, [x8, #16]
	str	wzr, [x8, #8]
	str	xzr, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x23, x3
	ldr	x8, [x3, #16]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	x9, [x19, #8]
	mov	w10, #24
	umaddl	x9, w20, w10, x9
	str	x8, [x9, #16]
	ldr	w8, [x23, #8]
	str	w8, [x9, #8]
Lloh8:
	adrp	x8, _WINED3D_ALL_LAYERS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WINED3D_ALL_LAYERS@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	stp	wzr, w8, [x9]
	b	LBB0_6
LBB0_9:
	mov	x22, x4
	ldr	w25, [x23]
	mov	x0, x26
	bl	_wined3d_texture_from_resource
	mov	x24, x0
	ldr	x8, [x26]
Lloh11:
	adrp	x9, _WINED3D_RTYPE_TEXTURE_2D@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WINED3D_RTYPE_TEXTURE_2D@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	ldr	x8, [x24, #24]
	ldr	x8, [x8, x25, lsl #3]
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	mov	w10, #24
	umaddl	x9, w20, w10, x9
	str	x8, [x9, #16]
	str	wzr, [x9, #8]
	str	xzr, [x9]
	b	LBB0_22
LBB0_12:
	mov	x0, x24
	mov	x1, x25
	bl	_wined3d_texture_get_sub_resource_target
	ldr	x10, [x19, #8]
	mov	w8, #24
	umaddl	x8, w20, w8, x10
	mov	x9, x8
	str	w0, [x9, #8]!
	ldr	w11, [x24]
	udiv	w12, w25, w11
	msub	w11, w12, w11, w25
	str	w11, [x8]
	mov	x11, x8
	str	w12, [x11, #4]!
	ldr	w12, [x23, #4]
	cmp	w12, #1
	b.eq	LBB0_14
; %bb.13:
Lloh14:
	adrp	x12, _WINED3D_ALL_LAYERS@GOTPAGE
Lloh15:
	ldr	x12, [x12, _WINED3D_ALL_LAYERS@GOTPAGEOFF]
Lloh16:
	ldr	x12, [x12]
	str	w12, [x11]
LBB0_14:
	sub	w11, w22, #128
	cmp	w11, #3
	b.hi	LBB0_6
; %bb.15:
	mov	w22, w20
Lloh17:
	adrp	x12, lJTI0_0@PAGE
Lloh18:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x13, LBB0_16
	ldrb	w14, [x12, x11]
	add	x13, x13, x14, lsl #2
	br	x13
LBB0_16:
Lloh19:
	adrp	x8, _TRUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh21:
	adrp	x8, _FALSE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_18:
	ldr	w2, [x8]
	mov	x0, x24
	mov	x1, x21
	bl	_wined3d_texture_get_texture_name
	ldr	x8, [x19, #8]
	mov	w9, #24
	madd	x8, x22, x9, x8
	str	x0, [x8, #16]
	b	LBB0_6
LBB0_19:
	ldr	x11, [x24, #8]
	b	LBB0_21
LBB0_20:
	ldr	x11, [x24, #16]
LBB0_21:
	mov	w12, #24
	madd	x10, x22, x12, x10
	str	x11, [x10, #16]
	str	wzr, [x9]
	str	xzr, [x8]
LBB0_22:
	mov	w8, #1
	lsl	w8, w8, w20
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_16-LBB0_16)>>2
	.byte	(LBB0_17-LBB0_16)>>2
	.byte	(LBB0_19-LBB0_16)>>2
	.byte	(LBB0_20-LBB0_16)>>2
                                        ; -- End function
	.comm	_WINED3DFMT_NULL,8,3            ; @WINED3DFMT_NULL
	.comm	_WINED3D_RTYPE_BUFFER,8,3       ; @WINED3D_RTYPE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not implemented for %s resources.\n"

	.comm	_WINED3D_ALL_LAYERS,8,3         ; @WINED3D_ALL_LAYERS
	.comm	_WINED3D_RTYPE_TEXTURE_2D,8,3   ; @WINED3D_RTYPE_TEXTURE_2D
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_context_set_fbo_key_for_render_target
.subsections_via_symbols
