	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvmet_tcp_try_recv_pdu
_nvmet_tcp_try_recv_pdu:                ## @nvmet_tcp_try_recv_pdu
	.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	%rdi, %r15
	movq	_MSG_DONTWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%r9d, -48(%rbp)
	movslq	(%rdi), %rax
	movq	8(%rdi), %r8
	leaq	16(%rdi,%rax), %rax
	movq	%rax, -56(%rbp)
	movq	%r8, -64(%rbp)
	movl	48(%rdi), %edi
	leaq	-48(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movl	$1, %ecx
	callq	_kernel_recvmsg
	movl	%eax, %r13d
	movl	%eax, %edi
	shrl	$31, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
LBB0_18:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	16(%r15), %r14
	leaq	-64(%rbp), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r15), %rdx
	movslq	%r13d, %rax
	addq	%rax, %rdx
	movl	%edx, (%r15)
	subq	%rax, 8(%r15)
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$16, %edx
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_nvmet_tcp_hdgst_len
	movq	%rax, %rbx
	movl	24(%r15), %edi
	callq	_nvmet_tcp_pdu_valid
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r15), %r13
	movl	24(%r15), %edi
	callq	_nvmet_tcp_pdu_size
	xorl	%edi, %edi
	cmpq	%rax, %r13
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	addq	16(%r15), %rbx
	movslq	(%r15), %rax
	subq	%rax, %rbx
	movq	%rbx, 8(%r15)
	movl	-48(%rbp), %r9d
	addq	%r14, %rax
	movq	%rax, -56(%rbp)
	movq	%rbx, -64(%rbp)
	movl	48(%r15), %edi
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_kernel_recvmsg
	movl	%eax, %r13d
	movl	%eax, %edi
	shrl	$31, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
	jmp	LBB0_18
LBB0_3:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_12:
	cmpq	$0, 40(%r15)
	je	LBB0_15
## %bb.13:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_nvmet_tcp_verify_hdgst
	testq	%rax, %rax
	jne	LBB0_14
LBB0_15:
	cmpq	$0, 32(%r15)
	je	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_nvmet_tcp_check_ddgst
	testq	%rax, %rax
	je	LBB0_17
LBB0_14:
	movq	%r15, %rdi
	callq	_nvmet_tcp_fatal_error
	movq	_EPROTO@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_18
LBB0_7:
	movl	24(%r15), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_pr_err
	movq	%r15, %rdi
	callq	_nvmet_tcp_fatal_error
	jmp	LBB0_10
LBB0_9:
	movl	24(%r15), %esi
	movq	16(%r15), %rdx
	leaq	L_.str.1(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_pr_err
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_18
LBB0_17:
	movq	%r15, %rdi
	callq	_nvmet_tcp_done_recv_pdu
	movl	%eax, %r13d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DONTWAIT,4,2               ## @MSG_DONTWAIT
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected pdu type %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"pdu %d bad hlen %d\n"

	.comm	_EPROTO,4,2                     ## @EPROTO
	.no_dead_strip	_nvmet_tcp_try_recv_pdu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvmet_tcp_try_recv_pdu
_nvmet_tcp_try_recv_pdu:                ; @nvmet_tcp_try_recv_pdu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	add	x20, x0, #16
Lloh0:
	adrp	x8, _MSG_DONTWAIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DONTWAIT@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
	str	w5, [sp, #8]
	ldrsw	x8, [x0]
	ldr	x4, [x0, #8]
	add	x8, x20, x8
	stp	x4, x8, [sp, #16]
	ldr	w0, [x0, #48]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	add	x2, sp, #16
	mov	w3, #1
	bl	_kernel_recvmsg
	mov	x21, x0
	lsr	w0, w0, #31
	bl	_unlikely
	cbnz	x0, LBB0_17
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrsw	x8, [x19]
	sxtw	x9, w21
	add	x2, x8, x9
	str	w2, [x19]
	ldr	x8, [x19, #8]
	subs	x8, x8, x9
	str	x8, [x19, #8]
	b.ne	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w2, #16
	b.ne	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_nvmet_tcp_hdgst_len
	mov	x21, x0
	ldr	w0, [x19, #24]
	bl	_nvmet_tcp_pdu_valid
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x22, [x19, #16]
	ldr	w0, [x19, #24]
	bl	_nvmet_tcp_pdu_size
	cmp	x22, x0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #16]
	ldrsw	x9, [x19]
	add	x8, x8, x21
	sub	x4, x8, x9
	str	x4, [x19, #8]
	ldr	w5, [sp, #8]
	add	x8, x20, x9
	stp	x4, x8, [sp, #16]
	ldr	w0, [x19, #48]
	b	LBB0_1
LBB0_7:
Lloh3:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_16
LBB0_8:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	bl	_nvmet_tcp_verify_hdgst
	cbnz	x0, LBB0_12
LBB0_10:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_18
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	bl	_nvmet_tcp_check_ddgst
	cbz	x0, LBB0_18
LBB0_12:
	mov	x0, x19
	bl	_nvmet_tcp_fatal_error
Lloh5:
	adrp	x8, _EPROTO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
	ldr	w1, [x19, #24]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	mov	x0, x19
	bl	_nvmet_tcp_fatal_error
	b	LBB0_15
LBB0_14:
	ldr	w1, [x19, #24]
	ldr	x8, [x19, #16]
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_15:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_17:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_18:
	mov	x0, x19
	bl	_nvmet_tcp_done_recv_pdu
	mov	x21, x0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DONTWAIT,4,2               ; @MSG_DONTWAIT
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected pdu type %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"pdu %d bad hlen %d\n"

	.comm	_EPROTO,4,2                     ; @EPROTO
	.no_dead_strip	_nvmet_tcp_try_recv_pdu
.subsections_via_symbols
