	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chk_path                       ## -- Begin function chk_path
	.p2align	4, 0x90
_chk_path:                              ## @chk_path
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r13
	xorl	%edi, %edi
	cmpb	$47, (%r13)
	sete	%dil
	addq	%r13, %rdi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	$-1, %r14d
	leaq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movb	$0, (%rbx)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_lstat
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	$47, (%rbx)
	incq	%rbx
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strchr
	movq	%rax, %rbx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%rax, %rax
	jne	LBB0_2
	jmp	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_S_IRWXG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_S_IRWXO@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r13, %rdi
	callq	_mkdir
	testq	%rax, %rax
	js	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_pids@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_set_ids
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_W_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_R_OK@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_X_OK@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r13, %rdi
	callq	_access
	testq	%rax, %rax
	jns	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_lstat
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_FILEBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	-48(%rbp), %esi
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r13, %rdi
	callq	_set_pmode
	movl	%ebx, %esi
	subl	%r13d, %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_add_dir
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	$47, (%rbx)
	incq	%rbx
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strchr
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_4
LBB0_6:
	movb	$47, (%rbx)
LBB0_7:
	movl	$-1, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S_IRWXU,4,2                    ## @S_IRWXU
	.comm	_S_IRWXG,4,2                    ## @S_IRWXG
	.comm	_S_IRWXO,4,2                    ## @S_IRWXO
	.comm	_pids,8,3                       ## @pids
	.comm	_R_OK,4,2                       ## @R_OK
	.comm	_W_OK,4,2                       ## @W_OK
	.comm	_X_OK,4,2                       ## @X_OK
	.comm	_FILEBITS,4,2                   ## @FILEBITS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chk_path                       ; -- Begin function chk_path
	.p2align	2
_chk_path:                              ; @chk_path
	.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, x2
	mov	x20, x1
	mov	x21, x0
	mov	x8, x0
	ldrb	w9, [x8], #1
	cmp	w9, #47
	csel	x0, x0, x8, ne
	mov	w23, #47
	mov	w1, #47
	bl	_strchr
	cbz	x0, LBB0_13
; %bb.1:
	mov	x22, x0
	mov	w28, #-1
Lloh0:
	adrp	x24, _S_IRWXU@GOTPAGE
Lloh1:
	ldr	x24, [x24, _S_IRWXU@GOTPAGEOFF]
Lloh2:
	adrp	x26, _S_IRWXO@GOTPAGE
Lloh3:
	ldr	x26, [x26, _S_IRWXO@GOTPAGEOFF]
Lloh4:
	adrp	x27, _W_OK@GOTPAGE
Lloh5:
	ldr	x27, [x27, _W_OK@GOTPAGEOFF]
Lloh6:
	adrp	x25, _X_OK@GOTPAGE
Lloh7:
	ldr	x25, [x25, _X_OK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	strb	wzr, [x22]
	add	x1, sp, #8
	mov	x0, x21
	bl	_lstat
	cbnz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	strb	w23, [x22], #1
	mov	x0, x22
	mov	w1, #47
	bl	_strchr
	mov	x22, x0
	cbnz	x0, LBB0_2
	b	LBB0_11
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x24]
Lloh8:
	adrp	x9, _S_IRWXG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _S_IRWXG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x26]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_mkdir
	tbnz	x0, #63, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh11:
	adrp	x8, _pids@GOTPAGE
Lloh12:
	ldr	x8, [x8, _pids@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_set_ids
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh14:
	adrp	x8, _R_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _R_OK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x27]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_access
	tbz	x0, #63, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #8
	mov	x0, x21
	bl	_lstat
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #8]
Lloh17:
	adrp	x9, _FILEBITS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FILEBITS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	and	w8, w9, w8
	ldr	w9, [x24]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_set_pmode
	sub	w1, w22, w21
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #1
	bl	_add_dir
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	strb	w23, [x22], #1
	mov	x0, x22
	mov	w1, #47
	bl	_strchr
	mov	x22, x0
	mov	w28, #0
	mov	w0, #0
	cbnz	x22, LBB0_2
	b	LBB0_14
LBB0_11:
	mov	x0, x28
	b	LBB0_14
LBB0_12:
	mov	w8, #47
	strb	w8, [x22]
LBB0_13:
	mov	w0, #-1
LBB0_14:
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_S_IRWXU,4,2                    ; @S_IRWXU
	.comm	_S_IRWXG,4,2                    ; @S_IRWXG
	.comm	_S_IRWXO,4,2                    ; @S_IRWXO
	.comm	_pids,8,3                       ; @pids
	.comm	_R_OK,4,2                       ; @R_OK
	.comm	_W_OK,4,2                       ; @W_OK
	.comm	_X_OK,4,2                       ; @X_OK
	.comm	_FILEBITS,4,2                   ; @FILEBITS
.subsections_via_symbols
