	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_unregister_mac          ## -- Begin function __mlx4_unregister_mac
	.p2align	4, 0x90
___mlx4_unregister_mac:                 ## @__mlx4_unregister_mac
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_mlx4_is_mf_bonded
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	cmpl	$1, %r14d
	sete	%bl
	movq	%r12, %rdi
	callq	_mlx4_priv
	testl	%r14d, %r14d
	jle	LBB0_26
## %bb.1:
	cmpl	%r14d, (%r12)
	jge	LBB0_2
LBB0_26:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_warn                      ## TAILCALL
LBB0_2:
	movb	%bl, %r15b
	incl	%r15d
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rax
	shlq	$5, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mlx4_priv
	movq	(%rax), %rdx
	movl	%r14d, %esi
	shlq	$5, %rsi
	leaq	(%rdx,%rsi), %rbx
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_7
## %bb.3:
	cmpl	$1, %r14d
	jne	LBB0_6
## %bb.4:
	leaq	(%rdx,%rsi), %rdi
	addq	$8, %rdi
	callq	_mutex_lock
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_7:
	leaq	(%rdx,%rsi), %rdi
	addq	$8, %rdi
	callq	_mutex_lock
	jmp	LBB0_8
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rdi
	addq	$8, %rdi
	callq	_mutex_lock
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
LBB0_5:
	leaq	(%rax,%rcx), %rdi
	addq	$8, %rdi
	movq	_SINGLE_DEPTH_NESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mutex_lock_nested
LBB0_8:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_find_index
	movl	%eax, %r13d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_validate_index
	testq	%rax, %rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_13
## %bb.9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	24(%rdx,%rsi), %rax
	movslq	%r13d, %r13
	decq	(%rax,%r13,8)
	jne	LBB0_11
## %bb.10:
	movq	(%rbx), %rax
	cmpl	$0, (%rax,%r13,4)
	je	LBB0_15
LBB0_11:
	leaq	(%rdx,%rsi), %r15
	addq	$24, %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_mlx4_dbg
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	(%r15), %rax
	cmpq	$0, (%rax,%r13,8)
	jne	LBB0_13
## %bb.12:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	$0, (%rax,%r13,4)
LBB0_13:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
LBB0_22:
	cmpl	$2, %r14d
	jne	LBB0_24
## %bb.23:
	leaq	(%rdx,%rsi), %rdi
	addq	$8, %rdi
	callq	_mutex_unlock
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rdi
	addq	$8, %rdi
	jmp	LBB0_25
LBB0_24:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rdi
	addq	$8, %rdi
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_mutex_unlock
	leaq	(%r14,%rbx), %rdi
	addq	$8, %rdi
	jmp	LBB0_25
LBB0_15:
	movq	16(%rdx,%rsi), %rdx
	movq	$0, (%rdx,%r13,8)
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_mlx4_set_port_mac_table
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_mlx4_warn
LBB0_17:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	decl	12(%rdx,%rsi)
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.18:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	$0, (%rax,%r13,4)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rax,%rcx), %rax
	cmpq	$0, (%rax,%r13,8)
	jne	LBB0_22
## %bb.19:
	leaq	(%rdx,%rsi), %rbx
	addq	$12, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rax,%rcx), %rdx
	movq	$0, (%rdx,%r13,8)
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_mlx4_set_port_mac_table
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_mlx4_warn
LBB0_21:
	decl	(%rbx)
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_14:
	leaq	(%rdx,%rsi), %rdi
	addq	$8, %rdi
LBB0_25:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid port number (%d), aborting...\n"

	.comm	_SINGLE_DEPTH_NESTING,4,2       ## @SINGLE_DEPTH_NESTING
L_.str.1:                               ## @.str.1
	.asciz	"Have more references for index %d, no need to modify mac table\n"

L_.str.2:                               ## @.str.2
	.asciz	"Fail to set mac in port %d during unregister\n"

L_.str.3:                               ## @.str.3
	.asciz	"Fail to set mac in duplicate port %d during unregister\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_unregister_mac          ; -- Begin function __mlx4_unregister_mac
	.p2align	2
___mlx4_unregister_mac:                 ; @__mlx4_unregister_mac
	.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	x23, x2
	mov	x19, x1
	mov	x21, x0
	bl	_mlx4_is_mf_bonded
	mov	x22, x0
	mov	x0, x21
	bl	_mlx4_priv
	mov	w8, #1
	cmp	w19, #1
	cinc	w20, w8, eq
	b.lt	LBB0_2
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, w19
	b.ge	LBB0_3
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	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
	b	_mlx4_warn
