	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function server_request_tun
_server_request_tun:                    ## @server_request_tun
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	$0, -24(%rbp)
	xorl	%eax, %eax
	callq	_packet_get_int
	movl	%eax, %ebx
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_1
## %bb.2:
	movq	_options@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	callq	_packet_get_int
	movq	_auth_opts@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %edi
	cmpl	$-1, %edi
	je	LBB0_5
## %bb.6:
	movq	_SSH_TUNID_ANY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.7:
	cmpl	%eax, %edi
	jne	LBB0_10
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_11
LBB0_5:
	movl	%eax, %edi
LBB0_8:
	leaq	-24(%rbp), %rdx
	movl	%ebx, %esi
	callq	_tun_open
	testl	%eax, %eax
	js	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	movq	-24(%rbp), %rsi
	leaq	L_.str.2(%rip), %rdi
	callq	_debug
	movq	_SSH_CHANNEL_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CHAN_TCP_WINDOW_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_CHAN_TCP_PACKET_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	subq	$8, %rsp
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movl	%ebx, %r8d
	movl	$-1, %r9d
	pushq	$1
	pushq	%rsi
	pushq	$0
	pushq	%rax
	pushq	%r10
	callq	_channel_new
	addq	$48, %rsp
	movq	%rax, %rbx
	movl	$1, (%rax)
	movq	_tun_fwd_ifnames@GOTPCREL(%rip), %rdi
	movq	(%rdi), %r14
	testq	%r14, %r14
	leaq	L_.str.5(%rip), %rax
	movq	%r14, %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.6(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	-24(%rbp), %r8
	leaq	L_.str.4(%rip), %rsi
	callq	_xasprintf
	movq	%r14, %rdi
	callq	_free
	movq	-24(%rbp), %rdi
	callq	_free
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.7(%rip), %rdi
LBB0_11:
	callq	_packet_send_debug
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported tunnel device mode."

	.comm	_options,4,2                    ## @options
L_.str.1:                               ## @.str.1
	.asciz	"Server has rejected tunnel device forwarding"

	.comm	_auth_opts,8,3                  ## @auth_opts
	.comm	_SSH_TUNID_ANY,4,2              ## @SSH_TUNID_ANY
L_.str.2:                               ## @.str.2
	.asciz	"Tunnel forwarding using interface %s"

L_.str.3:                               ## @.str.3
	.asciz	"tun"

	.comm	_SSH_CHANNEL_OPEN,4,2           ## @SSH_CHANNEL_OPEN
	.comm	_CHAN_TCP_WINDOW_DEFAULT,4,2    ## @CHAN_TCP_WINDOW_DEFAULT
	.comm	_CHAN_TCP_PACKET_DEFAULT,4,2    ## @CHAN_TCP_PACKET_DEFAULT
	.comm	_tun_fwd_ifnames,8,3            ## @tun_fwd_ifnames
L_.str.4:                               ## @.str.4
	.asciz	"%s%s%s"

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

L_.str.6:                               ## @.str.6
	.asciz	","

L_.str.7:                               ## @.str.7
	.asciz	"Failed to open the tunnel device."

	.comm	_sys_tun_infilter,4,2           ## @sys_tun_infilter
	.comm	_sys_tun_outfilter,4,2          ## @sys_tun_outfilter
	.no_dead_strip	_server_request_tun
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function server_request_tun
_server_request_tun:                    ; @server_request_tun
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	str	xzr, [sp, #24]
	bl	_packet_get_int
	and	w8, w0, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _options@GOTPAGE
Lloh1:
	ldr	x8, [x8, _options@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.2:
	bl	_packet_get_int
	mov	x8, x0
Lloh3:
	adrp	x9, _auth_opts@GOTPAGE
Lloh4:
	ldr	x9, [x9, _auth_opts@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w0, [x9]
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.3:
Lloh6:
	adrp	x9, _SSH_TUNID_ANY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SSH_TUNID_ANY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	ccmp	w0, w8, #4, ne
	b.eq	LBB0_7
	b	LBB0_9
LBB0_4:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_5:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_6:
	mov	x0, x8
LBB0_7:
	add	x2, sp, #24
	mov	x1, x20
	bl	_tun_open
	tbnz	w0, #31, LBB0_9
; %bb.8:
	mov	x20, x0
	ldr	x1, [sp, #24]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_debug
Lloh15:
	adrp	x8, _SSH_CHANNEL_OPEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SSH_CHANNEL_OPEN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x8, _CHAN_TCP_WINDOW_DEFAULT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CHAN_TCP_WINDOW_DEFAULT@GOTPAGEOFF]
Lloh20:
	ldr	w6, [x8]
Lloh21:
	adrp	x8, _CHAN_TCP_PACKET_DEFAULT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CHAN_TCP_PACKET_DEFAULT@GOTPAGEOFF]
Lloh23:
	ldr	w7, [x8]
	mov	w21, #1
	str	w21, [sp, #16]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	str	x1, [sp, #8]
	str	wzr, [sp]
	mov	x0, x19
	mov	x3, x20
	mov	x4, x20
	mov	w5, #-1
	bl	_channel_new
	mov	x19, x0
	str	w21, [x0]
Lloh26:
	adrp	x0, _tun_fwd_ifnames@GOTPAGE
Lloh27:
	ldr	x0, [x0, _tun_fwd_ifnames@GOTPAGEOFF]
	ldr	x20, [x0]
Lloh28:
	adrp	x8, l_.str.5@PAGE
Lloh29:
	add	x8, x8, l_.str.5@PAGEOFF
	cmp	x20, #0
	csel	x2, x8, x20, eq
Lloh30:
	adrp	x9, l_.str.6@PAGE
Lloh31:
	add	x9, x9, l_.str.6@PAGEOFF
	csel	x3, x8, x9, eq
	ldr	x4, [sp, #24]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_xasprintf
	mov	x0, x20
	bl	_free
	ldr	x0, [sp, #24]
	bl	_free
	b	LBB0_11
LBB0_9:
Lloh34:
	adrp	x0, l_.str.7@PAGE
Lloh35:
	add	x0, x0, l_.str.7@PAGEOFF
LBB0_10:
	bl	_packet_send_debug
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported tunnel device mode."

	.comm	_options,4,2                    ; @options
l_.str.1:                               ; @.str.1
	.asciz	"Server has rejected tunnel device forwarding"

	.comm	_auth_opts,8,3                  ; @auth_opts
	.comm	_SSH_TUNID_ANY,4,2              ; @SSH_TUNID_ANY
l_.str.2:                               ; @.str.2
	.asciz	"Tunnel forwarding using interface %s"

l_.str.3:                               ; @.str.3
	.asciz	"tun"

	.comm	_SSH_CHANNEL_OPEN,4,2           ; @SSH_CHANNEL_OPEN
	.comm	_CHAN_TCP_WINDOW_DEFAULT,4,2    ; @CHAN_TCP_WINDOW_DEFAULT
	.comm	_CHAN_TCP_PACKET_DEFAULT,4,2    ; @CHAN_TCP_PACKET_DEFAULT
	.comm	_tun_fwd_ifnames,8,3            ; @tun_fwd_ifnames
l_.str.4:                               ; @.str.4
	.asciz	"%s%s%s"

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

l_.str.6:                               ; @.str.6
	.asciz	","

l_.str.7:                               ; @.str.7
	.asciz	"Failed to open the tunnel device."

	.comm	_sys_tun_infilter,4,2           ; @sys_tun_infilter
	.comm	_sys_tun_outfilter,4,2          ; @sys_tun_outfilter
	.no_dead_strip	_server_request_tun
.subsections_via_symbols
