	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ProxyEncodeTcpStream
_ProxyEncodeTcpStream:                  ## @ProxyEncodeTcpStream
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%rsp, -112(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_INET_ADDRSTRLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%r13, %rdi
	callq	_ip_next
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%r14, %rdi
	callq	_GetAckModified
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	%r14, %rdi
	callq	_GetProxyAddress
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_INET_NTOA_BUF
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_inet_ntoa_r
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_GetProxyPort
	movl	%eax, %edi
	callq	_ntohs
	leaq	L_.str(%rip), %rdx
	leaq	-96(%rbp), %r12
	movq	%r12, %rdi
	movl	$38, %esi
	movq	%rbx, %rcx
	movl	%eax, %r8d
	callq	_snprintf
	movq	%r12, %rdi
	callq	_strlen
	movl	%eax, %r12d
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	andl	$-2, %ecx
	subl	%ecx, %eax
	je	LBB0_2
## %bb.3:
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.4:
	movl	$1, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_2:
	movl	$2, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	leaq	-96(%rbp), %rdi
	callq	_strcat
	addl	%ebx, %r12d
LBB0_6:
	movl	(%r13), %edi
	callq	_ntohs
	movl	%eax, %ebx
	leaq	-96(%rbp), %rdi
	callq	_strlen
	addl	%ebx, %eax
	cmpl	%r15d, %eax
	jg	LBB0_9
## %bb.7:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %ebx
	addl	4(%r13), %ebx
	shll	$2, %ebx
	movl	(%r13), %edi
	callq	_ntohs
                                        ## kill: def $eax killed $eax def $rax
	subl	%ebx, %eax
	je	LBB0_9
## %bb.8:
	movslq	%ebx, %rbx
	addq	%r13, %rbx
	movslq	%r12d, %r12
	leaq	(%rbx,%r12), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_memmove
	leaq	-96(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_memcpy
	movq	%r14, %rdi
	callq	_SetAckModified
	movq	%r13, %rdi
	callq	_ip_next
	movq	%rax, %r15
	movl	16(%rax), %edi
	movq	%r14, %rsi
	callq	_GetDeltaSeqOut
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r12), %esi
	movl	(%r13), %ecx
	movl	4(%r13), %edx
	movl	(%r15), %r9d
	movl	16(%r15), %r8d
	movq	%r14, %rdi
	callq	_AddSeq
	movl	(%r13), %ebx
	movl	%ebx, %edi
	callq	_ntohs
	addl	%eax, %r12d
	movl	%r12d, %edi
	callq	_htons
	movl	%eax, (%r13)
	subl	%eax, %ebx
	movl	8(%r13), %esi
	movl	%ebx, %edi
	callq	_ADJUST_CHECKSUM
	movq	$0, 8(%r15)
	movq	%r13, %rdi
	callq	_TcpChecksum
	movq	%rax, 8(%r15)
LBB0_9:
	movq	-112(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_INET_ADDRSTRLEN,4,2            ## @INET_ADDRSTRLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[DEST %s %d]"

L_.str.1:                               ## @.str.1
	.asciz	" \n"

L_.str.2:                               ## @.str.2
	.asciz	"\n"

	.no_dead_strip	_ProxyEncodeTcpStream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ProxyEncodeTcpStream
_ProxyEncodeTcpStream:                  ; @ProxyEncodeTcpStream
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #48
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x25, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _INET_ADDRSTRLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INET_ADDRSTRLEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	mov	x0, x1
	bl	_ip_next
	mov	x23, x0
	mov	x0, x20
	bl	_GetAckModified
	cbnz	x0, LBB0_9
; %bb.1:
	mov	x0, x20
	bl	_GetProxyAddress
	mov	x24, x0
	mov	x0, x22
	bl	_INET_NTOA_BUF
	mov	x1, x0
	mov	x0, x24
	bl	_inet_ntoa_r
	mov	x22, x0
	mov	x0, x20
	bl	_GetProxyPort
	bl	_ntohs
	mov	x4, x0
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	sub	x0, x29, #112
	mov	w1, #38
	mov	x3, x22
	bl	_snprintf
	sub	x0, x29, #112
	bl	_strlen
	mov	x22, x0
	and	w8, w0, #0x1
	cmp	w0, #0
	cneg	w8, w8, lt
	cbz	w8, LBB0_4
; %bb.2:
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.3:
	mov	w24, #1
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
	mov	w24, #2
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	sub	x0, x29, #112
	bl	_strcat
	add	w22, w22, w24
LBB0_6:
	ldr	w0, [x19]
	bl	_ntohs
	mov	x24, x0
	sub	x0, x29, #112
	bl	_strlen
	add	w8, w0, w24
	cmp	w8, w21
	b.gt	LBB0_9
; %bb.7:
	ldr	w8, [x23]
	ldp	w0, w9, [x19]
	add	w8, w8, w9
	lsl	w21, w8, #2
	bl	_ntohs
	subs	w2, w0, w21
	b.eq	LBB0_9
; %bb.8:
	add	x21, x19, w21, sxtw
	add	x0, x21, w22, sxtw
	mov	x1, x21
	bl	_memmove
	sub	x1, x29, #112
	mov	x0, x21
	mov	x2, x22
	bl	_memcpy
	mov	x0, x20
	bl	_SetAckModified
	mov	x0, x19
	bl	_ip_next
	mov	x21, x0
	ldr	w0, [x0, #16]
	mov	x1, x20
	bl	_GetDeltaSeqOut
	add	w1, w0, w22
	ldp	w3, w2, [x19]
	ldr	w4, [x21, #16]
	ldr	w5, [x21]
	mov	x0, x20
	bl	_AddSeq
	ldr	w20, [x19]
	mov	x0, x20
	bl	_ntohs
	add	w0, w0, w22
	bl	_htons
	str	w0, [x19]
	sub	w0, w20, w0
	ldr	w1, [x19, #8]
	bl	_ADJUST_CHECKSUM
	str	xzr, [x21, #8]
	mov	x0, x19
	bl	_TcpChecksum
	str	x0, [x21, #8]
LBB0_9:
	mov	sp, x25
	ldur	x8, [x29, #-72]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #64
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_INET_ADDRSTRLEN,4,2            ; @INET_ADDRSTRLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[DEST %s %d]"

l_.str.1:                               ; @.str.1
	.asciz	" \n"

l_.str.2:                               ; @.str.2
	.asciz	"\n"

	.no_dead_strip	_ProxyEncodeTcpStream
.subsections_via_symbols
