	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bundle_ReceiveDatalink         ## -- Begin function bundle_ReceiveDatalink
	.p2align	4, 0x90
_bundle_ReceiveDatalink:                ## @bundle_ReceiveDatalink
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SEND_MAXFD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	24(,%rax,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -104(%rbp)                ## 8-byte Spill
	movq	_SCATTER_SEGMENTS@GOTPCREL(%rip), %r14
	movl	(%r14), %r13d
	movq	%r13, %rax
	shlq	$4, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_LogPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_log_Printf
	movq	_Version@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strlen
	incq	%rax
	movq	%rax, 8(%rbx)
	movq	$0, (%rbx)
	movl	$1, -52(%rbp)
	movl	(%r14), %ecx
	leaq	-52(%rbp), %rdx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_datalink2iov
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.1:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %r14d
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.2:
	shlq	$4, %r14
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13,%r12), %rbx
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, (%r13,%r12)
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%r12, %r12
	movl	$0, %eax
	cmovel	%eax, %ebx
	addl	%ebx, %r15d
	addq	$16, %r12
	cmpq	%r12, %r14
	jne	LBB0_3
LBB0_8:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leal	24(,%rax,4), %r13d
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movl	%r13d, (%rbx)
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	$0, 16(%rbx)
	leaq	-152(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	xorps	%xmm0, %xmm0
	movups	%xmm0, -120(%rbp)
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, -128(%rbp)
	movl	$1, -152(%rbp)
	movq	%rbx, -144(%rbp)
	movl	%r13d, -136(%rbp)
	movq	_LogDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r12), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movq	_MSG_WAITALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	callq	_recvmsg
	movl	8(%r12), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_9
## %bb.14:
	movq	8(%rbx), %rax
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movq	16(%rbx), %rax
	movq	_SCM_RIGHTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.19:
	movq	%rbx, %rdi
	callq	_CMSG_DATA
	movq	%rbx, %rcx
	movq	%rax, %r13
	movl	(%rbx), %ebx
	addl	%ecx, %ebx
	subl	%r13d, %ebx
	movl	%ebx, %r14d
	sarl	$2, %r14d
	cmpl	$7, %ebx
	jg	LBB0_25
