	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pathdup
_pathdup:                               ## @pathdup
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_strlen
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r12
	subq	$1, %rax
	jb	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpb	$47, -1(%r14,%r12)
	je	LBB0_1
LBB0_3:
	leaq	1(%r12), %rdi
	callq	_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str(%rip), %rdi
	callq	_error
LBB0_5:
	movq	_L_opt@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.6:
	testq	%r12, %r12
	je	LBB0_10
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14,%rbx), %edi
	callq	_tolower
	movb	%al, (%r15,%rbx)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_8
	jmp	LBB0_10
LBB0_9:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_memcpy
LBB0_10:
	movb	$0, (%r15,%r12)
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc()"

	.comm	_L_opt,8,3                      ## @L_opt
	.no_dead_strip	_pathdup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pathdup
_pathdup:                               ; @pathdup
	.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
	bl	_strlen
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x0
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	x0, x20, #1
	add	x8, x19, x20
	ldurb	w8, [x8, #-1]
	cmp	w8, #47
	b.eq	LBB0_1
LBB0_3:
	add	x0, x20, #1
	bl	_malloc
	mov	x21, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_5:
Lloh8:
	adrp	x8, _L_opt@GOTPAGE
Lloh9:
	ldr	x8, [x8, _L_opt@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.6:
	cbz	x20, LBB0_10
; %bb.7:
	mov	x22, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w0, [x19, x22]
	bl	_tolower
	strb	w0, [x21, x22]
	add	x22, x22, #1
	cmp	x20, x22
	b.ne	LBB0_8
	b	LBB0_10
LBB0_9:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
LBB0_10:
	strb	wzr, [x21, x20]
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc()"

	.comm	_L_opt,8,3                      ; @L_opt
	.no_dead_strip	_pathdup
.subsections_via_symbols
