	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_file_contents
_write_file_contents:                   ## @write_file_contents
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movl	(%r12), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_wb_buffptr
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_wb_remaining
	cmpq	%rbx, %rax
	cmovaeq	%rbx, %rax
	movl	(%r12), %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_read
	testq	%rax, %rax
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	subq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_wb_consume
	testl	%eax, %eax
	jns	LBB0_1
	jmp	LBB0_7
LBB0_5:
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't read temporary file(%jd)"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
	.no_dead_strip	_write_file_contents
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_file_contents
_write_file_contents:                   ; @write_file_contents
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x22]
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_lseek
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x20, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_wb_buffptr
	mov	x21, x0
	mov	x0, x19
	bl	_wb_remaining
	cmp	x0, x20
	csel	x2, x0, x20, lo
	ldr	w0, [x22]
	mov	x1, x21
	bl	_read
	mov	x3, x0
	cmp	x0, #0
	b.le	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	x20, x20, x3
	mov	x0, x19
	mov	x1, x3
	bl	_wb_consume
	tbz	w0, #31, LBB0_1
	b	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_archive_set_error
Lloh10:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't read temporary file(%jd)"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
	.no_dead_strip	_write_file_contents
.subsections_via_symbols
