	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_reset
_do_reset:                              ## @do_reset
	.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, %r14
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movq	_LOCK_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_LOCK_REPORT_ON_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	callq	_repo_hold_locked_index
	movl	$-1, %r15d
	testq	%rax, %rax
	js	LBB0_31
## %bb.1:
	cmpl	$10, %ebx
	jne	LBB0_9
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movl	$10, %edx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	cmpl	$0, (%r14)
	je	LBB0_4
LBB0_19:
	leaq	4(%r14), %rsi
	leaq	-56(%rbp), %rdi
	callq	_oidcpy
	movl	$10, %ebx
	jmp	LBB0_20
LBB0_9:
	testl	%ebx, %ebx
	jle	LBB0_10
LBB0_11:
	movq	%r14, %r15
	movl	%ebx, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movsbl	(%r13,%rbx), %edi
	callq	_isspace
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_12
## %bb.14:
	movl	%r14d, %ebx
LBB0_15:
	movq	%r15, %r14
	movl	$-1, %r15d
	jmp	LBB0_16
LBB0_10:
	xorl	%ebx, %ebx
LBB0_16:
	leaq	L_.str.4(%rip), %rsi
	leaq	-64(%rbp), %rdi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_strbuf_addf
	movq	-64(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_get_oid
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	movq	-64(%rbp), %rdi
	addq	$15, %rdi
	leaq	-56(%rbp), %rsi
	callq	_get_oid
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	leaq	L_.str.6(%rip), %rdi
	callq	__
	movq	-64(%rbp), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_error
	leaq	-48(%rbp), %rdi
	callq	_rollback_lock_file
	jmp	LBB0_30
LBB0_20:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	leaq	-104(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	callq	_setup_unpack_trees_porcelain
	movl	$1, -104(%rbp)
	movl	(%r12), %eax
	movl	%eax, -84(%rbp)
	movl	%eax, -88(%rbp)
	movq	_oneway_merge@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -100(%rbp)
	movq	%r12, %rdi
	callq	_repo_read_index_unmerged
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	leaq	-48(%rbp), %rdi
	callq	_rollback_lock_file
	leaq	-64(%rbp), %rdi
	callq	_strbuf_release
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_action_name
	movq	%rax, %rdi
	callq	__
	movl	%eax, %edi
	callq	_error_resolve_conflict
	movl	%eax, %r15d
	jmp	LBB0_31
LBB0_22:
	leaq	-72(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	callq	_fill_tree_descriptor
	testl	%eax, %eax
	je	LBB0_23
## %bb.24:
	leaq	-72(%rbp), %rsi
	leaq	-104(%rbp), %rdx
	movl	$1, %edi
	callq	_unpack_trees
	testq	%rax, %rax
	jne	LBB0_25
## %bb.26:
	leaq	-56(%rbp), %rdi
	callq	_parse_tree_indirect
	movl	(%r12), %esi
	movq	%r12, %rdi
	movq	%rax, %rdx
	callq	_prime_cache_tree
	movl	(%r12), %edi
	movq	_COMMIT_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	callq	_write_locked_index
	testq	%rax, %rax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	js	LBB0_28
## %bb.27:
	movq	-72(%rbp), %rdi
	callq	_free
LBB0_29:
	leaq	L_.str.7(%rip), %rsi
	leaq	L_.str.10(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movq	%r13, %r8
	callq	_reflog_message
	movq	_UPDATE_REFS_MSG_ON_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	leaq	L_.str.11(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_update_ref
	movl	%eax, %r15d
	jmp	LBB0_30
LBB0_23:
	leaq	L_.str.8(%rip), %rdi
	callq	__
	movl	%eax, %ebx
	leaq	-56(%rbp), %rdi
	callq	_oid_to_hex
	movl	%ebx, %edi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_error
LBB0_25:
	leaq	-48(%rbp), %rdi
	callq	_rollback_lock_file
	movq	-72(%rbp), %rdi
	callq	_free
LBB0_30:
	leaq	-64(%rbp), %rdi
	callq	_strbuf_release
LBB0_31:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_the_hash_algo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	leaq	4(%r14), %rbx
	movq	$0, (%rsp)
	leaq	L_.str.1(%rip), %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	xorl	%r9d, %r9d
	callq	_commit_tree
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_7:
	movl	$1, (%r14)
	movq	%rbx, %rdi
	callq	_oid_to_hex
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_strlen
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	callq	_rebase_path_squash_onto
	movq	%rbx, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_write_message
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
LBB0_6:
	callq	__
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_error
	movl	%eax, %r15d
	jmp	LBB0_31
LBB0_28:
	leaq	L_.str.9(%rip), %rdi
	callq	__
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_error
	movl	%eax, %r15d
	movq	-72(%rbp), %rdi
	callq	_free
	testl	%r15d, %r15d
	jne	LBB0_30
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,8,3                ## @STRBUF_INIT
	.comm	_LOCK_INIT,4,2                  ## @LOCK_INIT
	.comm	_LOCK_REPORT_ON_ERROR,4,2       ## @LOCK_REPORT_ON_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[new root]"

L_.str.1:                               ## @.str.1
	.space	1

	.comm	_the_hash_algo,8,3              ## @the_hash_algo
L_.str.2:                               ## @.str.2
	.asciz	"writing fake root commit"

L_.str.3:                               ## @.str.3
	.asciz	"writing squash-onto"

L_.str.4:                               ## @.str.4
	.asciz	"refs/rewritten/%.*s"

L_.str.6:                               ## @.str.6
	.asciz	"could not read '%s'"

L_.str.7:                               ## @.str.7
	.asciz	"reset"

	.comm	_oneway_merge,4,2               ## @oneway_merge
L_.str.8:                               ## @.str.8
	.asciz	"failed to find tree of %s"

	.comm	_COMMIT_LOCK,4,2                ## @COMMIT_LOCK
L_.str.9:                               ## @.str.9
	.asciz	"could not write index"

L_.str.10:                              ## @.str.10
	.asciz	"'%.*s'"

L_.str.11:                              ## @.str.11
	.asciz	"HEAD"

	.comm	_UPDATE_REFS_MSG_ON_ERR,4,2     ## @UPDATE_REFS_MSG_ON_ERR
	.no_dead_strip	_do_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_reset
_do_reset:                              ; @do_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _LOCK_INIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LOCK_INIT@GOTPAGEOFF]
	str	x8, [sp, #56]
Lloh5:
	ldr	w8, [x9]
	str	w8, [sp, #40]
Lloh6:
	adrp	x8, _LOCK_REPORT_ON_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LOCK_REPORT_ON_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x1, sp, #40
	bl	_repo_hold_locked_index
	tbnz	x0, #63, LBB0_25
; %bb.1:
	cmp	w23, #10
	b.ne	LBB0_5
; %bb.2:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	w2, #10
	bl	_strncmp
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w8, [x19]
	cbz	w8, LBB0_27
LBB0_4:
	add	x1, x19, #4
	add	x0, sp, #48
	bl	_oidcpy
	mov	w22, #10
	b	LBB0_14
LBB0_5:
	cmp	w23, #1
	b.lt	LBB0_10
LBB0_6:
	mov	x22, #0
	mov	w23, w23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x20, x22]
	bl	_isspace
	cbnz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	cmp	x23, x22
	b.ne	LBB0_7
; %bb.9:
	mov	x22, x23
	b	LBB0_11
LBB0_10:
	mov	w22, #0
LBB0_11:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x0, sp, #56
	mov	x2, x22
	mov	x3, x20
	bl	_strbuf_addf
	ldr	x0, [sp, #56]
	add	x1, sp, #48
	bl	_get_oid
	cbz	x0, LBB0_14
; %bb.12:
	ldr	x8, [sp, #56]
	add	x0, x8, #15
	add	x1, sp, #48
	bl	_get_oid
	cbz	x0, LBB0_14
; %bb.13:
Lloh13:
	adrp	x0, l_.str.6@PAGE
Lloh14:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	__
	ldr	x8, [sp, #56]
	str	x8, [sp]
	bl	_error
	add	x0, sp, #40
	bl	_rollback_lock_file
	b	LBB0_24
LBB0_14:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh15:
	adrp	x1, l_.str.7@PAGE
Lloh16:
	add	x1, x1, l_.str.7@PAGEOFF
	add	x0, sp, #8
	bl	_setup_unpack_trees_porcelain
	ldr	w8, [x21]
	stp	w8, w8, [sp, #24]
Lloh17:
	adrp	x8, _oneway_merge@GOTPAGE
Lloh18:
	ldr	x8, [x8, _oneway_merge@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	movi.2s	v0, #1
	str	d0, [sp, #8]
	mov	w9, #1
	stp	w9, w8, [sp, #16]
	mov	x0, x21
	bl	_repo_read_index_unmerged
	cbz	x0, LBB0_16
; %bb.15:
	add	x0, sp, #40
	bl	_rollback_lock_file
	add	x0, sp, #56
	bl	_strbuf_release
	mov	x0, x19
	bl	_action_name
	bl	__
	bl	_error_resolve_conflict
	mov	x21, x0
	b	LBB0_26
LBB0_16:
	add	x1, sp, #32
	add	x2, sp, #48
	mov	x0, x21
	bl	_fill_tree_descriptor
	cbz	w0, LBB0_22
; %bb.17:
	add	x1, sp, #32
	add	x2, sp, #8
	mov	w0, #1
	bl	_unpack_trees
	cbnz	x0, LBB0_23
; %bb.18:
	add	x0, sp, #48
	bl	_parse_tree_indirect
	mov	x2, x0
	ldr	w1, [x21]
	mov	x0, x21
	bl	_prime_cache_tree
	ldr	w0, [x21]
Lloh20:
	adrp	x8, _COMMIT_LOCK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _COMMIT_LOCK@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x1, sp, #40
	bl	_write_locked_index
	tbnz	x0, #63, LBB0_32
; %bb.19:
	ldr	x0, [sp, #32]
	bl	_free
LBB0_20:
Lloh23:
	adrp	x1, l_.str.7@PAGE
Lloh24:
	add	x1, x1, l_.str.7@PAGEOFF
Lloh25:
	adrp	x2, l_.str.10@PAGE
Lloh26:
	add	x2, x2, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	mov	x4, x20
	bl	_reflog_message
Lloh27:
	adrp	x8, _UPDATE_REFS_MSG_ON_ERR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _UPDATE_REFS_MSG_ON_ERR@GOTPAGEOFF]
Lloh29:
	ldr	w5, [x8]
Lloh30:
	adrp	x1, l_.str.11@PAGE
Lloh31:
	add	x1, x1, l_.str.11@PAGEOFF
	add	x2, sp, #48
	mov	x3, #0
	mov	w4, #0
	bl	_update_ref
	mov	x21, x0
LBB0_21:
	add	x0, sp, #56
	bl	_strbuf_release
	b	LBB0_26
LBB0_22:
Lloh32:
	adrp	x0, l_.str.8@PAGE
Lloh33:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	__
	mov	x19, x0
	add	x0, sp, #48
	bl	_oid_to_hex
	str	x0, [sp]
	mov	x0, x19
	bl	_error
LBB0_23:
	add	x0, sp, #40
	bl	_rollback_lock_file
	ldr	x0, [sp, #32]
	bl	_free
LBB0_24:
	add	x0, sp, #56
	bl	_strbuf_release
LBB0_25:
	mov	w21, #-1
LBB0_26:
	mov	x0, x21
	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
	add	sp, sp, #128
	ret
LBB0_27:
Lloh34:
	adrp	x8, _the_hash_algo@GOTPAGE
Lloh35:
	ldr	x8, [x8, _the_hash_algo@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	ldr	w2, [x8]
	add	x22, x19, #4
Lloh37:
	adrp	x0, l_.str.1@PAGE
Lloh38:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #0
	mov	x3, #0
	mov	x4, x22
	mov	x5, #0
	mov	x6, #0
	bl	_commit_tree
	cbz	x0, LBB0_29
; %bb.28:
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_31
LBB0_29:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x22
	bl	_oid_to_hex
	mov	x22, x0
	bl	_strlen
	mov	x23, x0
	bl	_rebase_path_squash_onto
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	mov	w3, #0
	bl	_write_message
	cbz	x0, LBB0_4
; %bb.30:
Lloh41:
	adrp	x0, l_.str.3@PAGE
Lloh42:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_31:
	bl	__
	bl	_error
	mov	x21, x0
	b	LBB0_26
LBB0_32:
Lloh43:
	adrp	x0, l_.str.9@PAGE
Lloh44:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	__
	bl	_error
	mov	x21, x0
	ldr	x0, [sp, #32]
	bl	_free
	cbnz	w21, LBB0_21
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,8,3                ; @STRBUF_INIT
	.comm	_LOCK_INIT,4,2                  ; @LOCK_INIT
	.comm	_LOCK_REPORT_ON_ERROR,4,2       ; @LOCK_REPORT_ON_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[new root]"

l_.str.1:                               ; @.str.1
	.space	1

	.comm	_the_hash_algo,8,3              ; @the_hash_algo
l_.str.2:                               ; @.str.2
	.asciz	"writing fake root commit"

l_.str.3:                               ; @.str.3
	.asciz	"writing squash-onto"

l_.str.4:                               ; @.str.4
	.asciz	"refs/rewritten/%.*s"

l_.str.6:                               ; @.str.6
	.asciz	"could not read '%s'"

l_.str.7:                               ; @.str.7
	.asciz	"reset"

	.comm	_oneway_merge,4,2               ; @oneway_merge
l_.str.8:                               ; @.str.8
	.asciz	"failed to find tree of %s"

	.comm	_COMMIT_LOCK,4,2                ; @COMMIT_LOCK
l_.str.9:                               ; @.str.9
	.asciz	"could not write index"

l_.str.10:                              ; @.str.10
	.asciz	"'%.*s'"

l_.str.11:                              ; @.str.11
	.asciz	"HEAD"

	.comm	_UPDATE_REFS_MSG_ON_ERR,4,2     ; @UPDATE_REFS_MSG_ON_ERR
	.no_dead_strip	_do_reset
.subsections_via_symbols
