	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function recvfd_payload
_recvfd_payload:                        ## @recvfd_payload
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	%edi, %r15d
	leaq	-88(%rbp), %rdi
	movl	$32, %esi
	callq	_bzero
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_ATF_REQUIRE
	movq	%r13, -88(%rbp)
	movq	%rbx, -80(%rbp)
	movq	%r12, -96(%rbp)
	movq	%r14, -104(%rbp)
	leaq	-104(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$1, -72(%rbp)
	xorl	%r12d, %r12d
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	leaq	-88(%rbp), %rsi
	xorl	%edx, %edx
	callq	_recvmsg
	movl	%eax, %r13d
	xorl	%ebx, %ebx
	cmpl	$-1, %eax
	setne	%bl
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	movslq	%r13d, %rdx
	xorl	%edi, %edi
	cmpq	%r14, %rdx
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	leaq	-88(%rbp), %rdi
	callq	_CMSG_FIRSTHDR
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$-1, (%rax)
	movl	$0, %r14d
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	xorl	%r14d, %r14d
	movq	_SOL_SOCKET@GOTPCREL(%rip), %r13
	movq	_SCM_RIGHTS@GOTPCREL(%rip), %r15
	leaq	-88(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rax
	movq	_SCM_CREDS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$1, %eax
	cmovel	%eax, %r14d
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_CMSG_NXTHDR
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	(%r13), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %r12
	movq	16(%rbx), %r15
	movl	$4, %edi
	callq	_CMSG_LEN
	cmpq	%rax, %r15
	jne	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_CMSG_DATA
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$4, %edx
	callq	_memcpy
	xorl	%edi, %edi
	cmpl	$-1, (%r15)
	setne	%dil
	callq	_ATF_REQUIRE
	movq	%r12, %r15
	leaq	-88(%rbp), %r12
	jmp	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rax
	movq	(%r13), %rcx
	movq	%r12, %r15
	leaq	-88(%rbp), %r12
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rcx, %rax
	je	LBB0_7
	jmp	LBB0_8
LBB0_9:
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$-1, (%rax)
	setne	%r12b
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movl	%r12d, %edi
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_localcreds
	testl	%eax, %eax
	sete	%al
	testl	%r14d, %r14d
	setne	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"recvmsg failed: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"recvmsg: %zd bytes received; expected %zd"

L_.str.2:                               ## @.str.2
	.asciz	"recvmsg: did not receive control message"

	.comm	_SOL_SOCKET,8,3                 ## @SOL_SOCKET
	.comm	_SCM_RIGHTS,8,3                 ## @SCM_RIGHTS
	.comm	_SCM_CREDS,8,3                  ## @SCM_CREDS
L_.str.3:                               ## @.str.3
	.asciz	"recvmsg: did not receive single-fd message"

L_.str.4:                               ## @.str.4
	.asciz	"recvmsg: expected credentials were not received"

	.no_dead_strip	_recvfd_payload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function recvfd_payload
_recvfd_payload:                        ; @recvfd_payload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x22, x4
	mov	x21, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	add	x0, sp, #32
	mov	w1, #32
	bl	_bzero
	mov	x0, x22
	bl	_malloc
	mov	x24, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_ATF_REQUIRE
	stp	x24, x22, [sp, #32]
	stp	x21, x23, [sp, #16]
	add	x8, sp, #16
	str	x8, [sp, #56]
	mov	w8, #1
	str	w8, [sp, #48]
	add	x1, sp, #32
	mov	x0, x19
	mov	w2, #0
	bl	_recvmsg
	mov	x22, x0
	cmn	w0, #1
	cset	w23, ne
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_ATF_REQUIRE_MSG
	sxtw	x8, w22
	cmp	x8, x21
	cset	w0, eq
	stp	x22, x21, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	add	x0, sp, #32
	bl	_CMSG_FIRSTHDR
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	mov	w8, #-1
	str	w8, [x20]
	cbz	x21, LBB0_11
; %bb.1:
	mov	w22, #0
Lloh9:
	adrp	x23, _SOL_SOCKET@GOTPAGE
Lloh10:
	ldr	x23, [x23, _SOL_SOCKET@GOTPAGEOFF]
Lloh11:
	adrp	x24, _SCM_RIGHTS@GOTPAGE
Lloh12:
	ldr	x24, [x24, _SCM_RIGHTS@GOTPAGEOFF]
Lloh13:
	adrp	x25, _SCM_CREDS@GOTPAGE
Lloh14:
	ldr	x25, [x25, _SCM_CREDS@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	csinc	w22, w22, wzr, ne
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #32
	mov	x1, x21
	bl	_CMSG_NXTHDR
	mov	x21, x0
	cbz	x0, LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x26, [x21, #16]
	mov	w0, #4
	bl	_CMSG_LEN
	cmp	x26, x0
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_CMSG_DATA
	mov	x1, x0
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x20]
	cmn	w8, #1
	cset	w0, ne
	bl	_ATF_REQUIRE
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x23]
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, x9
	b.eq	LBB0_2
	b	LBB0_3
LBB0_10:
	ldr	w8, [x20]
	cmn	w8, #1
	cset	w0, ne
	b	LBB0_12
LBB0_11:
	mov	w0, #0
	mov	w22, #0
LBB0_12:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	mov	x0, x19
	bl	_localcreds
	cmp	w0, #0
	ccmp	w22, #0, #0, ne
	cset	w0, ne
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"recvmsg failed: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"recvmsg: %zd bytes received; expected %zd"

l_.str.2:                               ; @.str.2
	.asciz	"recvmsg: did not receive control message"

	.comm	_SOL_SOCKET,8,3                 ; @SOL_SOCKET
	.comm	_SCM_RIGHTS,8,3                 ; @SCM_RIGHTS
	.comm	_SCM_CREDS,8,3                  ; @SCM_CREDS
l_.str.3:                               ; @.str.3
	.asciz	"recvmsg: did not receive single-fd message"

l_.str.4:                               ; @.str.4
	.asciz	"recvmsg: expected credentials were not received"

	.no_dead_strip	_recvfd_payload
.subsections_via_symbols
