	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proto_msgout                   ## -- Begin function proto_msgout
	.p2align	4, 0x90
_proto_msgout:                          ## @proto_msgout
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_verbose@GOTPCREL(%rip), %rax
	testb	$2, (%rax)
	je	LBB0_2
## %bb.1:
	movq	(%r14), %rbx
	movq	%r14, %rdi
	callq	_uni_msg_len
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_dump_buf
LBB0_2:
	movq	_loose@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.3:
	movl	_proto_msgout.sent(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, _proto_msgout.sent(%rip)
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%ecx
	decl	%ecx
	cmpl	%ecx, %edx
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_VERBOSE
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.5:
	movq	%r14, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_uni_msg_destroy                ## TAILCALL
LBB0_6:
	movq	%r14, %rdi
	callq	_uni_msg_len
	movq	%rax, -88(%rbp)
	movq	_sscopframe@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpq	$0, (%rax)
	setne	%cl
	shll	$2, %ecx
	movl	%ecx, -80(%rbp)
	leaq	-88(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	%r14, %rdi
	callq	_uni_msg_len
	movl	%eax, -64(%rbp)
	movq	(%r14), %rax
	movq	%rax, -56(%rbp)
	movq	_sscop_fd@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_fcntl
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_8:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	(%r12), %edi
	movq	_F_SETFL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%ebx, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_10:
	movl	(%r12), %edi
	leaq	-80(%rbp), %rsi
	movl	$2, %edx
	callq	_writev
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_12:
	movl	-80(%rbp), %edx
	movl	-64(%rbp), %ecx
	leal	(%rcx,%rdx), %eax
	cmpl	%eax, %r15d
	je	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_err
LBB0_14:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r12), %edi
	movl	(%r13), %esi
	movl	%ebx, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_16:
	movq	%r14, %rdi
	callq	_uni_msg_destroy
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_proto_msgout.sent,4,2 ## @proto_msgout.sent
	.comm	_verbose,4,2                    ## @verbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"send"

	.comm	_loose,4,2                      ## @loose
L_.str.1:                               ## @.str.1
	.asciz	"loosing message"

	.comm	_sscopframe,8,3                 ## @sscopframe
	.comm	_sscop_fd,4,2                   ## @sscop_fd
	.comm	_F_GETFL,4,2                    ## @F_GETFL
L_.str.2:                               ## @.str.2
	.asciz	"cannot get flags for sscop fd"

	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_F_SETFL,4,2                    ## @F_SETFL
L_.str.3:                               ## @.str.3
	.asciz	"cannot set flags for sscop fd"

L_.str.4:                               ## @.str.4
	.asciz	"write sscop"

L_.str.5:                               ## @.str.5
	.asciz	"short sscop write %zu %zu %zd"

L_.str.6:                               ## @.str.6
	.asciz	"cannot restore flags for sscop fd"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proto_msgout                   ; -- Begin function proto_msgout
	.p2align	2
_proto_msgout:                          ; @proto_msgout
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _verbose@GOTPAGE
Lloh4:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbz	w8, #1, LBB0_2
; %bb.1:
	ldr	x20, [x19]
	mov	x0, x19
	bl	_uni_msg_len
	mov	x2, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_dump_buf
LBB0_2:
Lloh7:
	adrp	x8, _loose@GOTPAGE
Lloh8:
	ldr	x8, [x8, _loose@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	subs	w9, w8, #1
	b.lt	LBB0_6
; %bb.3:
	adrp	x10, _proto_msgout.sent@PAGE
	ldr	w11, [x10, _proto_msgout.sent@PAGEOFF]
	add	w12, w11, #1
	str	w12, [x10, _proto_msgout.sent@PAGEOFF]
	sdiv	w10, w11, w8
	msub	w8, w10, w8, w11
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.4:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_VERBOSE
	ldur	x8, [x29, #-56]
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_18
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_uni_msg_destroy
LBB0_6:
	mov	x0, x19
	bl	_uni_msg_len
	str	x0, [sp, #32]
Lloh15:
	adrp	x8, _sscopframe@GOTPAGE
Lloh16:
	ldr	x8, [x8, _sscopframe@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w8, ne
	lsl	w8, w8, #2
	str	w8, [sp, #40]
	add	x8, sp, #32
	str	x8, [sp, #48]
	mov	x0, x19
	bl	_uni_msg_len
	str	w0, [sp, #56]
	ldr	x8, [x19]
	str	x8, [sp, #64]
Lloh18:
	adrp	x22, _sscop_fd@GOTPAGE
Lloh19:
	ldr	x22, [x22, _sscop_fd@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh20:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_fcntl
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
Lloh25:
	adrp	x23, _O_NONBLOCK@GOTPAGE
Lloh26:
	ldr	x23, [x23, _O_NONBLOCK@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w20, w20, w8
	ldr	w0, [x22]
Lloh27:
	adrp	x24, _F_SETFL@GOTPAGE
Lloh28:
	ldr	x24, [x24, _F_SETFL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x2, x20
	bl	_fcntl
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.9:
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
	ldr	w0, [x22]
	add	x1, sp, #40
	mov	w2, #2
	bl	_writev
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_12
; %bb.11:
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_12:
	ldr	w8, [sp, #40]
	ldr	w9, [sp, #56]
	add	w10, w9, w8
	cmp	w21, w10
	b.eq	LBB0_14
; %bb.13:
	stp	x9, x21, [sp, #8]
	str	x8, [sp]
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_14:
	ldr	w8, [x23]
	orr	w2, w8, w20
	ldr	w0, [x22]
	ldr	w1, [x24]
	bl	_fcntl
	cmn	w0, #1
	b.ne	LBB0_16
; %bb.15:
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_16:
	mov	x0, x19
	bl	_uni_msg_destroy
	ldur	x8, [x29, #-56]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_proto_msgout.sent,4,2 ; @proto_msgout.sent
	.comm	_verbose,4,2                    ; @verbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"send"

	.comm	_loose,4,2                      ; @loose
l_.str.1:                               ; @.str.1
	.asciz	"loosing message"

	.comm	_sscopframe,8,3                 ; @sscopframe
	.comm	_sscop_fd,4,2                   ; @sscop_fd
	.comm	_F_GETFL,4,2                    ; @F_GETFL
l_.str.2:                               ; @.str.2
	.asciz	"cannot get flags for sscop fd"

	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_F_SETFL,4,2                    ; @F_SETFL
l_.str.3:                               ; @.str.3
	.asciz	"cannot set flags for sscop fd"

l_.str.4:                               ; @.str.4
	.asciz	"write sscop"

l_.str.5:                               ; @.str.5
	.asciz	"short sscop write %zu %zu %zd"

l_.str.6:                               ; @.str.6
	.asciz	"cannot restore flags for sscop fd"

.subsections_via_symbols
