	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ffs_extwrite
_ffs_extwrite:                          ## @ffs_extwrite
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	callq	_VTOI
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ITOFS
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	8(%rbx), %rcx
	movq	_IO_APPEND@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	(%rcx), %rdi
	movq	%rdi, 8(%r15)
	jmp	LBB0_3
LBB0_1:
	movq	8(%r15), %rdi
LBB0_3:
	shrq	$63, %rdi
	xorl	$1, %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_KASSERT
	movq	16(%r15), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_KASSERT
	movq	8(%r15), %rsi
	movq	16(%r15), %rdi
	movslq	%esi, %rax
	addq	%rdi, %rax
	movq	_UFS_NXADDR@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movslq	8(%rdx), %rdx
	imulq	%rcx, %rdx
	cmpq	%rdx, %rax
	jle	LBB0_5
## %bb.4:
	movq	_EFBIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_38
LBB0_5:
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rax
	testq	%rdi, %rdi
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	jle	LBB0_26
## %bb.6:
	movq	_IO_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r14d, %ecx
	movl	%eax, %r14d
	andl	%ecx, %r14d
	cmovnel	%eax, %r14d
	movq	_IO_EXT@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_lblkno
	movl	%eax, %r12d
	movq	8(%r15), %rsi
	movq	%rbx, %rdi
	callq	_blkoff
	movl	8(%rbx), %edi
	movl	%eax, %ebx
	movl	%edi, %ecx
	subl	%eax, %ecx
	movq	16(%r15), %rdx
	movslq	%ecx, %r13
	cmpq	%r13, %rdx
	cmovll	%edx, %r13d
	movq	8(%r15), %rsi
	movq	_BA_CLRBUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	orl	%r14d, %edx
	notl	%ecx
	andl	%ecx, %r14d
	cmpl	%r13d, %edi
	cmovgl	%edx, %r14d
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, %r8d
	leaq	-56(%rbp), %r9
	callq	_UFS_BALLOC
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rdi
	movq	_B_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	%r13d, 8(%rax)
	jg	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	callq	_vfs_bio_clrbuf
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movslq	%r13d, %rax
	addq	8(%r15), %rax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rsi
	cmpq	%rsi, %rax
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, (%rcx)
	movq	%rax, %rsi
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_sblksize
	movl	%eax, %r12d
	movq	-56(%rbp), %rax
	subl	4(%rax), %r12d
	cmpl	%r13d, %r12d
	cmovgel	%r13d, %r12d
	movslq	-68(%rbp), %rdi                 ## 4-byte Folded Reload
	addq	8(%rax), %rdi
	movl	%r12d, %esi
	movq	%r15, %r13
	movq	%r15, %rdx
	callq	_uiomove
	movl	%eax, %r15d
	movq	-56(%rbp), %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_vfs_bio_set_flags
	movq	_IO_SYNC@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdi
	callq	_bwrite
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_vm_page_count_severe
	testq	%rax, %rax
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_buf_dirty_count_severe
	testq	%rax, %rax
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	addl	%r12d, %ecx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	8(%rax), %ecx
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_IO_DIRECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IO_ASYNC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdi
	callq	_bawrite
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r15d, %esi
	testl	%r15d, %r15d
	jne	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_7 Depth=1
	testl	%r12d, %r12d
	movq	%r13, %r15
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_IN_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	orl	%eax, 4(%rcx)
	cmpq	$0, 16(%r15)
	jle	LBB0_26
## %bb.39:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r15), %rsi
	jmp	LBB0_7
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdi
	callq	_bdwrite
	jmp	LBB0_22
LBB0_26:
	xorl	%esi, %esi
	jmp	LBB0_27
LBB0_8:
	movl	%eax, %esi
	jmp	LBB0_27
LBB0_23:
	movq	%r13, %r15
LBB0_27:
	movq	_ISUID@GOTPCREL(%rip), %r14
	movq	_ISGID@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	orl	(%r14), %eax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_32
## %bb.28:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_32
## %bb.29:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	16(%r15), %rax
	jle	LBB0_32
## %bb.30:
	movq	_PRIV_VFS_RETAINSUGID@GOTPCREL(%rip), %rax
	movl	%esi, %r12d
	movl	(%rax), %esi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_priv_check_cred
	movl	%r12d, %esi
	testq	%rax, %rax
	je	LBB0_32
## %bb.31:
	movl	(%rbx), %eax
	orl	(%r14), %eax
	notl	%eax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	andl	(%rcx), %eax
	movl	%eax, (%rcx)
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, 8(%rcx)
LBB0_32:
	testl	%esi, %esi
	je	LBB0_35
## %bb.33:
	movq	_IO_UNIT@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, (%rax)
	je	LBB0_38
## %bb.34:
	movq	_IO_EXT@GOTPCREL(%rip), %rax
	movq	_IO_SYNC@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	orl	(%rax), %edx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%esi, %ebx
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	callq	_ffs_truncate
	movl	%ebx, %esi
	movq	16(%r15), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	subq	%rcx, %rax
	addq	%rax, 8(%r15)
	movq	%rcx, 16(%r15)
	jmp	LBB0_38
