	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function context_apply_fbo_entry
_context_apply_fbo_entry:               ## @context_apply_fbo_entry
	.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
	movq	_WINED3D_FBO_ENTRY_FLAG_ATTACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdx)
	je	LBB0_1
## %bb.12:
	movl	24(%rdx), %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_context_bind_fbo               ## TAILCALL
LBB0_1:
	movq	%rsi, %r12
	movq	8(%rdi), %r13
	movl	(%rdi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	4(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_GL_FRAMEBUFFER@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	24(%rdx), %edx
	movq	%rdi, %r14
	callq	_context_bind_fbo
	movq	24(%r13), %rax
	movq	_ARB_FRAMEBUFFER_NO_ATTACHMENTS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_3
## %bb.2:
	movq	(%r15), %rdi
	movq	_GL_FRAMEBUFFER_DEFAULT_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r13), %edx
	callq	_glFramebufferParameteri
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	(%r15), %rdi
	movq	_GL_FRAMEBUFFER_DEFAULT_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r13), %edx
	callq	_glFramebufferParameteri
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	(%r15), %rdi
	movq	_GL_FRAMEBUFFER_DEFAULT_LAYERS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_glFramebufferParameteri
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	(%r15), %rdi
	movq	_GL_FRAMEBUFFER_DEFAULT_SAMPLES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_glFramebufferParameteri
	movl	%eax, %edi
	callq	_GL_EXTCALL
LBB0_3:
	cmpl	$0, 16(%r13)
	movq	%r12, %rsi
	movq	%r13, %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_6
## %bb.4:
	movl	$4, %r13d
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%rcx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$2, %r8d
	shll	%cl, %r8d
	movq	16(%r15), %rax
	addq	%r13, %rax
	andl	8(%r15), %r8d
	movq	%r14, %rdi
	movq	%rbx, %r12
	movq	%rsi, %rbx
	movl	%ecx, %edx
	movq	%rax, %rcx
	callq	_context_attach_surface_fbo
	movq	%rbx, %rsi
	movq	%r12, %rbx
	movl	16(%r12), %eax
	addq	$4, %r13
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, %rcx
	cmpq	%rax, %rdx
	jb	LBB0_5
LBB0_6:
	movq	16(%r15), %rdx
	movl	(%r15), %r8d
	movl	8(%r15), %ecx
	andl	$1, %ecx
	movq	%r14, %rdi
	movq	%rsi, %r12
	callq	_context_attach_depth_stencil_fbo
	movq	_GL_NONE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	*(%rbx)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_context_set_draw_buffer
	movq	_GL_FRAMEBUFFER@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	je	LBB0_11
## %bb.7:
	movq	_GL_READ_FRAMEBUFFER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%r12, %rsi
	jne	LBB0_9
## %bb.8:
	movq	_GL_DRAW_FRAMEBUFFER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_10
LBB0_9:
	movq	%r14, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_10:
	callq	_context_bind_fbo
LBB0_11:
	movq	_WINED3D_FBO_ENTRY_FLAG_ATTACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_FBO_ENTRY_FLAG_ATTACHED,4,2 ## @WINED3D_FBO_ENTRY_FLAG_ATTACHED
	.comm	_GL_FRAMEBUFFER,8,3             ## @GL_FRAMEBUFFER
	.comm	_ARB_FRAMEBUFFER_NO_ATTACHMENTS,8,3 ## @ARB_FRAMEBUFFER_NO_ATTACHMENTS
	.comm	_GL_FRAMEBUFFER_DEFAULT_WIDTH,4,2 ## @GL_FRAMEBUFFER_DEFAULT_WIDTH
	.comm	_GL_FRAMEBUFFER_DEFAULT_HEIGHT,4,2 ## @GL_FRAMEBUFFER_DEFAULT_HEIGHT
	.comm	_GL_FRAMEBUFFER_DEFAULT_LAYERS,4,2 ## @GL_FRAMEBUFFER_DEFAULT_LAYERS
	.comm	_GL_FRAMEBUFFER_DEFAULT_SAMPLES,4,2 ## @GL_FRAMEBUFFER_DEFAULT_SAMPLES
	.comm	_GL_NONE,4,2                    ## @GL_NONE
	.comm	_GL_READ_FRAMEBUFFER,8,3        ## @GL_READ_FRAMEBUFFER
	.comm	_GL_DRAW_FRAMEBUFFER,8,3        ## @GL_DRAW_FRAMEBUFFER
	.no_dead_strip	_context_apply_fbo_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function context_apply_fbo_entry
_context_apply_fbo_entry:               ; @context_apply_fbo_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x2]
Lloh0:
	adrp	x24, _WINED3D_FBO_ENTRY_FLAG_ATTACHED@GOTPAGE
