	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_degamma
_build_degamma:                         ## @build_degamma
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	-56(%rbp), %rdi
	movl	%ecx, %esi
	callq	_build_coefficients
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_NUM_PTS_IN_REGION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %ecx
	leal	(%rcx,%rcx,4), %r8d
	testl	%eax, %eax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.12:
	leal	(%rax,%rax,2), %ecx
	leal	(%rax,%rcx,4), %eax
	movl	%eax, %edx
	movl	%edx, %edi
	andl	$-2, %edi
	movq	_dc_fixpt_zero@GOTPCREL(%rip), %rcx
	movq	%rbx, %rsi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rbx
	movq	%rbx, 16(%rsi)
	movq	(%rcx), %rbx
	movq	%rbx, 8(%rsi)
	movq	(%rcx), %rbx
	movq	%rbx, (%rsi)
	movq	(%rcx), %rbx
	movq	%rbx, 40(%rsi)
	movq	(%rcx), %rbx
	movq	%rbx, 32(%rsi)
	movq	(%rcx), %rbx
	movq	%rbx, 24(%rsi)
	addq	$48, %rsi
	addq	$-2, %rdi
	jne	LBB0_13
## %bb.4:
	testb	$1, %dl
	je	LBB0_6
## %bb.5:
	movq	(%rcx), %rdx
	movq	%rdx, 16(%rsi)
	movq	(%rcx), %rdx
	movq	%rdx, 8(%rsi)
	movq	(%rcx), %rcx
	movq	%rcx, (%rsi)
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	movl	%r8d, %r14d
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	cmpl	%r8d, %eax
	je	LBB0_9
## %bb.7:
	movl	%eax, %r15d
	leaq	(%r15,%r15,2), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %r13
	addq	$16, %r13
	leaq	-56(%rbp), %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r15,4), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_translate_to_linear_space_ex
	movq	%rax, (%r13)
	movq	%rax, -8(%r13)
	movq	%rax, -16(%r13)
	incq	%r15
	addq	$24, %r13
	cmpq	%r15, %r14
	jne	LBB0_8
LBB0_9:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	leal	1(%rbx), %ecx
	movl	$1, %eax
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	cmpl	%ecx, %esi
	je	LBB0_18
## %bb.10:
	movl	%ebx, %ecx
	subl	%esi, %ecx
	incl	%ecx
	testb	$1, %cl
	jne	LBB0_14
## %bb.11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	cmpl	%ebx, %esi
	jne	LBB0_16
	jmp	LBB0_18
LBB0_14:
	movq	_dc_fixpt_one@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	leaq	(%r14,%r14,2), %r8
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, 16(%rdi,%r8,8)
	movq	(%rcx), %rdx
	movq	%rdx, 8(%rdi,%r8,8)
	movq	(%rcx), %rcx
	movq	%rcx, (%rdi,%r8,8)
	incq	%r14
	cmpl	%ebx, %esi
	je	LBB0_18
LBB0_16:
	movl	%ebx, %ecx
	leaq	(%r14,%r14,2), %rdx
	leaq	(%rdi,%rdx,8), %rdx
	addq	$40, %rdx
	subq	%r14, %rcx
	incq	%rcx
	movq	_dc_fixpt_one@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rdi
	movq	%rdi, -24(%rdx)
	movq	(%rsi), %rdi
	movq	%rdi, -32(%rdx)
	movq	(%rsi), %rdi
	movq	%rdi, -40(%rdx)
	movq	(%rsi), %rdi
	movq	%rdi, (%rdx)
	movq	(%rsi), %rdi
	movq	%rdi, -8(%rdx)
	movq	(%rsi), %rdi
	movq	%rdi, -16(%rdx)
	addq	$48, %rdx
	addq	$-2, %rcx
	jne	LBB0_17
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_PTS_IN_REGION,4,2          ## @NUM_PTS_IN_REGION
	.comm	_dc_fixpt_zero,8,3              ## @dc_fixpt_zero
	.comm	_dc_fixpt_one,8,3               ## @dc_fixpt_one
	.no_dead_strip	_build_degamma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_degamma
_build_degamma:                         ; @build_degamma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	add	x0, sp, #8
	mov	x1, x3
	bl	_build_coefficients
	cbz	w0, LBB0_21
