	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lsapi_writev
_lsapi_writev:                          ## @lsapi_writev
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	_s_skip_write@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_19
## %bb.1:
	movl	%r14d, %r13d
	testl	%r14d, %r14d
	jle	LBB0_18
## %bb.2:
	movq	_g_running@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	%r14d, %r13d
	je	LBB0_18
## %bb.3:
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movl	%edi, %r12d
	movl	%r14d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	(%rbx), %rsi
	movl	%r12d, %edi
	movl	%r15d, %edx
	callq	_writev
	testl	%eax, %eax
	jle	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	subl	%eax, %r13d
	jle	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_g_running@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_18
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rcx
	addq	$16, %rcx
	movl	%eax, %edx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	subl	-16(%rcx), %edx
	jb	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	%rcx, (%rbx)
	addq	$16, %rcx
	movl	%edx, %eax
	testl	%edx, %edx
	jg	LBB0_8
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$-1, %eax
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %edx
	addq	%rdx, -8(%rcx)
	movq	(%rbx), %rcx
	subl	%eax, (%rcx)
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%r13d, %r13d
	jle	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_g_running@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_4
LBB0_18:
	subl	%r13d, %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	subl	%r13d, %r14d
	testl	%r14d, %r14d
	movl	$-1, %eax
	cmovlel	%eax, %r14d
	jmp	LBB0_19
LBB0_14:
	movl	$-1, %r14d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_s_skip_write,8,3               ## @s_skip_write
	.comm	_g_running,8,3                  ## @g_running
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_EINTR,8,3                      ## @EINTR
	.no_dead_strip	_lsapi_writev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lsapi_writev
_lsapi_writev:                          ; @lsapi_writev
	.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
	mov	x19, x3
Lloh0:
	adrp	x8, _s_skip_write@GOTPAGE
Lloh1:
	ldr	x8, [x8, _s_skip_write@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_16
; %bb.1:
	mov	x23, x19
	cmp	w19, #1
	b.lt	LBB0_15
; %bb.2:
Lloh3:
	adrp	x24, _g_running@GOTPAGE
Lloh4:
	ldr	x24, [x24, _g_running@GOTPAGEOFF]
	ldr	x8, [x24]
	mov	x23, x19
	cbz	x8, LBB0_15
; %bb.3:
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh5:
	adrp	x25, _errno@GOTPAGE
Lloh6:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
Lloh7:
	adrp	x26, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x26, [x26, _EAGAIN@GOTPAGEOFF]
	mov	x23, x19
Lloh9:
	adrp	x27, _EINTR@GOTPAGE
Lloh10:
	ldr	x27, [x27, _EINTR@GOTPAGEOFF]
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x1, [x21]
	mov	x0, x22
	mov	x2, x20
	bl	_writev
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w23, w23, w0
	ldr	x8, [x24]
	cmp	w23, #1
	ccmp	x8, #0, #4, ge
	b.eq	LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	add	x8, x8, #16
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w9, [x8, #-16]
	subs	w9, w0, w9
	b.lo	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	str	x8, [x21]
	add	x8, x8, #16
	mov	x0, x9
	cmp	w9, #0
	b.gt	LBB0_7
	b	LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmn	w0, #1
	b.ne	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_13
	b	LBB0_18
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	x9, [x8, #-8]
	add	x9, x9, w0, uxtw
	stur	x9, [x8, #-8]
	ldr	x8, [x21]
	ldr	w9, [x8]
	sub	w9, w9, w0
	str	w9, [x8]
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w23, #1
	b.lt	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x24]
	cbnz	x8, LBB0_4
LBB0_15:
	sub	w19, w19, w23
LBB0_16:
	mov	x0, x19
	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_17:
	sub	w8, w19, w23
	cmp	w8, #0
	csinv	w19, w8, wzr, gt
	b	LBB0_16
LBB0_18:
	mov	w19, #-1
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_s_skip_write,8,3               ; @s_skip_write
	.comm	_g_running,8,3                  ; @g_running
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_EINTR,8,3                      ; @EINTR
	.no_dead_strip	_lsapi_writev
.subsections_via_symbols
