	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function catu_populate_table
_catu_populate_table:                   ## @catu_populate_table
	.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	%rdi, %r15
	callq	_tmc_sg_table_buf_size
	movq	%rax, %rbx
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_catu_get_table
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.1:
	movq	%rax, %r12
	movq	%rbx, %rdx
                                        ## implicit-def: $rcx
                                        ## kill: killed $rcx
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jae	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	_SZ_1M@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%rbx, %rcx
	cmpq	%rdx, %rcx
	cmovaeq	%rdx, %rcx
	xorl	%r12d, %r12d
	cmpq	%rcx, %rbx
	jae	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_CATU_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rax
	movslq	%r13d, %r13
	imull	%r14d, %r15d
	addl	(%rax,%r13,4), %r15d
	movl	(%rdx), %edi
	shrq	$20, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movq	%rcx, %rbx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_catu_dbg
	movl	%r15d, %edi
	callq	_catu_make_entry
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r12,4)
	incl	%r14d
	movl	%r14d, %eax
	cltd
	movq	_CATU_PAGES_PER_SYSPAGE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movq	%rbx, %rcx
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	%edx, %r14d
	cmpl	$1, %edx
	adcl	$0, %r13d
	incq	%r12
	movq	_CATU_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	addq	%r15, %rbx
	cmpq	%rcx, %rbx
	jb	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdx, %rbx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	_CATU_PTRS_PER_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subl	%r12d, %edx
	movq	%rcx, %r12
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
	movl	$0, -44(%rbp)
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	leaq	-44(%rbp), %rdx
	callq	_catu_get_table
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_catu_make_entry
	movq	_CATU_LINK_PREV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r12,%rcx,4)
	movl	-44(%rbp), %edi
	callq	_catu_make_entry
	movq	_CATU_LINK_NEXT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r12,%rcx,4)
	movl	(%r15), %edi
	movq	%rbx, %rdx
	shrq	$20, %rdx
	decq	%rdx
	movl	-52(%rbp), %ecx
	movl	-44(%rbp), %r9d
	leaq	L_.str.1(%rip), %rsi
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_catu_dbg
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_12:
	movq	%r15, %rdi
	callq	_tmc_sg_table_sync_table
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SZ_1M,8,3                      ## @SZ_1M
	.comm	_CATU_PAGE_SIZE,8,3             ## @CATU_PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[table %5ld:%03d] 0x%llx\n"

	.comm	_CATU_PAGES_PER_SYSPAGE,4,2     ## @CATU_PAGES_PER_SYSPAGE
	.comm	_CATU_PTRS_PER_PAGE,4,2         ## @CATU_PTRS_PER_PAGE
	.comm	_CATU_LINK_PREV,8,3             ## @CATU_LINK_PREV
	.comm	_CATU_LINK_NEXT,8,3             ## @CATU_LINK_NEXT
L_.str.1:                               ## @.str.1
	.asciz	"[table%5ld]: Cur: 0x%llx Prev: 0x%llx, Next: 0x%llx\n"

	.no_dead_strip	_catu_populate_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function catu_populate_table
_catu_populate_table:                   ; @catu_populate_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
	mov	x19, x0
	bl	_tmc_sg_table_buf_size
	mov	x28, x0
	add	x2, sp, #40
	mov	x0, x19
	mov	x1, #0
	bl	_catu_get_table
	cbz	x28, LBB0_12
; %bb.1:
	mov	x23, x0
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
	mov	w25, #0
	mov	w26, #0
	mov	x21, #0
Lloh0:
	adrp	x24, _CATU_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _CATU_PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x27, _CATU_PAGES_PER_SYSPAGE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _CATU_PAGES_PER_SYSPAGE@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
                                        ; implicit-def: $x0
                                        ; kill: killed $x0
	str	x28, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x21, x28
	b.hs	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
Lloh6:
	adrp	x8, _SZ_1M@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SZ_1M@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x8, x8, x21
	cmp	x8, x28
	csel	x20, x8, x28, lo
	cmp	x21, x20
	b.hs	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x23, [sp, #32]                  ; 8-byte Folded Spill
	mov	x23, x24
	mov	x24, x27
	mov	x27, #0
	ldr	x8, [x23]
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x19, #8]
	ldr	w9, [x9, w25, sxtw #2]
	madd	w28, w26, w8, w9
	ldr	w0, [x19]
	lsr	x2, x21, #20
	mov	x1, x22
	mov	x3, x27
	mov	x4, x28
	bl	_catu_dbg
	mov	x0, x28
	bl	_catu_make_entry
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	str	w0, [x8, x27, lsl #2]
	add	w8, w26, #1
	ldr	w9, [x24]
	sdiv	w10, w8, w9
	msub	w26, w10, w9, w8
	cmp	w26, #0
	cinc	w25, w25, eq
	add	x27, x27, #1
	ldr	x8, [x23]
	add	x21, x8, x21
	cmp	x21, x20
	b.lo	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x28, [sp, #8]                   ; 8-byte Folded Reload
	mov	x24, x23
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
	cmp	x21, x28
	b.eq	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x2, sp, #44
	mov	x0, x19
	mov	x1, x21
	bl	_catu_get_table
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w27, #0
	cmp	x21, x28
	b.ne	LBB0_7
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x23, w27, uxtw #2
Lloh9:
	adrp	x8, _CATU_PTRS_PER_PAGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CATU_PTRS_PER_PAGE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	sub	w8, w8, w27
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
	str	wzr, [sp, #44]
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh12:
	adrp	x27, _CATU_PAGES_PER_SYSPAGE@GOTPAGE
Lloh13:
	ldr	x27, [x27, _CATU_PAGES_PER_SYSPAGE@GOTPAGEOFF]
	ldr	w20, [sp, #28]                  ; 4-byte Folded Reload
	mov	x0, x20
	bl	_catu_make_entry
Lloh14:
	adrp	x8, _CATU_LINK_PREV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CATU_LINK_PREV@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	w0, [x23, x8, lsl #2]
	ldr	w0, [sp, #44]
	bl	_catu_make_entry
Lloh17:
	adrp	x8, _CATU_LINK_NEXT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CATU_LINK_NEXT@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	w0, [x23, x8, lsl #2]
	ldr	w0, [x19]
	lsr	x8, x21, #20
	sub	x2, x8, #1
	ldp	w3, w8, [sp, #40]
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x20
	bl	_catu_dbg
	ldr	w8, [sp, #44]
	cbz	w8, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [sp, #40]
	str	w9, [sp, #28]                   ; 4-byte Folded Spill
	str	w8, [sp, #40]
	ldr	x23, [sp, #16]                  ; 8-byte Folded Reload
	b	LBB0_2
LBB0_12:
	mov	x0, x19
	bl	_tmc_sg_table_sync_table
	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
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SZ_1M,8,3                      ; @SZ_1M
	.comm	_CATU_PAGE_SIZE,8,3             ; @CATU_PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[table %5ld:%03d] 0x%llx\n"

	.comm	_CATU_PAGES_PER_SYSPAGE,4,2     ; @CATU_PAGES_PER_SYSPAGE
	.comm	_CATU_PTRS_PER_PAGE,4,2         ; @CATU_PTRS_PER_PAGE
	.comm	_CATU_LINK_PREV,8,3             ; @CATU_LINK_PREV
	.comm	_CATU_LINK_NEXT,8,3             ; @CATU_LINK_NEXT
l_.str.1:                               ; @.str.1
	.asciz	"[table%5ld]: Cur: 0x%llx Prev: 0x%llx, Next: 0x%llx\n"

	.no_dead_strip	_catu_populate_table
.subsections_via_symbols
