	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_vf_set_enable_smi_admin   ## -- Begin function mlx4_vf_set_enable_smi_admin
	.p2align	4, 0x90
_mlx4_vf_set_enable_smi_admin:          ## @mlx4_vf_set_enable_smi_admin
	.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	%ecx, %r14d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r12
	callq	_mlx4_priv
	movq	%rax, %r15
	leaq	8(%rax), %rdi
	movl	%r13d, %esi
	callq	_mlx4_get_active_ports
	movl	%eax, %ebx
	movl	8(%r15), %esi
	movl	%eax, %edi
	callq	_find_first_bit
	movl	8(%r15), %esi
	movl	%ebx, %edi
	callq	_bitmap_weight
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mlx4_master_func_num
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%r13d, %ecx
	je	LBB0_12
## %bb.1:
	testl	%r13d, %r13d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	jle	LBB0_6
## %bb.2:
	testl	%esi, %esi
	jle	LBB0_6
## %bb.3:
	cmpl	%r13d, (%r12)
	jle	LBB0_6
## %bb.4:
	cmpl	$1, %r14d
	ja	LBB0_6
## %bb.5:
	movq	_MLX4_MAX_PORTS@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	jl	LBB0_6
## %bb.8:
	cmpl	$1, %ebx
	jne	LBB0_11
## %bb.9:
	cmpl	$2, 4(%r12)
	jl	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_mlx4_info
	movq	_EPROTONOSUPPORT@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	(%r15), %rcx
	movl	%r13d, %edx
	movq	(%rcx,%rdx,8), %rcx
	movl	%esi, %edx
	movl	%r14d, (%rcx,%rdx,4)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_MAX_PORTS,4,2             ## @MLX4_MAX_PORTS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMI access disallowed for single ported VFs\n"

	.comm	_EPROTONOSUPPORT,4,2            ## @EPROTONOSUPPORT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_vf_set_enable_smi_admin   ; -- Begin function mlx4_vf_set_enable_smi_admin
	.p2align	2
_mlx4_vf_set_enable_smi_admin:          ; @mlx4_vf_set_enable_smi_admin
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_mlx4_priv
	mov	x23, x0
	add	x0, x0, #8
	mov	x1, x21
	bl	_mlx4_get_active_ports
	mov	x24, x0
	ldr	w1, [x23, #8]
	bl	_find_first_bit
	ldr	w1, [x23, #8]
	mov	x0, x24
	bl	_bitmap_weight
	mov	x24, x0
	mov	x0, x22
	bl	_mlx4_master_func_num
	cmp	w0, w21
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_12
LBB0_2:
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.3:
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.4:
	ldr	w8, [x22]
	cmp	w8, w21
	b.le	LBB0_10
; %bb.5:
	cmp	w19, #1
	b.hi	LBB0_10
; %bb.6:
Lloh0:
	adrp	x8, _MLX4_MAX_PORTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_MAX_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.lt	LBB0_10
; %bb.7:
	cmp	w24, #1
	b.ne	LBB0_13
; %bb.8:
	ldr	w8, [x22, #4]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.9:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_mlx4_info
Lloh5:
	adrp	x8, _EPROTONOSUPPORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPROTONOSUPPORT@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w0, #0
	ldr	x8, [x23]
	ldr	x8, [x8, w21, uxtw #3]
	str	w19, [x8, w20, uxtw #2]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_MAX_PORTS,4,2             ; @MLX4_MAX_PORTS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMI access disallowed for single ported VFs\n"

	.comm	_EPROTONOSUPPORT,4,2            ; @EPROTONOSUPPORT
.subsections_via_symbols
