	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qedr_gsi_build_packet
_qedr_gsi_build_packet:                 ## @qedr_gsi_build_packet
	.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	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_QEDR_MAX_UD_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	(%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	$0, (%r12)
	leaq	-56(%rbp), %rcx
	leaq	-60(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_qedr_gsi_build_header
	testl	%eax, %eax
	jne	LBB0_20
## %bb.1:
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leaq	-56(%rbp), %rdi
	movq	%r13, %r14
	movq	%r13, %rsi
	callq	_ib_ud_header_pack
	movl	%eax, %r13d
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdx
	addq	$24, %rdx
	movl	(%rbx), %ecx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_dma_alloc_coherent
	movl	%eax, 20(%r12)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %edi
	callq	_ether_addr_equal
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	movq	_QED_LL2_TX_DEST_NW@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	%r12, %rdi
	callq	_kfree
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_6:
	movq	_QED_LL2_TX_DEST_LB@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	movl	-60(%rbp), %eax
	movl	%eax, (%r12)
	movl	20(%r12), %edi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movl	%r13d, 16(%r12)
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %r8d
	movl	%r8d, 4(%r12)
	testl	%r8d, %r8d
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	jle	LBB0_19
## %bb.9:
	movq	8(%r14), %rcx
	movq	8(%r12), %rdx
	cmpl	$4, %r8d
	jae	LBB0_11
## %bb.10:
	xorl	%esi, %esi
	jmp	LBB0_18
LBB0_11:
	movl	%r8d, %esi
	andl	$-4, %esi
	leaq	-4(%rsi), %rbx
	movq	%rbx, %rdi
	shrq	$2, %rdi
	incq	%rdi
	movl	%edi, %eax
	andl	$3, %eax
	cmpq	$12, %rbx
	jae	LBB0_13
## %bb.12:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_13:
	andq	$-4, %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rcx,%rbx,8), %xmm0
	movups	16(%rcx,%rbx,8), %xmm1
	movups	%xmm0, (%rdx,%rbx,8)
	movups	%xmm1, 16(%rdx,%rbx,8)
	movups	32(%rcx,%rbx,8), %xmm0
	movups	48(%rcx,%rbx,8), %xmm1
	movups	%xmm0, 32(%rdx,%rbx,8)
	movups	%xmm1, 48(%rdx,%rbx,8)
	movups	64(%rcx,%rbx,8), %xmm0
	movups	80(%rcx,%rbx,8), %xmm1
	movups	%xmm0, 64(%rdx,%rbx,8)
	movups	%xmm1, 80(%rdx,%rbx,8)
	movups	96(%rcx,%rbx,8), %xmm0
	movups	112(%rcx,%rbx,8), %xmm1
	movups	%xmm0, 96(%rdx,%rbx,8)
	movups	%xmm1, 112(%rdx,%rbx,8)
	addq	$16, %rbx
	addq	$-4, %rdi
	jne	LBB0_14
LBB0_15:
	testq	%rax, %rax
	je	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	leaq	(,%rbx,8), %rdi
	orq	$16, %rdi
	movups	(%rcx,%rbx,8), %xmm0
	movups	(%rcx,%rdi), %xmm1
	movups	%xmm0, (%rdx,%rbx,8)
	movups	%xmm1, (%rdx,%rdi)
	addq	$4, %rbx
	decq	%rax
	jne	LBB0_16
LBB0_17:
	cmpq	%r8, %rsi
	je	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rcx,%rsi,8), %eax
	movl	%eax, 4(%rdx,%rsi,8)
	movl	(%rcx,%rsi,8), %eax
	movl	%eax, (%rdx,%rsi,8)
	incq	%rsi
	cmpq	%rsi, %r8
	jne	LBB0_18
LBB0_19:
	movq	%r12, (%r9)
	xorl	%eax, %eax
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_22
## %bb.21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_QEDR_MAX_UD_HEADER_SIZE,4,2    ## @QEDR_MAX_UD_HEADER_SIZE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QED_LL2_TX_DEST_LB,4,2         ## @QED_LL2_TX_DEST_LB
	.comm	_QED_LL2_TX_DEST_NW,4,2         ## @QED_LL2_TX_DEST_NW
	.no_dead_strip	_qedr_gsi_build_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qedr_gsi_build_packet
_qedr_gsi_build_packet:                 ; @qedr_gsi_build_packet
	.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
	sub	sp, sp, #32
	mov	x19, x3
	mov	x21, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _QEDR_MAX_UD_HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QEDR_MAX_UD_HEADER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	x24, [x0]
	str	xzr, [x3]
	sub	x3, x29, #88
	sub	x4, x29, #76
	bl	_qedr_gsi_build_header
	cbnz	w0, LBB0_14
; %bb.1:
	sub	x0, x29, #88
	mov	x1, x22
	bl	_ib_ud_header_pack
	mov	x23, x0
Lloh8:
	adrp	x25, _GFP_ATOMIC@GOTPAGE
Lloh9:
	ldr	x25, [x25, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
	add	x2, x0, #24
	ldr	w3, [x25]
	mov	x0, x24
	mov	x1, x23
	bl	_dma_alloc_coherent
	str	w0, [x20, #20]
	cbz	w0, LBB0_6
; %bb.3:
	ldp	w1, w0, [x29, #-88]
	bl	_ether_addr_equal
Lloh10:
	adrp	x8, _QED_LL2_TX_DEST_NW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _QED_LL2_TX_DEST_NW@GOTPAGEOFF]
Lloh12:
	adrp	x9, _QED_LL2_TX_DEST_LB@GOTPAGE
Lloh13:
	ldr	x9, [x9, _QED_LL2_TX_DEST_LB@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x20, #28]
	ldur	w8, [x29, #-76]
	str	w8, [x20]
	ldr	w0, [x20, #20]
	mov	x1, x22
	mov	x2, x23
	bl	_memcpy
	str	w23, [x20, #16]
	ldr	w8, [x21]
	str	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.4:
	ldr	x10, [x21, #8]
	ldr	x9, [x20, #8]
	cmp	w8, #8
	b.hs	LBB0_8
; %bb.5:
	mov	x11, #0
	b	LBB0_11
LBB0_6:
	mov	x0, x20
	bl	_kfree
LBB0_7:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_8:
	and	x11, x8, #0xfffffff8
	add	x12, x10, #32
	add	x13, x9, #32
	mov	x14, x11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q0, [x12, #-32]
	ldp	q3, q2, [x12], #64
	stp	q1, q0, [x13, #-32]
	stp	q3, q2, [x13], #64
	subs	x14, x14, #8
	b.ne	LBB0_9
; %bb.10:
	cmp	x11, x8
	b.eq	LBB0_13
LBB0_11:
	lsl	x12, x11, #3
	add	x10, x10, x12
	add	x9, x9, x12
	sub	x8, x8, x11
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x10], #8
	str	d0, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_12
LBB0_13:
	mov	w0, #0
	str	x20, [x19]
LBB0_14:
	ldur	x8, [x29, #-72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #64
	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_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_QEDR_MAX_UD_HEADER_SIZE,4,2    ; @QEDR_MAX_UD_HEADER_SIZE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QED_LL2_TX_DEST_LB,4,2         ; @QED_LL2_TX_DEST_LB
	.comm	_QED_LL2_TX_DEST_NW,4,2         ; @QED_LL2_TX_DEST_NW
	.no_dead_strip	_qedr_gsi_build_packet
.subsections_via_symbols
