	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___freebsd11_dirname            ## -- Begin function __freebsd11_dirname
	.p2align	4, 0x90
___freebsd11_dirname:                   ## @__freebsd11_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___freebsd11_dirname.dname(%rip), %rax
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_malloc
	movq	%rax, ___freebsd11_dirname.dname(%rip)
	testq	%rax, %rax
	je	LBB0_22
LBB0_2:
	testq	%r14, %r14
	je	LBB0_11
## %bb.3:
	cmpb	$0, (%r14)
	je	LBB0_11
## %bb.4:
	movq	%r14, %rdi
	callq	_strlen
	cltq
	leaq	-1(%r14), %rcx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rcx,%rax), %rdx
	cmpq	%r14, %rdx
	jbe	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	decq	%rax
	cmpb	$47, (%rdx)
	je	LBB0_5
## %bb.7:
	addq	%r14, %rax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$47, (%rax)
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	decq	%rax
	cmpq	%r14, %rax
	ja	LBB0_8
## %bb.10:
	movq	%r14, %rax
	jmp	LBB0_13
LBB0_11:
	movw	$46, (%rax)
	jmp	LBB0_23
LBB0_12:
	addq	%r14, %rax
	decq	%rax
LBB0_13:
	movq	%rax, %rcx
	subq	%r14, %rcx
	je	LBB0_20
## %bb.14:
	decq	%rax
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rbx
	cmpq	%r14, %rax
	jbe	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	leaq	-1(%rbx), %rcx
	cmpb	$47, (%rax)
	leaq	-1(%rax), %rax
	je	LBB0_15
LBB0_17:
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jae	LBB0_21
## %bb.18:
	movq	___freebsd11_dirname.dname(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	___freebsd11_dirname.dname(%rip), %rax
	movb	$0, (%rax,%rbx)
	jmp	LBB0_23
LBB0_20:
	cmpb	$47, (%r14)
	sete	%cl
	orb	$46, %cl
	movq	___freebsd11_dirname.dname(%rip), %rax
	movb	%cl, (%rax)
	movb	$0, 1(%rax)
	jmp	LBB0_23
LBB0_21:
	movq	_ENAMETOOLONG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_22:
	xorl	%eax, %eax
LBB0_23:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,___freebsd11_dirname.dname,8,3 ## @__freebsd11_dirname.dname
	.comm	_MAXPATHLEN,8,3                 ## @MAXPATHLEN
	.comm	_ENAMETOOLONG,4,2               ## @ENAMETOOLONG
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___freebsd11_dirname            ; -- Begin function __freebsd11_dirname
	.p2align	2
___freebsd11_dirname:                   ; @__freebsd11_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, x0
	adrp	x21, ___freebsd11_dirname.dname@PAGE
	ldr	x0, [x21, ___freebsd11_dirname.dname@PAGEOFF]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	bl	_malloc
	str	x0, [x21, ___freebsd11_dirname.dname@PAGEOFF]
	cbz	x0, LBB0_18
LBB0_2:
	cbz	x19, LBB0_17
; %bb.3:
	ldrb	w8, [x19]
	cbz	w8, LBB0_17
; %bb.4:
	mov	x0, x19
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x9, w0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x19, x9
	sub	x8, x8, #1
	cmp	x8, x19
	b.ls	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w8, [x8]
	sub	x9, x9, #1
	cmp	w8, #47
	b.eq	LBB0_5
; %bb.7:
	add	x8, x19, x9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x8]
	cmp	w9, #47
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	x8, x8, #1
	cmp	x8, x19
	b.hi	LBB0_8
; %bb.10:
	mov	x8, x19
LBB0_11:
	subs	x9, x8, x19
	b.eq	LBB0_19
; %bb.12:
	sub	x8, x8, #1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x20, x9
	cmp	x8, x19
	b.ls	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldrb	w10, [x8], #-1
	sub	x9, x20, #1
	cmp	w10, #47
	b.eq	LBB0_13
LBB0_15:
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x20, x8
	b.hs	LBB0_20
; %bb.16:
	ldr	x0, [x21, ___freebsd11_dirname.dname@PAGEOFF]
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
	ldr	x0, [x21, ___freebsd11_dirname.dname@PAGEOFF]
	strb	wzr, [x0, x20]
	b	LBB0_18
LBB0_17:
	mov	w8, #46
	strh	w8, [x0]
LBB0_18:
	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_19:
	ldrb	w8, [x19]
	cmp	w8, #47
	mov	w8, #46
	cinc	w8, w8, eq
	ldr	x0, [x21, ___freebsd11_dirname.dname@PAGEOFF]
	strb	w8, [x0]
	strb	wzr, [x0, #1]
	b	LBB0_18
LBB0_20:
	mov	x0, #0
Lloh6:
	adrp	x8, _ENAMETOOLONG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENAMETOOLONG@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _errno@GOTPAGE
Lloh10:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,___freebsd11_dirname.dname,8,3 ; @__freebsd11_dirname.dname
	.comm	_MAXPATHLEN,8,3                 ; @MAXPATHLEN
	.comm	_ENAMETOOLONG,4,2               ; @ENAMETOOLONG
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
