	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmveth_alloc_buffer_pool
_ibmveth_alloc_buffer_pool:             ## @ibmveth_alloc_buffer_pool
	.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
	movl	8(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_kmalloc_array
	movq	%rax, (%rbx)
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movl	8(%rbx), %edi
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	8(%rbx), %edi
	movl	(%r15), %edx
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	cmpl	$0, 8(%rbx)
	jle	LBB0_7
## %bb.5:
	movq	(%rbx), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rax,%rcx,4)
	incq	%rcx
	movslq	8(%rbx), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_6
LBB0_7:
	leaq	40(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_atomic_set
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	jmp	LBB0_8
LBB0_9:
	movq	16(%rbx), %rdi
	callq	_kfree
	movq	$0, 16(%rbx)
LBB0_2:
	movq	(%rbx), %rdi
	callq	_kfree
	movq	$0, (%rbx)
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_ibmveth_alloc_buffer_pool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmveth_alloc_buffer_pool
_ibmveth_alloc_buffer_pool:             ; @ibmveth_alloc_buffer_pool
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #4
	bl	_kmalloc_array
	str	x0, [x19]
	cbz	x0, LBB0_9
; %bb.1:
	ldr	w0, [x19, #8]
	ldr	w2, [x20]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w0, [x19, #8]
	ldr	w2, [x20]
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #48]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x8, #0
	ldr	x9, [x19]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	w8, [x9, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x10, [x19, #8]
	cmp	x8, x10
	b.lt	LBB0_5
LBB0_6:
	add	x0, x19, #40
	mov	w1, #0
	bl	_atomic_set
	mov	w0, #0
	stp	xzr, xzr, [x19, #24]
	b	LBB0_10
LBB0_7:
	ldr	x0, [x19, #16]
	bl	_kfree
	str	xzr, [x19, #16]
LBB0_8:
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_ibmveth_alloc_buffer_pool
.subsections_via_symbols