## %bb.20:
	movq	_LogERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	$1, %r14d
	leaq	L_.str.8(%rip), %rax
	leaq	L_.str.9(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.7(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_log_Printf
	cmpl	$4, %ebx
	jb	LBB0_23
## %bb.21:
	movslq	%r14d, %rax
	addl	$-2, %r14d
	leaq	-4(,%rax,4), %rbx
	addq	%r13, %rbx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_close
	movl	%r14d, -56(%rbp)
	decl	%r14d
	addq	$-4, %rbx
	cmpl	$-2, %r14d
	jne	LBB0_22
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_23 Depth=1
	cltq
	shlq	$4, %rax
	movq	(%r12,%rax), %rdi
	callq	_free
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -52(%rbp)
	jae	LBB0_24
	jmp	LBB0_59
LBB0_5:
	movq	_LogERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_9:
	movq	_LogERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.11:
	leaq	L_.str.5(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_12
LBB0_4:
	movq	_LogERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_59
LBB0_16:
	movq	_LogERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -52(%rbp)
	jb	LBB0_59
## %bb.17:                              ##   in Loop: Header=BB0_18 Depth=1
	cltq
	shlq	$4, %rax
	movq	(%r12,%rax), %rdi
	callq	_free
	jmp	LBB0_18
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_12 Depth=1
	cltq
	shlq	$4, %rax
	movq	(%r12,%rax), %rdi
	callq	_free
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -52(%rbp)
	jae	LBB0_13
LBB0_59:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_61
## %bb.60:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	_Version@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	(%r12), %rsi
	movq	8(%r12), %rdx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_30
## %bb.26:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r12), %edx
	movq	(%r12), %rcx
	movl	(%rbx), %r8d
	leaq	L_.str.10(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movslq	%r14d, %rax
	addl	$-2, %r14d
	leaq	-4(,%rax,4), %rbx
	addq	%r13, %rbx
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_close
	movl	%r14d, -56(%rbp)
	decl	%r14d
	addq	$-4, %rbx
	cmpl	$-2, %r14d
	jne	LBB0_27
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_28 Depth=1
	cltq
	shlq	$4, %rax
	movq	(%r12,%rax), %rdi
	callq	_free
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -52(%rbp)
	jae	LBB0_29
	jmp	LBB0_59
LBB0_30:
	xorl	%eax, %eax
	callq	_getpid
	movl	%eax, -64(%rbp)
	movl	4(%r13), %edi
	leaq	-64(%rbp), %rsi
	movl	$4, %edx
	callq	_write
	cmpl	$4, %eax
	je	LBB0_38
## %bb.31:
	cmpl	$-1, %eax
	jne	LBB0_33
## %bb.32:
	movq	_LogERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.11(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_34
LBB0_38:
	movl	4(%r13), %edi
	movq	%r12, %rsi
	addq	$16, %rsi
	movl	-52(%rbp), %edx
	decl	%edx
	callq	_readv
	cmpl	%r15d, %eax
	jne	LBB0_39
## %bb.46:
	movl	4(%r13), %edi
	callq	_close
	leal	-2(%r14), %eax
	movl	%eax, -56(%rbp)
	movl	$1, -52(%rbp)
	movl	(%r13), %r8d
	leaq	8(%r13), %r9
	subq	$8, %rsp
	leaq	-56(%rbp), %rax
	leaq	-52(%rbp), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	pushq	%rax
	callq	_iov2datalink
	addq	$16, %rsp
	movl	-56(%rbp), %ecx
	testq	%rax, %rax
	je	LBB0_47
## %bb.52:
	movq	%rax, %r15
	testl	%ecx, %ecx
	je	LBB0_57
## %bb.53:
	movq	_LogERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.13(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_log_Printf
	movq	%r15, %rdi
	callq	_datalink_Destroy
	subl	$1, -56(%rbp)
	jb	LBB0_56
## %bb.54:
	movslq	%r14d, %rax
	leaq	(,%rax,4), %rbx
	addq	%r13, %rbx
LBB0_55:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_close
	addq	$-4, %rbx
	subl	$1, -56(%rbp)
	jae	LBB0_55
LBB0_56:
	movl	(%r13), %edi
	callq	_close
	jmp	LBB0_58
LBB0_33:
	movq	_LogERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.12(%rip), %rsi
	movl	%eax, %edx
	movl	$4, %ecx
	xorl	%eax, %eax
	callq	_log_Printf
LBB0_34:
	movslq	%r14d, %rax
	addl	$-2, %r14d
	leaq	-4(,%rax,4), %rbx
	addq	%r13, %rbx
	.p2align	4, 0x90
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_close
	movl	%r14d, -56(%rbp)
	decl	%r14d
	addq	$-4, %rbx
	cmpl	$-2, %r14d
	jne	LBB0_35
	jmp	LBB0_36
LBB0_37:                                ##   in Loop: Header=BB0_36 Depth=1
	cltq
	shlq	$4, %rax
	movq	(%r12,%rax), %rdi
	callq	_free
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -52(%rbp)
	jae	LBB0_37
	jmp	LBB0_59
LBB0_39:
	movq	_LogERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	cmpl	$-1, %eax
	je	LBB0_40
## %bb.41:
	leaq	L_.str.12(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_42
LBB0_47:
	subl	$1, %ecx
	movl	%ecx, -56(%rbp)
	jb	LBB0_50
## %bb.48:
	movslq	%r14d, %rax
	leaq	(,%rax,4), %rbx
	addq	%r13, %rbx
LBB0_49:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_close
	addq	$-4, %rbx
	subl	$1, -56(%rbp)
	jae	LBB0_49
LBB0_50:
	movl	(%r13), %edi
	callq	_close
	movl	4(%r13), %edi
	callq	_close
	jmp	LBB0_58
LBB0_40:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.11(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_log_Printf
LBB0_42:
	movslq	%r14d, %rax
	addl	$-2, %r14d
	leaq	-4(,%rax,4), %rbx
	addq	%r13, %rbx
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_close
	movl	%r14d, -56(%rbp)
	decl	%r14d
	addq	$-4, %rbx
	cmpl	$-2, %r14d
	jne	LBB0_43
	jmp	LBB0_44
LBB0_45:                                ##   in Loop: Header=BB0_44 Depth=1
	cltq
	shlq	$4, %rax
	movq	(%r12,%rax), %rdi
	callq	_free
LBB0_44:                                ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -52(%rbp)
	jae	LBB0_45
	jmp	LBB0_59
LBB0_57:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_bundle_DatalinkLinkin
	movq	%r15, %rdi
	callq	_datalink_AuthOk
	movl	(%r15), %edi
	callq	_bundle_CalculateBandwidth
LBB0_58:
	movq	(%r12), %rdi
	callq	_free
	jmp	LBB0_59
LBB0_61:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SEND_MAXFD,4,2                 ## @SEND_MAXFD
	.comm	_SCATTER_SEGMENTS,4,2           ## @SCATTER_SEGMENTS
	.comm	_LogPHASE,4,2                   ## @LogPHASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Receiving datalink\n"

	.comm	_Version,4,2                    ## @Version
	.comm	_LogERROR,4,2                   ## @LogERROR
L_.str.1:                               ## @.str.1
	.asciz	"Cannot determine space required for link\n"

L_.str.2:                               ## @.str.2
	.asciz	"Cannot allocate space to receive link\n"

	.comm	_SOL_SOCKET,8,3                 ## @SOL_SOCKET
	.comm	_LogDEBUG,4,2                   ## @LogDEBUG
L_.str.3:                               ## @.str.3
	.asciz	"Expecting %u scatter/gather bytes\n"

	.comm	_MSG_WAITALL,4,2                ## @MSG_WAITALL
L_.str.4:                               ## @.str.4
	.asciz	"Failed recvmsg: %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.5:                               ## @.str.5
	.asciz	"Failed recvmsg: Got %zd, not %u\n"

	.comm	_SCM_RIGHTS,8,3                 ## @SCM_RIGHTS
L_.str.6:                               ## @.str.6
	.asciz	"Recvmsg: no descriptors received !\n"

L_.str.7:                               ## @.str.7
	.asciz	"Recvmsg: %d descriptor%s received (too few) !\n"

L_.str.8:                               ## @.str.8
	.space	1

L_.str.9:                               ## @.str.9
	.asciz	"s"

	.comm	_LogWARN,4,2                    ## @LogWARN
L_.str.10:                              ## @.str.10
	.asciz	"Cannot receive datalink, incorrect version (\"%.*s\", not \"%s\")\n"

L_.str.11:                              ## @.str.11
	.asciz	"Failed write: %s\n"

L_.str.12:                              ## @.str.12
	.asciz	"Failed write: Got %zd, not %d\n"

L_.str.13:                              ## @.str.13
	.asciz	"bundle_ReceiveDatalink: Failed to handle %d auxiliary file descriptors (%d remain)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bundle_ReceiveDatalink         ; -- Begin function bundle_ReceiveDatalink
	.p2align	2
_bundle_ReceiveDatalink:                ; @bundle_ReceiveDatalink
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #80
	mov	x20, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _SEND_MAXFD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEND_MAXFD@GOTPAGEOFF]
Lloh5:
	ldrsw	x27, [x8]
	lsl	x8, x27, #2
	add	x9, x8, #24
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #39
	and	x8, x8, #0xfffffffffffffff0
	sub	x23, x9, x8
	mov	sp, x23
Lloh8:
	adrp	x21, _SCATTER_SEGMENTS@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SCATTER_SEGMENTS@GOTPAGEOFF]
	ldr	w22, [x21]
	lsl	x8, x22, #4
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x19, x9, x8
	mov	sp, x19
Lloh12:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_Printf
Lloh17:
	adrp	x8, _Version@GOTPAGE
Lloh18:
	ldr	x8, [x8, _Version@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_strlen
	add	x8, x0, #1
	stp	xzr, x8, [x19]
	mov	w8, #1
	stur	w8, [x29, #-92]
	ldr	w3, [x21]
	sub	x2, x29, #92
	mov	x0, #0
	mov	x1, x19
	mov	x4, #0
	mov	x5, #0
	bl	_datalink2iov
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.1:
	stur	x24, [x29, #-160]               ; 8-byte Folded Spill
	ldur	w8, [x29, #-92]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x28, #0
	mov	w25, #0
	lsl	x21, x8, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x26, x19, x28
	ldr	x24, [x26, #8]
	mov	x0, x24
	bl	_malloc
	str	x0, [x26]
	cbz	x0, LBB0_18
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x28, #0
	csel	w8, wzr, w24, eq
	add	w25, w8, w25
	add	x28, x28, #16
	cmp	x21, x28
	b.ne	LBB0_3
	b	LBB0_7
LBB0_5:
Lloh20:
	adrp	x8, _LogERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _LogERROR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_6:
	mov	w25, #0
LBB0_7:
	lsl	w8, w27, #2
	add	w21, w8, #24
	str	w21, [x23]
Lloh25:
	adrp	x24, _SOL_SOCKET@GOTPAGE
Lloh26:
	ldr	x24, [x24, _SOL_SOCKET@GOTPAGEOFF]
	ldr	x8, [x24]
	stp	x8, xzr, [x23, #8]
	sub	x0, x29, #144
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	stp	xzr, xzr, [x29, #-112]
	stur	x19, [x29, #-120]
	mov	w8, #1
	stur	w8, [x29, #-144]
	stur	x23, [x29, #-136]
	stur	w21, [x29, #-128]
Lloh27:
	adrp	x8, _LogDEBUG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LogDEBUG@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	str	x8, [sp, #-16]!
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_log_Printf
	add	sp, sp, #16
Lloh32:
	adrp	x8, _MSG_WAITALL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MSG_WAITALL@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	sub	x1, x29, #144
	mov	x0, x20
	bl	_recvmsg
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19, #8]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.8:
	ldr	x8, [x23, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.9:
	ldr	x8, [x23, #16]
Lloh35:
	adrp	x9, _SCM_RIGHTS@GOTPAGE
Lloh36:
	ldr	x9, [x9, _SCM_RIGHTS@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.10:
	mov	x0, x23
	bl	_CMSG_DATA
	mov	x20, x0
	ldr	w8, [x23]
	add	w8, w8, w23
	sub	w21, w8, w20
	asr	w23, w21, #2
	cmp	w21, #7
	b.gt	LBB0_29
; %bb.11:
Lloh38:
	adrp	x8, _LogERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _LogERROR@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
Lloh41:
	adrp	x8, l_.str.9@PAGE
Lloh42:
	add	x8, x8, l_.str.9@PAGEOFF
Lloh43:
	adrp	x9, l_.str.8@PAGE
Lloh44:
	add	x9, x9, l_.str.8@PAGEOFF
	cmp	w23, #1
	csel	x8, x9, x8, eq
	stp	x23, x8, [sp, #-16]!
Lloh45:
	adrp	x1, l_.str.7@PAGE
Lloh46:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_log_Printf
	add	sp, sp, #16
	cmp	w21, #4
	b.lo	LBB0_15
; %bb.12:
	sub	w21, w23, #2
	add	x8, x20, w23, sxtw #2
	sub	x20, x8, #4
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20], #-4
	bl	_close
	stur	w21, [x29, #-96]
	sub	w21, w21, #1
	cmn	w21, #2
	b.ne	LBB0_13
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	sbfiz	x8, x8, #4, #32
	ldr	x0, [x19, x8]
	bl	_free
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x29, #-92]
	sub	w8, w9, #1
	stur	w8, [x29, #-92]
	cbnz	w9, LBB0_14
	b	LBB0_20
LBB0_16:
Lloh47:
	adrp	x9, _LogERROR@GOTPAGE
Lloh48:
	ldr	x9, [x9, _LogERROR@GOTPAGEOFF]
Lloh49:
	ldr	w20, [x9]
	cmn	w0, #1
	b.eq	LBB0_25
; %bb.17:
	stp	x0, x8, [sp, #-16]!
Lloh50:
	adrp	x1, l_.str.5@PAGE
Lloh51:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_26
LBB0_18:
Lloh52:
	adrp	x8, _LogERROR@GOTPAGE
Lloh53:
	ldr	x8, [x8, _LogERROR@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
Lloh55:
	adrp	x1, l_.str.2@PAGE
Lloh56:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_19:
	bl	_log_Printf
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh57:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh58:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh59:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_62
; %bb.21:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
Lloh60:
	adrp	x8, _LogERROR@GOTPAGE
Lloh61:
	ldr	x8, [x8, _LogERROR@GOTPAGEOFF]
Lloh62:
	ldr	w0, [x8]
Lloh63:
	adrp	x1, l_.str.6@PAGE
Lloh64:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_log_Printf
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x29, #-92]
	sub	w8, w9, #1
	stur	w8, [x29, #-92]
	cbz	w9, LBB0_20
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	sbfiz	x8, x8, #4, #32
	ldr	x0, [x19, x8]
	bl	_free
	b	LBB0_23
LBB0_25:
Lloh65:
	adrp	x8, _errno@GOTPAGE
Lloh66:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh67:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh68:
	adrp	x1, l_.str.4@PAGE
Lloh69:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_26:
	mov	x0, x20
	bl	_log_Printf
	add	sp, sp, #16
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x29, #-92]
	sub	w8, w9, #1
	stur	w8, [x29, #-92]
	cbz	w9, LBB0_20
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	sbfiz	x8, x8, #4, #32
	ldr	x0, [x19, x8]
	bl	_free
	b	LBB0_27
LBB0_29:
Lloh70:
	adrp	x21, _Version@GOTPAGE
Lloh71:
	ldr	x21, [x21, _Version@GOTPAGEOFF]
	ldr	w0, [x21]
	ldp	x1, x2, [x19]
	bl	_strncmp
	cbz	x0, LBB0_34
; %bb.30:
Lloh72:
	adrp	x8, _LogWARN@GOTPAGE
Lloh73:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh74:
	ldr	w0, [x8]
	ldp	x9, x8, [x19]
	ldr	w10, [x21]
	sub	sp, sp, #32
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh75:
	adrp	x1, l_.str.10@PAGE
Lloh76:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_log_Printf
	add	sp, sp, #32
	sub	w21, w23, #2
	add	x8, x20, w23, sxtw #2
	sub	x20, x8, #4
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20], #-4
	bl	_close
	stur	w21, [x29, #-96]
	sub	w21, w21, #1
	cmn	w21, #2
	b.ne	LBB0_31
	b	LBB0_33
LBB0_32:                                ;   in Loop: Header=BB0_33 Depth=1
	sbfiz	x8, x8, #4, #32
	ldr	x0, [x19, x8]
	bl	_free
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x29, #-92]
	sub	w8, w9, #1
	stur	w8, [x29, #-92]
	cbnz	w9, LBB0_32
	b	LBB0_20
LBB0_34:
	bl	_getpid
	stur	w0, [x29, #-148]
	ldr	w0, [x20, #4]
	sub	x1, x29, #148
	mov	w2, #4
	bl	_write
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #4
	b.eq	LBB0_37
; %bb.35:
Lloh77:
	adrp	x8, _LogERROR@GOTPAGE
Lloh78:
	ldr	x8, [x8, _LogERROR@GOTPAGEOFF]
	cmn	w0, #1
	b.ne	LBB0_44
; %bb.36:
	ldr	w21, [x8]
Lloh79:
	adrp	x8, _errno@GOTPAGE
Lloh80:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh81:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh82:
	adrp	x1, l_.str.11@PAGE
Lloh83:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x21
	b	LBB0_45
LBB0_37:
	ldr	w0, [x20, #4]
	add	x1, x19, #16
	ldur	w8, [x29, #-92]
	sub	w2, w8, #1
	bl	_readv
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, w25
	b.ne	LBB0_49
; %bb.38:
	ldr	w0, [x20, #4]
	bl	_close
	sub	w9, w23, #2
	mov	w8, #1
	stp	w9, w8, [x29, #-96]
	ldr	w4, [x20]
	add	x5, x20, #8
	sub	x2, x29, #92
	sub	x6, x29, #96
	ldur	x21, [x29, #-160]               ; 8-byte Folded Reload
	mov	x0, x21
	mov	x1, x19
	mov	x3, x22
	bl	_iov2datalink
	ldur	w8, [x29, #-96]
	cbz	x0, LBB0_51
; %bb.39:
	mov	x22, x0
	cbz	w8, LBB0_60
; %bb.40:
Lloh84:
	adrp	x9, _LogERROR@GOTPAGE
Lloh85:
	ldr	x9, [x9, _LogERROR@GOTPAGEOFF]
Lloh86:
	ldr	w0, [x9]
	mov	x9, x23
	stp	x9, x8, [sp, #-16]!
Lloh87:
	adrp	x1, l_.str.13@PAGE
Lloh88:
	add	x1, x1, l_.str.13@PAGEOFF
	bl	_log_Printf
	add	sp, sp, #16
	mov	x0, x22
	bl	_datalink_Destroy
	ldur	w8, [x29, #-96]
	sub	w9, w8, #1
	stur	w9, [x29, #-96]
	cbz	w8, LBB0_43
; %bb.41:
	add	x21, x20, w23, sxtw #2
LBB0_42:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21], #-4
	bl	_close
	ldur	w8, [x29, #-96]
	sub	w9, w8, #1
	stur	w9, [x29, #-96]
	cbnz	w8, LBB0_42
LBB0_43:
	ldr	w0, [x20]
	bl	_close
	b	LBB0_61
LBB0_44:
	ldr	w8, [x8]
	mov	w9, #4
	stp	x0, x9, [sp, #-16]!
Lloh89:
	adrp	x1, l_.str.12@PAGE
Lloh90:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x8
LBB0_45:
	bl	_log_Printf
	add	sp, sp, #16
	sub	w21, w23, #2
	add	x8, x20, w23, sxtw #2
	sub	x20, x8, #4
LBB0_46:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20], #-4
	bl	_close
	stur	w21, [x29, #-96]
	sub	w21, w21, #1
	cmn	w21, #2
	b.ne	LBB0_46
	b	LBB0_48
LBB0_47:                                ;   in Loop: Header=BB0_48 Depth=1
	sbfiz	x8, x8, #4, #32
	ldr	x0, [x19, x8]
	bl	_free
LBB0_48:                                ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x29, #-92]
	sub	w8, w9, #1
	stur	w8, [x29, #-92]
	cbnz	w9, LBB0_47
	b	LBB0_20
LBB0_49:
Lloh91:
	adrp	x8, _LogERROR@GOTPAGE
Lloh92:
	ldr	x8, [x8, _LogERROR@GOTPAGEOFF]
Lloh93:
	ldr	w21, [x8]
	cmn	w0, #1
	b.eq	LBB0_55
; %bb.50:
	stp	x0, x25, [sp, #-16]!
Lloh94:
	adrp	x1, l_.str.12@PAGE
Lloh95:
	add	x1, x1, l_.str.12@PAGEOFF
	b	LBB0_56
LBB0_51:
	sub	w9, w8, #1
	stur	w9, [x29, #-96]
	cbz	w8, LBB0_54
; %bb.52:
	add	x21, x20, w23, sxtw #2
LBB0_53:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21], #-4
	bl	_close
	ldur	w8, [x29, #-96]
	sub	w9, w8, #1
	stur	w9, [x29, #-96]
	cbnz	w8, LBB0_53
LBB0_54:
	ldr	w0, [x20]
	bl	_close
	ldr	w0, [x20, #4]
	bl	_close
	b	LBB0_61
LBB0_55:
Lloh96:
	adrp	x8, _errno@GOTPAGE
Lloh97:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh98:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh99:
	adrp	x1, l_.str.11@PAGE
Lloh100:
	add	x1, x1, l_.str.11@PAGEOFF
LBB0_56:
	mov	x0, x21
	bl	_log_Printf
	add	sp, sp, #16
	sub	w21, w23, #2
	add	x8, x20, w23, sxtw #2
	sub	x20, x8, #4
LBB0_57:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20], #-4
	bl	_close
	stur	w21, [x29, #-96]
	sub	w21, w21, #1
	cmn	w21, #2
	b.ne	LBB0_57
	b	LBB0_59
LBB0_58:                                ;   in Loop: Header=BB0_59 Depth=1
	sbfiz	x8, x8, #4, #32
	ldr	x0, [x19, x8]
	bl	_free
LBB0_59:                                ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x29, #-92]
	sub	w8, w9, #1
	stur	w8, [x29, #-92]
	cbnz	w9, LBB0_58
	b	LBB0_20
LBB0_60:
	mov	x0, x21
	mov	x1, x22
	bl	_bundle_DatalinkLinkin
	mov	x0, x22
	bl	_datalink_AuthOk
	ldr	w0, [x22]
	bl	_bundle_CalculateBandwidth
LBB0_61:
	ldr	x0, [x19]
	bl	_free
	b	LBB0_20
LBB0_62:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGot	Lloh77, Lloh78
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpAdd	Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpAdd	Lloh89, Lloh90
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.loh AdrpAdd	Lloh94, Lloh95
	.loh AdrpAdd	Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.cfi_endproc
                                        ; -- End function
	.comm	_SEND_MAXFD,4,2                 ; @SEND_MAXFD
	.comm	_SCATTER_SEGMENTS,4,2           ; @SCATTER_SEGMENTS
	.comm	_LogPHASE,4,2                   ; @LogPHASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Receiving datalink\n"

	.comm	_Version,4,2                    ; @Version
	.comm	_LogERROR,4,2                   ; @LogERROR
l_.str.1:                               ; @.str.1
	.asciz	"Cannot determine space required for link\n"

l_.str.2:                               ; @.str.2
	.asciz	"Cannot allocate space to receive link\n"

	.comm	_SOL_SOCKET,8,3                 ; @SOL_SOCKET
	.comm	_LogDEBUG,4,2                   ; @LogDEBUG
l_.str.3:                               ; @.str.3
	.asciz	"Expecting %u scatter/gather bytes\n"

	.comm	_MSG_WAITALL,4,2                ; @MSG_WAITALL
l_.str.4:                               ; @.str.4
	.asciz	"Failed recvmsg: %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.5:                               ; @.str.5
	.asciz	"Failed recvmsg: Got %zd, not %u\n"

	.comm	_SCM_RIGHTS,8,3                 ; @SCM_RIGHTS
l_.str.6:                               ; @.str.6
	.asciz	"Recvmsg: no descriptors received !\n"

l_.str.7:                               ; @.str.7
	.asciz	"Recvmsg: %d descriptor%s received (too few) !\n"

l_.str.8:                               ; @.str.8
	.space	1

l_.str.9:                               ; @.str.9
	.asciz	"s"

	.comm	_LogWARN,4,2                    ; @LogWARN
l_.str.10:                              ; @.str.10
	.asciz	"Cannot receive datalink, incorrect version (\"%.*s\", not \"%s\")\n"

l_.str.11:                              ; @.str.11
	.asciz	"Failed write: %s\n"

l_.str.12:                              ; @.str.12
	.asciz	"Failed write: Got %zd, not %d\n"

l_.str.13:                              ; @.str.13
	.asciz	"bundle_ReceiveDatalink: Failed to handle %d auxiliary file descriptors (%d remain)\n"

.subsections_via_symbols
