	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GL_Bind                        ## -- Begin function GL_Bind
	.p2align	4, 0x90
_GL_Bind:                               ## @GL_Bind
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_PRINT_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	movq	_tr@GOTPCREL(%rip), %rax
	movq	16(%rax), %rcx
LBB0_3:
	movq	_r_nobind@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_tr@GOTPCREL(%rip), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	cmoveq	%rcx, %rsi
	cmpq	$0, (%rdx)
	cmoveq	%rcx, %rsi
	movl	(%rsi), %esi
	movq	_glState@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	movq	8(%rdx), %rdx
	cmpl	%esi, (%rcx,%rdx,4)
	jne	LBB0_5
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	%esi, (%rcx,%rdx,4)
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_qglBindTexture                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ri,8,3                         ## @ri
	.comm	_PRINT_WARNING,4,2              ## @PRINT_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GL_Bind: NULL image\n"

	.comm	_tr,24,3                        ## @tr
	.comm	_r_nobind,8,3                   ## @r_nobind
	.comm	_glState,16,3                   ## @glState
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GL_Bind                        ; -- Begin function GL_Bind
	.p2align	2
_GL_Bind:                               ; @GL_Bind
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _tr@GOTPAGE
Lloh1:
	ldr	x20, [x20, _tr@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x8, x19
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _ri@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _PRINT_WARNING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PRINT_WARNING@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x9]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	ldr	x8, [x20, #16]
LBB0_3:
Lloh10:
	adrp	x9, _r_nobind@GOTPAGE
Lloh11:
	ldr	x9, [x9, _r_nobind@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x10, [x20, #8]
	cmp	x10, #0
	ccmp	x9, #0, #4, ne
	csel	x8, x10, x8, ne
Lloh13:
	adrp	x9, _glState@GOTPAGE
Lloh14:
	ldr	x9, [x9, _glState@GOTPAGEOFF]
	ldr	w1, [x8]
	ldp	x8, x9, [x9]
	ldr	w10, [x8, x9, lsl #2]
	cmp	w10, w1
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w10, [x20]
	str	w10, [x19, #4]
	str	w1, [x8, x9, lsl #2]
Lloh15:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_qglBindTexture
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ri,8,3                         ; @ri
	.comm	_PRINT_WARNING,4,2              ; @PRINT_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GL_Bind: NULL image\n"

	.comm	_tr,24,3                        ; @tr
	.comm	_r_nobind,8,3                   ; @r_nobind
	.comm	_glState,16,3                   ; @glState
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
.subsections_via_symbols
