	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_msg_send                   ## -- Begin function ssh_msg_send
	.p2align	4, 0x90
_ssh_msg_send:                          ## @ssh_msg_send
	.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	$56, %rsp
	.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	%rdx, %rdi
	callq	_sshbuf_len
	movl	%eax, %r12d
	movzbl	%bl, %esi
	leaq	L_.str(%rip), %rdi
	callq	_debug3
	leal	1(%r12), %esi
	leaq	-96(%rbp), %r13
	movq	%r13, %rdi
	callq	_put_u32
	movq	%rbx, -64(%rbp)
	movq	_vwrite@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	%r14d, %esi
	movq	%r13, %rdx
	movl	$40, %ecx
	callq	_atomicio
	cmpl	$40, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %ebx
	movq	%r15, %rdi
	callq	_sshbuf_mutable_ptr
	movl	%ebx, %edi
	movl	%r14d, %esi
	movq	%rax, %rdx
	movl	%r12d, %ecx
	callq	_atomicio
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%r12d, %ecx
	je	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_error
	movl	$-1, %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ssh_msg_send: type %u"

	.comm	_vwrite,4,2                     ## @vwrite
L_.str.1:                               ## @.str.1
	.asciz	"ssh_msg_send: write"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_msg_send                   ; -- Begin function ssh_msg_send
	.p2align	2
_ssh_msg_send:                          ; @ssh_msg_send
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	x0, x2
	bl	_sshbuf_len
	mov	x20, x0
	and	w1, w22, #0xff
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug3
	add	w1, w20, #1
	mov	x0, sp
	bl	_put_u32
	str	x22, [sp, #32]
Lloh5:
	adrp	x22, _vwrite@GOTPAGE
Lloh6:
	ldr	x22, [x22, _vwrite@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x2, sp
	mov	x1, x19
	mov	w3, #40
	bl	_atomicio
	cmp	w0, #40
	b.ne	LBB0_3
; %bb.1:
	ldr	w22, [x22]
	mov	x0, x21
	bl	_sshbuf_mutable_ptr
	mov	x2, x0
	mov	x0, x22
	mov	x1, x19
	mov	x3, x20
	bl	_atomicio
	cmp	w0, w20
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error
	mov	w0, #-1
LBB0_4:
	ldr	x8, [sp, #40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	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
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ssh_msg_send: type %u"

	.comm	_vwrite,4,2                     ; @vwrite
l_.str.1:                               ; @.str.1
	.asciz	"ssh_msg_send: write"

.subsections_via_symbols
