	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_modify_gid
_add_modify_gid:                        ## @add_modify_gid
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rsi), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_is_gid_entry_valid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	12(%rbx), %edi
	movl	8(%rbx), %esi
	movq	(%rbx), %rcx
	movq	%r14, %rdx
	callq	_del_gid
LBB0_2:
	leaq	16(%rbx), %rdi
	callq	_rdma_is_zero_gid
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_3
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	callq	_alloc_gid_entry
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_rdma_protocol_roce
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_add_roce_gid
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_put_gid_entry
	movl	%ebx, %r15d
	jmp	LBB0_9
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_7:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_store_gid_entry
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_add_modify_gid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_modify_gid
_add_modify_gid:                        ; @add_modify_gid
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x9, [x1]
	ldr	w0, [x8, x9, lsl #2]
	bl	_is_gid_entry_valid
	cbz	x0, LBB0_2
; %bb.1:
	ldp	w1, w0, [x20, #8]
	ldr	x3, [x20]
	mov	x2, x19
	bl	_del_gid
LBB0_2:
	add	x0, x20, #16
	bl	_rdma_is_zero_gid
	cbz	x0, LBB0_5
LBB0_3:
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x20
	bl	_alloc_gid_entry
	cbz	x0, LBB0_9
; %bb.6:
	mov	x21, x0
	ldp	w1, w0, [x20, #8]
	bl	_rdma_protocol_roce
	cbz	x0, LBB0_10
; %bb.7:
	mov	x0, x21
	bl	_add_roce_gid
	cbz	w0, LBB0_10
; %bb.8:
	mov	x20, x0
	mov	x0, x21
	bl	_put_gid_entry
	b	LBB0_4
LBB0_9:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_store_gid_entry
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_add_modify_gid
.subsections_via_symbols
