	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__ssh_read_banner               ## -- Begin function _ssh_read_banner
	.p2align	4, 0x90
__ssh_read_banner:                      ## @_ssh_read_banner
	.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	$552, %rsp                      ## imm = 0x228
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -584(%rbp)                ## 8-byte Spill
	movq	$0, (%rsi)
	movq	%rdi, -576(%rbp)                ## 8-byte Spill
	callq	_ssh_packet_get_input
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_sshbuf_len
	movq	%rax, %r13
	movq	%rbx, -592(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_sshbuf_ptr
	movq	%rax, %rbx
	leaq	-304(%rbp), %r12
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=2
	movw	$10, -304(%rbp,%rax)
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=2
	incq	%rax
	leaq	1(%r15), %rcx
	cmpq	$255, %rax
	je	LBB0_9
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r13, %rcx
	jae	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	%rcx, %r15
	movzbl	(%rbx,%rcx), %ecx
	movb	%cl, -304(%rbp,%rax)
	cmpb	$13, %cl
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	cmpb	$10, %cl
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movb	$0, 1(%rax,%r12)
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movb	$0, -49(%rbp)
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_debug
	movq	-576(%rbp), %rax                ## 8-byte Reload
	movq	8(%rax), %rax
	cmpq	$0, (%rax)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	incq	%r15
	leaq	1(%r14), %rax
	movq	%r15, %rcx
	cmpq	$65536, %r14                    ## imm = 0x10000
	movq	%rax, %r14
	jb	LBB0_1
LBB0_12:
	movq	-576(%rbp), %rdi                ## 8-byte Reload
	callq	_ssh_packet_get_output
	movl	%eax, %ebx
	leaq	L_.str(%rip), %r14
	movq	%r14, %rdi
	callq	_strlen
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_sshbuf_put
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.13:
	movq	_SSH_ERR_NO_PROTOCOL_VERSION@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_3:
	xorl	%ebx, %ebx
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	movl	%ebx, %eax
	addq	$552, %rsp                      ## imm = 0x228
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	incq	%r15
	movq	-592(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rsi
	callq	_sshbuf_consume
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.15:
	leaq	L_.str.3(%rip), %rsi
	leaq	-304(%rbp), %rdi
	leaq	-568(%rbp), %rdx
	leaq	-564(%rbp), %rcx
	leaq	-560(%rbp), %r8
	callq	_sscanf
	cmpl	$3, %eax
	jne	LBB0_16
## %bb.17:
	movl	-568(%rbp), %esi
	movl	-564(%rbp), %edx
	leaq	L_.str.4(%rip), %rdi
	leaq	-560(%rbp), %rbx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_debug
	movq	%rbx, %rdi
	callq	_compat_datafellows
	movq	-576(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	-568(%rbp), %eax
	cmpl	$1, %eax
	jne	LBB0_22
## %bb.18:
	cmpl	$99, -564(%rbp)
	jne	LBB0_22
## %bb.19:
	movl	$2, -568(%rbp)
	movl	$0, -564(%rbp)
	jmp	LBB0_20
LBB0_16:
	movq	_SSH_ERR_INVALID_FORMAT@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_22:
	cmpl	$2, %eax
	jne	LBB0_23
LBB0_20:
	leaq	-304(%rbp), %r14
	movq	%r14, %rdi
	callq	_chop
	leaq	L_.str.5(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_debug
	movq	%r14, %rdi
	callq	_strdup
	movq	-584(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jne	LBB0_25
## %bb.21:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_23:
	movq	_SSH_ERR_PROTOCOL_MISMATCH@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %ebx
	jmp	LBB0_25
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Protocol mismatch.\r\n"

L_.str.1:                               ## @.str.1
	.asciz	"SSH-"

L_.str.2:                               ## @.str.2
	.asciz	"ssh_exchange_identification: %s"

	.comm	_SSH_ERR_NO_PROTOCOL_VERSION,4,2 ## @SSH_ERR_NO_PROTOCOL_VERSION
L_.str.3:                               ## @.str.3
	.asciz	"SSH-%d.%d-%[^\n]\n"

	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ## @SSH_ERR_INVALID_FORMAT
L_.str.4:                               ## @.str.4
	.asciz	"Remote protocol version %d.%d, remote software version %.100s"

	.comm	_SSH_ERR_PROTOCOL_MISMATCH,4,2  ## @SSH_ERR_PROTOCOL_MISMATCH
L_.str.5:                               ## @.str.5
	.asciz	"Remote version string %.100s"

	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__ssh_read_banner               ; -- Begin function _ssh_read_banner
	.p2align	2
__ssh_read_banner:                      ; @_ssh_read_banner
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #576
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	str	x1, [sp, #32]                   ; 8-byte Folded Spill
	str	xzr, [x1]
	bl	_ssh_packet_get_input
	mov	x21, x0
	bl	_sshbuf_len
	mov	x22, x0
	mov	x0, x21
	bl	_sshbuf_ptr
	mov	x23, x0
	mov	x27, #0
	mov	x24, #0
	add	x28, sp, #304
	mov	w19, #10
Lloh3:
	adrp	x25, l_.str.2@PAGE
Lloh4:
	add	x25, x25, l_.str.2@PAGEOFF
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	x8, #0
	subs	x9, x22, x24
	csel	x9, xzr, x9, lo
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=2
	strh	w19, [x28, x8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=2
	add	x8, x8, #1
	add	x24, x26, #1
	cmp	x8, #255
	b.eq	LBB0_8
LBB0_4:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	x26, x24
	ldrb	w10, [x23, x24]
	strb	w10, [x28, x8]
	cmp	w10, #13
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=2
	cmp	w10, #10
	b.ne	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x8, x8, x28
	strb	wzr, [x8, #1]
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	strb	wzr, [sp, #559]
	add	x0, sp, #304
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strncmp
	add	x24, x26, #1
	cbz	x0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	str	x28, [sp]
	mov	x0, x25
	bl	_debug
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbnz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	add	x8, x27, #1
	cmp	x27, #16, lsl #12               ; =65536
	mov	x27, x8
	b.lo	LBB0_1
LBB0_11:
	mov	x0, x20
	bl	_ssh_packet_get_output
	mov	x19, x0
Lloh7:
	adrp	x20, l_.str@PAGE
Lloh8:
	add	x20, x20, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_sshbuf_put
Lloh9:
	adrp	x8, _SSH_ERR_NO_PROTOCOL_VERSION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSH_ERR_NO_PROTOCOL_VERSION@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w0, w8, w0, eq
	b	LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldur	x8, [x29, #-96]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.14:
	add	sp, sp, #576
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x21
	mov	x1, x24
	bl	_sshbuf_consume
	cbnz	w0, LBB0_13
; %bb.16:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x19, sp, #48
	add	x0, sp, #304
	add	x2, sp, #44
	add	x3, sp, #40
	add	x4, sp, #48
	bl	_sscanf
	cmp	w0, #3
	b.ne	LBB0_20
; %bb.17:
	ldp	w9, w8, [sp, #40]
	stp	x9, x19, [sp, #8]
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_debug
	add	x0, sp, #48
	bl	_compat_datafellows
	str	w0, [x20]
	ldr	w8, [sp, #44]
	cmp	w8, #1
	b.ne	LBB0_21
; %bb.18:
	ldr	w9, [sp, #40]
	cmp	w9, #99
	b.ne	LBB0_21
; %bb.19:
	mov	w8, #2
	stp	wzr, w8, [sp, #40]
	b	LBB0_22
LBB0_20:
Lloh19:
	adrp	x8, _SSH_ERR_INVALID_FORMAT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SSH_ERR_INVALID_FORMAT@GOTPAGEOFF]
	b	LBB0_24
LBB0_21:
	cmp	w8, #2
	b.ne	LBB0_23
LBB0_22:
	add	x19, sp, #304
	add	x0, sp, #304
	bl	_chop
	str	x19, [sp]
Lloh21:
	adrp	x0, l_.str.5@PAGE
Lloh22:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_debug
	add	x0, sp, #304
	bl	_strdup
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	str	x0, [x8]
Lloh23:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w8, wzr, eq
	b	LBB0_13
LBB0_23:
Lloh26:
	adrp	x8, _SSH_ERR_PROTOCOL_MISMATCH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SSH_ERR_PROTOCOL_MISMATCH@GOTPAGEOFF]
LBB0_24:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Protocol mismatch.\r\n"

l_.str.1:                               ; @.str.1
	.asciz	"SSH-"

l_.str.2:                               ; @.str.2
	.asciz	"ssh_exchange_identification: %s"

	.comm	_SSH_ERR_NO_PROTOCOL_VERSION,4,2 ; @SSH_ERR_NO_PROTOCOL_VERSION
l_.str.3:                               ; @.str.3
	.asciz	"SSH-%d.%d-%[^\n]\n"

	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ; @SSH_ERR_INVALID_FORMAT
l_.str.4:                               ; @.str.4
	.asciz	"Remote protocol version %d.%d, remote software version %.100s"

	.comm	_SSH_ERR_PROTOCOL_MISMATCH,4,2  ; @SSH_ERR_PROTOCOL_MISMATCH
l_.str.5:                               ; @.str.5
	.asciz	"Remote version string %.100s"

	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols
