	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _CloseArchive
__CloseArchive:                         ## @_CloseArchive
	.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	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_archModeWrite@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.1:
	movq	32(%rbx), %r14
	movq	%rbx, %rdi
	callq	_WriteHead
	movq	8(%rbx), %rdi
	callq	_ftello
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_4
## %bb.2:
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_fatal
LBB0_4:
	movq	%rbx, %rdi
	callq	_WriteToc
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	__getFilePos
	movl	%eax, 8(%r14)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_WriteDataChunks
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.5:
	movq	8(%rbx), %rdi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %esi
	callq	_fseeko
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_WriteToc
LBB0_7:
	movq	8(%rbx), %rdi
	callq	_fclose
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_fatal
LBB0_9:
	cmpq	$0, 24(%rbx)
	je	LBB0_13
## %bb.10:
	movq	(%rbx), %rax
	cmpq	(%r12), %rax
	jne	LBB0_13
## %bb.11:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	xorl	%esi, %esi
	callq	_fsync_fname
LBB0_13:
	movq	$0, 8(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_archModeWrite,8,3              ## @archModeWrite
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not determine seek position in archive file: %m"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.1:                               ## @.str.1
	.asciz	"could not close archive file: %m"

	.no_dead_strip	__CloseArchive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _CloseArchive
__CloseArchive:                         ; @_CloseArchive
	.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	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _archModeWrite@GOTPAGE
Lloh1:
	ldr	x22, [x22, _archModeWrite@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	ldr	x20, [x19, #32]
	mov	x0, x19
	bl	_WriteHead
	ldr	x0, [x19, #8]
	bl	_ftello
	mov	x21, x0
	tbz	w0, #31, LBB0_4
; %bb.2:
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_4:
	mov	x0, x19
	bl	_WriteToc
	mov	x0, x19
	mov	x1, x20
	bl	__getFilePos
	str	w0, [x20, #8]
	mov	x0, x19
	mov	x1, #0
	bl	_WriteDataChunks
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x0, [x19, #8]
Lloh4:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_fseeko
	cbnz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_WriteToc
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_fclose
	cbz	x0, LBB0_9
; %bb.8:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fatal
LBB0_9:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.10:
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.11:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_13
; %bb.12:
	mov	w1, #0
	bl	_fsync_fname
LBB0_13:
	str	xzr, [x19, #8]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_archModeWrite,8,3              ; @archModeWrite
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not determine seek position in archive file: %m"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.1:                               ; @.str.1
	.asciz	"could not close archive file: %m"

	.no_dead_strip	__CloseArchive
.subsections_via_symbols
