	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_symlink
_get_symlink:                           ## @get_symlink
	.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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_is_null_oid
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_has_symlinks@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_strlen
	leaq	-40(%rbp), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_strbuf_readlink
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_6
LBB0_8:
	leaq	-44(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_read_object_file
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_oid_to_hex
	movslq	%eax, %rsi
	movl	%r12d, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_die
	jmp	LBB0_10
LBB0_4:
	leaq	-40(%rbp), %rdi
	movq	%r14, %rsi
	movl	$128, %edx
	callq	_strbuf_read_file
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
LBB0_6:
	callq	__
	movl	%eax, %edi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_die
LBB0_7:
	leaq	-40(%rbp), %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movq	%rax, %r15
LBB0_10:
	movq	%r15, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.comm	_has_symlinks,8,3               ## @has_symlinks
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not read symlink %s"

L_.str.1:                               ## @.str.1
	.asciz	"could not read symlink file %s"

L_.str.2:                               ## @.str.2
	.asciz	"could not read object %s for symlink %s"

	.no_dead_strip	_get_symlink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_symlink
_get_symlink:                           ; @get_symlink
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x21, x0
	bl	_is_null_oid
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh3:
	adrp	x8, _has_symlinks@GOTPAGE
Lloh4:
	ldr	x8, [x8, _has_symlinks@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	add	x0, sp, #16
	mov	x1, x19
	bl	_strbuf_readlink
	cbz	x0, LBB0_9
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	add	x1, sp, #28
	add	x2, sp, #16
	mov	x0, x21
	bl	_read_object_file
	mov	x20, x0
	cbnz	x0, LBB0_10
; %bb.5:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x22, x0
	mov	x0, x21
	bl	_oid_to_hex
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	str	x19, [sp]
	mov	x0, x22
	bl	_die
	b	LBB0_10
LBB0_6:
	add	x0, sp, #16
	mov	x1, x19
	mov	w2, #128
	bl	_strbuf_read_file
	cbz	x0, LBB0_9
; %bb.7:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	__
	mov	x1, x19
	bl	_die
LBB0_9:
	add	x0, sp, #16
	mov	x1, #0
	bl	_strbuf_detach
	mov	x20, x0
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.comm	_has_symlinks,8,3               ; @has_symlinks
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not read symlink %s"

l_.str.1:                               ; @.str.1
	.asciz	"could not read symlink file %s"

l_.str.2:                               ; @.str.2
	.asciz	"could not read object %s for symlink %s"

	.no_dead_strip	_get_symlink
.subsections_via_symbols
