	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_device_enable_sriov
_mlx5_device_enable_sriov:              ## @mlx5_device_enable_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	%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
	movl	%esi, %r14d
	movq	%rdi, %r13
	callq	_MLX5_ESWITCH_MANAGER
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	(%r13), %edi
	movl	%r14d, %esi
	callq	_mlx5_eswitch_update_num_of_vfs
	movl	(%r13), %edi
	movq	_MLX5_ESWITCH_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mlx5_eswitch_enable
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_mlx5_core_warn
	jmp	LBB0_14
LBB0_3:
	testl	%r14d, %r14d
	jle	LBB0_13
## %bb.4:
	movl	%r14d, %r15d
	leaq	L_.str.1(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	callq	_mlx5_core_dbg
	cmpq	%r14, %r15
	je	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rbx
	incq	%r14
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_mlx5_core_enable_hca
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_mlx5_core_warn
	cmpq	%r14, %r15
	jne	LBB0_5
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rax
	movl	$1, (%rax,%rbx,4)
	movq	_port_type@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_MLX5_CAP_GEN
	movq	_MLX5_CAP_PORT_TYPE_IB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_sriov_restore_guids
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_7
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_ESWITCH_LEGACY,4,2        ## @MLX5_ESWITCH_LEGACY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable eswitch SRIOV (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to enable VF %d (%d)\n"

	.comm	_port_type,4,2                  ## @port_type
	.comm	_MLX5_CAP_PORT_TYPE_IB,8,3      ## @MLX5_CAP_PORT_TYPE_IB
L_.str.2:                               ## @.str.2
	.asciz	"failed to restore VF %d settings, err %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"successfully enabled VF* %d\n"

	.no_dead_strip	_mlx5_device_enable_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_enable_sriov
_mlx5_device_enable_sriov:              ; @mlx5_device_enable_sriov
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	bl	_MLX5_ESWITCH_MANAGER
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_mlx5_eswitch_update_num_of_vfs
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _MLX5_ESWITCH_LEGACY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_ESWITCH_LEGACY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mlx5_eswitch_enable
	cbz	w0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_mlx5_core_warn
	b	LBB0_14
LBB0_3:
	cmp	w20, #1
	b.lt	LBB0_13
; %bb.4:
	mov	x23, #0
	mov	w25, w20
	mov	w26, #1
Lloh5:
	adrp	x27, _port_type@GOTPAGE
Lloh6:
	ldr	x27, [x27, _port_type@GOTPAGEOFF]
Lloh7:
	adrp	x28, _MLX5_CAP_PORT_TYPE_IB@GOTPAGE
Lloh8:
	ldr	x28, [x28, _MLX5_CAP_PORT_TYPE_IB@GOTPAGEOFF]
Lloh9:
	adrp	x20, l_.str.2@PAGE
Lloh10:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh11:
	adrp	x21, l_.str.3@PAGE
Lloh12:
	add	x21, x21, l_.str.3@PAGEOFF
Lloh13:
	adrp	x22, l_.str.1@PAGE
Lloh14:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_mlx5_core_dbg
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x23, x24
	cmp	x25, x24
	b.eq	LBB0_13
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x24, x23, #1
	mov	x0, x19
	mov	x1, x24
	bl	_mlx5_core_enable_hca
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x0, [sp]
	mov	x0, x19
	mov	x1, x22
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x2, x23
	bl	_mlx5_core_warn
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #8]
	str	w26, [x8, x23, lsl #2]
	ldr	w1, [x27]
	mov	x0, x19
	bl	_MLX5_CAP_GEN
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_sriov_restore_guids
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	str	x0, [sp]
	mov	x0, x19
	mov	x1, x20
	b	LBB0_9
LBB0_13:
	mov	w21, #0
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_ESWITCH_LEGACY,4,2        ; @MLX5_ESWITCH_LEGACY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable eswitch SRIOV (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to enable VF %d (%d)\n"

	.comm	_port_type,4,2                  ; @port_type
	.comm	_MLX5_CAP_PORT_TYPE_IB,8,3      ; @MLX5_CAP_PORT_TYPE_IB
l_.str.2:                               ; @.str.2
	.asciz	"failed to restore VF %d settings, err %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"successfully enabled VF* %d\n"

	.no_dead_strip	_mlx5_device_enable_sriov
.subsections_via_symbols
