	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function logout_receive
_logout_receive:                        ## @logout_receive
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_pdu_new
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_pdu_receive
	movq	(%r14), %rbx
	movl	(%rbx), %edx
	movq	_ISCSI_BHS_OPCODE_IMMEDIATE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	notl	%eax
	andl	%edx, %eax
	movq	_ISCSI_BHS_OPCODE_LOGOUT_REQUEST@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_log_errx
	movq	(%r14), %rbx
LBB0_2:
	movl	(%rbx), %esi
	andl	$127, %esi
	movq	_BHSLR_REASON_CLOSE_SESSION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_log_debugx
LBB0_4:
	movl	8(%rbx), %edi
	callq	_ntohl
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_ISCSI_SNLT
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%r13), %r15d
	movl	8(%rbx), %edi
	callq	_ntohl
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_log_errx
LBB0_6:
	movl	12(%rbx), %edi
	callq	_ntohl
	movl	4(%r13), %ecx
	cmpl	%ecx, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_log_errx
LBB0_8:
	movl	8(%rbx), %edi
	callq	_ntohl
	movl	%eax, (%r13)
	movl	(%r12), %ecx
	testl	%ecx, 4(%rbx)
	jne	LBB0_10
## %bb.9:
	incl	%eax
	movl	%eax, (%r13)
LBB0_10:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISCSI_BHS_OPCODE_IMMEDIATE,4,2 ## @ISCSI_BHS_OPCODE_IMMEDIATE
	.comm	_ISCSI_BHS_OPCODE_LOGOUT_REQUEST,4,2 ## @ISCSI_BHS_OPCODE_LOGOUT_REQUEST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"protocol error: received invalid opcode 0x%x"

	.comm	_BHSLR_REASON_CLOSE_SESSION,4,2 ## @BHSLR_REASON_CLOSE_SESSION
L_.str.1:                               ## @.str.1
	.asciz	"received Logout PDU with invalid reason 0x%x; continuing anyway"

L_.str.2:                               ## @.str.2
	.asciz	"received Logout PDU with decreasing CmdSN: was %u, is %u"

L_.str.3:                               ## @.str.3
	.asciz	"received Logout PDU with wrong ExpStatSN: is %u, should be %u"

	.no_dead_strip	_logout_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function logout_receive
_logout_receive:                        ; @logout_receive
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	bl	_pdu_new
	mov	x20, x0
	bl	_pdu_receive
	ldr	x23, [x20]
	ldr	w2, [x23]
Lloh0:
	adrp	x22, _ISCSI_BHS_OPCODE_IMMEDIATE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ISCSI_BHS_OPCODE_IMMEDIATE@GOTPAGEOFF]
	ldr	w8, [x22]
	bic	w8, w2, w8
Lloh2:
	adrp	x9, _ISCSI_BHS_OPCODE_LOGOUT_REQUEST@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ISCSI_BHS_OPCODE_LOGOUT_REQUEST@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_log_errx
	ldr	x23, [x20]
LBB0_2:
	ldr	w8, [x23]
	and	w1, w8, #0x7f
Lloh7:
	adrp	x8, _BHSLR_REASON_CLOSE_SESSION@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BHSLR_REASON_CLOSE_SESSION@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w1, w8
	b.eq	LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log_debugx
LBB0_4:
	ldr	w0, [x23, #8]
	bl	_ntohl
	ldr	w1, [x19]
	bl	_ISCSI_SNLT
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w21, [x19]
	ldr	w0, [x23, #8]
	bl	_ntohl
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_log_errx
LBB0_6:
	ldr	w0, [x23, #12]
	bl	_ntohl
	ldr	w8, [x19, #4]
	cmp	w0, w8
	b.eq	LBB0_8
; %bb.7:
	mov	x2, x0
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_log_errx
LBB0_8:
	ldr	w0, [x23, #8]
	bl	_ntohl
	str	w0, [x19]
	ldr	w8, [x23, #4]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.9:
	add	w8, w0, #1
	str	w8, [x19]
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ISCSI_BHS_OPCODE_IMMEDIATE,4,2 ; @ISCSI_BHS_OPCODE_IMMEDIATE
	.comm	_ISCSI_BHS_OPCODE_LOGOUT_REQUEST,4,2 ; @ISCSI_BHS_OPCODE_LOGOUT_REQUEST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"protocol error: received invalid opcode 0x%x"

	.comm	_BHSLR_REASON_CLOSE_SESSION,4,2 ; @BHSLR_REASON_CLOSE_SESSION
l_.str.1:                               ; @.str.1
	.asciz	"received Logout PDU with invalid reason 0x%x; continuing anyway"

l_.str.2:                               ; @.str.2
	.asciz	"received Logout PDU with decreasing CmdSN: was %u, is %u"

l_.str.3:                               ; @.str.3
	.asciz	"received Logout PDU with wrong ExpStatSN: is %u, should be %u"

	.no_dead_strip	_logout_receive
.subsections_via_symbols
