	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function text_receive
_text_receive:                          ## @text_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_pdu_new
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_pdu_receive
	movq	(%r15), %rbx
	movq	(%rbx), %rdx
	movq	_ISCSI_BHS_OPCODE_TEXT_RESPONSE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_log_errx
	movq	(%r15), %rbx
LBB0_2:
	movq	_BHSTR_FLAGS_CONTINUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_log_errx
LBB0_4:
	movl	4(%rbx), %edi
	callq	_ntohl
	movq	(%r14), %rcx
	incq	%rcx
	cmpq	%rcx, %rax
	je	LBB0_6
## %bb.5:
	movl	4(%rbx), %edi
	callq	_ntohl
	movq	(%r14), %rcx
	incq	%rcx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_log_errx
LBB0_6:
	movl	4(%rbx), %edi
	callq	_ntohl
	movq	%rax, (%r14)
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISCSI_BHS_OPCODE_TEXT_RESPONSE,8,3 ## @ISCSI_BHS_OPCODE_TEXT_RESPONSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"protocol error: received invalid opcode 0x%x"

	.comm	_BHSTR_FLAGS_CONTINUE,4,2       ## @BHSTR_FLAGS_CONTINUE
L_.str.1:                               ## @.str.1
	.asciz	"received Text PDU with unsupported \"C\" flag"

L_.str.2:                               ## @.str.2
	.asciz	"received Text PDU with wrong StatSN: is %u, should be %u"

	.comm	_BHSTR_FLAGS_FINAL,4,2          ## @BHSTR_FLAGS_FINAL
	.no_dead_strip	_text_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function text_receive
_text_receive:                          ; @text_receive
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_pdu_new
	mov	x20, x0
	bl	_pdu_receive
	ldr	x21, [x20]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _ISCSI_BHS_OPCODE_TEXT_RESPONSE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ISCSI_BHS_OPCODE_TEXT_RESPONSE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_log_errx
	ldr	x21, [x20]
LBB0_2:
	ldr	w8, [x21]
Lloh5:
	adrp	x9, _BHSTR_FLAGS_CONTINUE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BHSTR_FLAGS_CONTINUE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_log_errx
LBB0_4:
	ldr	w0, [x21, #4]
	bl	_ntohl
	ldr	x8, [x19]
	add	x8, x8, #1
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x21, #4]
	bl	_ntohl
	ldr	x8, [x19]
	add	x8, x8, #1
	stp	x0, x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_log_errx
LBB0_6:
	ldr	w0, [x21, #4]
	bl	_ntohl
	str	x0, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ISCSI_BHS_OPCODE_TEXT_RESPONSE,8,3 ; @ISCSI_BHS_OPCODE_TEXT_RESPONSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"protocol error: received invalid opcode 0x%x"

	.comm	_BHSTR_FLAGS_CONTINUE,4,2       ; @BHSTR_FLAGS_CONTINUE
l_.str.1:                               ; @.str.1
	.asciz	"received Text PDU with unsupported \"C\" flag"

l_.str.2:                               ; @.str.2
	.asciz	"received Text PDU with wrong StatSN: is %u, should be %u"

	.comm	_BHSTR_FLAGS_FINAL,4,2          ; @BHSTR_FLAGS_FINAL
	.no_dead_strip	_text_receive
.subsections_via_symbols
