	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gl_update_texture_state        ## -- Begin function gl_update_texture_state
	.p2align	4, 0x90
_gl_update_texture_state:               ## @gl_update_texture_state
	.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	%rdi, %r14
	movl	(%rdi), %eax
	movq	_TEXTURE_2D@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	leaq	32(%r14), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_TEXTURE_1D@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.4:
	leaq	24(%r14), %rax
LBB0_5:
	movq	(%rax), %rax
LBB0_6:
	movq	%rax, 16(%r14)
	cmpq	$0, 8(%r14)
	je	LBB0_13
## %bb.7:
	movq	40(%r14), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.8:
	movq	_GL_FALSE@GOTPCREL(%rip), %r15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	callq	_gl_test_texture_object_completeness
	movq	%rbx, %rdi
	callq	_gl_set_texture_sampler
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_11
LBB0_12:
	movq	_GL_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_TEXTURE_2D,4,2                 ## @TEXTURE_2D
	.comm	_TEXTURE_1D,4,2                 ## @TEXTURE_1D
	.comm	_GL_FALSE,8,3                   ## @GL_FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gl_update_texture_state        ; -- Begin function gl_update_texture_state
	.p2align	2
_gl_update_texture_state:               ; @gl_update_texture_state
	.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
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TEXTURE_2D@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TEXTURE_2D@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	add	x8, x19, #32
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x9, _TEXTURE_1D@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TEXTURE_1D@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.3:
	add	x8, x19, #24
LBB0_4:
	ldr	x8, [x8]
LBB0_5:
	str	x8, [x19, #16]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x8, [x19, #40]
	ldr	x20, [x8]
Lloh6:
	adrp	x21, _GL_FALSE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _GL_FALSE@GOTPAGEOFF]
	cbnz	x20, LBB0_10
LBB0_7:
	ldr	x8, [x21]
	str	x8, [x19, #8]
LBB0_8:
	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
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x20, [x20, #8]
	cbz	x20, LBB0_7
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x20
	bl	_gl_test_texture_object_completeness
	mov	x0, x20
	bl	_gl_set_texture_sampler
	ldr	x8, [x21]
	str	x8, [x20]
	b	LBB0_9
LBB0_12:
	mov	x8, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TEXTURE_2D,4,2                 ; @TEXTURE_2D
	.comm	_TEXTURE_1D,4,2                 ; @TEXTURE_1D
	.comm	_GL_FALSE,8,3                   ; @GL_FALSE
.subsections_via_symbols
