	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_create_ah
_qib_create_ah:                         ## @qib_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_idev
	movq	%rax, %r15
	movl	(%rbx), %edi
	movq	%r13, %rsi
	callq	_qib_check_ah
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %r14
	movq	%r15, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	(%r15), %rax
	movq	_ib_qib_max_ahs@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_kfree
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	incq	%rax
	movq	%rax, (%r15)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r13), %eax
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
	addq	$4, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ib_qib_max_ahs,8,3             ## @ib_qib_max_ahs
	.no_dead_strip	_qib_create_ah
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_create_ah
_qib_create_ah:                         ; @qib_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	x20, x0
	ldr	w0, [x0]
	bl	_to_idev
	mov	x21, x0
	ldr	w0, [x20]
	mov	x1, x19
	bl	_qib_check_ah
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
Lloh2:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	add	x22, x21, #8
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _ib_qib_max_ahs@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ib_qib_max_ahs@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_kfree
LBB0_5:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@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:
	add	x8, x8, #1
	str	x8, [x21]
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19]
	str	w8, [x20, #8]
	add	x0, x20, #4
	mov	w1, #0
	bl	_atomic_set
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ib_qib_max_ahs,8,3             ; @ib_qib_max_ahs
	.no_dead_strip	_qib_create_ah
.subsections_via_symbols
