	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hfi1_create_kctxt
_hfi1_create_kctxt:                     ## @hfi1_create_kctxt
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	_HFI1_CTRL_CTXT@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpq	$0, (%r12)
	setne	%dil
	callq	_BUILD_BUG_ON
	movl	(%r14), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_hfi1_create_ctxtdata
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_MULTI_PKT_EGR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_KGET
	movl	%eax, %r15d
	movq	_NODROP_RHQ_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_KGET
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movq	_NODROP_EGR_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_KGET
	movl	%eax, %r15d
	movq	_DMA_RTAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_KGET
	orl	%r15d, %eax
	orl	%ebx, %eax
	movq	-40(%rbp), %rcx
	movl	%eax, (%rcx)
	movq	8(%rcx), %rdx
	cmpq	(%r12), %rdx
	jne	LBB0_4
## %bb.3:
	movq	_HFI1_CAP_DMA_RTAIL@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%rcx)
LBB0_4:
	movl	$1, 16(%rcx)
	movq	_SC_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%rcx), %edx
	movl	(%r14), %ecx
	movq	%r14, %rdi
	callq	_sc_alloc
	movq	-40(%rbp), %rcx
	movl	%eax, 20(%rcx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %edi
	callq	_hfi1_init_ctxt
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dd_dev_err
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dd_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI1_CTRL_CTXT,8,3             ## @HFI1_CTRL_CTXT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Kernel receive context allocation failed\n"

	.comm	_MULTI_PKT_EGR,4,2              ## @MULTI_PKT_EGR
	.comm	_NODROP_RHQ_FULL,4,2            ## @NODROP_RHQ_FULL
	.comm	_NODROP_EGR_FULL,4,2            ## @NODROP_EGR_FULL
	.comm	_DMA_RTAIL,4,2                  ## @DMA_RTAIL
	.comm	_HFI1_CAP_DMA_RTAIL,4,2         ## @HFI1_CAP_DMA_RTAIL
	.comm	_SC_ACK,4,2                     ## @SC_ACK
L_.str.1:                               ## @.str.1
	.asciz	"Kernel send context allocation failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hfi1_create_kctxt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hfi1_create_kctxt
_hfi1_create_kctxt:                     ; @hfi1_create_kctxt
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _HFI1_CTRL_CTXT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HFI1_CTRL_CTXT@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, ne
	bl	_BUILD_BUG_ON
	ldr	w1, [x19]
	add	x2, sp, #8
	mov	x0, x20
	bl	_hfi1_create_ctxtdata
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh2:
	adrp	x8, _MULTI_PKT_EGR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MULTI_PKT_EGR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_HFI1_CAP_KGET
	mov	x20, x0
Lloh5:
	adrp	x8, _NODROP_RHQ_FULL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NODROP_RHQ_FULL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_HFI1_CAP_KGET
	orr	w20, w0, w20
Lloh8:
	adrp	x8, _NODROP_EGR_FULL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NODROP_EGR_FULL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_HFI1_CAP_KGET
	orr	w20, w20, w0
Lloh11:
	adrp	x8, _DMA_RTAIL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_RTAIL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_HFI1_CAP_KGET
	orr	w9, w20, w0
	ldr	x8, [sp, #8]
	str	w9, [x8]
	ldr	x10, [x8, #8]
	ldr	x11, [x21]
	cmp	x10, x11
	b.ne	LBB0_3
; %bb.2:
Lloh14:
	adrp	x10, _HFI1_CAP_DMA_RTAIL@GOTPAGE
Lloh15:
	ldr	x10, [x10, _HFI1_CAP_DMA_RTAIL@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8]
LBB0_3:
	mov	w9, #1
	str	w9, [x8, #16]
Lloh17:
	adrp	x9, _SC_ACK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SC_ACK@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x9]
	ldr	w2, [x8, #24]
	ldr	w3, [x19]
	mov	x0, x19
	bl	_sc_alloc
	ldr	x8, [sp, #8]
	str	w0, [x8, #20]
	cbz	w0, LBB0_6
; %bb.4:
	bl	_hfi1_init_ctxt
	mov	w20, #0
	b	LBB0_7
LBB0_5:
	mov	x20, x0
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_err
	b	LBB0_7
LBB0_6:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_err
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI1_CTRL_CTXT,8,3             ; @HFI1_CTRL_CTXT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Kernel receive context allocation failed\n"

	.comm	_MULTI_PKT_EGR,4,2              ; @MULTI_PKT_EGR
	.comm	_NODROP_RHQ_FULL,4,2            ; @NODROP_RHQ_FULL
	.comm	_NODROP_EGR_FULL,4,2            ; @NODROP_EGR_FULL
	.comm	_DMA_RTAIL,4,2                  ; @DMA_RTAIL
	.comm	_HFI1_CAP_DMA_RTAIL,4,2         ; @HFI1_CAP_DMA_RTAIL
	.comm	_SC_ACK,4,2                     ; @SC_ACK
l_.str.1:                               ; @.str.1
	.asciz	"Kernel send context allocation failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hfi1_create_kctxt
.subsections_via_symbols
