	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssh_request_reply
_ssh_request_reply:                     ## @ssh_request_reply
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	callq	_sshbuf_len
	leaq	-1072(%rbp), %r12
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_POKE_U32
	movq	_vwrite@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	$4, %ecx
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_atomicio
	cmpq	$4, %rax
	jne	LBB0_11
## %bb.1:
	movl	(%r13), %r12d
	movq	%rbx, %rdi
	callq	_sshbuf_mutable_ptr
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_sshbuf_len
	movl	%r12d, %edi
	movl	%r14d, %esi
	movq	%r13, %rdx
	movq	%rax, %rcx
	callq	_atomicio
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_sshbuf_len
	cmpq	%rax, %r12
	jne	LBB0_11
## %bb.2:
	movq	_read@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-1072(%rbp), %rdx
	movl	$4, %ecx
	movl	%r14d, %esi
	callq	_atomicio
	cmpq	$4, %rax
	jne	LBB0_11
## %bb.3:
	leaq	-1072(%rbp), %rdi
	callq	_PEEK_U32
	movq	%rax, %rbx
	movq	_MAX_AGENT_REPLY_LEN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jbe	LBB0_5
## %bb.4:
	movq	_SSH_ERR_INVALID_FORMAT@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movq	%r15, %rdi
	callq	_sshbuf_reset
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.6:
	movl	%r14d, -1076(%rbp)              ## 4-byte Spill
	leaq	-1072(%rbp), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$1024, %rbx                     ## imm = 0x400
	movl	$1024, %r13d                    ## imm = 0x400
	cmovbq	%rbx, %r13
	movq	_read@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-1076(%rbp), %esi               ## 4-byte Reload
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_atomicio
	cmpq	%r13, %rax
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %r12
	movq	%r15, %rdi
	movq	%r14, %r15
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_sshbuf_put
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	subq	%r13, %rbx
	movq	%r15, %r14
	movq	%r12, %r15
	jne	LBB0_7
## %bb.10:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_SSH_ERR_AGENT_COMMUNICATION@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_vwrite,4,2                     ## @vwrite
	.comm	_SSH_ERR_AGENT_COMMUNICATION,4,2 ## @SSH_ERR_AGENT_COMMUNICATION
	.comm	_read,4,2                       ## @read
	.comm	_MAX_AGENT_REPLY_LEN,8,3        ## @MAX_AGENT_REPLY_LEN
	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ## @SSH_ERR_INVALID_FORMAT
	.no_dead_strip	_ssh_request_reply
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssh_request_reply
_ssh_request_reply:                     ; @ssh_request_reply
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #1040
	mov	x19, x2
	mov	x21, x1
	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, #-72]
	mov	x0, x1
	bl	_sshbuf_len
	mov	x1, x0
	add	x0, sp, #8
	bl	_POKE_U32
Lloh3:
	adrp	x22, _vwrite@GOTPAGE
Lloh4:
	ldr	x22, [x22, _vwrite@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x2, sp, #8
	mov	x1, x20
	mov	w3, #4
	bl	_atomicio
	cmp	x0, #4
	b.ne	LBB0_10
; %bb.1:
	ldr	w22, [x22]
	mov	x0, x21
	bl	_sshbuf_mutable_ptr
	mov	x23, x0
	mov	x0, x21
	bl	_sshbuf_len
	mov	x3, x0
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	bl	_atomicio
	mov	x22, x0
	mov	x0, x21
	bl	_sshbuf_len
	cmp	x22, x0
	b.ne	LBB0_10
; %bb.2:
Lloh5:
	adrp	x23, _read@GOTPAGE
Lloh6:
	ldr	x23, [x23, _read@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x2, sp, #8
	mov	x1, x20
	mov	w3, #4
	bl	_atomicio
	cmp	x0, #4
	b.ne	LBB0_10
; %bb.3:
	add	x0, sp, #8
	bl	_PEEK_U32
Lloh7:
	adrp	x8, _MAX_AGENT_REPLY_LEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_AGENT_REPLY_LEN@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ls	LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _SSH_ERR_INVALID_FORMAT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SSH_ERR_INVALID_FORMAT@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
	mov	x21, x0
	mov	x0, x19
	bl	_sshbuf_reset
	cbz	x21, LBB0_14
; %bb.6:
	mov	w24, #1024
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x21, #1024
	csel	x22, x21, x24, lo
	ldr	w0, [x23]
	add	x2, sp, #8
	mov	x1, x20
	mov	x3, x22
	bl	_atomicio
	cmp	x0, x22
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x22
	bl	_sshbuf_put
	cbnz	w0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	subs	x21, x21, x22
	b.ne	LBB0_7
	b	LBB0_12
LBB0_10:
Lloh12:
	adrp	x8, _SSH_ERR_AGENT_COMMUNICATION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SSH_ERR_AGENT_COMMUNICATION@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	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_15
; %bb.13:
	add	sp, sp, #1040
	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	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w0, #0
	b	LBB0_12
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_vwrite,4,2                     ; @vwrite
	.comm	_SSH_ERR_AGENT_COMMUNICATION,4,2 ; @SSH_ERR_AGENT_COMMUNICATION
	.comm	_read,4,2                       ; @read
	.comm	_MAX_AGENT_REPLY_LEN,8,3        ; @MAX_AGENT_REPLY_LEN
	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ; @SSH_ERR_INVALID_FORMAT
	.no_dead_strip	_ssh_request_reply
.subsections_via_symbols
