	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_vf_smi_entries
_add_vf_smi_entries:                    ## @add_vf_smi_entries
	.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	%rdi, %rbx
	movq	72(%rdi), %rdi
	addq	$4, %rdi
	movl	80(%rbx), %esi
	callq	_rdma_port_get_link_layer
	movq	_IB_LINK_LAYER_ETHERNET@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.1:
	movq	(%rbx), %r15
	movq	72(%rbx), %rax
	movl	(%rax), %edi
	callq	_mlx4_master_func_num
	cmpq	%rax, %r15
	je	LBB0_6
## %bb.2:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_sysfs_attr_init
	movq	_sysfs_show_smi_enabled@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	leaq	L_.str(%rip), %rax
	movq	%rax, 8(%rbx)
	movl	$292, 16(%rbx)                  ## imm = 0x124
	leaq	40(%rbx), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_sysfs_create_file
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movl	%r13d, %r14d
	jmp	LBB0_6
LBB0_4:
	leaq	48(%rbx), %r13
	movq	%r13, %rdi
	callq	_sysfs_attr_init
	movq	_sysfs_show_enable_smi_admin@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rbx)
	movq	_sysfs_store_enable_smi_admin@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, 48(%rbx)
	movl	$420, 56(%rbx)                  ## imm = 0x1A4
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_sysfs_create_file
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_sysfs_remove_file
	movl	%ebx, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_LINK_LAYER_ETHERNET,8,3     ## @IB_LINK_LAYER_ETHERNET
	.comm	_sysfs_show_smi_enabled,4,2     ## @sysfs_show_smi_enabled
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"smi_enabled"

L_.str.1:                               ## @.str.1
	.asciz	"failed to create smi_enabled\n"

	.comm	_sysfs_show_enable_smi_admin,4,2 ## @sysfs_show_enable_smi_admin
	.comm	_sysfs_store_enable_smi_admin,4,2 ## @sysfs_store_enable_smi_admin
L_.str.2:                               ## @.str.2
	.asciz	"enable_smi_admin"

L_.str.3:                               ## @.str.3
	.asciz	"failed to create enable_smi_admin\n"

	.no_dead_strip	_add_vf_smi_entries
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_vf_smi_entries
_add_vf_smi_entries:                    ; @add_vf_smi_entries
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x8, [x0, #72]
	add	x0, x8, #4
	ldr	w1, [x19, #80]
	bl	_rdma_port_get_link_layer
Lloh0:
	adrp	x8, _IB_LINK_LAYER_ETHERNET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_LINK_LAYER_ETHERNET@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	ldr	x20, [x19]
	ldr	x8, [x19, #72]
	ldr	w0, [x8]
	bl	_mlx4_master_func_num
	cmp	x20, x0
	b.ne	LBB0_4
LBB0_2:
	mov	w22, #0
LBB0_3:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	add	x20, x19, #8
	mov	x0, x20
	bl	_sysfs_attr_init
Lloh3:
	adrp	x8, _sysfs_show_smi_enabled@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sysfs_show_smi_enabled@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	str	xzr, [x19, #24]
Lloh6:
	adrp	x8, l_.str@PAGE
Lloh7:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19, #8]
	mov	w8, #292
	str	w8, [x19, #16]
	add	x21, x19, #40
	mov	x0, x21
	mov	x1, x20
	bl	_sysfs_create_file
	cbz	w0, LBB0_6
; %bb.5:
	mov	x22, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_3
LBB0_6:
	add	x22, x19, #48
	mov	x0, x22
	bl	_sysfs_attr_init
Lloh10:
	adrp	x8, _sysfs_show_enable_smi_admin@GOTPAGE
Lloh11:
	ldr	x8, [x8, _sysfs_show_enable_smi_admin@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _sysfs_store_enable_smi_admin@GOTPAGE
Lloh14:
	ldr	x9, [x9, _sysfs_store_enable_smi_admin@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #64]
Lloh16:
	adrp	x8, l_.str.2@PAGE
Lloh17:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x19, #48]
	mov	w8, #420
	str	w8, [x19, #56]
	mov	x0, x21
	mov	x1, x22
	bl	_sysfs_create_file
	mov	x22, x0
	cbz	w0, LBB0_3
; %bb.7:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	mov	x0, x21
	mov	x1, x20
	bl	_sysfs_remove_file
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_LINK_LAYER_ETHERNET,8,3     ; @IB_LINK_LAYER_ETHERNET
	.comm	_sysfs_show_smi_enabled,4,2     ; @sysfs_show_smi_enabled
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"smi_enabled"

l_.str.1:                               ; @.str.1
	.asciz	"failed to create smi_enabled\n"

	.comm	_sysfs_show_enable_smi_admin,4,2 ; @sysfs_show_enable_smi_admin
	.comm	_sysfs_store_enable_smi_admin,4,2 ; @sysfs_store_enable_smi_admin
l_.str.2:                               ; @.str.2
	.asciz	"enable_smi_admin"

l_.str.3:                               ; @.str.3
	.asciz	"failed to create enable_smi_admin\n"

	.no_dead_strip	_add_vf_smi_entries
.subsections_via_symbols
