	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v2_set_gid
_hns_roce_v2_set_gid:                   ## @hns_roce_v2_set_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	testq	%r8, %r8
	je	LBB0_2
## %bb.3:
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movq	%rdi, %r14
	movq	(%r8), %rax
	movq	_IB_GID_TYPE_ROCE_UDP_ENCAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_ipv6_addr_v4mapped
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	movq	_GID_TYPE_FLAG_ROCE_V2_IPV6@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_4:
	movq	_GID_TYPE_FLAG_ROCE_V1@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_GID_TYPE_FLAG_ROCE_V2_IPV4@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_hns_roce_config_sgid_table
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_11
LBB0_9:
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GID_TYPE_FLAG_ROCE_V1,4,2      ## @GID_TYPE_FLAG_ROCE_V1
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_GID_TYPE_ROCE,8,3           ## @IB_GID_TYPE_ROCE
	.comm	_IB_GID_TYPE_ROCE_UDP_ENCAP,8,3 ## @IB_GID_TYPE_ROCE_UDP_ENCAP
	.comm	_GID_TYPE_FLAG_ROCE_V2_IPV4,4,2 ## @GID_TYPE_FLAG_ROCE_V2_IPV4
	.comm	_GID_TYPE_FLAG_ROCE_V2_IPV6,4,2 ## @GID_TYPE_FLAG_ROCE_V2_IPV6
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configure sgid table failed(%d)!\n"

	.no_dead_strip	_hns_roce_v2_set_gid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_v2_set_gid
_hns_roce_v2_set_gid:                   ; @hns_roce_v2_set_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
	cbz	x3, LBB0_4
; %bb.1:
	cbz	x4, LBB0_4
; %bb.2:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x0
	ldr	x8, [x4]
Lloh0:
	adrp	x9, _IB_GID_TYPE_ROCE_UDP_ENCAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_GID_TYPE_ROCE_UDP_ENCAP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_ipv6_addr_v4mapped
Lloh3:
	adrp	x8, _GID_TYPE_FLAG_ROCE_V2_IPV4@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GID_TYPE_FLAG_ROCE_V2_IPV4@GOTPAGEOFF]
Lloh5:
	adrp	x9, _GID_TYPE_FLAG_ROCE_V2_IPV6@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GID_TYPE_FLAG_ROCE_V2_IPV6@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_6
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_5:
Lloh10:
	adrp	x8, _GID_TYPE_FLAG_ROCE_V1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GID_TYPE_FLAG_ROCE_V1@GOTPAGEOFF]
LBB0_6:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_hns_roce_config_sgid_table
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GID_TYPE_FLAG_ROCE_V1,4,2      ; @GID_TYPE_FLAG_ROCE_V1
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_GID_TYPE_ROCE,8,3           ; @IB_GID_TYPE_ROCE
	.comm	_IB_GID_TYPE_ROCE_UDP_ENCAP,8,3 ; @IB_GID_TYPE_ROCE_UDP_ENCAP
	.comm	_GID_TYPE_FLAG_ROCE_V2_IPV4,4,2 ; @GID_TYPE_FLAG_ROCE_V2_IPV4
	.comm	_GID_TYPE_FLAG_ROCE_V2_IPV6,4,2 ; @GID_TYPE_FLAG_ROCE_V2_IPV6
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configure sgid table failed(%d)!\n"

	.no_dead_strip	_hns_roce_v2_set_gid
.subsections_via_symbols
