	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_init_port_info
_mlx4_init_port_info:                   ## @mlx4_init_port_info
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r13
	callq	_mlx4_priv
	movq	%rax, %rdi
	callq	_priv_to_devlink
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_mlx4_priv
	movq	(%rax), %r14
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rdx
	leaq	(%rdx,%rdx,8), %r12
	leaq	4(%r14,%r12,8), %r15
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_devlink_port_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, 24(%r14,%r12,8)
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, (%r14,%r12,8)
	movq	%r13, %rdi
	callq	_mlx4_is_slave
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	leaq	(%r14,%r12,8), %rsi
	addq	$68, %rsi
	movq	%r13, %rdi
	callq	_mlx4_init_mac_table
	leaq	(%r14,%r12,8), %rsi
	addq	$64, %rsi
	movq	%r13, %rdi
	callq	_mlx4_init_vlan_table
	leaq	(%r14,%r12,8), %rsi
	addq	$60, %rsi
	movq	%r13, %rdi
	callq	_mlx4_init_roce_gid_table
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_mlx4_get_base_qpn
	movl	%eax, 56(%r14,%r12,8)
LBB0_3:
	movl	52(%r14,%r12,8), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_sprintf
	movl	52(%r14,%r12,8), %eax
	leaq	(%r14,%r12,8), %rbx
	addq	$8, %rbx
	movl	%eax, 12(%r14,%r12,8)
	movq	%r13, %rdi
	callq	_mlx4_is_mfunc
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	$292, (%rbx)                    ## imm = 0x124
	jmp	LBB0_6
LBB0_5:
	movl	$420, (%rbx)                    ## imm = 0x1A4
	movq	_set_port_type@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14,%r12,8)
LBB0_6:
	movq	_show_port_type@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14,%r12,8)
	movq	%rbx, %rdi
	callq	_sysfs_attr_init
	movq	(%r13), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_mlx4_err
	jmp	LBB0_14
LBB0_8:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	48(%r14,%r12,8), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	callq	_sprintf
	movl	48(%r14,%r12,8), %eax
	leaq	(%r14,%r12,8), %rbx
	addq	$32, %rbx
	movl	%eax, 36(%r14,%r12,8)
	movq	%r13, %rdi
	callq	_mlx4_is_mfunc
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	$292, (%rbx)                    ## imm = 0x124
	jmp	LBB0_11
LBB0_10:
	movl	$420, (%rbx)                    ## imm = 0x1A4
	movq	_set_port_ib_mtu@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14,%r12,8)
LBB0_11:
	movq	_show_port_ib_mtu@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14,%r12,8)
	movq	%rbx, %rdi
	callq	_sysfs_attr_init
	movq	(%r13), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %ebx
	leaq	(%r14,%r12,8), %rax
	addq	$24, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_mlx4_err
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_device_remove_file
LBB0_14:
	leaq	(%r14,%r12,8), %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_devlink_port_unregister
	movl	$-1, (%r14)
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mlx4_port%d"

	.comm	_set_port_type,4,2              ## @set_port_type
	.comm	_show_port_type,4,2             ## @show_port_type
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create file for port %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"mlx4_port%d_mtu"

	.comm	_set_port_ib_mtu,4,2            ## @set_port_ib_mtu
	.comm	_show_port_ib_mtu,4,2           ## @show_port_ib_mtu
L_.str.3:                               ## @.str.3
	.asciz	"Failed to create mtu file for port %d\n"

	.no_dead_strip	_mlx4_init_port_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_init_port_info
_mlx4_init_port_info:                   ; @mlx4_init_port_info
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x0
	bl	_mlx4_priv
	bl	_priv_to_devlink
	mov	x22, x0
	mov	x0, x21
	bl	_mlx4_priv
	ldr	x26, [x0]
	mov	w8, #72
	smaddl	x8, w20, w8, x26
	add	x19, x8, #4
	mov	x0, x22
	mov	x1, x19
	mov	x2, x20
	bl	_devlink_port_register
	mov	x23, x0
	cbnz	w0, LBB0_14
