	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msg_build
_msg_build:                             ## @msg_build
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movl	%r8d, %r13d
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	movl	%edx, %esi
	callq	_msg_calc_data_size
	movl	%eax, %r14d
	movq	_TIPC_MAX_USER_MSG_SIZE@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %r14d
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	$0, (%r12)
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_2:
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r12d
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_msg_hdr_sz
	movl	%eax, %r13d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	addl	%eax, %r12d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_msg_set_size
	xorl	%edi, %edi
	cmpl	-60(%rbp), %r12d                ## 4-byte Folded Reload
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_17:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r12d, %edi
	callq	_buf_acquire
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_skb_copy_to_linear_data
	testl	%r15d, %r15d
	jle	LBB0_7
## %bb.8:
	movl	%r15d, %r15d
	movl	$1, %r12d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	callq	_likely
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdi
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movslq	%r13d, %rax
	addq	(%rdi), %rax
	movl	8(%rbx), %esi
	movq	(%rbx), %rdx
	movq	%rax, %rdi
	callq	_copy_from_user
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	testl	%edi, %edi
	jne	LBB0_13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%rbx), %edx
	movq	(%rbx), %rcx
	movl	%r13d, %esi
	callq	_skb_copy_to_linear_data_offset
	movl	$1, %edi
	testl	%edi, %edi
	je	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	addl	(%rbx), %r13d
	addq	$16, %rbx
	leaq	1(%r12), %rax
	cmpq	%r15, %r12
	movq	%rax, %r12
	jb	LBB0_9
	jmp	LBB0_14
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_7:
	movl	$1, %edi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_14:
	callq	_likely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.15:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_buf_discard
	movq	$0, (%rbx)
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_TIPC_MAX_USER_MSG_SIZE,4,2     ## @TIPC_MAX_USER_MSG_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_msg_build
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msg_build
_msg_build:                             ; @msg_build
	.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
	mov	x19, x5
	mov	x21, x4
	mov	x26, x3
	mov	x24, x2
	mov	x22, x1
	mov	x25, x0
	mov	x0, x1
	mov	x1, x2
	bl	_msg_calc_data_size
	mov	x20, x0
Lloh0:
	adrp	x8, _TIPC_MAX_USER_MSG_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIPC_MAX_USER_MSG_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	str	xzr, [x19]
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_3:
	mov	x0, x25
	bl	_msg_hdr_sz
	mov	x23, x0
	add	w27, w0, w20
	mov	x0, x25
	mov	x1, x27
	bl	_msg_set_size
	cmp	w27, w26
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.4:
	str	xzr, [x19]
LBB0_5:
	mov	x0, x20
	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_6:
	mov	x0, x27
	bl	_buf_acquire
	str	x0, [x19]
	cbz	x0, LBB0_13
; %bb.7:
	mov	x1, x25
	mov	x2, x23
	bl	_skb_copy_to_linear_data
	cmp	w24, #1
	b.lt	LBB0_14
; %bb.8:
	mov	w24, w24
	mov	w25, #1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w2, [x22, #8]
	ldr	x3, [x22]
	mov	x1, x23
	bl	_skb_copy_to_linear_data_offset
	mov	w0, #1
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x22], #16
	add	w23, w23, w8
	cmp	w0, #0
	ccmp	x25, x24, #2, ne
	add	x25, x25, #1
	b.hs	LBB0_15
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_likely
	mov	x8, x0
	ldr	x0, [x19]
	cbz	x8, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x0]
	add	x0, x8, w23, sxtw
	ldr	w1, [x22, #8]
	ldr	x2, [x22]
	bl	_copy_from_user
	cmp	w0, #0
	cset	w0, eq
	b	LBB0_10
LBB0_13:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_14:
	mov	w0, #1
LBB0_15:
	bl	_likely
	cbnz	x0, LBB0_5
; %bb.16:
	ldr	x0, [x19]
	bl	_buf_discard
	str	xzr, [x19]
Lloh7:
	adrp	x8, _EFAULT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TIPC_MAX_USER_MSG_SIZE,4,2     ; @TIPC_MAX_USER_MSG_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_msg_build
.subsections_via_symbols
