	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_ah_attr_by_ipv6
_set_ah_attr_by_ipv6:                   ## @set_ah_attr_by_ipv6
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	16(%rdx), %rax
	cmpl	$255, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movl	24(%rdx), %eax
	movl	%eax, 16(%rsi)
	movq	(%rdx), %rax
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_IBV_GID_TYPE_ROCE_V2@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_IB_NEXT_HDR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_10
## %bb.6:
	movq	_IBV_GID_TYPE_IB_ROCE_V1@GOTPCREL(%rip), %rax
LBB0_7:
	leaq	16(%rbx), %rdx
	movl	(%rax), %eax
	movq	%rcx, %rsi
	movl	%eax, %ecx
	callq	_ibv_find_gid_index
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	movl	%eax, %eax
	movq	%rax, 8(%r14)
	movl	12(%rbx), %edi
	callq	_be32toh
	movl	8(%rbx), %ecx
	movl	%ecx, 4(%r14)
	shrl	$20, %eax
	movzbl	%al, %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_10:
	movq	_EPROTONOSUPPORT@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_IPPROTO_UDP,8,3                ## @IPPROTO_UDP
	.comm	_IBV_GID_TYPE_ROCE_V2,4,2       ## @IBV_GID_TYPE_ROCE_V2
	.comm	_IB_NEXT_HDR,8,3                ## @IB_NEXT_HDR
	.comm	_IBV_GID_TYPE_IB_ROCE_V1,4,2    ## @IBV_GID_TYPE_IB_ROCE_V1
	.comm	_EPROTONOSUPPORT,4,2            ## @EPROTONOSUPPORT
	.no_dead_strip	_set_ah_attr_by_ipv6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_ah_attr_by_ipv6
_set_ah_attr_by_ipv6:                   ; @set_ah_attr_by_ipv6
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	ldr	x8, [x2, #16]!
	ldr	w8, [x8]
	cmp	w8, #255
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	mov	x19, x1
	ldr	w8, [x20, #24]
	str	w8, [x1, #16]
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _IPPROTO_UDP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IPPROTO_UDP@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _IBV_GID_TYPE_ROCE_V2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IBV_GID_TYPE_ROCE_V2@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh7:
	adrp	x9, _IB_NEXT_HDR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IB_NEXT_HDR@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
Lloh10:
	adrp	x8, _IBV_GID_TYPE_IB_ROCE_V1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IBV_GID_TYPE_IB_ROCE_V1@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	mov	x1, x3
	mov	x3, x8
	bl	_ibv_find_gid_index
	tbnz	w0, #31, LBB0_10
; %bb.7:
	mov	w8, w0
	str	x8, [x19, #8]
	ldr	w0, [x20, #12]
	bl	_be32toh
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x20, #8]
	ubfx	w8, w8, #20, #8
	stp	w8, w9, [x19]
	b	LBB0_10
LBB0_8:
Lloh12:
	adrp	x8, _EPROTONOSUPPORT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPROTONOSUPPORT@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _errno@GOTPAGE
Lloh15:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh16:
	str	w8, [x9]
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_IPPROTO_UDP,8,3                ; @IPPROTO_UDP
	.comm	_IBV_GID_TYPE_ROCE_V2,4,2       ; @IBV_GID_TYPE_ROCE_V2
	.comm	_IB_NEXT_HDR,8,3                ; @IB_NEXT_HDR
	.comm	_IBV_GID_TYPE_IB_ROCE_V1,4,2    ; @IBV_GID_TYPE_IB_ROCE_V1
	.comm	_EPROTONOSUPPORT,4,2            ; @EPROTONOSUPPORT
	.no_dead_strip	_set_ah_attr_by_ipv6
.subsections_via_symbols
