	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mac_alloc_res
_mac_alloc_res:                         ## @mac_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_RES_OP_RESERVE_AND_MAP@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	%r9, %r12
	movl	%r8d, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r13
	movl	16(%rbp), %edx
	testl	%edx, %edx
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_get_param_l
	movl	%eax, %edx
LBB0_4:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_mlx4_slave_convert_port
	testl	%eax, %eax
	js	LBB0_1
## %bb.5:
	movl	%eax, %r14d
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	___mlx4_register_mac
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_set_param_l
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	callq	_mac_add_to_slave
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	___mlx4_unregister_mac
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RES_OP_RESERVE_AND_MAP,4,2     ## @RES_OP_RESERVE_AND_MAP
	.no_dead_strip	_mac_alloc_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mac_alloc_res
_mac_alloc_res:                         ; @mac_alloc_res
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
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, w2
	b.ne	LBB0_7
; %bb.1:
	mov	x22, x5
	mov	x19, x4
	mov	x21, x1
	mov	x20, x0
	cbnz	w6, LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_get_param_l
	mov	x6, x0
LBB0_3:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x6
	bl	_mlx4_slave_convert_port
	tbnz	w0, #31, LBB0_7
; %bb.4:
	mov	x24, x0
	mov	x0, x20
	mov	x1, x24
	mov	x2, x19
	bl	___mlx4_register_mac
	mov	x23, x0
	tbnz	w0, #31, LBB0_8
; %bb.5:
	mov	x0, x22
	mov	x1, x23
	bl	_set_param_l
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x3, x24
	mov	x4, x23
	bl	_mac_add_to_slave
	mov	x23, x0
	cbz	w0, LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x1, x24
	mov	x2, x19
	bl	___mlx4_unregister_mac
	b	LBB0_8
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_8:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RES_OP_RESERVE_AND_MAP,4,2     ; @RES_OP_RESERVE_AND_MAP
	.no_dead_strip	_mac_alloc_res
.subsections_via_symbols
