	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_ib_cleanup_multiport_master
_mlx5_ib_cleanup_multiport_master:      ## @mlx5_ib_cleanup_multiport_master
	.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, %r12
	movl	4(%rdi), %edi
	callq	_mlx5_core_native_port_num
	movl	%eax, %r14d
	leaq	24(%r12), %rdi
	movl	%eax, %esi
	callq	_mlx5_ib_port_link_layer
	movl	%eax, %r15d
	movl	4(%r12), %edi
	callq	_mlx5_core_is_mp_master
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	_IB_LINK_LAYER_ETHERNET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_10
## %bb.2:
	movq	_mlx5_ib_multiport_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpl	$0, (%r12)
	jle	LBB0_9
## %bb.3:
	decl	%r14d
	movl	%r14d, %r15d
	leaq	L_.str(%rip), %r14
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%rbx), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_mlx5_ib_dbg
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	%r12, %rdi
	callq	_mlx5_ib_unbind_slave_port
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rbx, %r15
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_kfree
	movq	16(%r12), %rax
	movq	$0, (%rax,%r15,8)
	jmp	LBB0_8
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mlx5_ib_dbg
	leaq	8(%r12), %rdi
	callq	_list_del
	movq	_mlx5_ib_multiport_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	4(%r12), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_nic_vport_disable_roce    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_LINK_LAYER_ETHERNET,4,2     ## @IB_LINK_LAYER_ETHERNET
	.comm	_mlx5_ib_multiport_mutex,4,2    ## @mlx5_ib_multiport_mutex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unbinding port_num: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"removing from devlist\n"

	.no_dead_strip	_mlx5_ib_cleanup_multiport_master
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_ib_cleanup_multiport_master
_mlx5_ib_cleanup_multiport_master:      ; @mlx5_ib_cleanup_multiport_master
	.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, #4]
	bl	_mlx5_core_native_port_num
	mov	x20, x0
	add	x0, x19, #24
	mov	x1, x20
	bl	_mlx5_ib_port_link_layer
	mov	x21, x0
	ldr	w0, [x19, #4]
	bl	_mlx5_core_is_mp_master
Lloh0:
	adrp	x8, _IB_LINK_LAYER_ETHERNET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_LINK_LAYER_ETHERNET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, #0
	ccmp	w21, w8, #0, ne
	b.eq	LBB0_2
; %bb.1:
	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
LBB0_2:
Lloh3:
	adrp	x0, _mlx5_ib_multiport_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _mlx5_ib_multiport_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x21, #0
	sub	w22, w20, #1
Lloh5:
	adrp	x20, l_.str@PAGE
Lloh6:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x21, #1
	str	x8, [sp]
	mov	x0, x19
	mov	x1, x20
	bl	_mlx5_ib_dbg
	ldr	x8, [x19, #16]
	ldr	x1, [x8, x21, lsl #3]
	mov	x0, x19
	bl	_mlx5_ib_unbind_slave_port
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x21, lsl #3]
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x22, x21
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_kfree
	ldr	x8, [x19, #16]
	str	xzr, [x8, x22, lsl #3]
	b	LBB0_5
LBB0_9:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx5_ib_dbg
	add	x0, x19, #8
	bl	_list_del
Lloh9:
	adrp	x0, _mlx5_ib_multiport_mutex@GOTPAGE
Lloh10:
	ldr	x0, [x0, _mlx5_ib_multiport_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x19, #4]
	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_nic_vport_disable_roce
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_LINK_LAYER_ETHERNET,4,2     ; @IB_LINK_LAYER_ETHERNET
	.comm	_mlx5_ib_multiport_mutex,4,2    ; @mlx5_ib_multiport_mutex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unbinding port_num: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"removing from devlist\n"

	.no_dead_strip	_mlx5_ib_cleanup_multiport_master
.subsections_via_symbols
