	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DoPortalRunFetch
_DoPortalRunFetch:                      ## @DoPortalRunFetch
	.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	%rcx, %r14
	movq	%rdx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	(%rdi), %rcx
	movq	_PORTAL_ONE_SELECT@GOTPCREL(%rip), %rdx
	movb	$1, %al
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.1:
	movq	_PORTAL_ONE_RETURNING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.2:
	movq	_PORTAL_ONE_MOD_WITH@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.3:
	movq	_PORTAL_UTIL_SELECT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	sete	%al
LBB0_4:
	movzbl	%al, %edi
	callq	_Assert
	addl	$-128, %ebx
	cmpl	$3, %ebx
	ja	LBB0_9
## %bb.5:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_6:
	testq	%r12, %r12
	jle	LBB0_19
## %bb.7:
	cmpq	$1, %r12
	je	LBB0_39
## %bb.8:
	decq	%r12
	movq	_None_Receiver@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	jmp	LBB0_38
LBB0_9:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	xorl	%esi, %esi
	testq	%r12, %r12
	jne	LBB0_22
	jmp	LBB0_20
LBB0_10:
	movq	%r12, %rax
	negq	%rax
	cmovsq	%r12, %rax
	shrq	$63, %r12
	movl	%r12d, %esi
	xorl	$1, %esi
	jmp	LBB0_12
LBB0_11:
	movq	%r12, %rax
	negq	%rax
	cmovsq	%r12, %rax
	shrq	$63, %r12
	movl	%r12d, %esi
LBB0_12:
	movq	%rax, %r12
	testq	%r12, %r12
	jne	LBB0_22
	jmp	LBB0_20
LBB0_13:
	testq	%r12, %r12
	jle	LBB0_31
## %bb.14:
	leaq	-1(%r12), %rbx
	movl	8(%r15), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ebx, %ecx
	jge	LBB0_33
## %bb.15:
	movq	_LONG_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_33
## %bb.16:
	cmpq	$1, 16(%r15)
	movslq	%eax, %rdx
	sbbq	$-1, %rdx
	movq	%rdx, %rax
	subq	%r12, %rax
	jge	LBB0_37
## %bb.17:
	leaq	1(%rdx), %rax
	cmpq	%r12, %rax
	jge	LBB0_39
## %bb.18:
	notq	%rdx
	addq	%r12, %rdx
	movq	_None_Receiver@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r15, %rdi
	movl	$1, %esi
	jmp	LBB0_38
LBB0_19:
	movl	$1, %esi
	js	LBB0_40
LBB0_20:
	cmpl	$0, 24(%r15)
	je	LBB0_28
## %bb.21:
	movq	(%r14), %rax
	movq	_DestNone@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	je	LBB0_29
LBB0_22:
	testl	%esi, %esi
	jne	LBB0_47
LBB0_23:
	movq	_FETCH_ALL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_47
## %bb.24:
	movq	(%r14), %rax
	movq	_DestNone@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	jne	LBB0_47
## %bb.25:
	movl	8(%r15), %ebx
	testl	%ebx, %ebx
	jle	LBB0_27
## %bb.26:
	cmpq	$1, 16(%r15)
	sbbl	$0, %ebx
LBB0_27:
	movq	%r15, %rdi
	callq	_DoPortalRewind
	jmp	LBB0_30
LBB0_28:
	movq	16(%r15), %rax
	testq	%rax, %rax
	sete	%r12b
	movq	(%r14), %rcx
	movq	_DestNone@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_35
LBB0_29:
	movzbl	%r12b, %ebx
LBB0_30:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	js	LBB0_42
## %bb.32:
	movq	%r15, %rdi
	callq	_DoPortalRewind
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	jmp	LBB0_48
LBB0_33:
	movq	%r15, %rdi
	callq	_DoPortalRewind
	cmpq	$2, %r12
	jb	LBB0_39
## %bb.34:
	movq	_None_Receiver@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	jmp	LBB0_38
LBB0_35:
	testq	%rax, %rax
	je	LBB0_46
## %bb.36:
	xorl	%r12d, %r12d
	testl	%esi, %esi
	je	LBB0_23
	jmp	LBB0_47
LBB0_37:
	incq	%rax
	movq	_None_Receiver@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%rax, %rdx
LBB0_38:
	callq	_PortalRunSelect
LBB0_39:
	movl	$1, %edx
	movq	%r15, %rdi
	movl	$1, %esi
	jmp	LBB0_48
LBB0_40:
	cmpq	$-1, %r12
	je	LBB0_45
## %bb.41:
	notq	%r12
	movq	_None_Receiver@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	jmp	LBB0_44
LBB0_42:
	movq	_FETCH_ALL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_None_Receiver@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_PortalRunSelect
	cmpq	$-1, %r12
	je	LBB0_45