LBB0_3:
	ldr	x25, [x0]
	mov	x0, x21
	bl	_mlx4_priv
	ldr	x26, [x0]
	mov	w27, w19
	add	x24, x26, x27, lsl #5
	cbz	w22, LBB0_6
; %bb.4:
	cmp	w19, #1
	b.ne	LBB0_7
; %bb.5:
	add	x8, x26, x27, lsl #5
	add	x0, x8, #8
	bl	_mutex_lock
	add	x8, x25, x20, lsl #5
	b	LBB0_8
LBB0_6:
	add	x0, x24, #8
	bl	_mutex_lock
	b	LBB0_9
LBB0_7:
	add	x8, x25, x20, lsl #5
	add	x0, x8, #8
	bl	_mutex_lock
	add	x8, x26, x27, lsl #5
LBB0_8:
	add	x0, x8, #8
Lloh2:
	adrp	x8, _SINGLE_DEPTH_NESTING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SINGLE_DEPTH_NESTING@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_mutex_lock_nested
LBB0_9:
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_find_index
	mov	x23, x0
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_validate_index
	cbnz	x0, LBB0_14
; %bb.10:
	add	x12, x25, x20, lsl #5
	add	x28, x26, x27, lsl #5
	ldr	x8, [x28, #24]!
	sxtw	x11, w23
	sbfiz	x9, x23, #3, #32
	ldr	x10, [x8, x9]
	subs	x10, x10, #1
	str	x10, [x8, x9]
	b.ne	LBB0_12
; %bb.11:
	ldr	x8, [x24]
	ldr	w8, [x8, x11, lsl #2]
	cbz	w8, LBB0_20
LBB0_12:
	mov	x24, x12
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	mov	x21, x11
	bl	_mlx4_dbg
	ldr	x8, [x28]
	ldr	x8, [x8, x21, lsl #3]
	cbnz	x8, LBB0_14
; %bb.13:
	mov	x9, x21
	ldr	x8, [x24]
	str	wzr, [x8, x21, lsl #2]
LBB0_14:
	cbz	w22, LBB0_18
LBB0_15:
	cmp	w19, #2
	b.ne	LBB0_17
; %bb.16:
	add	x8, x26, x27, lsl #5
	add	x0, x8, #8
	bl	_mutex_unlock
	add	x8, x25, x20, lsl #5
	b	LBB0_19
LBB0_17:
	add	x8, x25, x20, lsl #5
	add	x0, x8, #8
	bl	_mutex_unlock
LBB0_18:
	add	x8, x26, x27, lsl #5
LBB0_19:
	add	x0, x8, #8
	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
	b	_mutex_unlock
LBB0_20:
	mov	x28, x12
	add	x23, x26, x27, lsl #5
	ldr	x2, [x23, #16]
	mov	x24, x11
	str	xzr, [x2, x11, lsl #3]
	mov	x0, x21
	mov	x1, x19
	bl	_mlx4_set_port_mac_table
	cbz	x0, LBB0_22
; %bb.21:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_mlx4_warn
LBB0_22:
	ldr	w8, [x23, #12]!
	sub	w8, w8, #1
	str	w8, [x23]
	cbz	w22, LBB0_18
; %bb.23:
	ldr	x8, [x28]
	str	wzr, [x8, x24, lsl #2]
	add	x8, x25, x20, lsl #5
	ldr	x9, [x8, #24]
	ldr	x9, [x9, x24, lsl #3]
	cbnz	x9, LBB0_15
; %bb.24:
	ldr	x2, [x8, #16]
	str	xzr, [x2, x24, lsl #3]
	mov	x0, x21
	mov	x1, x20
	bl	_mlx4_set_port_mac_table
	cbz	x0, LBB0_26
; %bb.25:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_mlx4_warn
LBB0_26:
	ldr	w8, [x23]
	sub	w8, w8, #1
	str	w8, [x23]
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid port number (%d), aborting...\n"

	.comm	_SINGLE_DEPTH_NESTING,4,2       ; @SINGLE_DEPTH_NESTING
l_.str.1:                               ; @.str.1
	.asciz	"Have more references for index %d, no need to modify mac table\n"

l_.str.2:                               ; @.str.2
	.asciz	"Fail to set mac in port %d during unregister\n"

l_.str.3:                               ; @.str.3
	.asciz	"Fail to set mac in duplicate port %d during unregister\n"

.subsections_via_symbols
