	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ilk_csc_convert_ctm
_ilk_csc_convert_ctm:                   ## @ilk_csc_convert_ctm
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	callq	_ilk_csc_limited_range
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rsi
	leaq	-128(%rbp), %rdi
	callq	_ctm_mult_by_limited
	movq	%rax, %r14
	jmp	LBB0_3
LBB0_2:
	movq	(%rbx), %r14
LBB0_3:
	xorl	%ebx, %ebx
	movq	_CTM_COEFF_0_125@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$12, %esi
	callq	_ILK_CSC_COEFF_FP
	orl	(%r15,%rbx,4), %eax
	orl	$12288, %eax                    ## imm = 0x3000
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	$9, %rbx
	je	LBB0_18
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rbx,8), %rdi
	movabsq	$9223372036854775807, %rax      ## imm = 0x7FFFFFFFFFFFFFFF
	andq	%rax, %rdi
	movq	_CTM_COEFF_4_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	decq	%rdx
	xorl	%esi, %esi
	callq	_clamp_val
	movq	%rax, %r12
	movl	$0, (%r15,%rbx,4)
	movq	(%r14,%rbx,8), %rdi
	callq	_CTM_COEFF_NEGATIVE
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	orb	$-128, 1(%r15,%rbx,4)
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	(%r13), %r12
	jb	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_CTM_COEFF_0_25@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jae	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$11, %esi
	callq	_ILK_CSC_COEFF_FP
	orl	(%r15,%rbx,4), %eax
	orl	$8192, %eax                     ## imm = 0x2000
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_CTM_COEFF_0_5@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jae	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$10, %esi
	callq	_ILK_CSC_COEFF_FP
	orl	(%r15,%rbx,4), %eax
	orl	$4096, %eax                     ## imm = 0x1000
	jmp	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_CTM_COEFF_1_0@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jae	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$9, %esi
	callq	_ILK_CSC_COEFF_FP
	orl	(%r15,%rbx,4), %eax
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_CTM_COEFF_2_0@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jae	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_ILK_CSC_COEFF_FP
	orl	(%r15,%rbx,4), %eax
	orl	$28672, %eax                    ## imm = 0x7000
	jmp	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$7, %esi
	callq	_ILK_CSC_COEFF_FP
	orl	(%r15,%rbx,4), %eax
	orl	$24576, %eax                    ## imm = 0x6000
	jmp	LBB0_17
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CTM_COEFF_4_0,8,3              ## @CTM_COEFF_4_0
	.comm	_CTM_COEFF_0_125,8,3            ## @CTM_COEFF_0_125
	.comm	_CTM_COEFF_0_25,8,3             ## @CTM_COEFF_0_25
	.comm	_CTM_COEFF_0_5,8,3              ## @CTM_COEFF_0_5
	.comm	_CTM_COEFF_1_0,8,3              ## @CTM_COEFF_1_0
	.comm	_CTM_COEFF_2_0,8,3              ## @CTM_COEFF_2_0
	.no_dead_strip	_ilk_csc_convert_ctm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ilk_csc_convert_ctm
_ilk_csc_convert_ctm:                   ; @ilk_csc_convert_ctm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	ldr	x8, [x0]
	ldr	x20, [x8]
	bl	_ilk_csc_limited_range
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x1, [x20]
	mov	x0, sp
	bl	_ctm_mult_by_limited
	mov	x20, x0
	b	LBB0_3
LBB0_2:
	ldr	x20, [x20]
LBB0_3:
	mov	x22, #0
Lloh3:
	adrp	x23, _CTM_COEFF_4_0@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CTM_COEFF_4_0@GOTPAGEOFF]
Lloh5:
	adrp	x24, _CTM_COEFF_0_125@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CTM_COEFF_0_125@GOTPAGEOFF]
Lloh7:
	adrp	x25, _CTM_COEFF_0_25@GOTPAGE
Lloh8:
	ldr	x25, [x25, _CTM_COEFF_0_25@GOTPAGEOFF]
Lloh9:
	adrp	x26, _CTM_COEFF_0_5@GOTPAGE
Lloh10:
	ldr	x26, [x26, _CTM_COEFF_0_5@GOTPAGEOFF]
Lloh11:
	adrp	x27, _CTM_COEFF_1_0@GOTPAGE
Lloh12:
	ldr	x27, [x27, _CTM_COEFF_1_0@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w1, #12
	bl	_ILK_CSC_COEFF_FP
	ldr	w8, [x19, x22, lsl #2]
	orr	w8, w0, w8
	orr	w8, w8, #0x3000
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w8, [x19, x22, lsl #2]
	add	x22, x22, #1
	cmp	x22, #9
	b.eq	LBB0_18
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x28, x22, #3
	ldr	x8, [x20, x28]
	and	x0, x8, #0x7fffffffffffffff
	ldr	x8, [x23]
	sub	x2, x8, #1
	mov	w1, #0
	bl	_clamp_val
	mov	x21, x0
	str	wzr, [x19, x22, lsl #2]
	ldr	x0, [x20, x28]
	bl	_CTM_COEFF_NEGATIVE
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	lsl	x8, x22, #2
	ldr	w9, [x19, x8]
	orr	w9, w9, #0x8000
	str	w9, [x19, x8]
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24]
	cmp	x21, x8
	b.lo	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x25]
	cmp	x21, x8
	b.hs	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w1, #11
	bl	_ILK_CSC_COEFF_FP
	ldr	w8, [x19, x22, lsl #2]
	orr	w8, w0, w8
	orr	w8, w8, #0x2000
	b	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26]
	cmp	x21, x8
	b.hs	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w1, #10
	bl	_ILK_CSC_COEFF_FP
	ldr	w8, [x19, x22, lsl #2]
	orr	w8, w0, w8
	orr	w8, w8, #0x1000
	b	LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x27]
	cmp	x21, x8
	b.hs	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w1, #9
	bl	_ILK_CSC_COEFF_FP
	ldr	w8, [x19, x22, lsl #2]
	orr	w8, w8, w0
	b	LBB0_5
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh13:
	adrp	x8, _CTM_COEFF_2_0@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CTM_COEFF_2_0@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	mov	x0, x21
	cmp	x21, x8
	b.hs	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w1, #8
	bl	_ILK_CSC_COEFF_FP
	ldr	w8, [x19, x22, lsl #2]
	orr	w8, w0, w8
	orr	w8, w8, #0x7000
	b	LBB0_5
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w1, #7
	bl	_ILK_CSC_COEFF_FP
	ldr	w8, [x19, x22, lsl #2]
	orr	w8, w0, w8
	orr	w8, w8, #0x6000
	b	LBB0_5
LBB0_18:
	ldr	x8, [sp, #72]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CTM_COEFF_4_0,8,3              ; @CTM_COEFF_4_0
	.comm	_CTM_COEFF_0_125,8,3            ; @CTM_COEFF_0_125
	.comm	_CTM_COEFF_0_25,8,3             ; @CTM_COEFF_0_25
	.comm	_CTM_COEFF_0_5,8,3              ; @CTM_COEFF_0_5
	.comm	_CTM_COEFF_1_0,8,3              ; @CTM_COEFF_1_0
	.comm	_CTM_COEFF_2_0,8,3              ; @CTM_COEFF_2_0
	.no_dead_strip	_ilk_csc_convert_ctm
.subsections_via_symbols
