	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_BeginFrameCustomView        ## -- Begin function RE_BeginFrameCustomView
	.p2align	4, 0x90
_RE_BeginFrameCustomView:               ## @RE_BeginFrameCustomView
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_tr@GOTPCREL(%rip), %r14
	cmpl	$0, 16(%r14)
	je	LBB0_13
## %bb.1:
	movq	_glConfig@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_SwapVidAndBuff
	movq	(%rbx), %rax
	movq	%rax, 8(%r14)
	movq	_qfalse@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_glState@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_r_textureMode@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_R_IssuePendingRenderCommands
	movq	(%rbx), %rax
	movl	8(%rax), %edi
	callq	_GL_TextureMode
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
LBB0_3:
	movq	_r_gamma@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	(%r15), %rcx
	movq	%rcx, (%rax)
	xorl	%eax, %eax
	callq	_R_IssuePendingRenderCommands
	xorl	%eax, %eax
	callq	_R_SetColorMappings
LBB0_5:
	movq	_r_ignoreGLErrors@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	jne	LBB0_8
## %bb.6:
	xorl	%eax, %eax
	callq	_R_IssuePendingRenderCommands
	xorl	%eax, %eax
	callq	_qglGetError
	movq	_GL_NO_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.7:
	movq	_ri@GOTPCREL(%rip), %rcx
	movq	_ERR_FATAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	*(%rcx)
LBB0_8:
	movl	$8, %edi
	callq	_R_GetCommandBuffer
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%rax, %rbx
	movq	_RC_DRAW_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	_r_drawBuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_Q_stricmp
	testl	%eax, %eax
	jne	LBB0_10
## %bb.11:
	movq	_GL_FRONT@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_GL_BACK@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_STEREO_CENTER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tr,20,2                        ## @tr
	.comm	_glConfig,8,2                   ## @glConfig
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_glState,8,3                    ## @glState
	.comm	_r_textureMode,8,3              ## @r_textureMode
	.comm	_r_gamma,8,3                    ## @r_gamma
	.comm	_r_ignoreGLErrors,8,3           ## @r_ignoreGLErrors
	.comm	_GL_NO_ERROR,4,2                ## @GL_NO_ERROR
	.comm	_ri,8,3                         ## @ri
	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RE_BeginFrame() - glGetError() failed (0x%x)!"

	.comm	_RC_DRAW_BUFFER,4,2             ## @RC_DRAW_BUFFER
	.comm	_r_drawBuffer,8,3               ## @r_drawBuffer
L_.str.1:                               ## @.str.1
	.asciz	"GL_FRONT"

	.comm	_GL_FRONT,8,3                   ## @GL_FRONT
	.comm	_GL_BACK,8,3                    ## @GL_BACK
	.comm	_STEREO_CENTER,4,2              ## @STEREO_CENTER
	.comm	_qtrue,4,2                      ## @qtrue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_BeginFrameCustomView        ; -- Begin function RE_BeginFrameCustomView
	.p2align	2
_RE_BeginFrameCustomView:               ; @RE_BeginFrameCustomView
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x20, _tr@GOTPAGE
Lloh1:
	ldr	x20, [x20, _tr@GOTPAGEOFF]
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_10
; %bb.1:
Lloh2:
	adrp	x19, _glConfig@GOTPAGE
Lloh3:
	ldr	x19, [x19, _glConfig@GOTPAGEOFF]
	mov	x0, x19
	bl	_SwapVidAndBuff
	ldr	d0, [x19]
	str	d0, [x20, #8]
Lloh4:
	adrp	x19, _qfalse@GOTPAGE
Lloh5:
	ldr	x19, [x19, _qfalse@GOTPAGEOFF]
Lloh6:
	adrp	x8, _glState@GOTPAGE
Lloh7:
	ldr	x8, [x8, _glState@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh8:
	str	x9, [x8]
Lloh9:
	adrp	x21, _r_textureMode@GOTPAGE
Lloh10:
	ldr	x21, [x21, _r_textureMode@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	bl	_R_IssuePendingRenderCommands
	ldr	x8, [x21]
	ldr	w0, [x8, #8]
	bl	_GL_TextureMode
	ldr	x8, [x19]
	ldr	x9, [x21]
	str	x8, [x9]
LBB0_3:
Lloh11:
	adrp	x8, _r_gamma@GOTPAGE
Lloh12:
	ldr	x8, [x8, _r_gamma@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x8]
	cbz	x9, LBB0_5
; %bb.4:
	ldr	x9, [x19]
	str	x9, [x8]
	bl	_R_IssuePendingRenderCommands
	bl	_R_SetColorMappings
LBB0_5:
Lloh14:
	adrp	x8, _r_ignoreGLErrors@GOTPAGE
Lloh15:
	ldr	x8, [x8, _r_ignoreGLErrors@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbnz	w8, LBB0_8
; %bb.6:
	bl	_R_IssuePendingRenderCommands
	bl	_qglGetError
Lloh17:
	adrp	x8, _GL_NO_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GL_NO_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_8
; %bb.7:
	mov	x2, x0
Lloh20:
	adrp	x8, _ri@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _ERR_FATAL@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ERR_FATAL@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x9]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
LBB0_8:
	mov	w0, #8
	bl	_R_GetCommandBuffer
	cbz	x0, LBB0_10
; %bb.9:
	mov	x19, x0
Lloh28:
	adrp	x8, _RC_DRAW_BUFFER@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RC_DRAW_BUFFER@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [x0, #4]
Lloh31:
	adrp	x8, _r_drawBuffer@GOTPAGE
Lloh32:
	ldr	x8, [x8, _r_drawBuffer@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_Q_stricmp
Lloh36:
	adrp	x8, _GL_FRONT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _GL_FRONT@GOTPAGEOFF]
Lloh38:
	adrp	x9, _GL_BACK@GOTPAGE
Lloh39:
	ldr	x9, [x9, _GL_BACK@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x8, x9, eq
	ldr	x8, [x8]
	str	w8, [x19]
Lloh40:
	adrp	x8, _STEREO_CENTER@GOTPAGE
Lloh41:
	ldr	x8, [x8, _STEREO_CENTER@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
Lloh43:
	adrp	x9, _qtrue@GOTPAGE
Lloh44:
	ldr	x9, [x9, _qtrue@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	stp	w9, w8, [x20]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_tr,20,2                        ; @tr
	.comm	_glConfig,8,2                   ; @glConfig
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_glState,8,3                    ; @glState
	.comm	_r_textureMode,8,3              ; @r_textureMode
	.comm	_r_gamma,8,3                    ; @r_gamma
	.comm	_r_ignoreGLErrors,8,3           ; @r_ignoreGLErrors
	.comm	_GL_NO_ERROR,4,2                ; @GL_NO_ERROR
	.comm	_ri,8,3                         ; @ri
	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RE_BeginFrame() - glGetError() failed (0x%x)!"

	.comm	_RC_DRAW_BUFFER,4,2             ; @RC_DRAW_BUFFER
	.comm	_r_drawBuffer,8,3               ; @r_drawBuffer
l_.str.1:                               ; @.str.1
	.asciz	"GL_FRONT"

	.comm	_GL_FRONT,8,3                   ; @GL_FRONT
	.comm	_GL_BACK,8,3                    ; @GL_BACK
	.comm	_STEREO_CENTER,4,2              ; @STEREO_CENTER
	.comm	_qtrue,4,2                      ; @qtrue
.subsections_via_symbols