Lloh1:
	ldr	x24, [x24, _WINED3D_FBO_ENTRY_FLAG_ATTACHED@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w2, [x19, #24]
	mov	x0, x20
	mov	x1, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_context_bind_fbo
LBB0_2:
	ldr	x26, [x20, #8]
	ldp	w8, w23, [x20]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh2:
	adrp	x25, _GL_FRAMEBUFFER@GOTPAGE
Lloh3:
	ldr	x25, [x25, _GL_FRAMEBUFFER@GOTPAGEOFF]
	ldr	x1, [x25]
	ldr	w2, [x19, #24]
	mov	x0, x20
	bl	_context_bind_fbo
	ldr	x8, [x26, #24]
Lloh4:
	adrp	x9, _ARB_FRAMEBUFFER_NO_ATTACHMENTS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ARB_FRAMEBUFFER_NO_ATTACHMENTS@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x0, [x25]
Lloh7:
	adrp	x8, _GL_FRAMEBUFFER_DEFAULT_WIDTH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GL_FRAMEBUFFER_DEFAULT_WIDTH@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x26, #8]
	bl	_glFramebufferParameteri
	bl	_GL_EXTCALL
	ldr	x0, [x25]
Lloh10:
	adrp	x8, _GL_FRAMEBUFFER_DEFAULT_HEIGHT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GL_FRAMEBUFFER_DEFAULT_HEIGHT@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x26, #12]
	bl	_glFramebufferParameteri
	bl	_GL_EXTCALL
	ldr	x0, [x25]
Lloh13:
	adrp	x8, _GL_FRAMEBUFFER_DEFAULT_LAYERS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GL_FRAMEBUFFER_DEFAULT_LAYERS@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_glFramebufferParameteri
	bl	_GL_EXTCALL
	ldr	x0, [x25]
Lloh16:
	adrp	x8, _GL_FRAMEBUFFER_DEFAULT_SAMPLES@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GL_FRAMEBUFFER_DEFAULT_SAMPLES@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_glFramebufferParameteri
	bl	_GL_EXTCALL
LBB0_4:
	ldr	w8, [x26, #16]
	cbz	w8, LBB0_7
; %bb.5:
	mov	x2, #0
	mov	w27, #4
	mov	w28, #2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x22, x2, #1
	add	x3, x8, x27
	ldr	w8, [x19, #8]
	lsl	w9, w28, w2
	and	w4, w8, w9
	mov	x0, x20
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_context_attach_surface_fbo
	ldr	w8, [x26, #16]
	add	x27, x27, #4
	mov	x2, x22
	cmp	x22, x8
	b.lo	LBB0_6
LBB0_7:
	ldr	x2, [x19, #16]
	ldr	w8, [x19, #8]
	and	w3, w8, #0x1
	ldr	w4, [x19]
	mov	x0, x20
	mov	x1, x21
	bl	_context_attach_depth_stencil_fbo
	ldr	x8, [x26]
Lloh19:
	adrp	x22, _GL_NONE@GOTPAGE
Lloh20:
	ldr	x22, [x22, _GL_NONE@GOTPAGEOFF]
	ldr	w0, [x22]
	blr	x8
	ldr	w1, [x22]
	mov	x0, x20
	bl	_context_set_draw_buffer
	ldr	x8, [x25]
	cmp	x8, x21
	b.eq	LBB0_12
; %bb.8:
Lloh21:
	adrp	x8, _GL_READ_FRAMEBUFFER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GL_READ_FRAMEBUFFER@GOTPAGEOFF]
Lloh23:
	ldr	x1, [x8]
	cmp	x1, x21
	b.ne	LBB0_10
; %bb.9:
Lloh24:
	adrp	x8, _GL_DRAW_FRAMEBUFFER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _GL_DRAW_FRAMEBUFFER@GOTPAGEOFF]
Lloh26:
	ldr	x1, [x8]
	mov	x0, x20
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	b	LBB0_11
LBB0_10:
	mov	x0, x20
	mov	x2, x23
LBB0_11:
	bl	_context_bind_fbo
LBB0_12:
	ldr	w8, [x24]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_FBO_ENTRY_FLAG_ATTACHED,4,2 ; @WINED3D_FBO_ENTRY_FLAG_ATTACHED
	.comm	_GL_FRAMEBUFFER,8,3             ; @GL_FRAMEBUFFER
	.comm	_ARB_FRAMEBUFFER_NO_ATTACHMENTS,8,3 ; @ARB_FRAMEBUFFER_NO_ATTACHMENTS
	.comm	_GL_FRAMEBUFFER_DEFAULT_WIDTH,4,2 ; @GL_FRAMEBUFFER_DEFAULT_WIDTH
	.comm	_GL_FRAMEBUFFER_DEFAULT_HEIGHT,4,2 ; @GL_FRAMEBUFFER_DEFAULT_HEIGHT
	.comm	_GL_FRAMEBUFFER_DEFAULT_LAYERS,4,2 ; @GL_FRAMEBUFFER_DEFAULT_LAYERS
	.comm	_GL_FRAMEBUFFER_DEFAULT_SAMPLES,4,2 ; @GL_FRAMEBUFFER_DEFAULT_SAMPLES
	.comm	_GL_NONE,4,2                    ; @GL_NONE
	.comm	_GL_READ_FRAMEBUFFER,8,3        ; @GL_READ_FRAMEBUFFER
	.comm	_GL_DRAW_FRAMEBUFFER,8,3        ; @GL_DRAW_FRAMEBUFFER
	.no_dead_strip	_context_apply_fbo_entry
.subsections_via_symbols
