	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sg_to_link_tbl_offset
_sg_to_link_tbl_offset:                 ## @sg_to_link_tbl_offset
	.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
	xorl	%r12d, %r12d
	movl	%r8d, %eax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	addl	%ecx, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_16
## %bb.1:
	movq	%rdi, %r15
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.2:
	movq	%r9, %r14
	movl	%edx, %ebx
	movl	%esi, %r13d
	cmpl	$1, %r8d
	sbbl	$-1, %r13d
	incl	%r13d
	xorl	%r12d, %r12d
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	decl	%r13d
	je	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_sg_dma_len
	movl	%ebx, %ecx
	subl	%eax, %ecx
	jae	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	subl	%ebx, %eax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %eax
	cmovael	%ecx, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jle	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %edx
	subl	%ecx, %edx
	jbe	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r12d, %r12
	leaq	(%r14,%r12,4), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	callq	_sg_dma_address
	movl	%ebx, %esi
	addq	%rax, %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_to_talitos_ptr
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_to_talitos_ptr_ext_set
	incl	%r12d
	addl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r12d, %r12
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r14,%rcx,4), %r12
	movq	%r15, %rdi
	callq	_sg_dma_address
	movl	%ebx, %esi
	addq	%rax, %rsi
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, %rdi
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_to_talitos_ptr
	movq	%r12, %rdi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_to_talitos_ptr_ext_set
	incl	%r12d
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	subl	%r14d, %ebx
	subl	%r14d, -44(%rbp)                ## 4-byte Folded Spill
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_sg_next
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	testq	%rax, %rax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_3
LBB0_14:
	testl	%r12d, %r12d
	jle	LBB0_16
LBB0_15:
	movl	%r12d, %eax
	leaq	(%r14,%rax,4), %rdi
	addq	$-4, %rdi
	movq	_DESC_PTR_LNKTBL_RET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_to_talitos_ptr_ext_set
LBB0_16:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	testl	%r12d, %r12d
	jg	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_DESC_PTR_LNKTBL_RET,4,2        ## @DESC_PTR_LNKTBL_RET
	.no_dead_strip	_sg_to_link_tbl_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sg_to_link_tbl_offset
_sg_to_link_tbl_offset:                 ; @sg_to_link_tbl_offset
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	w19, #0
	adds	w26, w4, w3
	b.eq	LBB0_14
; %bb.1:
	mov	x22, x0
	cbz	x0, LBB0_14
; %bb.2:
	mov	x20, x5
	mov	x21, x3
	mov	x23, x2
	mov	w19, #0
	cmp	w4, #0
	cinc	w8, w1, ne
	add	w27, w8, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	subs	w27, w27, #1
	b.eq	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_sg_dma_len
	subs	w8, w23, w0
	b.hs	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w0, w23
	cmp	w8, w26
	csel	w24, w8, w26, lo
	cmp	w21, #1
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w25, w24, w21
	b.ls	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x20, w19, sxtw #2
	mov	x0, x22
	bl	_sg_dma_address
	add	x1, x0, w23, uxtw
	mov	x0, x24
	mov	x2, x21
	mov	w3, #0
	bl	_to_talitos_ptr
	mov	x0, x24
	mov	w1, #0
	mov	w2, #0
	bl	_to_talitos_ptr_ext_set
	add	w19, w19, #1
	add	w23, w23, w21
	mov	x24, x25
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x20, w19, sxtw #2
	mov	x0, x22
	bl	_sg_dma_address
	add	x1, x0, w23, uxtw
	mov	x0, x25
	mov	x2, x24
	mov	w3, #0
	bl	_to_talitos_ptr
	mov	x0, x25
	mov	w1, #0
	mov	w2, #0
	bl	_to_talitos_ptr_ext_set
	mov	w23, #0
	add	w19, w19, #1
	sub	w26, w26, w24
	sub	w21, w21, w24
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x8
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_sg_next
	cbz	w26, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	cbnz	x0, LBB0_3
LBB0_12:
	cmp	w19, #1
	b.lt	LBB0_14
; %bb.13:
	add	x8, x20, w19, uxtw #2
	sub	x0, x8, #4
Lloh0:
	adrp	x8, _DESC_PTR_LNKTBL_RET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DESC_PTR_LNKTBL_RET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_to_talitos_ptr_ext_set
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DESC_PTR_LNKTBL_RET,4,2        ; @DESC_PTR_LNKTBL_RET
	.no_dead_strip	_sg_to_link_tbl_offset
.subsections_via_symbols
