	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cfv_create_genpool
_cfv_create_genpool:                    ## @cfv_create_genpool
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movl	20(%rdi), %edi
	callq	_virtqueue_get_vring_size
	movq	_ETH_DATA_LEN@GOTPCREL(%rip), %rcx
	movl	4(%r13), %edx
	addl	(%rcx), %edx
	addl	8(%r13), %edx
	imull	%eax, %edx
	leal	(%rdx,%rdx,4), %eax
	leal	(%rdx,%rax,2), %eax
	cltq
	imulq	$1717986919, %rax, %rbx         ## imm = 0x66666667
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$34, %rbx
	addl	%eax, %ebx
	movl	%ebx, (%r13)
	xorl	%eax, %eax
	callq	_num_possible_cpus
	incl	%eax
	movq	32(%r13), %rcx
	imull	(%rcx), %eax
	cmpl	%eax, %ebx
	jle	LBB0_6
## %bb.1:
	movl	(%r13), %ebx
	xorl	%eax, %eax
	callq	_num_possible_cpus
	movq	32(%r13), %rdi
	imull	(%rdi), %eax
	cmpl	%eax, %ebx
	jle	LBB0_5
## %bb.2:
	leaq	48(%r13), %r15
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	56(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	movl	(%r12), %ecx
	movq	%r15, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 40(%r13)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %eax
	leal	(%rax,%rax,2), %ebx
	sarl	$2, %ebx
	movl	%ebx, (%r13)
	xorl	%eax, %eax
	callq	_num_possible_cpus
	movq	32(%r13), %rdi
	imull	(%rdi), %eax
	cmpl	%eax, %ebx
	jg	LBB0_3
LBB0_5:
	leaq	L_.str(%rip), %rsi
	callq	_netdev_info
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	%r15d, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	32(%r13), %rdi
	movl	(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_dbg
	movl	$7, %edi
	movl	$-1, %esi
	callq	_gen_pool_create
	movl	%eax, 28(%r13)
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movl	%eax, %r15d
	movq	40(%r13), %r14
	movq	%r14, %rdi
	callq	_virt_to_phys
	movl	(%r13), %ecx
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	movl	$-1, %r8d
	callq	_gen_pool_add_virt
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	movq	%r13, %rdi
	callq	_cfv_destroy_genpool
	jmp	LBB0_12
LBB0_9:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_num_possible_cpus
	movq	32(%r13), %rcx
	imull	(%rcx), %eax
	movl	%eax, 12(%r13)
	movl	28(%r13), %edi
	movl	%eax, %esi
	callq	_gen_pool_alloc
	movl	%eax, 24(%r13)
	testl	%eax, %eax
	je	LBB0_10
## %bb.13:
	movl	20(%r13), %edi
	callq	_virtqueue_get_vring_size
	movl	%eax, 16(%r13)
	jmp	LBB0_12
LBB0_10:
	xorl	%r14d, %r14d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ETH_DATA_LEN,4,2               ## @ETH_DATA_LEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not enough device memory\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.1:                               ## @.str.1
	.asciz	"Allocated %zd bytes from dma-memory\n"

	.no_dead_strip	_cfv_create_genpool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cfv_create_genpool
_cfv_create_genpool:                    ; @cfv_create_genpool
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ENOMEM@GOTPAGEOFF]
	ldr	w20, [x22]
	ldr	w0, [x0, #20]
	bl	_virtqueue_get_vring_size
Lloh2:
	adrp	x8, _ETH_DATA_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETH_DATA_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #4]
	add	w8, w9, w8
	add	w8, w8, w10
	mul	w8, w0, w8
	mov	w9, #11
	mul	w8, w8, w9
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w21, w8, w9, asr #2
	str	w21, [x19]
	bl	_num_possible_cpus
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
	madd	w8, w8, w0, w8
	cmp	w21, w8
	b.le	LBB0_6
; %bb.1:
	ldr	w21, [x19]
	bl	_num_possible_cpus
	mov	x8, x0
	ldr	x0, [x19, #32]
	ldr	w9, [x0]
	mul	w8, w9, w8
	cmp	w21, w8
	b.le	LBB0_5
; %bb.2:
	neg	w20, w20
	add	x21, x19, #48
Lloh5:
	adrp	x23, _GFP_ATOMIC@GOTPAGE
Lloh6:
	ldr	x23, [x23, _GFP_ATOMIC@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #56]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w1, [x19]
	ldr	w3, [x23]
	mov	x2, x21
	bl	_dma_alloc_coherent
	str	x0, [x19, #40]
	cbnz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	add	w8, w8, w8, lsl #1
	asr	w24, w8, #2
	str	w24, [x19]
	bl	_num_possible_cpus
	mov	x8, x0
	ldr	x0, [x19, #32]
	ldr	w9, [x0]
	mul	w8, w9, w8
	cmp	w24, w8
	b.gt	LBB0_3
LBB0_5:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_info
	ldr	w8, [x22]
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
LBB0_7:
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x0, [x19, #32]
	ldr	w2, [x19]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_dbg
	mov	w0, #7
	mov	w1, #-1
	bl	_gen_pool_create
	str	w0, [x19, #28]
	cbz	w0, LBB0_11
; %bb.10:
	mov	x21, x0
	ldr	x20, [x19, #40]
	mov	x0, x20
	bl	_virt_to_phys
	mov	x2, x0
	ldr	w3, [x19]
	mov	x0, x21
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w4, #-1
	bl	_gen_pool_add_virt
	mov	x20, x0
	cbz	w0, LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_cfv_destroy_genpool
	b	LBB0_8
LBB0_12:
	bl	_num_possible_cpus
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
	mul	w1, w8, w0
	str	w1, [x19, #12]
	ldr	w0, [x19, #28]
	bl	_gen_pool_alloc
	str	w0, [x19, #24]
	cbz	w0, LBB0_14
; %bb.13:
	ldr	w0, [x19, #20]
	bl	_virtqueue_get_vring_size
	mov	w20, #0
	str	w0, [x19, #16]
	b	LBB0_8
LBB0_14:
	ldr	w8, [x22]
	neg	w20, w8
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ETH_DATA_LEN,4,2               ; @ETH_DATA_LEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not enough device memory\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.1:                               ; @.str.1
	.asciz	"Allocated %zd bytes from dma-memory\n"

	.no_dead_strip	_cfv_create_genpool
.subsections_via_symbols
