	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_resolve_grh_to_l2
_mlx4_resolve_grh_to_l2:                ## @mlx4_resolve_grh_to_l2
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	16(%rdx), %rbx
	movq	%rbx, %rdi
	callq	_link_local_gid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%r15), %rdi
	movq	(%rbx), %rsi
	addq	$32, %rsi
	movl	$3, %edx
	callq	_memcpy
	movq	(%r15), %rdi
	addq	$12, %rdi
	movq	(%rbx), %rsi
	addq	$52, %rsi
	movl	$3, %edx
	callq	_memcpy
	movq	(%r15), %rax
	xorl	$2, (%rax)
	movq	%rbx, %rdi
LBB0_6:
	callq	_get_vlan_id
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_8
## %bb.7:
	movl	$536870912, %edi                ## imm = 0x20000000
	callq	_htobe32
	orl	%eax, 12(%r15)
	movl	(%r14), %eax
	shll	$13, %eax
	movzwl	%ax, %eax
	orl	%r12d, %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_8
LBB0_2:
	movq	%rbx, %rdi
	callq	_is_multicast_gid
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	(%r15), %rax
	movabsq	$219043332147, %rcx             ## imm = 0x3300000033
	movq	%rcx, (%rax)
	movq	16(%r14), %rcx
	movl	48(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	16(%r14), %rcx
	movl	52(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movq	16(%r14), %rcx
	movl	56(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	16(%r14), %rcx
	movl	60(%rcx), %ecx
	movl	%ecx, 20(%rax)
	movl	(%r12), %edi
	movl	8(%r14), %edx
	movl	24(%r14), %esi
	leaq	-40(%rbp), %rcx
	callq	_ibv_query_gid
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	$49152, %edi                    ## imm = 0xC000
	callq	_htobe16
	movl	%eax, 16(%r15)
	movl	$-2147483648, %edi              ## imm = 0x80000000
	callq	_htobe32
	orl	%eax, 12(%r15)
	leaq	-40(%rbp), %rdi
	jmp	LBB0_6
LBB0_3:
	movl	$1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mlx4_resolve_grh_to_l2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_resolve_grh_to_l2
_mlx4_resolve_grh_to_l2:                ; @mlx4_resolve_grh_to_l2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	add	x21, x2, #16
	mov	x0, x21
	bl	_link_local_gid
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x0, [x19]
	ldr	x8, [x21]
	add	x1, x8, #32
	mov	w2, #3
	bl	_memcpy
	ldr	x8, [x19]
	add	x0, x8, #12
	ldr	x8, [x21]
	add	x1, x8, #52
	mov	w2, #3
	bl	_memcpy
	ldr	x8, [x19]
	ldr	w9, [x8]
	eor	w9, w9, #0x2
	str	w9, [x8]
	mov	x0, x21
LBB0_2:
	bl	_get_vlan_id
	mov	x21, x0
	mov	w8, #65535
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.3:
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	mov	x0, x21
	bl	_is_multicast_gid
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x8, [x19]
	movi.2s	v0, #51
	str	d0, [x8]
	ldr	x9, [x20, #16]
	ldr	w9, [x9, #48]
	str	w9, [x8, #8]
	ldr	x9, [x20, #16]
	ldr	w9, [x9, #52]
	str	w9, [x8, #12]
	ldr	x9, [x20, #16]
	ldr	w9, [x9, #56]
	str	w9, [x8, #16]
	ldr	x9, [x20, #16]
	ldr	w9, [x9, #60]
	str	w9, [x8, #20]
	ldr	w0, [x22]
	ldr	w1, [x20, #24]
	ldr	w2, [x20, #8]
	add	x3, sp, #8
	bl	_ibv_query_gid
	cbnz	w0, LBB0_9
; %bb.6:
	mov	w0, #49152
	bl	_htobe16
	str	w0, [x19, #16]
	mov	w0, #-2147483648
	bl	_htobe32
	ldr	w8, [x19, #12]
	orr	w8, w8, w0
	str	w8, [x19, #12]
	add	x0, sp, #8
	b	LBB0_2
LBB0_7:
	mov	w0, #536870912
	bl	_htobe32
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	ldr	w9, [x20]
	ubfiz	w9, w9, #13, #3
	orr	w9, w9, w21
	stp	w9, w8, [x19, #8]
	b	LBB0_9
LBB0_8:
	mov	w0, #1
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mlx4_resolve_grh_to_l2
.subsections_via_symbols
