	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function switch_branches
_switch_branches:                       ## @switch_branches
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movl	$0, -44(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_trace2_cmd_mode
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	L_.str.1(%rip), %r12
	leaq	-48(%rbp), %rdx
	leaq	-76(%rbp), %rcx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_resolve_refdup
	movq	%rax, %r15
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	movl	$1, %edx
	callq	_lookup_commit_reference_gently
	movq	%rax, -64(%rbp)
LBB0_2:
	movq	_REF_ISSYMREF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -76(%rbp)
	je	LBB0_3
## %bb.4:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	leaq	-72(%rbp), %rdx
	callq	_skip_prefix
LBB0_6:
	cmpq	$0, 24(%r14)
	jne	LBB0_7
	jmp	LBB0_11
LBB0_3:
	movq	$0, -56(%rbp)
	cmpq	$0, 24(%r14)
	je	LBB0_11
LBB0_7:
	cmpq	$0, 16(%r14)
	je	LBB0_11
## %bb.8:
	cmpq	$0, (%r13)
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rdi
	callq	_BUG
LBB0_10:
	movq	$0, 8(%r13)
	leaq	L_.str.4(%rip), %rax
	movq	%rax, (%r13)
LBB0_11:
	cmpq	$0, (%r13)
	je	LBB0_12
LBB0_15:
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_merge_working_tree
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_23
LBB0_12:
	movq	%r12, (%r13)
	movq	-64(%rbp), %rdi
	movq	%rdi, 8(%r13)
	testq	%rdi, %rdi
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die
	movq	8(%r13), %rdi
LBB0_14:
	callq	_parse_commit_or_die
	cmpq	$0, 8(%r14)
	je	LBB0_15
LBB0_17:
	cmpl	$0, (%r14)
	jne	LBB0_22
## %bb.18:
	cmpq	$0, -56(%rbp)
	jne	LBB0_22
## %bb.19:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.20:
	movq	8(%r13), %rsi
	cmpq	%rdi, %rsi
	je	LBB0_22
## %bb.21:
	callq	_orphaned_commit_warning
LBB0_22:
	leaq	-72(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_update_refs_for_switch
	movq	-64(%rbp), %rdi
	movq	8(%r13), %rsi
	movl	$1, %edx
	callq	_post_checkout_hook
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_free
	xorl	%ebx, %ebx
	orl	-44(%rbp), %r14d
	setne	%bl
LBB0_23:
	movl	%ebx, %eax
	addq	$40, %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	"branch"

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

	.comm	_the_repository,4,2             ## @the_repository
	.comm	_REF_ISSYMREF,4,2               ## @REF_ISSYMREF
L_.str.2:                               ## @.str.2
	.asciz	"refs/heads/"

L_.str.3:                               ## @.str.3
	.asciz	"'switch --orphan' should never accept a commit as starting point"

L_.str.4:                               ## @.str.4
	.asciz	"(empty)"

L_.str.5:                               ## @.str.5
	.asciz	"You are on a branch yet to be born"

	.no_dead_strip	_switch_branches
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function switch_branches
_switch_branches:                       ; @switch_branches
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
	str	wzr, [sp, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trace2_cmd_mode
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
	add	x2, sp, #16
	add	x3, sp, #12
	mov	x0, x22
	mov	w1, #0
	bl	_resolve_refdup
	mov	x21, x0
	str	x0, [sp, #40]
	cbz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _the_repository@GOTPAGE
Lloh5:
	ldr	x8, [x8, _the_repository@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	add	x1, sp, #16
	mov	w2, #1
	bl	_lookup_commit_reference_gently
	str	x0, [sp, #32]
LBB0_2:
	ldr	w8, [sp, #12]
Lloh7:
	adrp	x9, _REF_ISSYMREF@GOTPAGE
Lloh8:
	ldr	x9, [x9, _REF_ISSYMREF@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
	ldr	x0, [sp, #40]
	cbz	x0, LBB0_5
; %bb.4:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #24
	bl	_skip_prefix
LBB0_5:
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_7
	b	LBB0_11
LBB0_6:
	str	xzr, [sp, #40]
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_11
LBB0_7:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_11
; %bb.8:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_BUG
LBB0_10:
Lloh14:
	adrp	x8, l_.str.4@PAGE
Lloh15:
	add	x8, x8, l_.str.4@PAGEOFF
	stp	x8, xzr, [x19]
LBB0_11:
	ldr	x8, [x19]
	cbz	x8, LBB0_14
LBB0_12:
	add	x1, sp, #24
	add	x3, sp, #8
	mov	x0, x20
	mov	x2, x19
	bl	_merge_working_tree
	cbz	w0, LBB0_17
; %bb.13:
	mov	x22, x0
	mov	x0, x21
	bl	_free
	b	LBB0_23
LBB0_14:
	ldr	x0, [sp, #32]
	stp	x22, x0, [x19]
	cbnz	x0, LBB0_16
; %bb.15:
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	__
	bl	_die
	ldr	x0, [x19, #8]
LBB0_16:
	bl	_parse_commit_or_die
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_12
LBB0_17:
	ldr	w8, [x20]
	cbnz	w8, LBB0_22
; %bb.18:
	ldr	x8, [sp, #40]
	cbnz	x8, LBB0_22
; %bb.19:
	ldr	x0, [sp, #32]
	cbz	x0, LBB0_22
; %bb.20:
	ldr	x1, [x19, #8]
	cmp	x1, x0
	b.eq	LBB0_22
; %bb.21:
	bl	_orphaned_commit_warning
LBB0_22:
	add	x1, sp, #24
	mov	x0, x20
	mov	x2, x19
	bl	_update_refs_for_switch
	ldr	x0, [sp, #32]
	ldr	x1, [x19, #8]
	mov	w2, #1
	bl	_post_checkout_hook
	mov	x19, x0
	mov	x0, x21
	bl	_free
	ldr	w8, [sp, #8]
	orr	w8, w19, w8
	cmp	w8, #0
	cset	w22, ne
LBB0_23:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"branch"

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

	.comm	_the_repository,4,2             ; @the_repository
	.comm	_REF_ISSYMREF,4,2               ; @REF_ISSYMREF
l_.str.2:                               ; @.str.2
	.asciz	"refs/heads/"

l_.str.3:                               ; @.str.3
	.asciz	"'switch --orphan' should never accept a commit as starting point"

l_.str.4:                               ; @.str.4
	.asciz	"(empty)"

l_.str.5:                               ; @.str.5
	.asciz	"You are on a branch yet to be born"

	.no_dead_strip	_switch_branches
.subsections_via_symbols
