	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssh_confirm_remote_forward
_ssh_confirm_remote_forward:            ## @ssh_confirm_remote_forward
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_SSH2_MSG_REQUEST_SUCCESS@GOTPCREL(%rip), %r12
	cmpl	%esi, (%r12)
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	leaq	L_.str.4(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	leaq	L_.str.3(%rip), %rax
	cmoveq	%rax, %rdx
	leaq	L_.str.4(%rip), %rcx
	cmoveq	%rax, %rcx
LBB0_3:
	movq	16(%rbx), %r8
	movq	48(%rbx), %r9
	testq	%r9, %r9
	jne	LBB0_5
## %bb.4:
	movq	40(%rbx), %r9
LBB0_5:
	movl	32(%rbx), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	cmpq	$0, (%rbx)
	jne	LBB0_11
## %bb.6:
	cmpq	$0, 16(%rbx)
	jne	LBB0_11
## %bb.7:
	cmpl	%r14d, (%r12)
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_packet_get_int
	movl	%eax, 24(%rbx)
	movq	40(%rbx), %rdx
	movl	32(%rbx), %ecx
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_logit
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	movq	%r15, %rdi
	jmp	LBB0_10
LBB0_9:
	movl	28(%rbx), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
LBB0_10:
	callq	_channel_update_permission
LBB0_11:
	movq	_SSH2_MSG_REQUEST_FAILURE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_20
## %bb.12:
	movq	_options@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rax)
	movq	(%rbx), %rsi
	je	LBB0_16
## %bb.13:
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.14:
	leaq	L_.str.6(%rip), %rdi
	callq	_fatal
	jmp	LBB0_20
LBB0_16:
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.17:
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_19
LBB0_15:
	movq	16(%rbx), %rsi
	leaq	L_.str.7(%rip), %rdi
	callq	_fatal
	jmp	LBB0_20
LBB0_18:
	movq	16(%rbx), %rsi
	leaq	L_.str.9(%rip), %rdi
LBB0_19:
	xorl	%eax, %eax
	callq	_logit
LBB0_20:
	movq	_remote_forward_confirms_received@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	incq	%rcx
	movq	%rcx, (%rax)
	movq	_options@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_22
## %bb.21:
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	movq	_fork_after_authentication_flag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_22
## %bb.23:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fork_postauth                  ## TAILCALL
LBB0_22:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"remote forward %s for: listen %s%s%d, connect %s:%d"

	.comm	_SSH2_MSG_REQUEST_SUCCESS,4,2   ## @SSH2_MSG_REQUEST_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"success"

L_.str.2:                               ## @.str.2
	.asciz	"failure"

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	":"

L_.str.5:                               ## @.str.5
	.asciz	"Allocated port %u for remote forward to %s:%d"

	.comm	_SSH2_MSG_REQUEST_FAILURE,4,2   ## @SSH2_MSG_REQUEST_FAILURE
	.comm	_options,16,3                   ## @options
L_.str.6:                               ## @.str.6
	.asciz	"Error: remote port forwarding failed for listen path %s"

L_.str.7:                               ## @.str.7
	.asciz	"Error: remote port forwarding failed for listen port %d"

L_.str.8:                               ## @.str.8
	.asciz	"Warning: remote port forwarding failed for listen path %s"

L_.str.9:                               ## @.str.9
	.asciz	"Warning: remote port forwarding failed for listen port %d"

	.comm	_remote_forward_confirms_received,8,3 ## @remote_forward_confirms_received
L_.str.10:                              ## @.str.10
	.asciz	"All remote forwarding requests processed"

	.comm	_fork_after_authentication_flag,8,3 ## @fork_after_authentication_flag
	.no_dead_strip	_ssh_confirm_remote_forward
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssh_confirm_remote_forward
_ssh_confirm_remote_forward:            ; @ssh_confirm_remote_forward
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x3
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _SSH2_MSG_REQUEST_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SSH2_MSG_REQUEST_SUCCESS@GOTPAGEOFF]
Lloh2:
	adrp	x8, l_.str.2@PAGE
Lloh3:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh4:
	adrp	x9, l_.str.1@PAGE
Lloh5:
	add	x9, x9, l_.str.1@PAGEOFF
	ldr	w10, [x22]
	cmp	w10, w1
	csel	x8, x9, x8, eq
	ldr	x10, [x3]
Lloh6:
	adrp	x9, l_.str.4@PAGE
Lloh7:
	add	x9, x9, l_.str.4@PAGEOFF
	cbnz	x10, LBB0_2
