	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_create_ctxtdata           ## -- Begin function hfi1_create_ctxtdata
	.p2align	4, 0x90
_hfi1_create_ctxtdata:                  ## @hfi1_create_ctxtdata
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %edx
	movq	%rdi, %r14
	movq	(%rdi), %r13
	movq	(%r13), %rax
	subq	8(%r13), %rax
	movq	24(%r13), %rcx
	movl	%ecx, %r15d
	subl	%eax, %r15d
	xorl	%r12d, %r12d
	cmpq	%rax, %rcx
	cmovlel	%r12d, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$136, %edi
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	callq	_kzalloc_node
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_20
## %bb.1:
	leaq	-52(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_allocate_rcd_index
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	%rbx, %rdi
	callq	_kfree
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_21
LBB0_3:
	leaq	128(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	callq	_hfi1_exp_tid_group_init
	movq	%r14, 120(%rbx)
	movq	%r13, 112(%rbx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movl	32(%r13), %eax
	movl	%eax, 4(%rbx)
	movq	_normal_rhf_rcv_functions@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 108(%rbx)
	leaq	104(%rbx), %rdi
	callq	_mutex_init
	leaq	100(%rbx), %rdi
	callq	_spin_lock_init
	leaq	96(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	addq	$92, %rdi
	callq	_INIT_LIST_HEAD
	movq	_PROC@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	64(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_hfi1_cdbg
	movl	-52(%rbp), %ecx
	movq	8(%r13), %rax
	cmpq	%rcx, %rax
	jle	LBB0_7
## %bb.4:
	movl	32(%r13), %eax
	cmpl	%r15d, %ecx
	jae	LBB0_6
## %bb.5:
	incl	%eax
	imull	%ecx, %eax
	incl	4(%rbx)
	jmp	LBB0_10
LBB0_7:
	subl	%eax, %ecx
	movl	32(%r13), %edx
	movl	16(%r13), %eax
	imull	%edx, %eax
	addl	%r15d, %eax
	movq	24(%r13), %rsi
	cmpq	%rcx, %rsi
	jle	LBB0_9
## %bb.8:
	incl	%edx
	imull	%ecx, %edx
	addl	%edx, %eax
	incl	4(%rbx)
	jmp	LBB0_10
LBB0_6:
	imull	%ecx, %eax
	addl	%r15d, %eax
	jmp	LBB0_10
LBB0_9:
	imull	%ecx, %edx
	addl	%edx, %esi
	addl	%eax, %esi
	movl	%esi, %eax
LBB0_10:
	movl	36(%r13), %esi
	imull	%esi, %eax
	movl	%eax, 8(%rbx)
	movq	_rcvhdrcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%rbx)
	movq	_hfi1_hdrq_entsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 72(%rbx)
	decq	%rax
	movq	%rax, 80(%rbx)
	movl	4(%rbx), %eax
	imull	%esi, %eax
	movq	_hfi1_rcvarr_split@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	shrq	$37, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_round_down
	movq	%rax, 24(%rbx)
	movq	_MAX_EAGER_ENTRIES@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jle	LBB0_12
## %bb.11:
	movl	64(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_dd_dev_err
	movq	(%r15), %rax
	movq	%rax, 24(%rbx)
LBB0_12:
	movl	(%r14), %edi
	movl	64(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_hfi1_cdbg
	movq	24(%rbx), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	$1, %esi
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	callq	_kcalloc_node
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_20
## %bb.13:
	movq	24(%rbx), %rdi
	movl	(%r14), %edx
	movl	$1, %esi
	movl	%r15d, %ecx
	callq	_kcalloc_node
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_20
## %bb.14:
	movq	_eager_buffer_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	_hfi1_max_mtu@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	cmpq	%rdi, %rax
	jge	LBB0_16
## %bb.15:
	callq	___roundup_pow_of_two
	movq	%rax, 32(%rbx)
	movq	_PROC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	64(%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_hfi1_cdbg
LBB0_16:
	movq	_HFI1_MAX_EAGER_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	-52(%rbp), %eax
	cmpq	%rax, 8(%r13)
	jle	LBB0_19
## %bb.17:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	movl	%r15d, %edx
	callq	_kzalloc_node
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movq	%rbx, %rdi
	callq	_hfi1_kern_init_ctxt_generations
LBB0_19:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_21
LBB0_20:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	%rbx, %rdi
	callq	_hfi1_free_ctxt
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_normal_rhf_rcv_functions,4,2   ## @normal_rhf_rcv_functions
	.comm	_PROC,4,2                       ## @PROC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting up context %u\n"

	.comm	_rcvhdrcnt,4,2                  ## @rcvhdrcnt
	.comm	_hfi1_hdrq_entsize,8,3          ## @hfi1_hdrq_entsize
	.comm	_hfi1_rcvarr_split,4,2          ## @hfi1_rcvarr_split
	.comm	_MAX_EAGER_ENTRIES,8,3          ## @MAX_EAGER_ENTRIES
L_.str.1:                               ## @.str.1
	.asciz	"ctxt%u: requested too many RcvArray entries.\n"

L_.str.2:                               ## @.str.2
	.asciz	"ctxt%u: max Eager buffer RcvArray entries: %u\n"

	.comm	_eager_buffer_size,8,3          ## @eager_buffer_size
	.comm	_hfi1_max_mtu,8,3               ## @hfi1_max_mtu
L_.str.3:                               ## @.str.3
	.asciz	"ctxt%u: eager bufs size too small. Adjusting to %u\n"

	.comm	_HFI1_MAX_EAGER_BUFFER_SIZE,4,2 ## @HFI1_MAX_EAGER_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_create_ctxtdata           ; -- Begin function hfi1_create_ctxtdata
	.p2align	2
_hfi1_create_ctxtdata:                  ; @hfi1_create_ctxtdata
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x21, x1
	mov	x24, x0
	ldr	x23, [x0]
	ldr	x8, [x23, #24]
	ldp	x9, x10, [x23]
	sub	x9, x9, x10
	sub	w10, w8, w9
	cmp	x8, x9
	csel	w26, w10, wzr, gt
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #136
	mov	x2, x21
	bl	_kzalloc_node
	mov	x20, x0
	cbz	x0, LBB0_21
; %bb.1:
	add	x2, sp, #12
	mov	x0, x23
	mov	x1, x20
	bl	_allocate_rcd_index
	mov	x22, x0
	cbz	w0, LBB0_3
; %bb.2:
	str	xzr, [x19]
	mov	x0, x20
	bl	_kfree
	b	LBB0_22
LBB0_3:
	add	x0, x20, #128
	bl	_INIT_LIST_HEAD
	mov	x0, x20
	bl	_hfi1_exp_tid_group_init
	stp	x23, x24, [x20, #112]
	ldr	w8, [x23, #32]
	stp	w21, w8, [x20]
Lloh2:
	adrp	x8, _normal_rhf_rcv_functions@GOTPAGE
Lloh3:
	ldr	x8, [x8, _normal_rhf_rcv_functions@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x20, #108]
	add	x0, x20, #104
	bl	_mutex_init
	add	x0, x20, #100
	bl	_spin_lock_init
	add	x0, x20, #96
	bl	_INIT_LIST_HEAD
	add	x0, x20, #92
	bl	_INIT_LIST_HEAD
Lloh5:
	adrp	x24, _PROC@GOTPAGE
Lloh6:
	ldr	x24, [x24, _PROC@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	w2, [x20, #64]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_hfi1_cdbg
	ldr	w8, [sp, #12]
	ldr	x9, [x23, #8]
	cmp	x9, x8
	b.le	LBB0_6
; %bb.4:
	ldr	w9, [x23, #32]
	cmp	w8, w26
	b.hs	LBB0_9
; %bb.5:
	madd	w8, w8, w9, w8
	b	LBB0_8
LBB0_6:
	ldr	w10, [x23, #16]
	ldr	w11, [x23, #32]
	madd	w10, w11, w10, w26
	ldr	x12, [x23, #24]
	sub	w8, w8, w9
	cmp	x12, x8
	b.le	LBB0_10
; %bb.7:
	madd	w8, w8, w11, w8
	add	w8, w10, w8
LBB0_8:
	ldr	w9, [x20, #4]
	add	w9, w9, #1
	str	w9, [x20, #4]
	b	LBB0_11
LBB0_9:
	madd	w8, w9, w8, w26
	b	LBB0_11
LBB0_10:
	madd	w8, w11, w8, w12
	add	w8, w8, w10
LBB0_11:
	ldr	w1, [x23, #36]
	mul	w8, w1, w8
Lloh9:
	adrp	x9, _rcvhdrcnt@GOTPAGE
Lloh10:
	ldr	x9, [x9, _rcvhdrcnt@GOTPAGEOFF]
	str	w8, [x20, #8]
Lloh11:
	ldr	w8, [x9]
	str	w8, [x20, #88]
Lloh12:
	adrp	x8, _hfi1_hdrq_entsize@GOTPAGE
Lloh13:
	ldr	x8, [x8, _hfi1_hdrq_entsize@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	sub	x9, x8, #1
	stp	x8, x9, [x20, #72]
	ldr	w8, [x20, #4]
Lloh15:
	adrp	x9, _hfi1_rcvarr_split@GOTPAGE
Lloh16:
	ldr	x9, [x9, _hfi1_rcvarr_split@GOTPAGEOFF]
	mul	w8, w8, w1
Lloh17:
	ldr	w9, [x9]
	mul	w8, w8, w9
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	umull	x8, w8, w9
	lsr	x0, x8, #37
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_round_down
	str	x0, [x20, #24]
Lloh18:
	adrp	x26, _MAX_EAGER_ENTRIES@GOTPAGE
Lloh19:
	ldr	x26, [x26, _MAX_EAGER_ENTRIES@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x0, x8
	b.le	LBB0_13
; %bb.12:
	ldr	w2, [x20, #64]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_dd_dev_err
	ldr	x0, [x26]
	str	x0, [x20, #24]
LBB0_13:
	ldr	w8, [x24]
	ldr	w2, [x20, #64]
	str	x0, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
	bl	_hfi1_cdbg
	ldr	x0, [x20, #24]
	ldr	w2, [x25]
	mov	w1, #1
	mov	x3, x21
	bl	_kcalloc_node
	str	x0, [x20, #56]
	cbz	x0, LBB0_21
; %bb.14:
	ldr	x0, [x20, #24]
	ldr	w2, [x25]
	mov	w1, #1
	mov	x3, x21
	bl	_kcalloc_node
	str	x0, [x20, #48]
	cbz	x0, LBB0_21
; %bb.15:
Lloh24:
	adrp	x8, _eager_buffer_size@GOTPAGE
Lloh25:
	ldr	x8, [x8, _eager_buffer_size@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x20, #32]
Lloh27:
	adrp	x9, _hfi1_max_mtu@GOTPAGE
Lloh28:
	ldr	x9, [x9, _hfi1_max_mtu@GOTPAGEOFF]
Lloh29:
	ldr	x0, [x9]
	cmp	x8, x0
	b.ge	LBB0_17
; %bb.16:
	bl	___roundup_pow_of_two
	str	x0, [x20, #32]
	ldr	w8, [x24]
	ldr	w2, [x20, #64]
	str	x0, [sp]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x8
	bl	_hfi1_cdbg
LBB0_17:
Lloh32:
	adrp	x8, _HFI1_MAX_EAGER_BUFFER_SIZE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _HFI1_MAX_EAGER_BUFFER_SIZE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [x20, #40]
	ldr	w8, [sp, #12]
	ldr	x9, [x23, #8]
	cmp	x9, x8
	b.le	LBB0_20
; %bb.18:
	ldr	w1, [x25]
	mov	w0, #1
	mov	x2, x21
	bl	_kzalloc_node
	str	x0, [x20, #16]
	cbz	x0, LBB0_21
; %bb.19:
	mov	x0, x20
	bl	_hfi1_kern_init_ctxt_generations
LBB0_20:
	str	x20, [x19]
	b	LBB0_22
LBB0_21:
	str	xzr, [x19]
	mov	x0, x20
	bl	_hfi1_free_ctxt
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_22:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_normal_rhf_rcv_functions,4,2   ; @normal_rhf_rcv_functions
	.comm	_PROC,4,2                       ; @PROC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting up context %u\n"

	.comm	_rcvhdrcnt,4,2                  ; @rcvhdrcnt
	.comm	_hfi1_hdrq_entsize,8,3          ; @hfi1_hdrq_entsize
	.comm	_hfi1_rcvarr_split,4,2          ; @hfi1_rcvarr_split
	.comm	_MAX_EAGER_ENTRIES,8,3          ; @MAX_EAGER_ENTRIES
l_.str.1:                               ; @.str.1
	.asciz	"ctxt%u: requested too many RcvArray entries.\n"

l_.str.2:                               ; @.str.2
	.asciz	"ctxt%u: max Eager buffer RcvArray entries: %u\n"

	.comm	_eager_buffer_size,8,3          ; @eager_buffer_size
	.comm	_hfi1_max_mtu,8,3               ; @hfi1_max_mtu
l_.str.3:                               ; @.str.3
	.asciz	"ctxt%u: eager bufs size too small. Adjusting to %u\n"

	.comm	_HFI1_MAX_EAGER_BUFFER_SIZE,4,2 ; @HFI1_MAX_EAGER_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
