	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gt215_link_train_calc
_gt215_link_train_calc:                 ## @gt215_link_train_calc
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	xorl	%ecx, %ecx
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movl	$257, %edx                      ## imm = 0x101
	shll	%cl, %edx
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=2
	addq	$2, %rax
	cmpq	$64, %rax
	je	LBB0_18
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdi,%rax,4), %esi
	testl	%esi, %esi
	jns	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	andl	%edx, %esi
	jne	LBB0_8
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=2
	movl	4(%rdi,%rax,4), %esi
	testl	%esi, %esi
	jns	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	andl	%edx, %esi
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rax
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$64, %eax
	je	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$62, %eax
	ja	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %esi
	movl	(%rdi,%rsi,4), %ebx
	movq	%rax, %rsi
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=2
	incq	%rsi
	cmpq	$63, %rsi
	je	LBB0_15
LBB0_12:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%ebx, %ebx
	jns	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	testl	%edx, 4(%rdi,%rsi,4)
	jne	LBB0_14
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rax), %esi
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$64, %esi
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	subl	%eax, %esi
	sarl	%esi
	leal	(%rsi,%rax), %edx
	shrl	$4, %edx
	andl	$15, %edx
	incl	-96(%rbp,%rdx,4)
	addl	%esi, %eax
	addl	$48, %eax
	movl	%eax, -80(%rbp,%rcx,4)
	incq	%rcx
	cmpq	$8, %rcx
	jne	LBB0_1
