	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtld_dirname
_rtld_dirname:                          ## @rtld_dirname
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r15
	cmpb	$0, (%rdi)
	je	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	callq	_strlen
	cltq
	leaq	-1(%r15), %rcx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rcx,%rax), %rdx
	cmpq	%r15, %rdx
	jbe	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	decq	%rax
	cmpb	$47, (%rdx)
	je	LBB0_4
## %bb.6:
	addq	%r15, %rax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$47, (%rax)
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	decq	%rax
	cmpq	%r15, %rax
	ja	LBB0_7
## %bb.9:
	movq	%r15, %rax
	jmp	LBB0_11
LBB0_2:
	movw	$46, (%r14)
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	addq	%r15, %rax
	decq	%rax
LBB0_11:
	movq	%rax, %rcx
	subq	%r15, %rcx
	je	LBB0_20
## %bb.12:
	incq	%rcx
	movl	%eax, %esi
	subl	%r15d, %esi
	decq	%rax
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rbx
	movl	%esi, %edx
	cmpq	%r15, %rax
	jbe	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	-1(%rbx), %rcx
	leal	-1(%rdx), %esi
	cmpb	$47, (%rax)
	leaq	-1(%rax), %rax
	je	LBB0_13
LBB0_15:
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jle	LBB0_17
## %bb.16:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	__rtld_error
	movl	$-1, %eax
	jmp	LBB0_19
LBB0_20:
	cmpb	$47, (%r15)
	sete	%al
	orb	$46, %al
	movb	%al, (%r14)
	movb	$0, 1(%r14)
	jmp	LBB0_18
LBB0_17:
	movq	%r14, %rdi
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strncpy
	movb	$0, -1(%r14,%rbx)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Filename is too long: %s"

	.no_dead_strip	_rtld_dirname
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtld_dirname
_rtld_dirname:                          ; @rtld_dirname
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_15
; %bb.1:
	mov	x20, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_15
; %bb.2:
	mov	x0, x20
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x9, w0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x20, x9
	sub	x8, x8, #1
	cmp	x8, x20
	b.ls	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w8, [x8]
	sub	x9, x9, #1
	cmp	w8, #47
	b.eq	LBB0_3
; %bb.5:
	add	x8, x20, x9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x8]
	cmp	w9, #47
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	x8, x8, #1
	cmp	x8, x20
	b.hi	LBB0_6
; %bb.8:
	mov	x8, x20
LBB0_9:
	subs	x9, x8, x20
	b.eq	LBB0_17
; %bb.10:
	sub	x8, x8, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x21, x9
	cmp	x8, x20
	b.ls	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrb	w10, [x8], #-1
	sub	x9, x21, #1
	cmp	w10, #47
	b.eq	LBB0_11
LBB0_13:
	add	x8, x21, #1
Lloh0:
	adrp	x9, _PATH_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PATH_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_18
; %bb.14:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	__rtld_error
	mov	w0, #-1
	b	LBB0_16
LBB0_15:
	mov	w0, #0
	mov	w8, #46
	strh	w8, [x19]
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	w0, #0
	ldrb	w8, [x20]
	cmp	w8, #47
	mov	w8, #46
	cinc	w8, w8, eq
	strb	w8, [x19]
	strb	wzr, [x19, #1]
	b	LBB0_16
LBB0_18:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_strncpy
	mov	w0, #0
	strb	wzr, [x19, x21]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Filename is too long: %s"

	.no_dead_strip	_rtld_dirname
.subsections_via_symbols
