	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipath_create_ah
_ipath_create_ah:                       ## @ipath_create_ah
	.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, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_to_idev
	movq	%rax, %r14
	movq	(%r12), %rax
	movq	_IPATH_MULTICAST_LID_BASE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_3
## %bb.1:
	movq	_IPATH_PERMISSIVE_LID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%r12)
	je	LBB0_6
LBB0_3:
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movl	12(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.5:
	movq	(%rbx), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_8
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	%rax, %r15
	movq	%r14, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	(%r14), %rax
	movq	_ib_ipath_max_ahs@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.10:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	callq	_kfree
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_12:
	incq	%rax
	movq	%rax, (%r14)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movups	(%r12), %xmm0
	movups	%xmm0, 8(%r15)
	movq	16(%r12), %rax
	movq	%rax, 24(%r15)
	movl	16(%r12), %edi
	callq	_ipath_ib_rate_to_mult
	movl	%eax, 24(%r15)
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPATH_MULTICAST_LID_BASE,8,3   ## @IPATH_MULTICAST_LID_BASE
	.comm	_IPATH_PERMISSIVE_LID,8,3       ## @IPATH_PERMISSIVE_LID
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ib_ipath_max_ahs,8,3           ## @ib_ipath_max_ahs
	.no_dead_strip	_ipath_create_ah
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipath_create_ah
_ipath_create_ah:                       ; @ipath_create_ah
	.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	x19, x1
	mov	x21, x0
	ldr	x0, [x0]
	bl	_to_idev
	mov	x20, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _IPATH_MULTICAST_LID_BASE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IPATH_MULTICAST_LID_BASE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _IPATH_PERMISSIVE_LID@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IPATH_PERMISSIVE_LID@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ge
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x19, #8]
Lloh6:
	adrp	x10, _IB_AH_GRH@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IB_AH_GRH@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
LBB0_2:
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.4:
	ldr	x9, [x21]
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_7:
Lloh11:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kmalloc
	cbz	x0, LBB0_10
; %bb.8:
	mov	x21, x0
	add	x22, x20, #8
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
Lloh14:
	adrp	x9, _ib_ipath_max_ahs@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ib_ipath_max_ahs@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	bl	_kfree
LBB0_10:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_11:
	add	x8, x8, #1
	str	x8, [x20]
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19, #16]
	ldr	q0, [x19]
	stur	q0, [x21, #8]
	str	x8, [x21, #24]
	ldr	w0, [x19, #16]
	bl	_ipath_ib_rate_to_mult
	str	w0, [x21, #24]
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_IPATH_MULTICAST_LID_BASE,8,3   ; @IPATH_MULTICAST_LID_BASE
	.comm	_IPATH_PERMISSIVE_LID,8,3       ; @IPATH_PERMISSIVE_LID
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ib_ipath_max_ahs,8,3           ; @ib_ipath_max_ahs
	.no_dead_strip	_ipath_create_ah
.subsections_via_symbols
