	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_normalize_glob_ref             ## -- Begin function normalize_glob_ref
	.p2align	4, 0x90
_normalize_glob_ref:                    ## @normalize_glob_ref
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	cmpb	$47, (%rdx)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_BUG
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	leaq	-40(%rbp), %rdi
	movq	%rbx, %rsi
LBB0_6:
	callq	_strbuf_addstr
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_starts_with
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_strbuf_addstr
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strbuf_strip_suffix
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movq	%rax, (%r14)
	movq	%r15, %rdi
	callq	_has_glob_specials
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	(%r14), %r12
LBB0_9:
	movq	%r12, 8(%r14)
	leaq	-40(%rbp), %rdi
	callq	_strbuf_release
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	leaq	-40(%rbp), %rdi
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pattern must not start with '/'"

L_.str.1:                               ## @.str.1
	.asciz	"refs/"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_normalize_glob_ref             ; -- Begin function normalize_glob_ref
	.p2align	2
_normalize_glob_ref:                    ; @normalize_glob_ref
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldrb	w8, [x2]
	cmp	w8, #47
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BUG
LBB0_2:
	cbz	x21, LBB0_5
; %bb.3:
	add	x0, sp, #8
	mov	x1, x21
LBB0_4:
	bl	_strbuf_addstr
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_starts_with
	cbz	w0, LBB0_9
LBB0_6:
	add	x0, sp, #8
	mov	x1, x20
	bl	_strbuf_addstr
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #8
	bl	_strbuf_strip_suffix
	add	x0, sp, #8
	mov	x1, #0
	bl	_strbuf_detach
	str	x0, [x19]
	mov	x0, x20
	bl	_has_glob_specials
	mov	x8, #0
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x19]
LBB0_8:
	str	x8, [x19, #8]
	add	x0, sp, #8
	bl	_strbuf_release
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #8
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pattern must not start with '/'"

l_.str.1:                               ; @.str.1
	.asciz	"refs/"

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

.subsections_via_symbols
