	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_a_ctxt
_get_a_ctxt:                            ## @get_a_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r13
	leaq	-64(%rbp), %rdi
	leaq	-60(%rbp), %rsi
	callq	_qib_count_units
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$0, -64(%rbp)
	je	LBB0_1
## %bb.3:
	cmpl	$0, -60(%rbp)
	je	LBB0_4
## %bb.5:
	movq	_QIB_PORT_ALG_ACROSS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_6
## %bb.11:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_35
## %bb.12:
	leaq	-1(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$-1, -48(%rbp)                  ## 4-byte Folded Spill
	xorl	%r15d, %r15d
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_13 Depth=1
	testl	%ebx, %ebx
	setne	%al
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, %edi
	setb	%cl
	testb	%cl, %al
	cmovnel	%edi, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmovneq	%r14, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_29:                                ##   in Loop: Header=BB0_13 Depth=1
	incl	%r15d
	cmpl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	je	LBB0_30
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
                                        ##     Child Loop BB0_25 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
	movl	%r15d, %edi
	callq	_qib_lookup
	testq	%rax, %rax
	je	LBB0_29
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rax, %r14
	testq	%r13, %r13
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpq	(%r14), %r13
	ja	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r14), %rdi
	addq	-80(%rbp), %rdi                 ## 8-byte Folded Reload
	callq	_usable
	testq	%rax, %rax
	jne	LBB0_21
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	cmpq	$0, (%r14)
	je	LBB0_29
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r12, %r13
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r14), %rdi
	addq	%rbx, %rdi
	callq	_usable
	cmpq	$1, %rax
	sbbl	$-1, %r12d
	incq	%rbx
	cmpq	%rbx, (%r14)
	ja	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	testl	%r12d, %r12d
	movq	%r13, %r12
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_29
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	xorl	%edi, %edi
	movq	%rcx, %r8
	movl	$0, %ebx
	subq	%rax, %r8
	pxor	%xmm6, %xmm6
	pcmpeqd	%xmm7, %xmm7
	jbe	LBB0_28
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	32(%r14), %r9
	xorl	%ebx, %ebx
	cmpq	$4, %r8
	jae	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%edi, %edi
	jmp	LBB0_27
LBB0_24:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%r8, %rsi
	andq	$-4, %rsi
	leaq	(%r9,%rax,8), %rdi
	addq	$16, %rdi
	addq	%rsi, %rax
	pxor	%xmm0, %xmm0
	xorl	%ebx, %ebx
	pxor	%xmm1, %xmm1
	pxor	%xmm3, %xmm3
	pxor	%xmm2, %xmm2
	.p2align	4, 0x90
LBB0_25:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	-16(%rdi,%rbx,8), %xmm4
	movdqu	(%rdi,%rbx,8), %xmm5
	pcmpeqq	%xmm6, %xmm4
	pcmpeqq	%xmm6, %xmm5
	pshufd	$232, %xmm4, %xmm4              ## xmm4 = xmm4[0,2,2,3]
	paddd	%xmm4, %xmm3
	psubd	%xmm7, %xmm3
	pshufd	$232, %xmm5, %xmm5              ## xmm5 = xmm5[0,2,2,3]
	paddd	%xmm5, %xmm2
	psubd	%xmm7, %xmm2
	psubd	%xmm4, %xmm0
	psubd	%xmm5, %xmm1
	addq	$4, %rbx
	cmpq	%rbx, %rsi
	jne	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_13 Depth=1
	paddd	%xmm3, %xmm2
	pshufd	$85, %xmm2, %xmm3               ## xmm3 = xmm2[1,1,1,1]
	paddd	%xmm2, %xmm3
	movd	%xmm3, %edi
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ebx
	cmpq	%rsi, %r8
	je	LBB0_28
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%esi, %esi
	xorl	%edx, %edx
	cmpq	$0, (%r9,%rax,8)
	sete	%sil
	setne	%dl
	addl	%edx, %edi
	addl	%esi, %ebx
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_27
	jmp	LBB0_28
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_ENETDOWN@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_37
LBB0_6:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_35
## %bb.7:
	xorl	%r15d, %r15d
	movq	_EBUSY@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	cmpl	%ebx, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_34
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_qib_lookup
	testq	%rax, %rax
	je	LBB0_33
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_choose_port_ctxt
	testl	%eax, %eax
	je	LBB0_10
## %bb.32:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%ecx, %ecx
	addl	(%r14), %eax
	sete	%cl
	addl	%ecx, %r15d
	jmp	LBB0_33
LBB0_30:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_35
## %bb.31:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_choose_port_ctxt
	jmp	LBB0_37
LBB0_34:
	testl	%r15d, %r15d
	jne	LBB0_36
LBB0_35:
	movq	_ENETDOWN@GOTPCREL(%rip), %r14
LBB0_36:
	xorl	%eax, %eax
	subl	(%r14), %eax
LBB0_37:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ENETDOWN,4,2                   ## @ENETDOWN
	.comm	_QIB_PORT_ALG_ACROSS,4,2        ## @QIB_PORT_ALG_ACROSS
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_get_a_ctxt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_a_ctxt
_get_a_ctxt:                            ; @get_a_ctxt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x20, [x1]
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_qib_count_units
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_24
; %bb.1:
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_35
; %bb.2:
	mov	x22, x0
Lloh0:
	adrp	x8, _QIB_PORT_ALG_ACROSS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QIB_PORT_ALG_ACROSS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_25
