	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function siw_prepare_fpdu
_siw_prepare_fpdu:                      ## @siw_prepare_fpdu
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_iwarp_pktinfo@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	leaq	28(%rdi), %r14
	movq	%r14, %rdi
	callq	___rdmap_get_opcode
	movq	(%r12,%rax,8), %rax
	movq	%rax, (%rbx)
	movq	$0, 56(%rbx)
	movq	_DDP_FLAG_TAGGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 28(%rbx)
	je	LBB0_1
## %bb.2:
	movl	(%r15), %edi
	addl	8(%r15), %edi
	callq	_cpu_to_be64
	movl	%eax, 36(%rbx)
	jmp	LBB0_3
LBB0_1:
	movl	(%r15), %edi
	callq	_cpu_to_be32
	movl	%eax, 40(%rbx)
LBB0_3:
	movslq	4(%r15), %rax
	movslq	(%r15), %rcx
	subq	%rcx, %rax
	movq	(%rbx), %rdi
	movq	8(%rbx), %rcx
	movq	_MPA_CRC_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	%rdi, %rdx
	leaq	(%rdx,%rax), %rsi
	cmpq	%rcx, %rsi
	jle	LBB0_5
## %bb.4:
	movq	_DDP_FLAG_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
	subq	%rdx, %rcx
	movslq	%ecx, %rax
	xorl	%edx, %edx
	jmp	LBB0_6
LBB0_5:
	movq	_DDP_FLAG_LAST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r14)
	movl	%eax, %edx
	negl	%edx
	andl	$3, %edx
	movl	%eax, %ecx
LBB0_6:
	movl	%edx, 16(%rbx)
	movl	%ecx, 20(%rbx)
	addq	%rax, %rdi
	movq	_MPA_HDR_SIZE@GOTPCREL(%rip), %rax
	subq	(%rax), %rdi
	callq	_htons
	movl	%eax, 32(%rbx)
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_crypto_shash_init
	movq	(%rbx), %rdx
	movq	48(%rbx), %rdi
	movq	%r14, %rsi
	callq	_crypto_shash_update
	movl	$1, 24(%rbx)
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_iwarp_pktinfo,8,3              ## @iwarp_pktinfo
	.comm	_DDP_FLAG_TAGGED,4,2            ## @DDP_FLAG_TAGGED
	.comm	_MPA_CRC_SIZE,8,3               ## @MPA_CRC_SIZE
	.comm	_DDP_FLAG_LAST,4,2              ## @DDP_FLAG_LAST
	.comm	_MPA_HDR_SIZE,8,3               ## @MPA_HDR_SIZE
	.no_dead_strip	_siw_prepare_fpdu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function siw_prepare_fpdu
_siw_prepare_fpdu:                      ; @siw_prepare_fpdu
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _iwarp_pktinfo@GOTPAGE
Lloh1:
	ldr	x8, [x8, _iwarp_pktinfo@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	add	x20, x0, #28
	mov	x0, x20
	bl	___rdmap_get_opcode
	ldr	x8, [x22, x0, lsl #3]
	str	x8, [x19]
	str	xzr, [x19, #56]
	ldr	w8, [x19, #28]
Lloh3:
	adrp	x9, _DDP_FLAG_TAGGED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DDP_FLAG_TAGGED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x21, #8]
	ldr	w9, [x21]
	add	w0, w9, w8
	bl	_cpu_to_be64
	str	w0, [x19, #36]
	b	LBB0_3
LBB0_2:
	ldr	w0, [x21]
	bl	_cpu_to_be32
	str	w0, [x19, #40]
LBB0_3:
	ldpsw	x9, x8, [x21]
	sub	x9, x8, x9
Lloh6:
	adrp	x8, _MPA_CRC_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MPA_CRC_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x8]
	ldp	x8, x11, [x19]
	add	x12, x10, x8
	add	x10, x12, x9
	cmp	x10, x11
	b.le	LBB0_5
; %bb.4:
	mov	w10, #0
Lloh9:
	adrp	x9, _DDP_FLAG_LAST@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DDP_FLAG_LAST@GOTPAGEOFF]
	sub	x11, x11, x12
Lloh11:
	ldr	w9, [x9]
	ldr	w12, [x20]
	bic	w9, w12, w9
	str	w9, [x20]
	sxtw	x9, w11
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x10, _DDP_FLAG_LAST@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DDP_FLAG_LAST@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	ldr	w11, [x20]
	orr	w10, w11, w10
	str	w10, [x20]
	neg	w10, w9
	and	w10, w10, #0x3
	mov	x11, x9
LBB0_6:
	stp	w10, w11, [x19, #16]
Lloh15:
	adrp	x10, _MPA_HDR_SIZE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MPA_HDR_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	add	x8, x8, x9
	sub	x0, x8, x10
	bl	_htons
	str	w0, [x19, #32]
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_crypto_shash_init
	ldr	x0, [x19, #48]
	ldr	x2, [x19]
	mov	x1, x20
	bl	_crypto_shash_update
	mov	w8, #1
	str	w8, [x19, #24]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_iwarp_pktinfo,8,3              ; @iwarp_pktinfo
	.comm	_DDP_FLAG_TAGGED,4,2            ; @DDP_FLAG_TAGGED
	.comm	_MPA_CRC_SIZE,8,3               ; @MPA_CRC_SIZE
	.comm	_DDP_FLAG_LAST,4,2              ; @DDP_FLAG_LAST
	.comm	_MPA_HDR_SIZE,8,3               ; @MPA_HDR_SIZE
	.no_dead_strip	_siw_prepare_fpdu
.subsections_via_symbols