## %bb.17:
	movl	-96(%rbp), %eax
	movl	-92(%rbp), %ecx
	xorl	%edx, %edx
	xorl	%esi, %esi
	testl	%eax, %eax
	setg	%sil
	leal	(%rsi,%rsi,2), %esi
	cmovgl	%eax, %edx
	cmpl	%edx, %ecx
	movl	$4, %eax
	cmovlel	%esi, %eax
	cmovgl	%ecx, %edx
	movl	-88(%rbp), %ecx
	cmpl	%edx, %ecx
	movl	$5, %esi
	cmovlel	%eax, %esi
	cmovgl	%ecx, %edx
	cmpl	%edx, -84(%rbp)
	movl	$6, %r12d
	cmovlel	%esi, %r12d
	movl	$0, (%r13)
	movl	%r12d, %r15d
	shll	$4, %r15d
	leal	15(%r15), %r14d
	movl	-80(%rbp), %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, -80(%rbp)
	andl	$15, %eax
	orl	%eax, (%r13)
	movl	-76(%rbp), %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, -76(%rbp)
	shll	$4, %eax
	movzbl	%al, %eax
	orl	%eax, (%r13)
	movl	-72(%rbp), %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, -72(%rbp)
	andl	$15, %eax
	shll	$8, %eax
	orl	%eax, (%r13)
	movl	-68(%rbp), %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, -68(%rbp)
	shll	$12, %eax
	movzwl	%ax, %eax
	orl	%eax, (%r13)
	movl	-64(%rbp), %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, -64(%rbp)
	andl	$15, %eax
	shll	$16, %eax
	orl	%eax, (%r13)
	movl	-60(%rbp), %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, -60(%rbp)
	andl	$15, %eax
	shll	$20, %eax
	orl	%eax, (%r13)
	movl	-56(%rbp), %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_min
	andl	$15, %eax
	shll	$24, %eax
	orl	%eax, (%r13)
	movl	-52(%rbp), %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_min
	shll	$28, %eax
	orl	%eax, (%r13)
	movl	%r12d, %eax
	shll	$8, %eax
	addl	%r12d, %eax
	orl	$33554432, %eax                 ## imm = 0x2000000
	movl	%eax, 4(%r13)
	movl	$0, 8(%r13)
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gt215_link_train_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gt215_link_train_calc
_gt215_link_train_calc:                 ; @gt215_link_train_calc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x8, #0
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-40]
	stp	xzr, xzr, [sp, #8]
	add	x9, x0, #4
	mov	w10, #257
	add	x11, sp, #8
	add	x12, sp, #24
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	mov	x13, #0
	lsl	w14, w10, w8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=2
	add	x13, x13, #1
	cmp	x13, #64
	b.eq	LBB0_16
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w15, [x0, x13, lsl #2]
	tbz	w15, #31, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	and	w15, w15, w14
	cbz	w15, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w13, #64
	b.eq	LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w13, #63
	b.hs	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w16, [x0, x13, lsl #2]
	mov	x15, x13
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x15, x15, #1
	cmp	x15, #63
	b.eq	LBB0_13
LBB0_9:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	tbz	w16, #31, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w17, [x9, x15, lsl #2]
	tst	w17, w14
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_1 Depth=1
                                        ; kill: def $w15 killed $w15 killed $x15 def $x15
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x15, x13, #1
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w15, #64
LBB0_14:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w14, w15, w13
	add	w13, w13, w14, asr #1
	ubfx	w14, w13, #4, #4
	lsl	x14, x14, #2
	ldr	w15, [x11, x14]
	add	w15, w15, #1
	str	w15, [x11, x14]
	add	w13, w13, #48
	str	w13, [x12, x8, lsl #2]
	add	x8, x8, #1
	cmp	x8, #8
	b.ne	LBB0_1
; %bb.15:
	mov	w8, #3
	ldp	w9, w10, [sp, #8]
	cmp	w9, #0
	csel	w8, w8, wzr, gt
	csel	w9, w9, wzr, gt
	mov	w11, #4
	cmp	w10, w9
	csel	w8, w11, w8, gt
	csel	w9, w10, w9, gt
	mov	w10, #5
	ldp	w11, w12, [sp, #16]
	cmp	w11, w9
	csel	w8, w10, w8, gt
	csel	w9, w11, w9, gt
	mov	w10, #6
	cmp	w12, w9
	csel	w22, w10, w8, gt
	str	wzr, [x19]
	lsl	w21, w22, #4
	mov	w20, #15
	bfi	w20, w22, #4, #3
	ldr	w0, [sp, #24]
	mov	x1, x21
	bl	_max
	mov	x1, x20
	bl	_min
	str	w0, [sp, #24]
	and	w8, w0, #0xf
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [sp, #28]
	mov	x1, x21
	bl	_max
	mov	x1, x20
	bl	_min
	str	w0, [sp, #28]
	ubfiz	w8, w0, #4, #4
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [sp, #32]
	mov	x1, x21
	bl	_max
	mov	x1, x20
	bl	_min
	str	w0, [sp, #32]
	ubfiz	w8, w0, #8, #4
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [sp, #36]
	mov	x1, x21
	bl	_max
	mov	x1, x20
	bl	_min
	str	w0, [sp, #36]
	ubfiz	w8, w0, #12, #4
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [sp, #40]
	mov	x1, x21
	bl	_max
	mov	x1, x20
	bl	_min
	str	w0, [sp, #40]
	ubfiz	w8, w0, #16, #4
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [sp, #44]
	mov	x1, x21
	bl	_max
	mov	x1, x20
	bl	_min
	str	w0, [sp, #44]
	ubfiz	w8, w0, #20, #4
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [sp, #48]
	mov	x1, x21
	bl	_max
	mov	x1, x20
	bl	_min
	ubfiz	w8, w0, #24, #4
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [sp, #52]
	mov	x1, x21
	bl	_max
	mov	x1, x20
	bl	_min
	ldr	w8, [x19]
	orr	w8, w8, w0, lsl #28
	bfi	w22, w22, #8, #3
	orr	w9, w22, #0x2000000
	stp	w8, w9, [x19]
	str	wzr, [x19, #8]
LBB0_16:
	ldur	x8, [x29, #-40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gt215_link_train_calc
.subsections_via_symbols