; %bb.1:
	sxtw	x27, w20
	mov	w8, #72
	madd	x24, x27, x8, x26
	mov	x25, x24
	str	x21, [x25, #24]!
	str	w20, [x24]
	mov	x0, x21
	bl	_mlx4_is_slave
	cbnz	w0, LBB0_3
; %bb.2:
	mov	w8, #72
	madd	x22, x27, x8, x26
	add	x1, x22, #68
	mov	x0, x21
	bl	_mlx4_init_mac_table
	add	x1, x22, #64
	mov	x0, x21
	bl	_mlx4_init_vlan_table
	add	x1, x22, #60
	mov	x0, x21
	bl	_mlx4_init_roce_gid_table
	mov	x0, x21
	mov	x1, x20
	bl	_mlx4_get_base_qpn
	str	w0, [x22, #56]
LBB0_3:
	mov	w8, #72
	madd	x23, x27, x8, x26
	ldr	w0, [x23, #52]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_sprintf
	ldr	w8, [x23, #52]
	add	x22, x23, #8
	str	w8, [x23, #12]
	mov	x0, x21
	bl	_mlx4_is_mfunc
	cbz	x0, LBB0_5
; %bb.4:
	mov	w8, #292
	str	w8, [x22]
	b	LBB0_6
LBB0_5:
	mov	w8, #420
	str	w8, [x22]
Lloh2:
	adrp	x8, _set_port_type@GOTPAGE
Lloh3:
	ldr	x8, [x8, _set_port_type@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	w9, #72
	madd	x9, x27, x9, x26
	str	w8, [x9, #20]
LBB0_6:
Lloh5:
	adrp	x8, _show_port_type@GOTPAGE
Lloh6:
	ldr	x8, [x8, _show_port_type@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	w9, #72
	madd	x9, x27, x9, x26
	str	w8, [x9, #16]
	mov	x0, x22
	bl	_sysfs_attr_init
	ldr	x8, [x21]
	ldr	x0, [x8]
	mov	x1, x22
	bl	_device_create_file
	cbz	w0, LBB0_8
; %bb.7:
	mov	x23, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_mlx4_err
	b	LBB0_13
LBB0_8:
	mov	w8, #72
	madd	x28, x27, x8, x26
	ldr	w0, [x28, #48]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_sprintf
	ldr	w8, [x28, #48]
	add	x23, x28, #32
	str	w8, [x28, #36]
	mov	x0, x21
	bl	_mlx4_is_mfunc
	cbz	x0, LBB0_10
; %bb.9:
	mov	w8, #292
	str	w8, [x23]
	b	LBB0_11
LBB0_10:
	mov	w8, #420
	str	w8, [x23]
Lloh12:
	adrp	x8, _set_port_ib_mtu@GOTPAGE
Lloh13:
	ldr	x8, [x8, _set_port_ib_mtu@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	w9, #72
	madd	x9, x27, x9, x26
	str	w8, [x9, #44]
LBB0_11:
Lloh15:
	adrp	x8, _show_port_ib_mtu@GOTPAGE
Lloh16:
	ldr	x8, [x8, _show_port_ib_mtu@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	mov	w9, #72
	madd	x9, x27, x9, x26
	str	w8, [x9, #40]
	mov	x0, x23
	bl	_sysfs_attr_init
	ldr	x8, [x21]
	ldr	x0, [x8]
	mov	x1, x23
	bl	_device_create_file
	mov	x23, x0
	cbz	w0, LBB0_14
; %bb.12:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_mlx4_err
	ldr	x8, [x25]
	ldr	x8, [x8]
	ldr	x0, [x8]
	mov	x1, x22
	bl	_device_remove_file
LBB0_13:
	mov	x0, x19
	bl	_devlink_port_unregister
	mov	w8, #-1
	str	w8, [x24]
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mlx4_port%d"

	.comm	_set_port_type,4,2              ; @set_port_type
	.comm	_show_port_type,4,2             ; @show_port_type
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create file for port %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"mlx4_port%d_mtu"

	.comm	_set_port_ib_mtu,4,2            ; @set_port_ib_mtu
	.comm	_show_port_ib_mtu,4,2           ; @show_port_ib_mtu
l_.str.3:                               ; @.str.3
	.asciz	"Failed to create mtu file for port %d\n"

	.no_dead_strip	_mlx4_init_port_info
.subsections_via_symbols
