	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_sriov_set_msix_res
_ice_sriov_set_msix_res:                ## @ice_sriov_set_msix_res
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	callq	_ice_get_max_valid_res_idx
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	16(%rbx), %rdx
	movl	%edx, %ecx
	subl	%r14d, %ecx
	cmpl	%ecx, %eax
	jge	LBB0_2
## %bb.3:
	movq	8(%rbx), %rsi
	movl	%ecx, (%rbx)
	movslq	(%rsi), %rdi
	subq	%rdi, %rdx
	xorl	%eax, %eax
	cmpq	%r14, %rdx
	jge	LBB0_5
## %bb.4:
	movl	%ecx, %edx
	subl	%edi, %edx
	addl	%edx, 4(%rbx)
	movl	%ecx, 4(%rsi)
	jmp	LBB0_5
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ice_sriov_set_msix_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_sriov_set_msix_res
_ice_sriov_set_msix_res:                ; @ice_sriov_set_msix_res
	.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	x20, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_ice_get_max_valid_res_idx
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	x10, [x19, #16]
	sub	w8, w10, w20
	cmp	w0, w8
	b.ge	LBB0_4
; %bb.2:
	ldr	x9, [x19, #8]
	str	w8, [x19]
	ldrsw	x11, [x9]
	sub	x10, x10, x11
	cmp	x10, x20
	b.ge	LBB0_5
; %bb.3:
	mov	w0, #0
	ldr	w10, [x19, #4]
	sub	w11, w8, w11
	add	w10, w11, w10
	str	w10, [x19, #4]
	str	w8, [x9, #4]
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ice_sriov_set_msix_res
.subsections_via_symbols
