	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_base_ctxt
_setup_base_ctxt:                       ## @setup_base_ctxt
	.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, %r14
	movq	24(%rsi), %rbx
	movl	16(%rsi), %edi
	callq	_hfi1_init_ctxt
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_hfi1_create_rcvhdrq
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%r12, %rdi
	callq	_hfi1_setup_eagerbufs
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
LBB0_6:
	cmpq	$0, 8(%r12)
	je	LBB0_9
## %bb.7:
	movq	_HFI1_CTXT_BASE_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %rsi
	callq	_set_bit
LBB0_8:
	movq	_HFI1_CTXT_BASE_UNINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %rsi
	callq	_clear_bit
	movq	%r12, %rdi
	callq	_wake_up
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	cmpq	$0, 8(%r12)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_setup_subctxt
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_6
LBB0_4:
	movq	%r12, %rdi
	callq	_hfi1_alloc_ctxt_rcv_groups
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_init_user_ctxt
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.10:
	movq	%r12, %rdi
	callq	_user_init
	movq	%r12, (%r14)
	movq	%r12, %rdi
	callq	_hfi1_rcd_get
	xorl	%r15d, %r15d
	cmpq	$0, 8(%r12)
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI1_CTXT_BASE_FAILED,4,2      ## @HFI1_CTXT_BASE_FAILED
	.comm	_HFI1_CTXT_BASE_UNINIT,4,2      ## @HFI1_CTXT_BASE_UNINIT
	.no_dead_strip	_setup_base_ctxt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_base_ctxt
_setup_base_ctxt:                       ; @setup_base_ctxt
	.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	x21, [x1, #24]
	ldr	w0, [x1, #16]
	bl	_hfi1_init_ctxt
	mov	x0, x21
	mov	x1, x19
	bl	_hfi1_create_rcvhdrq
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_hfi1_setup_eagerbufs
	mov	x21, x0
	cbz	w0, LBB0_6
LBB0_2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _HFI1_CTXT_BASE_FAILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HFI1_CTXT_BASE_FAILED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_set_bit
LBB0_4:
Lloh3:
	adrp	x8, _HFI1_CTXT_BASE_UNINIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HFI1_CTXT_BASE_UNINIT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_clear_bit
	mov	x0, x19
	bl	_wake_up
LBB0_5:
	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
LBB0_6:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_setup_subctxt
	mov	x21, x0
	cbnz	w0, LBB0_2
LBB0_8:
	mov	x0, x19
	bl	_hfi1_alloc_ctxt_rcv_groups
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.9:
	mov	x0, x20
	mov	x1, x19
	bl	_init_user_ctxt
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.10:
	mov	x0, x19
	bl	_user_init
	str	x19, [x20]
	mov	x0, x19
	bl	_hfi1_rcd_get
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI1_CTXT_BASE_FAILED,4,2      ; @HFI1_CTXT_BASE_FAILED
	.comm	_HFI1_CTXT_BASE_UNINIT,4,2      ; @HFI1_CTXT_BASE_UNINIT
	.no_dead_strip	_setup_base_ctxt
.subsections_via_symbols