; %bb.3:
	cmp	w22, #1
	b.lt	LBB0_35
; %bb.4:
	mov	x23, #0
	mov	w24, #0
	sub	x8, x20, #1
	str	x8, [sp]                        ; 8-byte Folded Spill
	mov	w27, #-1
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	w13, #0
	mov	w14, #0
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	cmp	w14, #0
	cset	w8, ne
	cmp	w13, w27
	cset	w9, lo
	tst	w8, w9
	csel	w27, w13, w27, ne
	csel	x23, x25, x23, ne
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w24, w24, #1
	cmp	w24, w22
	b.eq	LBB0_31
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
                                        ;     Child Loop BB0_20 Depth 2
                                        ;     Child Loop BB0_23 Depth 2
	mov	x0, x24
	bl	_qib_lookup
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x25, x0
	cbz	x20, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x25]
	cmp	x20, x8
	b.hi	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x25, #8]
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x0, x9, x8
	bl	_usable
	cbnz	x0, LBB0_16
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x25]
	cbz	x8, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x26, #0
	mov	w28, #0
LBB0_14:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x25, #8]
	add	x0, x26, x8
	bl	_usable
	cmp	x0, #0
	cinc	w28, w28, ne
	add	x26, x26, #1
	ldr	x8, [x25]
	cmp	x8, x26
	b.hi	LBB0_14
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	cbz	w28, LBB0_7
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
	ldp	x15, x8, [x25, #16]
	subs	x11, x8, x15
	b.ls	LBB0_5
; %bb.17:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x25, #32]
	cmp	x11, #8
	b.hs	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w14, #0
	mov	w13, #0
	mov	x10, x15
	b	LBB0_22
LBB0_19:                                ;   in Loop: Header=BB0_8 Depth=1
	and	x12, x11, #0xfffffffffffffff8
	add	x10, x15, x12
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	add	x13, x9, x15, lsl #3
	add	x13, x13, #32
	mov	x14, x12
	movi.2d	v3, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v5, #0000000000000000
	movi.2d	v6, #0000000000000000
	movi.2d	v7, #0000000000000000
LBB0_20:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q16, q17, [x13, #-32]
	cmeq.2d	v18, v16, #0
	cmtst.2d	v16, v16, v16
	xtn.2s	v16, v16
	ldp	q19, q20, [x13], #64
	cmeq.2d	v21, v17, #0
	cmtst.2d	v17, v17, v17
	xtn.2s	v17, v17
	cmeq.2d	v22, v19, #0
	cmtst.2d	v19, v19, v19
	xtn.2s	v19, v19
	cmeq.2d	v23, v20, #0
	cmtst.2d	v20, v20, v20
	xtn.2s	v20, v20
	sub.2s	v4, v4, v16
	sub.2s	v5, v5, v17
	sub.2s	v6, v6, v19
	sub.2s	v7, v7, v20
	xtn.2s	v16, v18
	xtn.2s	v17, v21
	xtn.2s	v18, v22
	xtn.2s	v19, v23
	sub.2s	v0, v0, v16
	sub.2s	v1, v1, v17
	sub.2s	v3, v3, v18
	sub.2s	v2, v2, v19
	subs	x14, x14, #8
	b.ne	LBB0_20
; %bb.21:                               ;   in Loop: Header=BB0_8 Depth=1
	add.2s	v4, v5, v4
	add.2s	v4, v6, v4
	add.2s	v4, v7, v4
	addp.2s	v4, v4, v4
	fmov	w13, s4
	add.2s	v0, v1, v0
	add.2s	v0, v3, v0
	add.2s	v0, v2, v0
	addp.2s	v0, v0, v0
	fmov	w14, s0
	cmp	x11, x12
	b.eq	LBB0_6
LBB0_22:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	x8, x8, x10
	add	x9, x9, x10, lsl #3
LBB0_23:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x10, [x9], #8
	cmp	x10, #0
	cinc	w13, w13, ne
	cinc	w14, w14, eq
	subs	x8, x8, #1
	b.ne	LBB0_23
	b	LBB0_6
LBB0_24:
Lloh3:
	adrp	x8, _ENXIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_36
LBB0_25:
	cmp	w22, #1
	b.lt	LBB0_35
; %bb.26:
	mov	w24, #0
	mov	w23, #0
Lloh5:
	adrp	x25, _EBUSY@GOTPAGE
Lloh6:
	ldr	x25, [x25, _EBUSY@GOTPAGEOFF]
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	add	w23, w23, #1
	cmp	w22, w23
	b.eq	LBB0_33
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_qib_lookup
	cbz	x0, LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_choose_port_ctxt
	cbz	w0, LBB0_37
; %bb.30:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	w8, [x25]
	cmn	w0, w8
	cinc	w24, w24, eq
	b	LBB0_27
LBB0_31:
	cbz	x23, LBB0_35
; %bb.32:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	mov	x3, x19
	bl	_choose_port_ctxt
	b	LBB0_37
LBB0_33:
	cbz	w24, LBB0_35
; %bb.34:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_36
LBB0_35:
Lloh9:
	adrp	x8, _ENETDOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENETDOWN@GOTPAGEOFF]
LBB0_36:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_37:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ENETDOWN,4,2                   ; @ENETDOWN
	.comm	_QIB_PORT_ALG_ACROSS,4,2        ; @QIB_PORT_ALG_ACROSS
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_get_a_ctxt
.subsections_via_symbols
