	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_data_block
_write_data_block:                      ## @write_data_block
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_21
## %bb.1:
	movq	%rdi, %r15
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.2:
	cmpq	$0, 8(%r15)
	js	LBB0_19
## %bb.3:
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	_ARCHIVE_EXTRACT_SPARSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	16(%r15), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	setne	%cl
	testq	%rax, %rax
	js	LBB0_6
## %bb.4:
	movq	24(%r15), %rdx
	leaq	(%rdx,%r14), %rsi
	cmpq	%rax, %rsi
	jle	LBB0_6
## %bb.5:
	subq	%rdx, %rax
	movq	%rax, %r14
	je	LBB0_26
LBB0_6:
	xorl	%eax, %eax
	movb	%cl, %al
	shlq	$14, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rax
	testq	%rbx, %rbx
	jle	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	(%r12,%rbx), %rcx
	movq	%r12, %rax
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$0, (%rax)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	incq	%rax
	cmpq	%rcx, %rax
	jb	LBB0_10
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rcx
	subq	%r12, %rcx
	movq	24(%r15), %rsi
	addq	%rcx, %rsi
	movq	%rsi, 24(%r15)
	subq	%rcx, %rbx
	je	LBB0_23
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rsi, %rcx
	shrq	$14, %rcx
	incq	%rcx
	imulq	-56(%rbp), %rcx                 ## 8-byte Folded Reload
	movslq	%ebx, %rdx
	addq	%rsi, %rdx
	movq	%rcx, %r13
	subq	%rsi, %r13
	cmpq	%rcx, %rdx
	cmovbeq	%rbx, %r13
	movq	%rax, %r12
	cmpq	32(%r15), %rsi
	jne	LBB0_15
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	24(%r15), %rsi
	movq	%rbx, %r13
	cmpq	32(%r15), %rsi
	je	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r15), %rdi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_25
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	24(%r15), %rax
	movq	%rax, 32(%r15)
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r15), %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_write
	testl	%eax, %eax
	js	LBB0_24
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %ecx
	addq	%rcx, %r12
	addl	%eax, 40(%r15)
	movq	24(%r15), %rax
	addq	%rcx, %rax
	movq	%rax, 24(%r15)
	movq	%rax, 32(%r15)
	subq	%rcx, %rbx
	jne	LBB0_7
	jmp	LBB0_23
LBB0_19:
	addq	$44, %r15
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
LBB0_20:
	callq	_archive_set_error
	movq	_ARCHIVE_WARN@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_21:
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %r14d
LBB0_23:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	addq	$44, %r15
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	jmp	LBB0_20
LBB0_25:
	addq	$44, %r15
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_26:
	xorl	%r14d, %r14d
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to write to an empty file"

	.comm	_ARCHIVE_WARN,4,2               ## @ARCHIVE_WARN
	.comm	_ARCHIVE_EXTRACT_SPARSE,4,2     ## @ARCHIVE_EXTRACT_SPARSE
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"Seek failed"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
L_.str.2:                               ## @.str.2
	.asciz	"Write failed"

	.no_dead_strip	_write_data_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_data_block
_write_data_block:                      ; @write_data_block
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x2, LBB0_22
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_20
; %bb.2:
	ldr	x9, [x20, #8]
	tbnz	x9, #63, LBB0_20
; %bb.3:
	mov	x19, x2
	mov	x21, x1
	ldr	w9, [x20, #16]
Lloh0:
	adrp	x10, _ARCHIVE_EXTRACT_SPARSE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ARCHIVE_EXTRACT_SPARSE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	ands	w23, w10, w9
	cset	w9, ne
	tbnz	x8, #63, LBB0_6
; %bb.4:
	ldr	x10, [x20, #24]
	add	x11, x10, x19
	cmp	x11, x8
	b.le	LBB0_6
; %bb.5:
	subs	x19, x8, x10
	b.eq	LBB0_24
LBB0_6:
	lsl	x24, x9, #14
Lloh3:
	adrp	x25, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x25, [x25, _SEEK_SET@GOTPAGEOFF]
	mov	x26, x19
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cbz	w23, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x8, x21
	cmp	x26, #1
	b.lt	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x9, x21, x26
	mov	x8, x21
LBB0_10:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w10, [x8]
	cbnz	w10, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x8, x8, #1
	cmp	x8, x9
	b.lo	LBB0_10
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x20, #24]
	sub	x10, x8, x21
	add	x1, x9, x10
	str	x1, [x20, #24]
	subs	x26, x26, x10
	b.eq	LBB0_24
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	lsr	x9, x1, #14
	madd	x9, x24, x9, x24
	add	x10, x1, w26, sxtw
	sub	x11, x9, x1
	cmp	x10, x9
	csel	x22, x11, x26, hi
	mov	x21, x8
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [x20, #24]
	mov	x22, x26
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #32]
	cmp	x1, x8
	b.eq	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x20, #8]
	ldr	w2, [x25]
	bl	_lseek
	tbnz	x0, #63, LBB0_26
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #24]
	str	x8, [x20, #32]
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x20, #8]
	mov	x1, x21
	mov	x2, x22
	bl	_write
	tbnz	w0, #31, LBB0_25
; %bb.19:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w8, w0
	add	x21, x21, x8
	ldr	w9, [x20, #40]
	add	w9, w9, w0
	str	w9, [x20, #40]
	ldr	x9, [x20, #24]
	add	x9, x9, x8
	stp	x9, x9, [x20, #24]
	subs	x26, x26, x8
	b.ne	LBB0_7
	b	LBB0_24
LBB0_20:
	add	x0, x20, #44
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #0
LBB0_21:
	bl	_archive_set_error
Lloh7:
	adrp	x8, _ARCHIVE_WARN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ARCHIVE_WARN@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:
Lloh9:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
LBB0_23:
	ldr	w19, [x8]
LBB0_24:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_25:
	add	x0, x20, #44
Lloh11:
	adrp	x8, _errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.2@PAGE
Lloh15:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_21
LBB0_26:
	add	x0, x20, #44
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_archive_set_error
Lloh21:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to write to an empty file"

	.comm	_ARCHIVE_WARN,4,2               ; @ARCHIVE_WARN
	.comm	_ARCHIVE_EXTRACT_SPARSE,4,2     ; @ARCHIVE_EXTRACT_SPARSE
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"Seek failed"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
l_.str.2:                               ; @.str.2
	.asciz	"Write failed"

	.no_dead_strip	_write_data_block
.subsections_via_symbols