; %bb.1:
Lloh0:
	adrp	x8, _NUM_PTS_IN_REGION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_PTS_IN_REGION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #25
	mul	w22, w8, w9
	cbz	w8, LBB0_8
; %bb.2:
	mov	w9, #13
	mul	w8, w8, w9
Lloh3:
	adrp	x9, _dc_fixpt_zero@GOTPAGE
Lloh4:
	ldr	x9, [x9, _dc_fixpt_zero@GOTPAGEOFF]
	cmp	w8, #2
	b.lo	LBB0_5
; %bb.3:
	add	x10, x9, #8
	cmp	x19, x10
	b.hs	LBB0_22
; %bb.4:
	mov	w10, #24
	madd	x10, x8, x10, x19
	cmp	x10, x9
	b.ls	LBB0_22
LBB0_5:
	mov	x10, #0
LBB0_6:
	mov	w11, #24
	madd	x11, x10, x11, x19
	add	x11, x11, #16
	sub	x10, x8, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	str	x12, [x11]
	ldr	x12, [x9]
	stur	x12, [x11, #-8]
	ldr	x12, [x9]
	stur	x12, [x11, #-16]
	add	x11, x11, #24
	subs	x10, x10, #1
	b.ne	LBB0_7
LBB0_8:
	cmp	w8, w22
	b.eq	LBB0_11
; %bb.9:
	add	x21, x21, w8, uxtw #2
	mov	w9, #24
	umaddl	x9, w8, w9, x19
	add	x23, x9, #16
	sub	x24, x22, w8, uxtw
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21], #4
	add	x1, sp, #8
	mov	w2, #0
	bl	_translate_to_linear_space_ex
	stp	x0, x0, [x23, #-8]
	stur	x0, [x23, #-16]
	add	x23, x23, #24
	subs	x24, x24, #1
	b.ne	LBB0_10
LBB0_11:
	add	w8, w20, #1
	cmp	w22, w8
	b.eq	LBB0_20
; %bb.12:
	mov	w9, w20
	sub	x8, x9, x22
	add	x10, x8, #1
Lloh5:
	adrp	x8, _dc_fixpt_one@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dc_fixpt_one@GOTPAGEOFF]
	cmp	x10, #2
	b.lo	LBB0_17
; %bb.13:
	mov	w11, #24
	madd	x12, x22, x11, x19
	madd	x11, x9, x11, x19
	add	x11, x11, #24
	add	x13, x8, #8
	cmp	x12, x13
	ccmp	x11, x8, #0, lo
	b.hi	LBB0_17
; %bb.14:
	and	x12, x10, #0xfffffffffffffffe
	add	x11, x12, x22
	mov	w13, #24
	madd	x13, x22, x13, x19
	mov	x14, x12
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ld1r.2d	{ v0 }, [x8]
	mov.16b	v1, v0
	mov.16b	v2, v0
	st3.2d	{ v0, v1, v2 }, [x13], #48
	subs	x14, x14, #2
	b.ne	LBB0_15
; %bb.16:
	cmp	x10, x12
	b.ne	LBB0_18
	b	LBB0_20
LBB0_17:
	mov	x11, x22
LBB0_18:
	sub	x9, x9, x11
	add	x9, x9, #1
	mov	w10, #24
	madd	x10, x11, x10, x19
	add	x10, x10, #16
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8]
	str	x11, [x10]
	ldr	x11, [x8]
	stur	x11, [x10, #-8]
	ldr	x11, [x8]
	stur	x11, [x10, #-16]
	add	x10, x10, #24
	subs	x9, x9, #1
	b.ne	LBB0_19
LBB0_20:
	mov	w0, #1
LBB0_21:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_22:
	and	x10, x8, #0xfffffffe
	mov	x11, x10
	mov	x12, x19
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ld1r.2d	{ v0 }, [x9]
	mov.16b	v1, v0
	mov.16b	v2, v0
	st3.2d	{ v0, v1, v2 }, [x12], #48
	subs	x11, x11, #2
	b.ne	LBB0_23
; %bb.24:
	cmp	x10, x8
	b.eq	LBB0_8
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_PTS_IN_REGION,4,2          ; @NUM_PTS_IN_REGION
	.comm	_dc_fixpt_zero,8,3              ; @dc_fixpt_zero
	.comm	_dc_fixpt_one,8,3               ; @dc_fixpt_one
	.no_dead_strip	_build_degamma
.subsections_via_symbols