LBB0_35:
	xorl	%esi, %esi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	16(%r15), %rax
	jle	LBB0_38
## %bb.36:
	movq	_IO_SYNC@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_38
## %bb.37:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_ffs_update
	movl	%eax, %esi
LBB0_38:
	movl	%esi, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_APPEND,4,2                  ## @IO_APPEND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ffs_extwrite: uio->uio_offset < 0"

L_.str.1:                               ## @.str.1
	.asciz	"ffs_extwrite: uio->uio_resid < 0"

	.comm	_UFS_NXADDR,4,2                 ## @UFS_NXADDR
	.comm	_EFBIG,4,2                      ## @EFBIG
	.comm	_IO_EXT,4,2                     ## @IO_EXT
	.comm	_IO_SYNC,4,2                    ## @IO_SYNC
	.comm	_BA_CLRBUF,4,2                  ## @BA_CLRBUF
	.comm	_B_CACHE,4,2                    ## @B_CACHE
	.comm	_IO_ASYNC,4,2                   ## @IO_ASYNC
	.comm	_IO_DIRECT,4,2                  ## @IO_DIRECT
	.comm	_IN_CHANGE,4,2                  ## @IN_CHANGE
	.comm	_ISUID,4,2                      ## @ISUID
	.comm	_ISGID,4,2                      ## @ISGID
	.comm	_PRIV_VFS_RETAINSUGID,4,2       ## @PRIV_VFS_RETAINSUGID
	.comm	_IO_UNIT,4,2                    ## @IO_UNIT
	.comm	_FS_UFS2_MAGIC,8,3              ## @FS_UFS2_MAGIC
	.comm	_UIO_WRITE,8,3                  ## @UIO_WRITE
	.no_dead_strip	_ffs_extwrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ffs_extwrite
