	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fd_package_recv
_fd_package_recv:                       ## @fd_package_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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movl	%edi, %r15d
	notl	%edi
	shrl	$31, %edi
	callq	_PJDLOG_ASSERT
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_PJDLOG_ASSERT
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_PJDLOG_ASSERT
	leaq	-104(%rbp), %rdi
	movl	$40, %esi
	callq	_bzero
	leaq	-144(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$40, %esi
	callq	_bzero
	leaq	-60(%rbp), %rax
	movq	%rax, -112(%rbp)
	movl	$4, -144(%rbp)
	movq	%rbx, -80(%rbp)
	movl	$1, -100(%rbp)
	movl	$4, %edi
	callq	_CMSG_SPACE
	imulq	%r12, %rax
	movq	%rax, -96(%rbp)
	movl	$1, %edi
	movq	%rax, %rsi
	callq	_calloc
	movq	%rax, -88(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	-104(%rbp), %rsi
	movl	%r15d, %edi
	callq	_msg_recv
	movl	$-1, %ebx
	cmpl	$-1, %eax
	je	LBB0_24
## %bb.3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	leaq	-104(%rbp), %rdi
	callq	_CMSG_FIRSTHDR
	movq	%rax, %rbx
	xorl	%r13d, %r13d
	testq	%rax, %rax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.4:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_11
## %bb.5:
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rbx), %rax
	movq	_SCM_RIGHTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	16(%rbx), %r15d
	xorl	%edi, %edi
	callq	_CMSG_LEN
	subl	%eax, %r15d
	movl	%r15d, %r13d
	sarl	$2, %r13d
	addl	%r14d, %r13d
	cmpq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	ja	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_CMSG_DATA
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r12,4), %rsi
	andl	$-4, %r15d
	movl	%eax, %edi
	movl	%r15d, %edx
	callq	_bcopy
	leaq	-104(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_CMSG_NXTHDR
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %r12
	movl	%r13d, %r14d
	cmpq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	jb	LBB0_6
LBB0_11:
	movl	%r13d, %r15d
	movl	%r13d, %r14d
	testq	%rbx, %rbx
	jne	LBB0_18
## %bb.12:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	cmpq	%r13, %r15
	jb	LBB0_18
## %bb.13:
	testq	%r13, %r13
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_16
## %bb.14:
	movq	_F_SETFD@GOTPCREL(%rip), %r14
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %edi
	movl	(%r14), %esi
	movl	(%r15), %edx
	callq	_fcntl
	incl	%ebx
	cmpq	%r13, %rbx
	jb	LBB0_15
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_25
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%r14d, %r15d
LBB0_18:
	testl	%r14d, %r14d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_23
## %bb.19:
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%rbx
	cmpq	%rbx, %r15
	je	LBB0_23
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edi
	testl	%edi, %edi
	js	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	callq	_close
	jmp	LBB0_22
LBB0_23:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %ebx
LBB0_24:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movq	-88(%rbp), %rdi
	callq	_free
	movl	%r15d, (%r14)
LBB0_25:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOL_SOCKET,8,3                 ## @SOL_SOCKET
	.comm	_SCM_RIGHTS,8,3                 ## @SCM_RIGHTS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
	.no_dead_strip	_fd_package_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fd_package_recv
_fd_package_recv:                       ; @fd_package_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	mvn	w8, w0
	lsr	w0, w8, #31
	bl	_PJDLOG_ASSERT
	cmp	x20, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
	cmp	x19, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
	add	x0, sp, #56
	mov	w1, #40
	bl	_bzero
	add	x22, sp, #16
	add	x0, sp, #16
	mov	w1, #40
	bl	_bzero
	add	x8, sp, #12
	str	x8, [sp, #48]
	mov	w8, #4
	str	w8, [sp, #16]
	str	x22, [sp, #80]
	mov	w8, #1
	str	w8, [sp, #60]
	mov	w0, #4
	bl	_CMSG_SPACE
	mul	x1, x0, x20
	str	x1, [sp, #64]
	mov	w0, #1
	bl	_calloc
	str	x0, [sp, #72]
	cbz	x0, LBB0_16
; %bb.1:
	add	x1, sp, #56
	mov	x0, x21
	bl	_msg_recv
Lloh0:
	adrp	x25, _errno@GOTPAGE
Lloh1:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.2:
	add	x0, sp, #56
	bl	_CMSG_FIRSTHDR
	mov	x21, x0
	mov	w26, #0
Lloh2:
	adrp	x22, _EINVAL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _EINVAL@GOTPAGEOFF]
	cbz	x0, LBB0_10
; %bb.3:
	cbz	x20, LBB0_10
; %bb.4:
	mov	x28, #0
	mov	w27, #0
Lloh4:
	adrp	x24, _SOL_SOCKET@GOTPAGE
Lloh5:
	ldr	x24, [x24, _SOL_SOCKET@GOTPAGEOFF]
Lloh6:
	adrp	x25, _SCM_RIGHTS@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SCM_RIGHTS@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w23, [x21, #16]
	mov	w0, #0
	bl	_CMSG_LEN
	sub	w23, w23, w0
	add	w26, w27, w23, asr #2
	cmp	x26, x20
	b.hi	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_CMSG_DATA
	add	x1, x19, x28, lsl #2
	and	w2, w23, #0xfffffffc
	bl	_bcopy
	add	x0, sp, #56
	mov	x1, x21
	bl	_CMSG_NXTHDR
	mov	x21, x0
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x28, x26
	mov	x27, x26
	cmp	x26, x20
	b.lo	LBB0_5
LBB0_10:
	mov	w24, w26
	mov	x27, x26
	cbnz	x21, LBB0_19
; %bb.11:
	cmp	x24, x20
Lloh8:
	adrp	x25, _errno@GOTPAGE
Lloh9:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	b.lo	LBB0_18
; %bb.12:
	cbz	x20, LBB0_15
; %bb.13:
	mov	x21, #0
Lloh10:
	adrp	x23, _F_SETFD@GOTPAGE
Lloh11:
	ldr	x23, [x23, _F_SETFD@GOTPAGEOFF]
Lloh12:
	adrp	x24, _FD_CLOEXEC@GOTPAGE
Lloh13:
	ldr	x24, [x24, _FD_CLOEXEC@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, x21, lsl #2]
	ldr	w1, [x23]
	ldr	w2, [x24]
	bl	_fcntl
	add	w21, w21, #1
	cmp	x21, x20
	b.lo	LBB0_14
LBB0_15:
	mov	w19, #0
	b	LBB0_22
LBB0_16:
	mov	w19, #-1
	b	LBB0_23
LBB0_17:
	ldr	w8, [x22]
Lloh14:
	adrp	x25, _errno@GOTPAGE
Lloh15:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	str	w8, [x25]
	mov	w24, w27
LBB0_18:
	cbnz	w27, LBB0_25
	b	LBB0_20
LBB0_19:
Lloh16:
	adrp	x25, _errno@GOTPAGE
Lloh17:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	cbnz	w27, LBB0_25
LBB0_20:
	ldr	w8, [x22]
	str	w8, [x25]
LBB0_21:
	mov	w19, #-1
LBB0_22:
	ldr	w20, [x25]
	ldr	x0, [sp, #72]
	bl	_free
	str	w20, [x25]
LBB0_23:
	mov	x0, x19
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	x19, x19, #4
	subs	x24, x24, #1
	b.eq	LBB0_20
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	tbnz	w0, #31, LBB0_24
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	bl	_close
	b	LBB0_24
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SOL_SOCKET,8,3                 ; @SOL_SOCKET
	.comm	_SCM_RIGHTS,8,3                 ; @SCM_RIGHTS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
	.no_dead_strip	_fd_package_recv
.subsections_via_symbols