## %bb.43:
	notq	%r12
	movq	(%rbx), %rcx
LBB0_44:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_PortalRunSelect
LBB0_45:
	movl	$1, %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	jmp	LBB0_48
LBB0_46:
	movq	_None_Receiver@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	$1, %r12d
	movl	$1, %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_PortalRunSelect
	movl	$1, %esi
LBB0_47:
	movq	%r15, %rdi
	movq	%r12, %rdx
LBB0_48:
	movq	%r14, %rcx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PortalRunSelect                ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_PORTAL_ONE_SELECT,8,3          ## @PORTAL_ONE_SELECT
	.comm	_PORTAL_ONE_RETURNING,8,3       ## @PORTAL_ONE_RETURNING
	.comm	_PORTAL_ONE_MOD_WITH,8,3        ## @PORTAL_ONE_MOD_WITH
	.comm	_PORTAL_UTIL_SELECT,8,3         ## @PORTAL_UTIL_SELECT
	.comm	_LONG_MAX,4,2                   ## @LONG_MAX
	.comm	_None_Receiver,8,3              ## @None_Receiver
	.comm	_FETCH_ALL,8,3                  ## @FETCH_ALL
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bogus direction"

	.comm	_DestNone,8,3                   ## @DestNone
	.no_dead_strip	_DoPortalRunFetch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DoPortalRunFetch
