	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_device_disable_sriov
_mlx5_device_disable_sriov:             ## @mlx5_device_disable_sriov
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	callq	_pci_num_vf
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movl	%eax, %esi
	leaq	L_.str(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movq	$0, (%rax,%r12,8)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rax
	incq	%rax
	movq	%rbx, %rsi
	cmpq	$1, %rax
	jbe	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rsi), %rbx
	movq	8(%r15), %rax
	movl	%ebx, %r12d
	cmpq	$0, (%rax,%r12,8)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_mlx5_core_disable_hca
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_mlx5_core_warn
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	callq	_MLX5_ESWITCH_MANAGER
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	4(%r15), %edi
	callq	_mlx5_eswitch_disable
LBB0_9:
	movq	%r15, %rdi
	movq	%r15, %rsi
	callq	_mlx5_wait_for_pages
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_core_warn                 ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to disable VF %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"timeout reclaiming VFs pages\n"

	.no_dead_strip	_mlx5_device_disable_sriov
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_device_disable_sriov
_mlx5_device_disable_sriov:             ; @mlx5_device_disable_sriov
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_pci_num_vf
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w1, w0
Lloh0:
	adrp	x20, l_.str@PAGE
Lloh1:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	and	x8, x21, #0xffffffff
	ldr	x9, [x19, #8]
	str	xzr, [x9, x8, lsl #3]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x21, #1
	mov	x1, x21
	cmp	x8, #1
	b.ls	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	x21, x1, #1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, w21, uxtw #3]
	cbz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_mlx5_core_disable_hca
	cbz	w0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x21, [sp]
	mov	x0, x19
	mov	x1, x20
	bl	_mlx5_core_warn
	b	LBB0_3
LBB0_7:
	mov	x0, x19
	bl	_MLX5_ESWITCH_MANAGER
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x19, #4]
	bl	_mlx5_eswitch_disable
LBB0_9:
	mov	x0, x19
	mov	x1, x19
	bl	_mlx5_wait_for_pages
	cbz	x0, LBB0_11
; %bb.10:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_mlx5_core_warn
LBB0_11:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to disable VF %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"timeout reclaiming VFs pages\n"

	.no_dead_strip	_mlx5_device_disable_sriov
.subsections_via_symbols
