	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_state_fb               ## -- Begin function context_state_fb
	.p2align	4, 0x90
_context_state_fb:                      ## @context_state_fb
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_find_draw_buffers_mask
	movq	%rax, %r14
	movq	_wined3d_settings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ORM_FBO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.1:
	cmpl	$0, 40(%r12)
	je	LBB0_2
## %bb.3:
	movq	(%r15), %rbx
	movq	24(%r12), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	32(%r12), %rax
	movl	(%rax), %ecx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.5:
	movq	%rbx, %r8
	movq	8(%rbx), %rax
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	xorl	%edx, %edx
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	addq	$8, %rax
	addq	$24, %rdx
	cmpq	%rdx, %rcx
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	16(%rsi), %edi
	movq	24(%r12), %rbx
	movl	%edi, 16(%rbx,%rdx)
	movq	(%rsi), %rsi
	movq	%rsi, 8(%rbx,%rdx)
	movq	(%rax), %rsi
	movl	12(%rsi), %edi
	movl	%edi, 4(%rbx,%rdx)
	movl	8(%rsi), %edi
	movl	%edi, (%rbx,%rdx)
	testq	%r15, %r15
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rsi), %rsi
	movq	(%rsi), %r15
	jmp	LBB0_9
LBB0_2:
	movq	_GL_FRAMEBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WINED3D_LOCATION_DRAWABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r8, %r9
	jmp	LBB0_14
LBB0_4:
	movq	%rbx, %r8
LBB0_10:
	movq	_GL_FRAMEBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	24(%r12), %r13
	movq	%r8, %rbx
	movq	(%r8), %rdi
	callq	_wined3d_rendertarget_view_get_surface
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.12:
	movq	(%rcx), %rcx
	movq	(%rcx), %r9
	jmp	LBB0_13
LBB0_11:
	xorl	%r9d, %r9d
LBB0_13:
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %rdx
	movq	%rax, %rcx
	movq	%r15, %r8
LBB0_14:
	callq	_context_apply_fbo_state
LBB0_15:
	movq	16(%r12), %rbx
	testq	%rbx, %rbx
	cmoveq	%r12, %rbx
	cmpq	(%rbx), %r14
	je	LBB0_17
## %bb.16:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_context_apply_draw_buffers
	movq	%r14, (%rbx)
LBB0_17:
	movq	_WINED3D_SHADER_CONST_PS_Y_CORR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wined3d_settings,8,3           ## @wined3d_settings
	.comm	_ORM_FBO,8,3                    ## @ORM_FBO
	.comm	_GL_FRAMEBUFFER,4,2             ## @GL_FRAMEBUFFER
	.comm	_WINED3D_LOCATION_DRAWABLE,8,3  ## @WINED3D_LOCATION_DRAWABLE
	.comm	_WINED3D_SHADER_CONST_PS_Y_CORR,4,2 ## @WINED3D_SHADER_CONST_PS_Y_CORR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_state_fb               ; -- Begin function context_state_fb
	.p2align	2
_context_state_fb:                      ; @context_state_fb
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
	bl	_find_draw_buffers_mask
	mov	x20, x0
Lloh0:
	adrp	x8, _wined3d_settings@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wined3d_settings@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _ORM_FBO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ORM_FBO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.1:
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_8
; %bb.2:
	ldr	x24, [x21]
	ldr	x0, [x19, #24]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19, #32]
	ldr	w10, [x8]
	cbz	w10, LBB0_9
; %bb.3:
	mov	x8, #0
	mov	x21, #0
	ldr	x9, [x24, #8]
	add	x10, x10, x10, lsl #1
	lsl	x10, x10, #3
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #8
	add	x8, x8, #24
	cmp	x10, x8
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9]
	cbz	x11, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w12, [x11, #16]
	ldr	x13, [x19, #24]
	add	x13, x13, x8
	str	w12, [x13, #16]
	ldr	x11, [x11]
	str	x11, [x13, #8]
	ldr	x11, [x9]
	ldr	d0, [x11, #8]
	str	d0, [x13]
	cbnz	x21, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [x11]
	ldr	x21, [x11]
	b	LBB0_4
LBB0_8:
Lloh6:
	adrp	x8, _GL_FRAMEBUFFER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GL_FRAMEBUFFER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _WINED3D_LOCATION_DRAWABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WINED3D_LOCATION_DRAWABLE@GOTPAGEOFF]
Lloh11:
	ldr	x4, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	x3, #0
	mov	x5, x4
	b	LBB0_14
LBB0_9:
	mov	x21, #0
LBB0_10:
Lloh12:
	adrp	x8, _GL_FRAMEBUFFER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GL_FRAMEBUFFER@GOTPAGEOFF]
Lloh14:
	ldr	w22, [x8]
	ldr	x23, [x19, #24]
	ldr	x0, [x24]
	bl	_wined3d_rendertarget_view_get_surface
	mov	x3, x0
	ldr	x8, [x24]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	x8, [x8]
	ldr	x5, [x8]
	b	LBB0_13
LBB0_12:
	mov	x5, #0
LBB0_13:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	x4, x21
LBB0_14:
	bl	_context_apply_fbo_state
LBB0_15:
	ldr	x8, [x19, #16]
	cmp	x8, #0
	csel	x21, x19, x8, eq
	ldr	x8, [x21]
	cmp	x20, x8
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x19
	mov	x1, x20
	bl	_context_apply_draw_buffers
	str	x20, [x21]
LBB0_17:
Lloh15:
	adrp	x8, _WINED3D_SHADER_CONST_PS_Y_CORR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WINED3D_SHADER_CONST_PS_Y_CORR@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_wined3d_settings,8,3           ; @wined3d_settings
	.comm	_ORM_FBO,8,3                    ; @ORM_FBO
	.comm	_GL_FRAMEBUFFER,4,2             ; @GL_FRAMEBUFFER
	.comm	_WINED3D_LOCATION_DRAWABLE,8,3  ; @WINED3D_LOCATION_DRAWABLE
	.comm	_WINED3D_SHADER_CONST_PS_Y_CORR,4,2 ; @WINED3D_SHADER_CONST_PS_Y_CORR
.subsections_via_symbols
