	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function veth_process_caps
_veth_process_caps:                     ## @veth_process_caps
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	imull	12(%rdi), %ecx
	movslq	%ecx, %rax
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$50, %rax
	addl	%edx, %eax
	movl	%eax, (%rdi)
	movl	16(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	20(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_4
## %bb.2:
	movq	_VETH_MAX_ACKS_PER_MSG@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %esi
	jg	LBB0_4
## %bb.3:
	addl	$999999, %ecx                   ## imm = 0xF423F
	cmpl	$1999998, %ecx                  ## imm = 0x1E847E
	jbe	LBB0_4
## %bb.5:
	cltd
	idivl	%esi
	movq	_HvLpEvent_Rc_Good@GOTPCREL(%rip), %r15
	movl	%eax, %esi
	subl	4(%rbx), %esi
	jl	LBB0_11
## %bb.6:
	movl	%eax, %r14d
	movl	8(%rbx), %edi
	incl	%esi
	callq	_veth_allocate_events
	movl	4(%rbx), %ecx
	testl	%eax, %eax
	jle	LBB0_8
## %bb.7:
	addl	%eax, %ecx
	movl	%ecx, 4(%rbx)
LBB0_8:
	cmpl	%r14d, %ecx
	jg	LBB0_11
## %bb.9:
	addq	$8, %rbx
	movq	_HvLpEvent_Rc_BufferNotAvailable@GOTPCREL(%rip), %r15
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_10
LBB0_4:
	addq	$8, %rbx
	movq	_HvLpEvent_Rc_InvalidSubtypeData@GOTPCREL(%rip), %r15
	leaq	L_.str(%rip), %rdi
LBB0_10:
	movl	(%rbx), %esi
	callq	_veth_error
LBB0_11:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.comm	_VETH_MAX_ACKS_PER_MSG,4,2      ## @VETH_MAX_ACKS_PER_MSG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received incompatible capabilities from LPAR %d.\n"

	.comm	_HvLpEvent_Rc_InvalidSubtypeData,4,2 ## @HvLpEvent_Rc_InvalidSubtypeData
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't allocate enough ack events for LPAR %d.\n"

	.comm	_HvLpEvent_Rc_BufferNotAvailable,4,2 ## @HvLpEvent_Rc_BufferNotAvailable
	.comm	_HvLpEvent_Rc_Good,4,2          ## @HvLpEvent_Rc_Good
	.no_dead_strip	_veth_process_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function veth_process_caps
_veth_process_caps:                     ; @veth_process_caps
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	mov	w8, #16959
	movk	w8, #15, lsl #16
Lloh0:
	adrp	x9, _HZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x9]
	ldp	w11, w9, [x0, #12]
	mul	w11, w10, w11
	add	w10, w8, #1
	sdiv	w10, w11, w10
	str	w10, [x0]
	cbz	w9, LBB0_8
; %bb.1:
	ldr	w10, [x19, #20]
	cbz	w10, LBB0_8
; %bb.2:
Lloh3:
	adrp	x12, _VETH_MAX_ACKS_PER_MSG@GOTPAGE
Lloh4:
	ldr	x12, [x12, _VETH_MAX_ACKS_PER_MSG@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x12]
	add	w8, w11, w8
	cmp	w10, w12
	mov	w11, #33918
	movk	w11, #30, lsl #16
	ccmp	w8, w11, #0, le
	b.ls	LBB0_8
; %bb.3:
	sdiv	w21, w9, w10
	ldr	w8, [x19, #4]
	subs	w8, w21, w8
	b.lt	LBB0_7
; %bb.4:
	mov	x20, x19
	ldr	w0, [x20, #8]!
	add	w1, w8, #1
	bl	_veth_allocate_events
	ldur	w8, [x20, #-4]
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.5:
	add	w8, w8, w0
	str	w8, [x19, #4]
LBB0_6:
	cmp	w8, w21
	b.le	LBB0_11
LBB0_7:
Lloh6:
	adrp	x19, _HvLpEvent_Rc_Good@GOTPAGE
Lloh7:
	ldr	x19, [x19, _HvLpEvent_Rc_Good@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	add	x20, x19, #8
Lloh8:
	adrp	x19, _HvLpEvent_Rc_InvalidSubtypeData@GOTPAGE
Lloh9:
	ldr	x19, [x19, _HvLpEvent_Rc_InvalidSubtypeData@GOTPAGEOFF]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
LBB0_9:
	ldr	w1, [x20]
	bl	_veth_error
LBB0_10:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh12:
	adrp	x19, _HvLpEvent_Rc_BufferNotAvailable@GOTPAGE
Lloh13:
	ldr	x19, [x19, _HvLpEvent_Rc_BufferNotAvailable@GOTPAGEOFF]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.comm	_VETH_MAX_ACKS_PER_MSG,4,2      ; @VETH_MAX_ACKS_PER_MSG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received incompatible capabilities from LPAR %d.\n"

	.comm	_HvLpEvent_Rc_InvalidSubtypeData,4,2 ; @HvLpEvent_Rc_InvalidSubtypeData
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't allocate enough ack events for LPAR %d.\n"

	.comm	_HvLpEvent_Rc_BufferNotAvailable,4,2 ; @HvLpEvent_Rc_BufferNotAvailable
	.comm	_HvLpEvent_Rc_Good,4,2          ; @HvLpEvent_Rc_Good
	.no_dead_strip	_veth_process_caps
.subsections_via_symbols
