	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function closestFit
LCPI0_0:
	.quad	0x3ff199999999999a              ## double 1.1000000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_closestFit:                            ## @closestFit
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %r14
	movq	16(%rbp), %r12
	movq	_GL_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glGetString
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_strtod
	ucomisd	LCPI0_0(%rip), %xmm0
	jb	LBB0_10
## %bb.1:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_nearestPower
	movq	%rax, %r13
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_nearestPower
	movq	%rax, %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %r14
	cmpq	$2, %r13
	setge	%cl
	movq	%r13, %r15
	sarq	%cl, %r15
	cmpq	$2, %r12
	setge	%cl
	sarq	%cl, %r12
	xorl	%edi, %edi
	testq	%r15, %r15
	setg	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r12, %r12
	setg	%dil
	callq	_assert
	movq	_GL_PROXY_TEXTURE_2D@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rcx, %rbx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GL_TEXTURE_1D@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	sete	%al
	movq	_GL_PROXY_TEXTURE_1D@GOTPCREL(%rip), %rbx
	cmpq	%rcx, (%rbx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	(%rbx), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	pushq	$0
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_glTexImage1D
	addq	$16, %rsp
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	movq	%r12, %r8
	xorl	%r9d, %r9d
	pushq	$0
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_glTexImage2D
	addq	$32, %rsp
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_GL_TEXTURE_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %esi
	leaq	-104(%rbp), %rcx
	callq	_glGetTexLevelParameteriv
	cmpq	$0, -104(%rbp)
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$1, %r13
	movq	%r15, %r13
	jne	LBB0_2
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %r13
	cmpq	$1, %r14
	jne	LBB0_2
## %bb.9:
	movq	24(%rbp), %r14
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	16(%rbp), %r12
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
LBB0_10:
	movq	_GL_MAX_TEXTURE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-72(%rbp), %rsi
	callq	_glGetIntegerv
	movq	%rbx, %rdi
	callq	_nearestPower
	movq	-72(%rbp), %rcx
	cmpq	%rcx, %rax
	cmovlq	%rax, %rcx
	movq	%rcx, (%r12)
	movq	%r15, %rdi
	callq	_nearestPower
	movq	-72(%rbp), %rcx
	cmpq	%rcx, %rax
	cmovlq	%rax, %rcx
	movq	%rcx, (%r14)
	jmp	LBB0_11
LBB0_12:
	movq	16(%rbp), %rax
	movq	%r13, (%rax)
	movq	24(%rbp), %rax
	movq	%r14, (%rax)
LBB0_11:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_VERSION,4,2                 ## @GL_VERSION
	.comm	_GL_TEXTURE_2D,8,3              ## @GL_TEXTURE_2D
	.comm	_GL_PROXY_TEXTURE_2D,8,3        ## @GL_PROXY_TEXTURE_2D
	.comm	_GL_TEXTURE_1D,8,3              ## @GL_TEXTURE_1D
	.comm	_GL_PROXY_TEXTURE_1D,8,3        ## @GL_PROXY_TEXTURE_1D
	.comm	_GL_TEXTURE_WIDTH,4,2           ## @GL_TEXTURE_WIDTH
	.comm	_GL_MAX_TEXTURE_SIZE,4,2        ## @GL_MAX_TEXTURE_SIZE
	.comm	_GL_PROXY_TEXTURE_CUBE_MAP_ARB,8,3 ## @GL_PROXY_TEXTURE_CUBE_MAP_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,8,3 ## @GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB,8,3 ## @GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB,8,3 ## @GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,8,3 ## @GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,8,3 ## @GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,8,3 ## @GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB
	.no_dead_strip	_closestFit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function closestFit
_closestFit:                            ; @closestFit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, x7
	mov	x20, x6
	mov	x23, x5
	mov	x24, x4
	mov	x25, x3
	mov	x21, x2
	mov	x22, x1
	mov	x26, x0
Lloh0:
	adrp	x8, _GL_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_glGetString
	mov	x1, #0
	bl	_strtod
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16369, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.lt	LBB0_9
; %bb.1:
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	str	x22, [sp, #16]                  ; 8-byte Folded Spill
	mov	x0, x22
	bl	_nearestPower
	mov	x27, x0
	str	x21, [sp, #24]                  ; 8-byte Folded Spill
	mov	x0, x21
	bl	_nearestPower
	mov	x21, x0
Lloh3:
	adrp	x22, _GL_PROXY_TEXTURE_1D@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GL_PROXY_TEXTURE_1D@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x28, x21
	cmp	x27, #1
	cset	w8, gt
	asr	x19, x27, x8
	cmp	x21, #1
	cset	w8, gt
	asr	x21, x21, x8
	cmp	x19, #0
	cset	w0, gt
	bl	_assert
	cmp	x21, #0
	cset	w0, gt
	bl	_assert
Lloh5:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _GL_PROXY_TEXTURE_2D@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GL_PROXY_TEXTURE_2D@GOTPAGEOFF]
Lloh10:
	ldr	x20, [x9]
	cmp	x8, x26
	ccmp	x20, x26, #4, ne
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [sp]
	mov	x0, x20
	mov	w1, #1
	mov	x2, x25
	mov	x3, x19
	mov	x4, x21
	mov	w5, #0
	mov	x6, x24
	mov	x7, x23
	bl	_glTexImage2D
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh11:
	adrp	x8, _GL_TEXTURE_1D@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GL_TEXTURE_1D@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x8, x26
	ldr	x8, [x22]
	ccmp	x8, x26, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x20, [x22]
	mov	x0, x20
	mov	w1, #1
	mov	x2, x25
	mov	x3, x19
	mov	w4, #0
	mov	x5, x24
	mov	x6, x23
	mov	x7, #0
	bl	_glTexImage1D
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh14:
	adrp	x8, _GL_TEXTURE_WIDTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GL_TEXTURE_WIDTH@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x3, sp, #56
	mov	x0, x20
	mov	w1, #1
	bl	_glGetTexLevelParameteriv
	ldr	x8, [sp, #56]
	cbnz	x8, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x27, #1
	mov	x27, x19
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, x19
	cmp	x28, #1
	b.ne	LBB0_2
; %bb.8:
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
LBB0_9:
Lloh17:
	adrp	x8, _GL_MAX_TEXTURE_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GL_MAX_TEXTURE_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, sp, #48
	bl	_glGetIntegerv
	mov	x0, x22
	bl	_nearestPower
	ldr	x8, [sp, #48]
	cmp	x0, x8
	csel	x8, x0, x8, lt
	str	x8, [x20]
	mov	x0, x21
	bl	_nearestPower
	ldr	x8, [sp, #48]
	cmp	x0, x8
	csel	x8, x0, x8, lt
	str	x8, [x19]
	b	LBB0_11
LBB0_10:
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	str	x27, [x8]
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	str	x28, [x8]
LBB0_11:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_VERSION,4,2                 ; @GL_VERSION
	.comm	_GL_TEXTURE_2D,8,3              ; @GL_TEXTURE_2D
	.comm	_GL_PROXY_TEXTURE_2D,8,3        ; @GL_PROXY_TEXTURE_2D
	.comm	_GL_TEXTURE_1D,8,3              ; @GL_TEXTURE_1D
	.comm	_GL_PROXY_TEXTURE_1D,8,3        ; @GL_PROXY_TEXTURE_1D
	.comm	_GL_TEXTURE_WIDTH,4,2           ; @GL_TEXTURE_WIDTH
	.comm	_GL_MAX_TEXTURE_SIZE,4,2        ; @GL_MAX_TEXTURE_SIZE
	.comm	_GL_PROXY_TEXTURE_CUBE_MAP_ARB,8,3 ; @GL_PROXY_TEXTURE_CUBE_MAP_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,8,3 ; @GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB,8,3 ; @GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB,8,3 ; @GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,8,3 ; @GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,8,3 ; @GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB
	.comm	_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,8,3 ; @GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB
	.no_dead_strip	_closestFit
.subsections_via_symbols
