	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function sample_2d_linear_mipmap_linear
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x5f000000                      ## float 9.22337203E+18
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_sample_2d_linear_mipmap_linear:        ## @sample_2d_linear_mipmap_linear
	.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	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, %rdx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %r15
	cmpq	%r12, %r15
	jbe	LBB0_8
## %bb.1:
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%r9, -112(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	16(%rbp), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_frac
	movq	%rax, %r13
	testq	%r12, %r12
	js	LBB0_2
## %bb.3:
	cvtsi2ss	%r12, %xmm0
	jmp	LBB0_4
LBB0_8:
	movq	(%rax,%r15,8), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rcx
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sample_2d_linear               ## TAILCALL
LBB0_2:
	movq	%r12, %rax
	shrq	%rax
	andl	$1, %r12d
	orq	%rax, %r12
	cvtsi2ss	%r12, %xmm0
	addss	%xmm0, %xmm0
LBB0_4:
	addss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %rax
	movq	%rax, %rcx
	sarq	$63, %rcx
	subss	LCPI0_1(%rip), %xmm0
	cvttss2si	%xmm0, %rdi
	andq	%rcx, %rdi
	orq	%rax, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	callq	_CLAMP
	movq	%rax, %r15
	movq	(%r14), %rax
	movq	-8(%rax,%r15,8), %rsi
	leaq	-60(%rbp), %rax
	leaq	-64(%rbp), %r10
	leaq	-72(%rbp), %r8
	leaq	-68(%rbp), %r9
	movq	%r14, %rdi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	%rbx, %rcx
	pushq	%rax
	pushq	%r10
	callq	_sample_2d_linear
	addq	$16, %rsp
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rsi
	leaq	-44(%rbp), %rax
	leaq	-48(%rbp), %r10
	leaq	-56(%rbp), %r8
	leaq	-52(%rbp), %r9
	movq	%r14, %rdi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	pushq	%rax
	pushq	%r10
	callq	_sample_2d_linear
	addq	$16, %rsp
	testq	%r13, %r13
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	js	LBB0_5
## %bb.6:
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13, %xmm0
	jmp	LBB0_7
LBB0_5:
	movq	%r13, %rax
	shrq	%rax
	andl	$1, %r13d
	orq	%rax, %r13
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13, %xmm0
	addss	%xmm0, %xmm0
LBB0_7:
	movss	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm3
	movss	-56(%rbp), %xmm1                ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	-72(%rbp), %xmm2                ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm3, %xmm2
	addss	%xmm1, %xmm2
	movss	%xmm2, (%rdx)
	movss	-52(%rbp), %xmm1                ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	-68(%rbp), %xmm2                ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm3, %xmm2
	addss	%xmm1, %xmm2
	movss	%xmm2, (%rcx)
	movss	-48(%rbp), %xmm1                ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	-64(%rbp), %xmm2                ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm3, %xmm2
	addss	%xmm1, %xmm2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movss	%xmm2, (%rax)
	mulss	-44(%rbp), %xmm0
	mulss	-60(%rbp), %xmm3
	addss	%xmm0, %xmm3
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movss	%xmm3, (%rax)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_sample_2d_linear_mipmap_linear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sample_2d_linear_mipmap_linear
_sample_2d_linear_mipmap_linear:        ; @sample_2d_linear_mipmap_linear
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x19, x7
	mov	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	ldr	x8, [x0]
	ldr	x9, [x8]
	ldr	x26, [x9]
	cmp	x26, x3
	b.ls	LBB0_2
; %bb.1:
	mov	x27, x3
	mov	x0, x3
	bl	_frac
	mov	x28, x0
	ucvtf	s0, x27
	fmov	s8, #1.00000000
	fadd	s0, s0, s8
	fcvtzu	x0, s0
	mov	w1, #1
	mov	x2, x26
	bl	_CLAMP
	ldr	x8, [x25]
	lsl	x26, x0, #3
	add	x8, x26, x8
	ldur	x1, [x8, #-8]
	add	x4, sp, #28
	add	x5, sp, #24
	add	x6, sp, #20
	add	x7, sp, #16
	mov	x0, x25
	mov	x2, x24
	mov	x3, x23
	bl	_sample_2d_linear
	ldr	x8, [x25]
	ldr	x1, [x8, x26]
	add	x4, sp, #12
	add	x5, sp, #8
	add	x6, sp, #4
	mov	x7, sp
	mov	x0, x25
	mov	x2, x24
	mov	x3, x23
	bl	_sample_2d_linear
	ucvtf	s0, x28
	fsub	s1, s8, s0
	ldr	s2, [sp, #28]
	ldr	s3, [sp, #12]
	fmul	s3, s3, s0
	fmadd	s2, s1, s2, s3
	str	s2, [x22]
	ldr	s2, [sp, #24]
	ldr	s3, [sp, #8]
	fmul	s3, s3, s0
	fmadd	s2, s1, s2, s3
	str	s2, [x21]
	ldr	s2, [sp, #20]
	ldr	s3, [sp, #4]
	fmul	s3, s3, s0
	fmadd	s2, s1, s2, s3
	str	s2, [x20]
	ldr	s2, [sp, #16]
	ldr	s3, [sp]
	fmul	s0, s3, s0
	fmadd	s0, s1, s2, s0
	str	s0, [x19]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_2:
	ldr	x1, [x8, x26, lsl #3]
	mov	x0, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x6, x20
	mov	x7, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_sample_2d_linear
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_sample_2d_linear_mipmap_linear
.subsections_via_symbols