_DoPortalRunFetch:                      ; @DoPortalRunFetch
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PORTAL_ONE_SELECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PORTAL_ONE_SELECT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _PORTAL_ONE_RETURNING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PORTAL_ONE_RETURNING@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _PORTAL_ONE_MOD_WITH@GOTPAGE
Lloh7:
	ldr	x11, [x11, _PORTAL_ONE_MOD_WITH@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x9, _PORTAL_UTIL_SELECT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PORTAL_UTIL_SELECT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
LBB0_3:
	bl	_Assert
	sub	w8, w22, #128
	cmp	w8, #3
	b.hi	LBB0_7
; %bb.4:
Lloh12:
	adrp	x9, lJTI0_0@PAGE
Lloh13:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	subs	x2, x21, #1
	b.lt	LBB0_28
; %bb.6:
	b.ne	LBB0_25
	b	LBB0_40
LBB0_7:
Lloh14:
	adrp	x8, _ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	mov	w1, #0
	cbnz	x21, LBB0_9
	b	LBB0_16
LBB0_8:
	cmp	x21, #0
	lsr	x8, x21, #63
	cneg	x21, x21, mi
	eor	w1, w8, #0x1
	cbz	x21, LBB0_16
LBB0_9:
	cbnz	w1, LBB0_27
LBB0_10:
Lloh19:
	adrp	x8, _FETCH_ALL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FETCH_ALL@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_27
; %bb.11:
	ldr	x8, [x19]
Lloh22:
	adrp	x9, _DestNone@GOTPAGE
Lloh23:
	ldr	x9, [x9, _DestNone@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_26
; %bb.12:
	ldr	w21, [x20, #8]
	cmp	w21, #1
	b.lt	LBB0_14
; %bb.13:
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w8, eq
	sub	w21, w21, w8
LBB0_14:
	mov	x0, x20
	bl	_DoPortalRewind
	b	LBB0_31
LBB0_15:
	cmp	x21, #0
	lsr	x1, x21, #63
	cneg	x21, x21, mi
	cbnz	x21, LBB0_9
LBB0_16:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_30
LBB0_17:
	ldr	x8, [x19]
Lloh25:
	adrp	x9, _DestNone@GOTPAGE
Lloh26:
	ldr	x9, [x9, _DestNone@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_37
; %bb.18:
	mov	w21, #0
	b	LBB0_31
LBB0_19:
	subs	x22, x21, #1
	b.lt	LBB0_32
; %bb.20:
	ldr	w8, [x20, #8]
	cmp	w8, #0
	cinc	w9, w8, lt
	cmp	w22, w9, asr #1
	b.le	LBB0_34
; %bb.21:
Lloh28:
	adrp	x9, _LONG_MAX@GOTPAGE
Lloh29:
	ldr	x9, [x9, _LONG_MAX@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_34
; %bb.22:
	sxtw	x8, w8
	ldr	x9, [x20, #16]
	cmp	x9, #0
	cinc	x8, x8, ne
	subs	x9, x8, x21
	b.ge	LBB0_38
; %bb.23:
	add	x9, x8, #1
	cmp	x9, x21
	b.ge	LBB0_40
; %bb.24:
	mvn	x8, x8
	add	x2, x8, x21
LBB0_25:
Lloh31:
	adrp	x8, _None_Receiver@GOTPAGE
Lloh32:
	ldr	x8, [x8, _None_Receiver@GOTPAGEOFF]
Lloh33:
	ldr	x3, [x8]
	mov	x0, x20
	mov	w1, #1
	b	LBB0_39
LBB0_26:
	mov	w1, #0
LBB0_27:
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x21
	b	LBB0_42
LBB0_28:
	tbnz	x21, #63, LBB0_43
; %bb.29:
	mov	w1, #1
	ldr	w8, [x20, #24]
	cbnz	w8, LBB0_17
LBB0_30:
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w21, eq
	ldr	x9, [x19]
Lloh34:
	adrp	x10, _DestNone@GOTPAGE
Lloh35:
	ldr	x10, [x10, _DestNone@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_36
LBB0_31:
	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_32:
	tbnz	x21, #63, LBB0_45
; %bb.33:
	mov	x0, x20
	bl	_DoPortalRewind
	mov	x0, x20
	mov	w1, #1
	mov	x2, #0
	b	LBB0_42
LBB0_34:
	mov	x0, x20
	bl	_DoPortalRewind
	cmp	x21, #2
	b.lo	LBB0_40
; %bb.35:
Lloh37:
	adrp	x8, _None_Receiver@GOTPAGE
Lloh38:
	ldr	x8, [x8, _None_Receiver@GOTPAGEOFF]
Lloh39:
	ldr	x3, [x8]
	mov	x0, x20
	mov	w1, #1
	mov	x2, x22
	b	LBB0_39
LBB0_36:
	cbz	x8, LBB0_49
LBB0_37:
	mov	x21, #0
	cbz	w1, LBB0_10
	b	LBB0_27
LBB0_38:
	add	x2, x9, #1
Lloh40:
	adrp	x8, _None_Receiver@GOTPAGE
Lloh41:
	ldr	x8, [x8, _None_Receiver@GOTPAGEOFF]
Lloh42:
	ldr	x3, [x8]
	mov	x0, x20
	mov	w1, #0
LBB0_39:
	bl	_PortalRunSelect
LBB0_40:
	mov	x0, x20
	mov	w1, #1
LBB0_41:
	mov	w2, #1
LBB0_42:
	mov	x3, x19
	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	_PortalRunSelect
LBB0_43:
	cmn	x21, #1
	b.eq	LBB0_48
; %bb.44:
	mvn	x2, x21
Lloh43:
	adrp	x8, _None_Receiver@GOTPAGE
Lloh44:
	ldr	x8, [x8, _None_Receiver@GOTPAGEOFF]
Lloh45:
	ldr	x3, [x8]
	b	LBB0_47
LBB0_45:
Lloh46:
	adrp	x8, _FETCH_ALL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _FETCH_ALL@GOTPAGEOFF]
Lloh48:
	ldr	x2, [x8]
Lloh49:
	adrp	x22, _None_Receiver@GOTPAGE
Lloh50:
	ldr	x22, [x22, _None_Receiver@GOTPAGEOFF]
	ldr	x3, [x22]
	mov	x0, x20
	mov	w1, #1
	bl	_PortalRunSelect
	cmn	x21, #1
	b.eq	LBB0_48
; %bb.46:
	mvn	x2, x21
	ldr	x3, [x22]
LBB0_47:
	mov	x0, x20
	mov	w1, #0
	bl	_PortalRunSelect
LBB0_48:
	mov	x0, x20
	mov	w1, #0
	b	LBB0_41
LBB0_49:
Lloh51:
	adrp	x8, _None_Receiver@GOTPAGE
Lloh52:
	ldr	x8, [x8, _None_Receiver@GOTPAGEOFF]
Lloh53:
	ldr	x3, [x8]
	mov	w21, #1
	mov	x0, x20
	mov	w1, #0
	mov	w2, #1
	bl	_PortalRunSelect
	mov	x1, x21
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_19-LBB0_5)>>2
                                        ; -- End function
	.comm	_PORTAL_ONE_SELECT,8,3          ; @PORTAL_ONE_SELECT
	.comm	_PORTAL_ONE_RETURNING,8,3       ; @PORTAL_ONE_RETURNING
	.comm	_PORTAL_ONE_MOD_WITH,8,3        ; @PORTAL_ONE_MOD_WITH
	.comm	_PORTAL_UTIL_SELECT,8,3         ; @PORTAL_UTIL_SELECT
	.comm	_LONG_MAX,4,2                   ; @LONG_MAX
	.comm	_None_Receiver,8,3              ; @None_Receiver
	.comm	_FETCH_ALL,8,3                  ; @FETCH_ALL
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bogus direction"

	.comm	_DestNone,8,3                   ; @DestNone
	.no_dead_strip	_DoPortalRunFetch
.subsections_via_symbols
