	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vlan_alloc_res
_vlan_alloc_res:                        ## @vlan_alloc_res
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %r13
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	16(%rbp), %r14d
	callq	_mlx4_priv
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edx
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	testl	%edx, %edx
	jne	LBB0_3
	jmp	LBB0_11
LBB0_2:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_param_l
	movl	%eax, %edx
	testl	%edx, %edx
	je	LBB0_11
LBB0_3:
	movq	_RES_OP_RESERVE_AND_MAP@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_11
## %bb.4:
	movq	%r13, %rbx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_mlx4_slave_convert_port
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movl	%eax, %r13d
	testl	%r14d, %r14d
	jne	LBB0_8
## %bb.6:
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.7:
	cmpl	(%r12), %r13d
	jle	LBB0_13
LBB0_8:
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%rbx, %rdx
	callq	___mlx4_register_vlan
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movl	-44(%rbp), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_set_param_l
	movl	-44(%rbp), %r8d
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movl	%r13d, %ecx
	callq	_vlan_add_to_slave
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%rbx, %rdx
	callq	___mlx4_unregister_vlan
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movslq	%r15d, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, (%rcx,%rax,4)
LBB0_14:
	xorl	%r14d, %r14d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_OP_RESERVE_AND_MAP,4,2     ## @RES_OP_RESERVE_AND_MAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vlan_alloc_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vlan_alloc_res
_vlan_alloc_res:                        ; @vlan_alloc_res
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x24, x6
	mov	x22, x5
	mov	x19, x4
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
	bl	_mlx4_priv
	ldr	x25, [x0]
	mov	x2, x24
	cbz	w24, LBB0_2
; %bb.1:
	cbnz	w2, LBB0_3
	b	LBB0_11
LBB0_2:
	mov	x0, x22
	bl	_get_param_l
	mov	x2, x0
	cbz	w2, LBB0_11
LBB0_3:
Lloh0:
	adrp	x8, _RES_OP_RESERVE_AND_MAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RES_OP_RESERVE_AND_MAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_11
; %bb.4:
	mov	x0, x20
	mov	x1, x21
	bl	_mlx4_slave_convert_port
	tbnz	w0, #31, LBB0_11
; %bb.5:
	mov	x23, x0
	cbnz	w24, LBB0_8
; %bb.6:
	cbz	w23, LBB0_8
; %bb.7:
	ldr	w8, [x20]
	cmp	w23, w8
	b.le	LBB0_13
LBB0_8:
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	___mlx4_register_vlan
	mov	x24, x0
	cbnz	w0, LBB0_12
; %bb.9:
	ldr	w1, [sp, #12]
	mov	x0, x22
	bl	_set_param_l
	ldr	w4, [sp, #12]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	bl	_vlan_add_to_slave
	mov	x24, x0
	cbz	w0, LBB0_12
; %bb.10:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	___mlx4_unregister_vlan
	b	LBB0_12
LBB0_11:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_12:
	mov	x0, x24
	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
	add	sp, sp, #96
	ret
LBB0_13:
	mov	w24, #0
	mov	w8, #1
	str	w8, [x25, w21, sxtw #2]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_OP_RESERVE_AND_MAP,4,2     ; @RES_OP_RESERVE_AND_MAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vlan_alloc_res
.subsections_via_symbols