; %bb.1:
	ldr	x10, [x19, #8]
Lloh8:
	adrp	x11, l_.str.3@PAGE
Lloh9:
	add	x11, x11, l_.str.3@PAGEOFF
	cmp	x10, #0
	csel	x10, x11, x10, eq
	csel	x9, x11, x9, eq
LBB0_2:
	ldr	x11, [x19, #16]
	ldr	x12, [x19, #48]
	cbnz	x12, LBB0_4
; %bb.3:
	ldr	x12, [x19, #40]
LBB0_4:
	ldr	w13, [x19, #32]
	stp	x12, x13, [sp, #32]
	stp	x9, x11, [sp, #16]
	stp	x8, x10, [sp]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
	ldr	x8, [x19]
	cbnz	x8, LBB0_10
; %bb.5:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_10
; %bb.6:
	ldr	w8, [x22]
	cmp	w8, w20
	b.ne	LBB0_8
; %bb.7:
	bl	_packet_get_int
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x19, #24]
	ldr	x8, [x19, #40]
	ldr	w9, [x19, #32]
	stp	x8, x9, [sp, #8]
	str	x0, [sp]
Lloh12:
	adrp	x0, l_.str.5@PAGE
Lloh13:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_logit
	ldp	w2, w1, [x19, #24]
	mov	x0, x21
	b	LBB0_9
LBB0_8:
	ldr	w1, [x19, #28]
	mov	x0, x21
	mov	w2, #-1
LBB0_9:
	bl	_channel_update_permission
LBB0_10:
Lloh14:
	adrp	x8, _SSH2_MSG_REQUEST_FAILURE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SSH2_MSG_REQUEST_FAILURE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x21, _options@GOTPAGE
Lloh18:
	ldr	x21, [x21, _options@GOTPAGEOFF]
	cmp	w8, w20
	b.ne	LBB0_19
; %bb.11:
	ldr	x8, [x21, #8]
	ldr	x1, [x19]
	cbz	x8, LBB0_14
; %bb.12:
	cbz	x1, LBB0_16
; %bb.13:
Lloh19:
	adrp	x0, l_.str.6@PAGE
Lloh20:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_fatal
	b	LBB0_19
LBB0_14:
	cbz	x1, LBB0_17
; %bb.15:
	str	x1, [sp]
Lloh21:
	adrp	x0, l_.str.8@PAGE
Lloh22:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_18
LBB0_16:
	ldr	x1, [x19, #16]
Lloh23:
	adrp	x0, l_.str.7@PAGE
Lloh24:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_fatal
	b	LBB0_19
LBB0_17:
	ldr	x8, [x19, #16]
	str	x8, [sp]
Lloh25:
	adrp	x0, l_.str.9@PAGE
Lloh26:
	add	x0, x0, l_.str.9@PAGEOFF
LBB0_18:
	bl	_logit
LBB0_19:
Lloh27:
	adrp	x8, _remote_forward_confirms_received@GOTPAGE
Lloh28:
	ldr	x8, [x8, _remote_forward_confirms_received@GOTPAGEOFF]
	ldr	x9, [x8]
	add	x9, x9, #1
	str	x9, [x8]
	ldr	x8, [x21]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.20:
Lloh29:
	adrp	x0, l_.str.10@PAGE
Lloh30:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_debug
Lloh31:
	adrp	x8, _fork_after_authentication_flag@GOTPAGE
Lloh32:
	ldr	x8, [x8, _fork_after_authentication_flag@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	cbz	x8, LBB0_22
; %bb.21:
	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
	add	sp, sp, #96
	b	_fork_postauth
LBB0_22:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"remote forward %s for: listen %s%s%d, connect %s:%d"

	.comm	_SSH2_MSG_REQUEST_SUCCESS,4,2   ; @SSH2_MSG_REQUEST_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"success"

l_.str.2:                               ; @.str.2
	.asciz	"failure"

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	":"

l_.str.5:                               ; @.str.5
	.asciz	"Allocated port %u for remote forward to %s:%d"

	.comm	_SSH2_MSG_REQUEST_FAILURE,4,2   ; @SSH2_MSG_REQUEST_FAILURE
	.comm	_options,16,3                   ; @options
l_.str.6:                               ; @.str.6
	.asciz	"Error: remote port forwarding failed for listen path %s"

l_.str.7:                               ; @.str.7
	.asciz	"Error: remote port forwarding failed for listen port %d"

l_.str.8:                               ; @.str.8
	.asciz	"Warning: remote port forwarding failed for listen path %s"

l_.str.9:                               ; @.str.9
	.asciz	"Warning: remote port forwarding failed for listen port %d"

	.comm	_remote_forward_confirms_received,8,3 ; @remote_forward_confirms_received
l_.str.10:                              ; @.str.10
	.asciz	"All remote forwarding requests processed"

	.comm	_fork_after_authentication_flag,8,3 ; @fork_after_authentication_flag
	.no_dead_strip	_ssh_confirm_remote_forward
.subsections_via_symbols
