	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fd_recv                        ## -- Begin function fd_recv
	.p2align	4, 0x90
_fd_recv:                               ## @fd_recv
	.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
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	%rdx, %r15
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.2:
	movq	%rsi, %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_PKG_MAX_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r15, %rbx
	subq	%r12, %rbx
	cmpq	%rbx, %rax
	cmovbq	%rax, %rbx
	leaq	(%r14,%r12,4), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_fd_package_recv
	testl	%eax, %eax
	jne	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%ebx, %r12d
	cmpq	%r15, %r12
	jb	LBB0_3
## %bb.10:
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$-1, %r13d
	jmp	LBB0_8
LBB0_4:
	movl	%eax, %r13d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.5:
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edi
	callq	_close
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_6
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r15d, (%rax)
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_PKG_MAX_SIZE,8,3               ## @PKG_MAX_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fd_recv                        ; -- Begin function fd_recv
	.p2align	2
_fd_recv:                               ; @fd_recv
	.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
Lloh0:
	adrp	x24, _errno@GOTPAGE
Lloh1:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
	cbz	x1, LBB0_6
; %bb.1:
	mov	x21, x2
	cbz	x2, LBB0_6
; %bb.2:
	mov	x19, x1
	mov	x22, x0
	mov	x8, #0
	mov	w25, #0
Lloh2:
	adrp	x26, _PKG_MAX_SIZE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _PKG_MAX_SIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x26]
	sub	x10, x21, x8
	cmp	x9, x10
	csel	x23, x9, x10, lo
	add	x1, x19, x8, lsl #2
	mov	x0, x22
	mov	x2, x23
	bl	_fd_package_recv
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w25, w23
	cmp	x8, x21
	mov	x25, x8
	b.lo	LBB0_3
; %bb.5:
	mov	w20, #0
	b	LBB0_11
LBB0_6:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
	mov	w20, #-1
	b	LBB0_10
LBB0_7:
	mov	x20, x0
	ldr	w21, [x24]
	cbz	w25, LBB0_10
; %bb.8:
	mov	w22, w25
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19], #4
	bl	_close
	subs	x22, x22, #1
	b.ne	LBB0_9
LBB0_10:
	str	w21, [x24]
LBB0_11:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_PKG_MAX_SIZE,8,3               ; @PKG_MAX_SIZE
.subsections_via_symbols
