	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_isgl
_build_isgl:                            ## @build_isgl
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	32(%rdi), %r14
	xorl	%r12d, %r12d
	testl	%edx, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	shlq	$4, %r12
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r13), %eax
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %r15
	callq	_htobe64
	movq	%rax, (%r14,%r13)
	movl	4(%rbx,%r13), %edi
	callq	_htobe64
	movq	%rax, 8(%r14,%r13)
	addq	$16, %r13
	cmpq	%r13, %r12
	jne	LBB0_3
## %bb.6:
	addq	%r13, %r14
	xorl	%r12d, %r12d
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	xorl	%r15d, %r15d
LBB0_7:
	movq	$0, (%r14)
	movq	_FW_RI_DATA_ISGL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movq	$0, 16(%rdi)
	movq	%rdi, %rbx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_htobe16
	movl	%eax, 8(%rbx)
	movq	$0, (%rbx)
	testq	%r13, %r13
	je	LBB0_9
## %bb.8:
	movq	%r15, (%r13)
	jmp	LBB0_9
LBB0_4:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.comm	_FW_RI_DATA_ISGL,4,2            ## @FW_RI_DATA_ISGL
	.no_dead_strip	_build_isgl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_isgl
_build_isgl:                            ; @build_isgl
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x21, x2
	mov	x20, x0
	ldr	x23, [x0, #32]
	cmp	w2, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	w24, w21
	add	x25, x1, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x25, #-4]
	tbnz	w8, #31, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, x8
	bl	_htobe64
	str	x0, [x23]
	ldr	w0, [x25], #16
	bl	_htobe64
	add	x8, x23, #16
	str	x0, [x23, #8]
	mov	x23, x8
	subs	x24, x24, #1
	b.ne	LBB0_2
; %bb.4:
	mov	x23, x8
	b	LBB0_6
LBB0_5:
	mov	x22, #0
LBB0_6:
	str	xzr, [x23]
Lloh0:
	adrp	x8, _FW_RI_DATA_ISGL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FW_RI_DATA_ISGL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #24]
	str	xzr, [x20, #16]
	mov	x0, x21
	bl	_htobe16
	str	w0, [x20, #8]
	str	xzr, [x20]
	mov	w0, #0
	cbz	x19, LBB0_9
; %bb.7:
	str	x22, [x19]
	b	LBB0_9
LBB0_8:
Lloh3:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.comm	_FW_RI_DATA_ISGL,4,2            ; @FW_RI_DATA_ISGL
	.no_dead_strip	_build_isgl
.subsections_via_symbols
