	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__swrite                        ## -- Begin function _swrite
	.p2align	4, 0x90
__swrite:                               ## @_swrite
	.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	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___SAPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %r13d
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	__sseek
	cmpl	$-1, %eax
	je	LBB0_2
LBB0_3:
	movl	%r13d, (%r12)
LBB0_4:
	movl	24(%rbx), %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	*8(%rbx)
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movl	(%rbx), %ecx
	movq	___SOFF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%ecx, %edx
	je	LBB0_9
## %bb.6:
	movq	___S2OAP@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, 16(%rbx)
	jne	LBB0_9
## %bb.7:
	movl	20(%rbx), %esi
	movq	_OFF_MAX@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	subl	%eax, %edi
	cmpl	%edi, %esi
	jle	LBB0_8
LBB0_9:
	notl	%edx
	andl	%edx, %ecx
	movl	%ecx, (%rbx)
	jmp	LBB0_11
LBB0_10:
	movq	___SOFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, (%rbx)
	jmp	LBB0_11
LBB0_2:
	movq	___SOPT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %eax
	testl	%ecx, (%rbx)
	jne	LBB0_11
	jmp	LBB0_3
LBB0_8:
	addl	%eax, %esi
	movl	%esi, 20(%rbx)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___SAPP,4,2                     ## @__SAPP
	.comm	_errno,4,2                      ## @errno
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	___SOPT,4,2                     ## @__SOPT
	.comm	___SOFF,4,2                     ## @__SOFF
	.comm	___S2OAP,4,2                    ## @__S2OAP
	.comm	_OFF_MAX,4,2                    ## @OFF_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__swrite                        ; -- Begin function _swrite
	.p2align	2
__swrite:                               ; @_swrite
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, ___SAPP@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___SAPP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x22, _errno@GOTPAGE
Lloh4:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w23, [x22]
Lloh5:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	__sseek
	cmn	w0, #1
	b.eq	LBB0_11
LBB0_2:
	str	w23, [x22]
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	w0, [x19, #24]
	mov	x1, x21
	mov	x2, x20
	blr	x8
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	w8, [x19]
Lloh8:
	adrp	x9, ___SOFF@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___SOFF@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	ldr	w10, [x19, #16]
Lloh11:
	adrp	x11, ___S2OAP@GOTPAGE
Lloh12:
	ldr	x11, [x11, ___S2OAP@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	tst	w11, w10
	b.ne	LBB0_7
; %bb.6:
	ldr	w10, [x19, #20]
Lloh14:
	adrp	x11, _OFF_MAX@GOTPAGE
Lloh15:
	ldr	x11, [x11, _OFF_MAX@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	sub	w11, w11, w0
	cmp	w10, w11
	b.le	LBB0_13
LBB0_7:
	bic	w8, w8, w9
	b	LBB0_9
LBB0_8:
Lloh17:
	adrp	x8, ___SOFF@GOTPAGE
Lloh18:
	ldr	x8, [x8, ___SOFF@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
LBB0_9:
	str	w8, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w8, [x19]
Lloh20:
	adrp	x9, ___SOPT@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___SOPT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.12:
	mov	w0, #-1
	b	LBB0_10
LBB0_13:
	add	w8, w10, w0
	str	w8, [x19, #20]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	___SAPP,4,2                     ; @__SAPP
	.comm	_errno,4,2                      ; @errno
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	___SOPT,4,2                     ; @__SOPT
	.comm	___SOFF,4,2                     ; @__SOFF
	.comm	___S2OAP,4,2                    ; @__S2OAP
	.comm	_OFF_MAX,4,2                    ; @OFF_MAX
.subsections_via_symbols
