	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enic_set_ringparam
_enic_set_ringparam:                    ## @enic_set_ringparam
	.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	%rsi, %rbx
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_netif_running
	cmpq	$0, 32(%rbx)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 24(%rbx)
	je	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rsi
LBB0_3:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpq	$0, 16(%rbx)
	jne	LBB0_6
## %bb.5:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_7:
	movl	%eax, %r15d
	movl	(%rbx), %edx
	movq	_ENIC_MAX_RQ_DESCS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_ENIC_MIN_RQ_DESCS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%r8d, %edx
	jg	LBB0_9
## %bb.8:
	cmpl	%ecx, %edx
	jl	LBB0_9
## %bb.12:
	movl	4(%rbx), %eax
	movq	_ENIC_MAX_WQ_DESCS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_ENIC_MIN_WQ_DESCS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%r8d, %eax
	jg	LBB0_14
## %bb.13:
	cmpl	%ecx, %eax
	jl	LBB0_14
## %bb.15:
	movl	(%r14), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	4(%r14), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.16:
	movq	%r12, %rdi
	callq	_dev_close
	movl	(%rbx), %edx
	movl	4(%rbx), %eax
LBB0_17:
	andl	$-32, %edx
	movl	%edx, (%r14)
	andl	$-32, %eax
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_enic_free_vnic_resources
	movq	%r14, %rdi
	callq	_enic_alloc_vnic_resources
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %r13d
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	callq	_netdev_err
	movq	%r14, %rdi
	callq	_enic_free_vnic_resources
LBB0_21:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	movl	%r13d, %ebx
	jmp	LBB0_22
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	jmp	LBB0_10
LBB0_14:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%eax, %edx
LBB0_10:
	xorl	%eax, %eax
	callq	_netdev_info
	jmp	LBB0_11
LBB0_19:
	movq	%r14, %rdi
	callq	_enic_init_vnic_resources
	xorl	%ebx, %ebx
	testl	%r15d, %r15d
	je	LBB0_22
## %bb.20:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_dev_open
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_21
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"modifying mini ring params is not supported"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"modifying jumbo ring params is not supported"

	.comm	_ENIC_MAX_RQ_DESCS,4,2          ## @ENIC_MAX_RQ_DESCS
	.comm	_ENIC_MIN_RQ_DESCS,4,2          ## @ENIC_MIN_RQ_DESCS
L_.str.2:                               ## @.str.2
	.asciz	"rx pending (%u) not in range [%u,%u]"

	.comm	_ENIC_MAX_WQ_DESCS,4,2          ## @ENIC_MAX_WQ_DESCS
	.comm	_ENIC_MIN_WQ_DESCS,4,2          ## @ENIC_MIN_WQ_DESCS
L_.str.3:                               ## @.str.3
	.asciz	"tx pending (%u) not in range [%u,%u]"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to alloc vNIC resources, aborting\n"

	.no_dead_strip	_enic_set_ringparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enic_set_ringparam
_enic_set_ringparam:                    ; @enic_set_ringparam
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [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 b8, -56
	.cfi_offset b9, -64
	mov	x22, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	mov	x0, x19
	bl	_netif_running
	ldr	x8, [x22, #32]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_5
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_netdev_info
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_4:
	mov	x0, x22
	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	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_8
LBB0_7:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_8:
	ldr	w8, [x22]
Lloh7:
	adrp	x9, _ENIC_MAX_RQ_DESCS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ENIC_MAX_RQ_DESCS@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _ENIC_MIN_RQ_DESCS@GOTPAGE
Lloh11:
	ldr	x10, [x10, _ENIC_MIN_RQ_DESCS@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #8, le
	b.ge	LBB0_10
; %bb.9:
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_10:
	ldr	w9, [x22, #4]
Lloh15:
	adrp	x10, _ENIC_MAX_WQ_DESCS@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ENIC_MAX_WQ_DESCS@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
Lloh18:
	adrp	x11, _ENIC_MIN_WQ_DESCS@GOTPAGE
Lloh19:
	ldr	x11, [x11, _ENIC_MIN_WQ_DESCS@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	cmp	w9, w10
	ccmp	w9, w11, #8, le
	b.ge	LBB0_12
; %bb.11:
	stp	x11, x10, [sp, #8]
	str	x9, [sp]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_12:
	mov	x21, x0
	ldr	d8, [x20]
	cbz	w0, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_dev_close
	ldp	w8, w9, [x22]
LBB0_14:
	and	w8, w8, #0xffffffe0
	and	w9, w9, #0xffffffe0
	stp	w8, w9, [x20]
	mov	x0, x20
	bl	_enic_free_vnic_resources
	mov	x0, x20
	bl	_enic_alloc_vnic_resources
	cbz	w0, LBB0_17
; %bb.15:
	mov	x22, x0
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	mov	x0, x20
	bl	_enic_free_vnic_resources
LBB0_16:
	str	d8, [x20]
	b	LBB0_4
LBB0_17:
	mov	x0, x20
	bl	_enic_init_vnic_resources
	cbz	w21, LBB0_19
; %bb.18:
	mov	x0, x19
	mov	x1, #0
	bl	_dev_open
	mov	x22, x0
	cbnz	w0, LBB0_16
	b	LBB0_4
LBB0_19:
	mov	w22, #0
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"modifying mini ring params is not supported"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"modifying jumbo ring params is not supported"

	.comm	_ENIC_MAX_RQ_DESCS,4,2          ; @ENIC_MAX_RQ_DESCS
	.comm	_ENIC_MIN_RQ_DESCS,4,2          ; @ENIC_MIN_RQ_DESCS
l_.str.2:                               ; @.str.2
	.asciz	"rx pending (%u) not in range [%u,%u]"

	.comm	_ENIC_MAX_WQ_DESCS,4,2          ; @ENIC_MAX_WQ_DESCS
	.comm	_ENIC_MIN_WQ_DESCS,4,2          ; @ENIC_MIN_WQ_DESCS
l_.str.3:                               ; @.str.3
	.asciz	"tx pending (%u) not in range [%u,%u]"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to alloc vNIC resources, aborting\n"

	.no_dead_strip	_enic_set_ringparam
.subsections_via_symbols
