	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connect_b3_a_res
_connect_b3_a_res:                      ## @connect_b3_a_res
	.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, %r15
	movq	%rdx, %r14
	movl	%edi, %ebx
	movl	%edi, %eax
	sarl	$16, %eax
	movslq	%eax, %r12
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_dprintf
	movl	$1, %edi
	movl	%eax, %esi
	callq	_dbug
	cmpl	$65536, %ebx                    ## imm = 0x10000
	jb	LBB0_9
## %bb.1:
	testq	%r15, %r15
	je	LBB0_9
## %bb.2:
	movq	(%r15), %rax
	movq	_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.3:
	movq	_INC_DIS_PENDING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.4:
	movq	_OUTG_DIS_PENDING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.5:
	movq	(%r14), %rax
	movq	(%rax,%r12,8), %rcx
	movq	_INC_ACT_PENDING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.6:
	movq	_CONNECTED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax,%r12,8)
	movq	(%r15), %rax
	movq	_INC_CON_CONNECTED_ALERT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_8
## %bb.7:
	movq	%rcx, (%r15)
LBB0_8:
	movq	8(%r14), %rax
	movl	(%rax,%r12,4), %esi
	movq	%r15, %rdi
	callq	_channel_request_xon
	movq	%r15, %rdi
	callq	_channel_xmit_xon
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connect_b3_a_res(ncci=0x%x)"

	.comm	_IDLE,8,3                       ## @IDLE
	.comm	_INC_DIS_PENDING,8,3            ## @INC_DIS_PENDING
	.comm	_OUTG_DIS_PENDING,8,3           ## @OUTG_DIS_PENDING
	.comm	_INC_ACT_PENDING,8,3            ## @INC_ACT_PENDING
	.comm	_CONNECTED,8,3                  ## @CONNECTED
	.comm	_INC_CON_CONNECTED_ALERT,8,3    ## @INC_CON_CONNECTED_ALERT
	.no_dead_strip	_connect_b3_a_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connect_b3_a_res
_connect_b3_a_res:                      ; @connect_b3_a_res
	.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	x20, x2
	mov	x22, x0
	sbfx	x21, x22, #16, #16
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_dprintf
	mov	x1, x0
	mov	w0, #1
	bl	_dbug
	cmp	w22, #16, lsl #12               ; =65536
	b.lo	LBB0_7
; %bb.1:
	cbz	x19, LBB0_7
; %bb.2:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _IDLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IDLE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _INC_DIS_PENDING@GOTPAGE
Lloh6:
	ldr	x10, [x10, _INC_DIS_PENDING@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
Lloh8:
	adrp	x11, _OUTG_DIS_PENDING@GOTPAGE
Lloh9:
	ldr	x11, [x11, _OUTG_DIS_PENDING@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.eq	LBB0_7
; %bb.3:
	ldr	x8, [x20]
	ldr	x9, [x8, x21, lsl #3]
Lloh11:
	adrp	x10, _INC_ACT_PENDING@GOTPAGE
Lloh12:
	ldr	x10, [x10, _INC_ACT_PENDING@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.4:
Lloh14:
	adrp	x9, _CONNECTED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CONNECTED@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	str	x9, [x8, x21, lsl #3]
	ldr	x8, [x19]
Lloh17:
	adrp	x10, _INC_CON_CONNECTED_ALERT@GOTPAGE
Lloh18:
	ldr	x10, [x10, _INC_CON_CONNECTED_ALERT@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x8, x10
	b.eq	LBB0_6
; %bb.5:
	str	x9, [x19]
LBB0_6:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x21, lsl #2]
	mov	x0, x19
	bl	_channel_request_xon
	mov	x0, x19
	bl	_channel_xmit_xon
LBB0_7:
	mov	w0, #0
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connect_b3_a_res(ncci=0x%x)"

	.comm	_IDLE,8,3                       ; @IDLE
	.comm	_INC_DIS_PENDING,8,3            ; @INC_DIS_PENDING
	.comm	_OUTG_DIS_PENDING,8,3           ; @OUTG_DIS_PENDING
	.comm	_INC_ACT_PENDING,8,3            ; @INC_ACT_PENDING
	.comm	_CONNECTED,8,3                  ; @CONNECTED
	.comm	_INC_CON_CONNECTED_ALERT,8,3    ; @INC_CON_CONNECTED_ALERT
	.no_dead_strip	_connect_b3_a_res
.subsections_via_symbols
