	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_register_vlan           ## -- Begin function __mlx4_register_vlan
	.p2align	4, 0x90
___mlx4_register_vlan:                  ## @__mlx4_register_vlan
	.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
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_mlx4_priv
	movq	(%rax), %r12
	leaq	(%r14,%r14,4), %r13
	leaq	(%r12,%r13,8), %rdi
	addq	$24, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	(%r12,%r13,8), %rax
	cmpq	8(%r12,%r13,8), %rax
	jne	LBB0_3
## %bb.1:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_MLX4_VLAN_REGULAR@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movq	_MLX4_MAX_VLAN_NUM@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jge	LBB0_13
## %bb.4:
	leaq	(%r12,%r13,8), %r12
	movl	$-1, %r13d
	jmp	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %r13d
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rcx
	movl	(%rcx,%rbx,4), %ecx
	testl	%r13d, %r13d
	js	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_9
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	testl	%ecx, %ecx
	je	LBB0_7
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_MLX4_VLAN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	32(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_be32_to_cpu
	andl	%r14d, %eax
	cmpl	-52(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %eax
	jmp	LBB0_11
LBB0_12:
	testl	%r13d, %r13d
	js	LBB0_13
## %bb.14:
	movq	16(%r12), %rax
	movl	%r13d, %r14d
	movl	$1, (%rax,%r14,4)
	movq	_MLX4_VLAN_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	orl	%r15d, %edi
	callq	_cpu_to_be32
	movq	32(%r12), %rdx
	movq	%rax, (%rdx,%r14,8)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_mlx4_set_port_vlan_table
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_mlx4_warn
	movq	16(%r12), %rax
	movl	$0, (%rax,%r14,4)
	movq	32(%r12), %rax
	movq	$0, (%rax,%r14,8)
	jmp	LBB0_17
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movq	16(%r12), %rax
	incl	(%rax,%rbx,4)
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_16:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	incq	(%r12)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_MLX4_VLAN_REGULAR,4,2          ## @MLX4_VLAN_REGULAR
	.comm	_MLX4_MAX_VLAN_NUM,4,2          ## @MLX4_MAX_VLAN_NUM
	.comm	_MLX4_VLAN_MASK,4,2             ## @MLX4_VLAN_MASK
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX4_VLAN_VALID,4,2            ## @MLX4_VLAN_VALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed adding vlan: %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_register_vlan           ; -- Begin function __mlx4_register_vlan
	.p2align	2
___mlx4_register_vlan:                  ; @__mlx4_register_vlan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x3
	mov	x20, x2
	mov	x23, x1
	mov	x25, x0
	bl	_mlx4_priv
	ldr	x22, [x0]
	mov	w8, #40
	madd	x24, x23, x8, x22
	add	x19, x24, #24
	mov	x0, x19
	bl	_mutex_lock
	ldp	x8, x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_18
LBB0_2:
	stp	x25, x21, [sp, #8]              ; 16-byte Folded Spill
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
Lloh3:
	adrp	x8, _MLX4_VLAN_REGULAR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_VLAN_REGULAR@GOTPAGEOFF]
Lloh5:
	ldrsw	x28, [x8]
Lloh6:
	adrp	x21, _MLX4_MAX_VLAN_NUM@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MLX4_MAX_VLAN_NUM@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w28, w8
	b.ge	LBB0_14
; %bb.3:
	mov	w9, #40
	madd	x9, x23, x9, x22
	add	x25, x9, #16
	add	x26, x9, #32
	mov	w27, #-1
Lloh8:
	adrp	x22, _MLX4_VLAN_MASK@GOTPAGE
Lloh9:
	ldr	x22, [x22, _MLX4_VLAN_MASK@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x27, x28
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x28, x28, #1
	cmp	x28, w8, sxtw
	b.ge	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	ldr	w9, [x9, x28, lsl #2]
	tbnz	w27, #31, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w9, LBB0_9
	b	LBB0_5
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	cbz	w9, LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w19, [x22]
	ldr	x8, [x26]
	ldr	x0, [x8, x28, lsl #3]
	bl	_be32_to_cpu
	and	w8, w0, w19
	cmp	w8, w20
	b.eq	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21]
	b	LBB0_5
LBB0_11:
	tbnz	w27, #31, LBB0_14
; %bb.12:
	ldr	x8, [x25]
	mov	w9, #1
	str	w9, [x8, w27, uxtw #2]
Lloh10:
	adrp	x8, _MLX4_VLAN_VALID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MLX4_VLAN_VALID@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w0, w8, w20
	bl	_cpu_to_be32
	ldr	x2, [x26]
	str	x0, [x2, w27, uxtw #3]
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x21
	mov	x1, x23
	bl	_mlx4_set_port_vlan_table
	mov	x23, x0
	bl	_unlikely
	cbz	x0, LBB0_16
; %bb.13:
	mov	w19, w27
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_mlx4_warn
	ldr	x8, [x25]
	str	wzr, [x8, x19, lsl #2]
	ldr	x8, [x26]
	str	xzr, [x8, x19, lsl #3]
	b	LBB0_17
LBB0_14:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_17
LBB0_15:
	mov	w23, #0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w28, [x8]
	ldr	x8, [x25]
	lsl	x9, x28, #2
	ldr	w10, [x8, x9]
	add	w10, w10, #1
	str	w10, [x8, x9]
	b	LBB0_17
LBB0_16:
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w27, [x8]
	ldr	x8, [x24]
	add	x8, x8, #1
	str	x8, [x24]
LBB0_17:
	ldr	x19, [sp, #24]                  ; 8-byte Folded Reload
LBB0_18:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_MLX4_VLAN_REGULAR,4,2          ; @MLX4_VLAN_REGULAR
	.comm	_MLX4_MAX_VLAN_NUM,4,2          ; @MLX4_MAX_VLAN_NUM
	.comm	_MLX4_VLAN_MASK,4,2             ; @MLX4_VLAN_MASK
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX4_VLAN_VALID,4,2            ; @MLX4_VLAN_VALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed adding vlan: %u\n"

.subsections_via_symbols
