	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_safe_create_leading_directories ## -- Begin function safe_create_leading_directories
	.p2align	4, 0x90
_safe_create_leading_directories:       ## @safe_create_leading_directories
	.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	%rdi, %rbx
	callq	_offset_1st_component
	movq	_SCLD_OK@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.1:
	movslq	%eax, %r15
	addq	%rbx, %r15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##     Child Loop BB0_8 Depth 2
	movb	(%r15), %al
	testb	%al, %al
	je	LBB0_24
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %r13
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	%al, %edi
	callq	_is_dir_sep
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movzbl	1(%r13), %eax
	incq	%r13
	testb	%al, %al
	jne	LBB0_4
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, (%r13)
	je	LBB0_24
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r15
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	1(%r15), %edi
	incq	%r15
	callq	_is_dir_sep
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, (%r15)
	je	LBB0_24
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movb	(%r13), %al
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movb	$0, (%r13)
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	callq	_stat
	testl	%eax, %eax
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_mkdir
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	callq	_stat
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	jne	LBB0_23
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_SCLD_VANISHED@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	jne	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_ENOTDIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_SCLD_EXISTS@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_adjust_shared_perm
	testq	%rax, %rax
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_SCLD_PERMS@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_SCLD_FAILED@GOTPCREL(%rip), %rax
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %r14d
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	-41(%rbp), %al                  ## 1-byte Reload
	movb	%al, (%r13)
	cmpl	(%r12), %r14d
	je	LBB0_2
LBB0_24:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCLD_OK,4,2                    ## @SCLD_OK
	.comm	_ENOTDIR,8,3                    ## @ENOTDIR
	.comm	_errno,8,3                      ## @errno
	.comm	_SCLD_EXISTS,4,2                ## @SCLD_EXISTS
	.comm	_EEXIST,8,3                     ## @EEXIST
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_SCLD_VANISHED,4,2              ## @SCLD_VANISHED
	.comm	_SCLD_FAILED,4,2                ## @SCLD_FAILED
	.comm	_SCLD_PERMS,4,2                 ## @SCLD_PERMS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_safe_create_leading_directories ; -- Begin function safe_create_leading_directories
	.p2align	2
_safe_create_leading_directories:       ; @safe_create_leading_directories
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_offset_1st_component
Lloh0:
	adrp	x21, _SCLD_OK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SCLD_OK@GOTPAGEOFF]
	ldr	w20, [x21]
	cbz	x19, LBB0_23
; %bb.1:
	add	x28, x19, w0, sxtw
Lloh2:
	adrp	x23, _errno@GOTPAGE
Lloh3:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh4:
	adrp	x25, _SCLD_PERMS@GOTPAGE
Lloh5:
	ldr	x25, [x25, _SCLD_PERMS@GOTPAGEOFF]
Lloh6:
	adrp	x26, _EEXIST@GOTPAGE
Lloh7:
	ldr	x26, [x26, _EEXIST@GOTPAGEOFF]
Lloh8:
	adrp	x27, _ENOENT@GOTPAGE
Lloh9:
	ldr	x27, [x27, _ENOENT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;     Child Loop BB0_8 Depth 2
	ldrb	w8, [x28]
	cbz	w8, LBB0_23
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x28
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sxtb	w0, w8
	bl	_is_dir_sep
	cbnz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	ldrb	w8, [x24, #1]!
	cbnz	w8, LBB0_4
	b	LBB0_23
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x24]
	cbz	w8, LBB0_23
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, x24
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsb	w0, [x28, #1]!
	bl	_is_dir_sep
	cbnz	x0, LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x28]
	cbz	w8, LBB0_23
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w22, [x24]
	strb	wzr, [x24]
	add	x1, sp, #8
	mov	x0, x19
	bl	_stat
	cbz	w0, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	w1, #511
	bl	_mkdir
	cbz	x0, LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_stat
	cbnz	w0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbnz	x0, LBB0_22
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh10:
	adrp	x8, _SCLD_VANISHED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SCLD_VANISHED@GOTPAGEOFF]
	b	LBB0_21
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbnz	x0, LBB0_22
; %bb.18:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh12:
	adrp	x8, _ENOTDIR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOTDIR@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x23]
Lloh15:
	adrp	x8, _SCLD_EXISTS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SCLD_EXISTS@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_adjust_shared_perm
	ldr	w8, [x25]
	cmp	x0, #0
	csel	w20, w20, w8, eq
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh17:
	adrp	x8, _SCLD_FAILED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SCLD_FAILED@GOTPAGEOFF]
LBB0_21:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w20, [x8]
LBB0_22:                                ;   in Loop: Header=BB0_2 Depth=1
	strb	w22, [x24]
	ldr	w8, [x21]
	cmp	w20, w8
	b.eq	LBB0_2
LBB0_23:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SCLD_OK,4,2                    ; @SCLD_OK
	.comm	_ENOTDIR,8,3                    ; @ENOTDIR
	.comm	_errno,8,3                      ; @errno
	.comm	_SCLD_EXISTS,4,2                ; @SCLD_EXISTS
	.comm	_EEXIST,8,3                     ; @EEXIST
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_SCLD_VANISHED,4,2              ; @SCLD_VANISHED
	.comm	_SCLD_FAILED,4,2                ; @SCLD_FAILED
	.comm	_SCLD_PERMS,4,2                 ; @SCLD_PERMS
.subsections_via_symbols