_ffs_extwrite:                          ; @ffs_extwrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	x0, x3, [sp, #24]               ; 16-byte Folded Spill
	mov	x22, x2
	mov	x19, x1
	bl	_VTOI
	mov	x23, x0
	bl	_ITOFS
	mov	x25, x0
	ldr	x20, [x23, #8]
Lloh0:
	adrp	x8, _IO_APPEND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IO_APPEND@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x20]
	str	x8, [x19, #8]
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
LBB0_3:
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	x8, [x19, #16]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldp	x1, x26, [x19, #8]
	add	x8, x26, w1, sxtw
Lloh7:
	adrp	x9, _UFS_NXADDR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _UFS_NXADDR@GOTPAGEOFF]
Lloh9:
	ldrsw	x9, [x9]
	ldrsw	x10, [x25, #8]
	mul	x9, x10, x9
	cmp	x8, x9
	b.le	LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _EFBIG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFBIG@GOTPAGEOFF]
Lloh12:
	ldr	w27, [x8]
	b	LBB0_40
LBB0_5:
	ldr	x8, [x20]
Lloh13:
	adrp	x9, _IO_SYNC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IO_SYNC@GOTPAGEOFF]
Lloh15:
	adrp	x10, _IO_EXT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _IO_EXT@GOTPAGEOFF]
	cmp	x26, #1
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	b.lt	LBB0_24
; %bb.6:
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	ldr	w8, [x9]
	tst	w8, w22
	csel	w8, wzr, w8, eq
	ldr	w9, [x10]
	orr	w26, w8, w9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	_lblkno
	mov	x24, x0
	ldr	x1, [x19, #8]
	mov	x0, x25
	bl	_blkoff
	mov	x28, x0
	ldr	w8, [x25, #8]
	sub	w9, w8, w0
	ldp	x1, x10, [x19, #8]
	cmp	x10, w9, sxtw
	csel	w21, w10, w9, lt
Lloh17:
	adrp	x9, _BA_CLRBUF@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BA_CLRBUF@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w10, w9, w26
	bic	w9, w26, w9
	cmp	w8, w21
	csel	w26, w10, w9, gt
	add	x5, sp, #40
	ldp	x0, x3, [sp, #24]               ; 16-byte Folded Reload
	mov	x2, x21
	mov	x4, x26
	bl	_UFS_BALLOC
	cbnz	w0, LBB0_25
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #40]
	ldr	w8, [x0]
Lloh20:
	adrp	x9, _B_CACHE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _B_CACHE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x25, #8]
	cmp	w8, w21
	b.gt	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_vfs_bio_clrbuf
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, w21, sxtw
	ldr	x1, [x20]
	cmp	x8, x1
	b.le	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	str	x8, [x20]
	mov	x1, x8
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x25
	mov	x2, x24
	bl	_sblksize
	ldr	x8, [sp, #40]
	ldr	w9, [x8, #4]
	sub	w9, w0, w9
	cmp	w9, w21
	csel	w24, w9, w21, lt
	ldr	x8, [x8, #8]
	add	x0, x8, w28, sxtw
	mov	x1, x24
	mov	x2, x19
	bl	_uiomove
	mov	x27, x0
	ldr	x0, [sp, #40]
	mov	x1, x22
	bl	_vfs_bio_set_flags
Lloh23:
	adrp	x8, _IO_SYNC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IO_SYNC@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #40]
	bl	_bwrite
	b	LBB0_20
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_vm_page_count_severe
	cbnz	x0, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_buf_dirty_count_severe
	cbnz	x0, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x25, #8]
	add	w9, w24, w28
	cmp	w9, w8
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh26:
	adrp	x8, _IO_ASYNC@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IO_ASYNC@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _IO_DIRECT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _IO_DIRECT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w22
	b.eq	LBB0_23
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #40]
	bl	_bawrite
LBB0_20:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w27, #0
	ccmp	w24, #0, #4, eq
	b.eq	LBB0_27
; %bb.21:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh32:
	adrp	x8, _IN_CHANGE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IN_CHANGE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x23, #4]
	orr	w8, w9, w8
	str	w8, [x23, #4]
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.lt	LBB0_26
; %bb.22:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [x19, #8]
	b	LBB0_7
LBB0_23:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #40]
	bl	_bdwrite
	b	LBB0_20
LBB0_24:
	mov	w27, #0
	b	LBB0_28
LBB0_25:
	mov	x27, x0
	b	LBB0_27
LBB0_26:
	mov	w27, #0
LBB0_27:
	ldr	x26, [sp, #8]                   ; 8-byte Folded Reload
LBB0_28:
	ldr	w8, [x23]
Lloh35:
	adrp	x21, _ISUID@GOTPAGE
Lloh36:
	ldr	x21, [x21, _ISUID@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh37:
	adrp	x24, _ISGID@GOTPAGE
Lloh38:
	ldr	x24, [x24, _ISGID@GOTPAGEOFF]
	ldr	w10, [x24]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_33
; %bb.29:
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_33
; %bb.30:
	ldr	x8, [x19, #16]
	cmp	x26, x8
	b.le	LBB0_33
; %bb.31:
Lloh39:
	adrp	x8, _PRIV_VFS_RETAINSUGID@GOTPAGE
Lloh40:
	ldr	x8, [x8, _PRIV_VFS_RETAINSUGID@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	bl	_priv_check_cred
	cbz	x0, LBB0_33
; %bb.32:
	ldr	w8, [x21]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x23]
	bic	w8, w9, w8
	str	w8, [x23]
	str	w8, [x20, #8]
LBB0_33:
	cbz	w27, LBB0_36
; %bb.34:
Lloh42:
	adrp	x8, _IO_UNIT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _IO_UNIT@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_40
; %bb.35:
Lloh45:
	adrp	x8, _IO_EXT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _IO_EXT@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
Lloh48:
	adrp	x9, _IO_SYNC@GOTPAGE
Lloh49:
	ldr	x9, [x9, _IO_SYNC@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	and	w9, w9, w22
	orr	w2, w9, w8
	ldp	x1, x0, [sp, #16]               ; 16-byte Folded Reload
	ldr	x3, [sp, #32]                   ; 8-byte Folded Reload
	bl	_ffs_truncate
	ldp	x9, x8, [x19, #8]
	sub	x8, x8, x26
	add	x8, x8, x9
	stp	x8, x26, [x19, #8]
	b	LBB0_40
LBB0_36:
	ldr	x8, [x19, #16]
	cmp	x26, x8
	b.le	LBB0_39
; %bb.37:
Lloh51:
	adrp	x8, _IO_SYNC@GOTPAGE
Lloh52:
	ldr	x8, [x8, _IO_SYNC@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_39
; %bb.38:
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	w1, #1
	bl	_ffs_update
	mov	x27, x0
	b	LBB0_40
LBB0_39:
	mov	w27, #0
LBB0_40:
	mov	x0, x27
	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
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_APPEND,4,2                  ; @IO_APPEND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ffs_extwrite: uio->uio_offset < 0"

l_.str.1:                               ; @.str.1
	.asciz	"ffs_extwrite: uio->uio_resid < 0"

	.comm	_UFS_NXADDR,4,2                 ; @UFS_NXADDR
	.comm	_EFBIG,4,2                      ; @EFBIG
	.comm	_IO_EXT,4,2                     ; @IO_EXT
	.comm	_IO_SYNC,4,2                    ; @IO_SYNC
	.comm	_BA_CLRBUF,4,2                  ; @BA_CLRBUF
	.comm	_B_CACHE,4,2                    ; @B_CACHE
	.comm	_IO_ASYNC,4,2                   ; @IO_ASYNC
	.comm	_IO_DIRECT,4,2                  ; @IO_DIRECT
	.comm	_IN_CHANGE,4,2                  ; @IN_CHANGE
	.comm	_ISUID,4,2                      ; @ISUID
	.comm	_ISGID,4,2                      ; @ISGID
	.comm	_PRIV_VFS_RETAINSUGID,4,2       ; @PRIV_VFS_RETAINSUGID
	.comm	_IO_UNIT,4,2                    ; @IO_UNIT
	.comm	_FS_UFS2_MAGIC,8,3              ; @FS_UFS2_MAGIC
	.comm	_UIO_WRITE,8,3                  ; @UIO_WRITE
	.no_dead_strip	_ffs_extwrite
.subsections_via_symbols
