	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function final
_final:                                 ## @final
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %r15
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rax
	movq	%rax, -72(%rbp)
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movq	%rax, -56(%rbp)
	movq	_from_stdin@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	je	LBB0_1
## %bb.2:
	movq	_output_fd@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_fsync_or_die
	movl	(%r12), %edi
	callq	_close
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die_errno
	jmp	LBB0_4
LBB0_1:
	movq	_input_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_close
LBB0_4:
	movq	16(%rbp), %r12
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	leaq	-72(%rbp), %r8
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_write_special_file
LBB0_6:
	testq	%r14, %r14
	movq	%r13, %r15
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_write_special_file
LBB0_8:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rbx
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_13
## %bb.9:
	testq	%rbx, %rbx
	jne	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rdx
	leaq	-64(%rbp), %rdi
	movq	%rcx, %rbx
	movq	%r12, %rsi
	callq	_odb_pack_name
	movq	%rbx, %rcx
	movq	%rax, %rbx
LBB0_11:
	movq	%rcx, %rdi
	movq	%rbx, %rsi
	callq	_finalize_object_file
	testq	%rax, %rax
	movq	_from_stdin@GOTPCREL(%rip), %r14
	je	LBB0_15
## %bb.12:
	leaq	L_.str.4(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die
	jmp	LBB0_15
LBB0_13:
	movq	_from_stdin@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	movl	$292, %esi                      ## imm = 0x124
	callq	_chmod
LBB0_15:
	cmpq	%r13, %r15
	je	LBB0_20
## %bb.16:
	testq	%r15, %r15
	jne	LBB0_18
## %bb.17:
	leaq	L_.str.5(%rip), %rdx
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	callq	_odb_pack_name
	movq	%rax, %r15
LBB0_18:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_finalize_object_file
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	leaq	L_.str.6(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die
	jmp	LBB0_21
LBB0_20:
	movq	%r15, %rdi
	movl	$292, %esi                      ## imm = 0x124
	callq	_chmod
LBB0_21:
	movq	_do_fsck_object@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_24
## %bb.22:
	movq	%r15, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_add_packed_git
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	_the_repository@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	callq	_install_packed_git
LBB0_24:
	cmpq	$0, (%r14)
	je	LBB0_25
## %bb.26:
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	-72(%rbp), %rbx
	movq	%r12, %rdi
	callq	_hash_to_hex
	leaq	L_.str.8(%rip), %rsi
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	callq	_strbuf_addf
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	movl	$1, %edi
	callq	_write_or_die
	movq	%r14, %rdi
	callq	_strbuf_release
	movq	_input_len@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_30
## %bb.27:
	movq	_input_offset@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	_input_buffer@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	addq	(%r15), %rsi
	movl	$1, %edi
	callq	_xwrite
	testl	%eax, %eax
	jle	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	movl	%eax, %eax
	movq	(%r14), %rdx
	movq	(%rbx), %rsi
	addq	%rax, %rsi
	movq	%rsi, (%rbx)
	subq	%rax, %rdx
	movq	%rdx, (%r14)
	jne	LBB0_28
	jmp	LBB0_30
LBB0_25:
	movq	%r12, %rdi
	callq	_hash_to_hex
	leaq	L_.str.7(%rip), %rdi
	movq	%rax, %rsi
	callq	_printf
LBB0_30:
	leaq	-56(%rbp), %rdi
	callq	_strbuf_release
	leaq	-64(%rbp), %rdi
	callq	_strbuf_release
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pack"

	.comm	_STRBUF_INIT,8,2                ## @STRBUF_INIT
	.comm	_from_stdin,8,3                 ## @from_stdin
	.comm	_input_fd,4,2                   ## @input_fd
	.comm	_output_fd,4,2                  ## @output_fd
L_.str.1:                               ## @.str.1
	.asciz	"error while closing pack file"

L_.str.2:                               ## @.str.2
	.asciz	"keep"

L_.str.3:                               ## @.str.3
	.asciz	"promisor"

L_.str.4:                               ## @.str.4
	.asciz	"cannot store pack file"

L_.str.5:                               ## @.str.5
	.asciz	"idx"

L_.str.6:                               ## @.str.6
	.asciz	"cannot store index file"

	.comm	_do_fsck_object,8,3             ## @do_fsck_object
	.comm	_the_repository,4,2             ## @the_repository
L_.str.7:                               ## @.str.7
	.asciz	"%s\n"

L_.str.8:                               ## @.str.8
	.asciz	"%s\t%s\n"

	.comm	_input_len,8,3                  ## @input_len
	.comm	_input_buffer,8,3               ## @input_buffer
	.comm	_input_offset,8,3               ## @input_offset
	.no_dead_strip	_final
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function final
_final:                                 ; @final
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x6
	mov	x24, x5
	mov	x25, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [sp, #24]
Lloh2:
	adrp	x26, _STRBUF_INIT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _STRBUF_INIT@GOTPAGEOFF]
	ldr	x8, [x26]
	stp	x8, x8, [sp, #8]
Lloh4:
	adrp	x27, _from_stdin@GOTPAGE
Lloh5:
	ldr	x27, [x27, _from_stdin@GOTPAGEOFF]
	ldr	x8, [x27]
	cbz	x8, LBB0_12
; %bb.1:
Lloh6:
	adrp	x28, _output_fd@GOTPAGE
Lloh7:
	ldr	x28, [x28, _output_fd@GOTPAGEOFF]
	ldr	w0, [x28]
	mov	x1, x22
	bl	_fsync_or_die
	ldr	w0, [x28]
	bl	_close
	cbz	w0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	bl	_die_errno
LBB0_3:
	cbz	x25, LBB0_5
LBB0_4:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x4, sp, #24
	mov	x1, x25
	mov	x2, x23
	mov	x3, x19
	bl	_write_special_file
LBB0_5:
	cbz	x24, LBB0_7
; %bb.6:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x24
	mov	x2, x23
	mov	x3, x19
	mov	x4, #0
	bl	_write_special_file
LBB0_7:
	cmp	x23, x22
	b.eq	LBB0_13
; %bb.8:
	cbnz	x23, LBB0_10
; %bb.9:
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #16
	mov	x1, x19
	bl	_odb_pack_name
	mov	x23, x0
LBB0_10:
	mov	x0, x22
	mov	x1, x23
	bl	_finalize_object_file
	cbz	x0, LBB0_15
; %bb.11:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	__
	bl	_die
	b	LBB0_15
LBB0_12:
Lloh18:
	adrp	x8, _input_fd@GOTPAGE
Lloh19:
	ldr	x8, [x8, _input_fd@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_close
	cbnz	x25, LBB0_4
	b	LBB0_5
LBB0_13:
	ldr	x8, [x27]
	cbz	x8, LBB0_15
; %bb.14:
	mov	x0, x23
	mov	w1, #292
	bl	_chmod
LBB0_15:
	cmp	x20, x21
	b.eq	LBB0_20
; %bb.16:
	cbnz	x20, LBB0_18
; %bb.17:
Lloh21:
	adrp	x2, l_.str.5@PAGE
Lloh22:
	add	x2, x2, l_.str.5@PAGEOFF
	add	x0, sp, #8
	mov	x1, x19
	bl	_odb_pack_name
	mov	x20, x0
LBB0_18:
	mov	x0, x21
	mov	x1, x20
	bl	_finalize_object_file
	cbz	x0, LBB0_21
; %bb.19:
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	__
	bl	_die
	b	LBB0_21
LBB0_20:
	mov	x0, x20
	mov	w1, #292
	bl	_chmod
LBB0_21:
Lloh25:
	adrp	x8, _do_fsck_object@GOTPAGE
Lloh26:
	ldr	x8, [x8, _do_fsck_object@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.22:
	mov	x0, x20
	bl	_strlen
	mov	x1, x0
	mov	x0, x20
	mov	w2, #0
	bl	_add_packed_git
	cbz	x0, LBB0_24
; %bb.23:
	mov	x1, x0
Lloh28:
	adrp	x8, _the_repository@GOTPAGE
Lloh29:
	ldr	x8, [x8, _the_repository@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_install_packed_git
LBB0_24:
	ldr	x8, [x27]
	cbz	x8, LBB0_29
; %bb.25:
	ldr	x8, [x26]
	str	x8, [sp]
	ldr	x20, [sp, #24]
	mov	x0, x19
	bl	_hash_to_hex
	mov	x3, x0
Lloh31:
	adrp	x1, l_.str.8@PAGE
Lloh32:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, sp
	mov	x2, x20
	bl	_strbuf_addf
	ldp	w2, w1, [sp]
	mov	w0, #1
	bl	_write_or_die
	mov	x0, sp
	bl	_strbuf_release
Lloh33:
	adrp	x19, _input_len@GOTPAGE
Lloh34:
	ldr	x19, [x19, _input_len@GOTPAGEOFF]
	ldr	x2, [x19]
	cbz	x2, LBB0_30
; %bb.26:
Lloh35:
	adrp	x20, _input_offset@GOTPAGE
Lloh36:
	ldr	x20, [x20, _input_offset@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh37:
	adrp	x21, _input_buffer@GOTPAGE
Lloh38:
	ldr	x21, [x21, _input_buffer@GOTPAGEOFF]
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	add	x1, x8, x9
	mov	w0, #1
	bl	_xwrite
	cmp	w0, #1
	b.lt	LBB0_30
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	mov	w9, w0
	ldr	x10, [x19]
	ldr	x8, [x20]
	add	x8, x8, x9
	str	x8, [x20]
	subs	x2, x10, x9
	str	x2, [x19]
	b.ne	LBB0_27
	b	LBB0_30
LBB0_29:
	mov	x0, x19
	bl	_hash_to_hex
	mov	x1, x0
Lloh39:
	adrp	x0, l_.str.7@PAGE
Lloh40:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_printf
LBB0_30:
	add	x0, sp, #8
	bl	_strbuf_release
	add	x0, sp, #16
	bl	_strbuf_release
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pack"

	.comm	_STRBUF_INIT,8,2                ; @STRBUF_INIT
	.comm	_from_stdin,8,3                 ; @from_stdin
	.comm	_input_fd,4,2                   ; @input_fd
	.comm	_output_fd,4,2                  ; @output_fd
l_.str.1:                               ; @.str.1
	.asciz	"error while closing pack file"

l_.str.2:                               ; @.str.2
	.asciz	"keep"

l_.str.3:                               ; @.str.3
	.asciz	"promisor"

l_.str.4:                               ; @.str.4
	.asciz	"cannot store pack file"

l_.str.5:                               ; @.str.5
	.asciz	"idx"

l_.str.6:                               ; @.str.6
	.asciz	"cannot store index file"

	.comm	_do_fsck_object,8,3             ; @do_fsck_object
	.comm	_the_repository,4,2             ; @the_repository
l_.str.7:                               ; @.str.7
	.asciz	"%s\n"

l_.str.8:                               ; @.str.8
	.asciz	"%s\t%s\n"

	.comm	_input_len,8,3                  ; @input_len
	.comm	_input_buffer,8,3               ; @input_buffer
	.comm	_input_offset,8,3               ; @input_offset
	.no_dead_strip	_final
.subsections_via_symbols
