	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_gitfile_gently            ## -- Begin function read_gitfile_gently
	.p2align	4, 0x90
_read_gitfile_gently:                   ## @read_gitfile_gently
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	-48(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_READ_GITFILE_ERR_STAT_FAILED@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
LBB0_24:
	movl	(%rax), %ebx
	testq	%r14, %r14
	je	LBB0_25
## %bb.30:
	movl	%ebx, (%r14)
	movq	%r12, %rdi
	callq	_free
	testl	%ebx, %ebx
	jne	LBB0_31
	jmp	LBB0_32
LBB0_3:
	movl	-44(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	cmpl	$1048576, -48(%rbp)             ## imm = 0x100000
	jle	LBB0_7
## %bb.6:
	movq	_READ_GITFILE_ERR_TOO_LARGE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_25:
	testl	%ebx, %ebx
	je	LBB0_29
## %bb.26:
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_read_gitfile_error_die
	movq	%r12, %rdi
	callq	_free
LBB0_31:
	xorl	%r15d, %r15d
LBB0_32:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_READ_GITFILE_ERR_NOT_A_FILE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	%eax, %ebx
	movl	-48(%rbp), %edi
	callq	_xmallocz
	movq	%rax, %r12
	movl	-48(%rbp), %edx
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_read_in_full
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_close
	cmpl	-48(%rbp), %r13d
	jne	LBB0_10
## %bb.11:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_starts_with
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movslq	%r13d, %rbx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	decq	%rbx
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movzbl	-1(%r12,%rbx), %eax
	cmpb	$13, %al
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpb	$10, %al
	je	LBB0_16
## %bb.17:
	cmpl	$9, %ebx
	jge	LBB0_19
## %bb.18:
	movq	_READ_GITFILE_ERR_NO_PATH@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_24
LBB0_8:
	movq	_READ_GITFILE_ERR_OPEN_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_10:
	movq	_READ_GITFILE_ERR_READ_FAILED@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_24
LBB0_12:
	movq	_READ_GITFILE_ERR_INVALID_FORMAT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_24
LBB0_19:
	movl	%ebx, %eax
	movb	$0, (%r12,%rax)
	movq	%r12, %r13
	addq	$8, %r13
	movq	%r13, %rdi
	callq	_is_absolute_path
	testl	%eax, %eax
	jne	LBB0_22
## %bb.20:
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	subl	%r15d, %eax
	incl	%eax
	leal	-8(%rbx), %ecx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	movq	%r13, %r8
	callq	_xstrfmt
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_free
	movq	%r13, %r12
LBB0_22:
	movq	%r13, %rdi
	callq	_is_git_directory
	testl	%eax, %eax
	je	LBB0_23
## %bb.27:
	movq	%r13, %rdi
	callq	_real_path
	movq	%rax, %r15
	testq	%r14, %r14
	je	LBB0_29
## %bb.28:
	movl	$0, (%r14)
LBB0_29:
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_32
LBB0_23:
	movq	_READ_GITFILE_ERR_NOT_A_REPO@GOTPCREL(%rip), %rax
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_READ_GITFILE_ERR_STAT_FAILED,4,2 ## @READ_GITFILE_ERR_STAT_FAILED
	.comm	_READ_GITFILE_ERR_NOT_A_FILE,4,2 ## @READ_GITFILE_ERR_NOT_A_FILE
	.comm	_READ_GITFILE_ERR_TOO_LARGE,4,2 ## @READ_GITFILE_ERR_TOO_LARGE
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_READ_GITFILE_ERR_OPEN_FAILED,4,2 ## @READ_GITFILE_ERR_OPEN_FAILED
	.comm	_READ_GITFILE_ERR_READ_FAILED,4,2 ## @READ_GITFILE_ERR_READ_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gitdir: "

	.comm	_READ_GITFILE_ERR_INVALID_FORMAT,4,2 ## @READ_GITFILE_ERR_INVALID_FORMAT
	.comm	_READ_GITFILE_ERR_NO_PATH,4,2   ## @READ_GITFILE_ERR_NO_PATH
L_.str.1:                               ## @.str.1
	.asciz	"%.*s%.*s"

	.comm	_READ_GITFILE_ERR_NOT_A_REPO,4,2 ## @READ_GITFILE_ERR_NOT_A_REPO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_gitfile_gently            ; -- Begin function read_gitfile_gently
	.p2align	2
_read_gitfile_gently:                   ; @read_gitfile_gently
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	add	x1, sp, #8
	bl	_stat
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, #0
	mov	x21, #0
Lloh0:
	adrp	x8, _READ_GITFILE_ERR_STAT_FAILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _READ_GITFILE_ERR_STAT_FAILED@GOTPAGEOFF]
LBB0_2:
	ldr	w23, [x8]
	cbz	x20, LBB0_7
; %bb.3:
	str	w23, [x20]
	mov	x0, x21
	bl	_free
	cbnz	w23, LBB0_9
	b	LBB0_10
LBB0_4:
	ldr	w0, [sp, #12]
	bl	_S_ISREG
	cbz	w0, LBB0_11
; %bb.5:
	ldr	w8, [sp, #8]
	cmp	w8, #256, lsl #12               ; =1048576
	b.le	LBB0_12
; %bb.6:
	mov	x22, #0
	mov	x21, #0
Lloh2:
	adrp	x8, _READ_GITFILE_ERR_TOO_LARGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _READ_GITFILE_ERR_TOO_LARGE@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
	cbz	w23, LBB0_29
; %bb.8:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x22
	bl	_read_gitfile_error_die
	mov	x0, x21
	bl	_free
LBB0_9:
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	mov	x22, #0
	mov	x21, #0
Lloh4:
	adrp	x8, _READ_GITFILE_ERR_NOT_A_FILE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _READ_GITFILE_ERR_NOT_A_FILE@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
Lloh6:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	tbnz	w0, #31, LBB0_18
; %bb.13:
	mov	x22, x0
	ldr	w0, [sp, #8]
	bl	_xmallocz
	mov	x21, x0
	ldr	w2, [sp, #8]
	mov	x0, x22
	mov	x1, x21
	bl	_read_in_full
	mov	x23, x0
	mov	x0, x22
	bl	_close
	ldr	w8, [sp, #8]
	cmp	w23, w8
	b.ne	LBB0_19
; %bb.14:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_starts_with
	cbz	w0, LBB0_22
; %bb.15:
	sxtw	x23, w23
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x21, x23
	ldurb	w8, [x8, #-1]
	cmp	w8, #13
	ccmp	w8, #10, #4, ne
	b.ne	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	sub	x23, x23, #1
	b	LBB0_16
LBB0_18:
	mov	x22, #0
	mov	x21, #0
Lloh11:
	adrp	x8, _READ_GITFILE_ERR_OPEN_FAILED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _READ_GITFILE_ERR_OPEN_FAILED@GOTPAGEOFF]
	b	LBB0_2
LBB0_19:
	mov	x22, #0
Lloh13:
	adrp	x8, _READ_GITFILE_ERR_READ_FAILED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _READ_GITFILE_ERR_READ_FAILED@GOTPAGEOFF]
	b	LBB0_2
LBB0_20:
	cmp	w23, #9
	b.ge	LBB0_23
; %bb.21:
	mov	x22, #0
Lloh15:
	adrp	x8, _READ_GITFILE_ERR_NO_PATH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _READ_GITFILE_ERR_NO_PATH@GOTPAGEOFF]
	b	LBB0_2
LBB0_22:
	mov	x22, #0
Lloh17:
	adrp	x8, _READ_GITFILE_ERR_INVALID_FORMAT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _READ_GITFILE_ERR_INVALID_FORMAT@GOTPAGEOFF]
	b	LBB0_2
LBB0_23:
	strb	wzr, [x21, w23, uxtw]
	add	x22, x21, #8
	mov	x0, x22
	bl	_is_absolute_path
	cbnz	w0, LBB0_26
; %bb.24:
	mov	x0, x19
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_26
; %bb.25:
	sub	w8, w0, w19
	add	w1, w8, #1
	sub	w3, w23, #8
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	mov	x4, x22
	bl	_xstrfmt
	mov	x22, x0
	mov	x0, x21
	bl	_free
	mov	x21, x22
LBB0_26:
	mov	x0, x22
	bl	_is_git_directory
	cbz	w0, LBB0_30
; %bb.27:
	mov	x0, x22
	bl	_real_path
	mov	x19, x0
	cbz	x20, LBB0_29
; %bb.28:
	str	wzr, [x20]
LBB0_29:
	mov	x0, x21
	bl	_free
	b	LBB0_10
LBB0_30:
Lloh21:
	adrp	x8, _READ_GITFILE_ERR_NOT_A_REPO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _READ_GITFILE_ERR_NOT_A_REPO@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_READ_GITFILE_ERR_STAT_FAILED,4,2 ; @READ_GITFILE_ERR_STAT_FAILED
	.comm	_READ_GITFILE_ERR_NOT_A_FILE,4,2 ; @READ_GITFILE_ERR_NOT_A_FILE
	.comm	_READ_GITFILE_ERR_TOO_LARGE,4,2 ; @READ_GITFILE_ERR_TOO_LARGE
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_READ_GITFILE_ERR_OPEN_FAILED,4,2 ; @READ_GITFILE_ERR_OPEN_FAILED
	.comm	_READ_GITFILE_ERR_READ_FAILED,4,2 ; @READ_GITFILE_ERR_READ_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gitdir: "

	.comm	_READ_GITFILE_ERR_INVALID_FORMAT,4,2 ; @READ_GITFILE_ERR_INVALID_FORMAT
	.comm	_READ_GITFILE_ERR_NO_PATH,4,2   ; @READ_GITFILE_ERR_NO_PATH
l_.str.1:                               ; @.str.1
	.asciz	"%.*s%.*s"

	.comm	_READ_GITFILE_ERR_NOT_A_REPO,4,2 ; @READ_GITFILE_ERR_NOT_A_REPO
.subsections_via_symbols
