	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qedr_prepare_sq_sges
_qedr_prepare_sq_sges:                  ## @qedr_prepare_sq_sges
	.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
	movl	(%rdx), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	%rdx, %r15
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_qed_chain_produce
	movq	%rax, %rbx
	movl	16(%rax), %edi
	movq	8(%r15), %rax
	movl	16(%rax,%r14), %esi
	callq	_DMA_REGPAIR_LE
	movq	8(%r15), %rax
	movq	8(%rax,%r14), %rdi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	movq	8(%r15), %rax
	movq	(%rax,%r14), %rdi
	callq	_cpu_to_le32
	movq	%rax, (%rbx)
	movq	8(%r15), %rax
	addl	(%rax,%r14), %r13d
	incq	%r12
	movslq	(%r15), %rax
	addq	$24, %r14
	cmpq	%rax, %r12
	jl	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_7
LBB0_6:
	addl	%eax, (%rsi)
LBB0_7:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%r13d, %r13d
	testq	%rsi, %rsi
	jne	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_qedr_prepare_sq_sges
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qedr_prepare_sq_sges
_qedr_prepare_sq_sges:                  ; @qedr_prepare_sq_sges
	.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, x1
	ldr	w8, [x2]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x21, x2
	mov	x22, x0
	mov	x24, #0
	mov	x25, #0
	mov	w20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_qed_chain_produce
	mov	x23, x0
	ldr	w0, [x0, #16]
	ldr	x8, [x21, #8]
	add	x8, x8, x24
	ldr	w1, [x8, #16]
	bl	_DMA_REGPAIR_LE
	ldr	x8, [x21, #8]
	add	x8, x8, x24
	ldr	x0, [x8, #8]
	bl	_cpu_to_le32
	str	x0, [x23, #8]
	ldr	x8, [x21, #8]
	ldr	x0, [x8, x24]
	bl	_cpu_to_le32
	ldr	x8, [x21, #8]
	ldr	w8, [x8, x24]
	str	x0, [x23]
	add	w20, w20, w8
	add	x25, x25, #1
	ldrsw	x8, [x21]
	add	x24, x24, #24
	cmp	x25, x8
	b.lt	LBB0_2
; %bb.3:
	cbz	x19, LBB0_5
LBB0_4:
	ldr	w9, [x19]
	add	w8, w9, w8
	str	w8, [x19]
LBB0_5:
	mov	x0, x20
	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
LBB0_6:
	mov	w20, #0
	cbnz	x19, LBB0_4
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_qedr_prepare_sq_sges
.subsections_via_symbols
