	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibv_resolve_eth_l2_from_gid    ## -- Begin function ibv_resolve_eth_l2_from_gid
	.p2align	4, 0x90
_ibv_resolve_eth_l2_from_gid:           ## @ibv_resolve_eth_l2_from_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movl	8(%rsi), %edx
	movl	16(%rsi), %esi
	leaq	-72(%rbp), %rcx
	callq	_ibv_query_gid
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	_NEIGH_GET_DEFAULT_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	callq	_neigh_init_resources
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	callq	_ipv6_addr_v4mapped
	testq	%rax, %rax
	movq	_AF_INET@GOTPCREL(%rip), %r13
	movq	_AF_INET6@GOTPCREL(%rip), %r14
	movq	%r13, %rax
	cmoveq	%r14, %rax
	movl	(%rax), %r15d
	movq	-72(%rbp), %rdi
	callq	_ipv6_addr_v4mapped
	testq	%rax, %rax
	cmoveq	%r14, %r13
	movl	(%r13), %r14d
	movq	(%rbx), %rsi
	leaq	-56(%rbp), %rdx
	movl	%r15d, %edi
	callq	_create_peer_from_gid
	testq	%rax, %rax
	jne	LBB0_12
## %bb.3:
	leaq	-72(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movl	%r14d, %edi
	callq	_create_peer_from_gid
	testq	%rax, %rax
	jne	LBB0_12
## %bb.4:
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %edx
	leaq	-48(%rbp), %rdi
	movl	%r15d, %esi
	callq	_neigh_set_dst
	testq	%rax, %rax
	jne	LBB0_12
## %bb.5:
	movl	-64(%rbp), %ecx
	movl	-60(%rbp), %edx
	leaq	-48(%rbp), %rdi
	movl	%r14d, %esi
	callq	_neigh_set_src
	testq	%rax, %rax
	je	LBB0_6
LBB0_12:
	leaq	-48(%rbp), %rdi
	callq	_neigh_free_resources
	movl	%r12d, %eax
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	-48(%rbp), %rdi
	callq	_neigh_get_oif_from_src
	testl	%eax, %eax
	jle	LBB0_12
## %bb.7:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_neigh_set_oif
	movq	_EHOSTUNREACH@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_process_get_neigh
	testq	%rax, %rax
	jne	LBB0_12
## %bb.8:
	leaq	-48(%rbp), %rdi
	callq	_neigh_get_vlan_id_from_dev
	movl	%eax, %ebx
	cmpl	$4095, %eax                     ## imm = 0xFFF
	jg	LBB0_10
## %bb.9:
	leaq	-48(%rbp), %rdi
	movl	%ebx, %esi
	callq	_neigh_set_vlan_id
LBB0_10:
	movq	_ETHERNET_LL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$2, %edx
	leaq	-48(%rbp), %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_neigh_get_ll
	testl	%eax, %eax
	jle	LBB0_12
## %bb.11:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	xorl	%r12d, %r12d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ETHERNET_LL_SIZE,4,2           ## @ETHERNET_LL_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NEIGH_GET_DEFAULT_TIMEOUT_MS,4,2 ## @NEIGH_GET_DEFAULT_TIMEOUT_MS
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.comm	_EHOSTUNREACH,4,2               ## @EHOSTUNREACH
	.comm	_ENOSYS,4,2                     ## @ENOSYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibv_resolve_eth_l2_from_gid    ; -- Begin function ibv_resolve_eth_l2_from_gid
	.p2align	2
_ibv_resolve_eth_l2_from_gid:           ; @ibv_resolve_eth_l2_from_gid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x3
	mov	x21, x2
	mov	x22, x1
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	w1, [x1, #16]
	ldr	w2, [x22, #8]
	add	x3, sp, #16
	bl	_ibv_query_gid
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _NEIGH_GET_DEFAULT_TIMEOUT_MS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NEIGH_GET_DEFAULT_TIMEOUT_MS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #24
	bl	_neigh_init_resources
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.2:
	neg	w20, w23
	ldr	x0, [x22]
	bl	_ipv6_addr_v4mapped
Lloh6:
	adrp	x23, _AF_INET@GOTPAGE
Lloh7:
	ldr	x23, [x23, _AF_INET@GOTPAGEOFF]
Lloh8:
	adrp	x25, _AF_INET6@GOTPAGE
Lloh9:
	ldr	x25, [x25, _AF_INET6@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x25, x23, eq
	ldr	w24, [x8]
	ldr	x0, [sp, #16]
	bl	_ipv6_addr_v4mapped
	cmp	x0, #0
	csel	x8, x25, x23, eq
	ldr	w23, [x8]
	ldr	x1, [x22]
	mov	x2, sp
	mov	x0, x24
	bl	_create_peer_from_gid
	cbnz	x0, LBB0_6
; %bb.3:
	add	x1, sp, #16
	add	x2, sp, #8
	mov	x0, x23
	bl	_create_peer_from_gid
	cbnz	x0, LBB0_6
; %bb.4:
	ldp	w3, w2, [sp]
	add	x0, sp, #24
	mov	x1, x24
	bl	_neigh_set_dst
	cbnz	x0, LBB0_6
; %bb.5:
	ldp	w3, w2, [sp, #8]
	add	x0, sp, #24
	mov	x1, x23
	bl	_neigh_set_src
	cbz	x0, LBB0_8
LBB0_6:
	add	x0, sp, #24
	bl	_neigh_free_resources
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	add	x0, sp, #24
	bl	_neigh_get_oif_from_src
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.9:
	mov	x1, x0
	add	x0, sp, #24
	bl	_neigh_set_oif
Lloh10:
	adrp	x8, _EHOSTUNREACH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EHOSTUNREACH@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
	add	x0, sp, #24
	bl	_process_get_neigh
	cbnz	x0, LBB0_6
; %bb.10:
	add	x0, sp, #24
	bl	_neigh_get_vlan_id_from_dev
	mov	x22, x0
	cmp	w0, #4095
	b.gt	LBB0_12
; %bb.11:
	add	x0, sp, #24
	mov	x1, x22
	bl	_neigh_set_vlan_id
LBB0_12:
Lloh13:
	adrp	x8, _ETHERNET_LL_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ETHERNET_LL_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	lsl	w2, w8, #2
	add	x0, sp, #24
	mov	x1, x21
	bl	_neigh_get_ll
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.13:
	mov	w20, #0
	str	w22, [x19]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ETHERNET_LL_SIZE,4,2           ; @ETHERNET_LL_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NEIGH_GET_DEFAULT_TIMEOUT_MS,4,2 ; @NEIGH_GET_DEFAULT_TIMEOUT_MS
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_EHOSTUNREACH,4,2               ; @EHOSTUNREACH
	.comm	_ENOSYS,4,2                     ; @ENOSYS
.subsections_via_symbols
