	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_change_dir_write_status        ## -- Begin function change_dir_write_status
	.p2align	4, 0x90
_change_dir_write_status:               ## @change_dir_write_status
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movl	$1, %r9d
	movl	%r14d, %ecx
	shll	%cl, %r9d
	movl	%esi, %r10d
	shll	%cl, %r10d
	movl	$-1, %eax
	testl	%edi, %edi
	js	LBB0_32
## %bb.1:
	movq	_dirs@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jle	LBB0_32
## %bb.2:
	movq	_Dirs@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	%r14d, %eax
	leaq	(%rax,%rax,2), %rdx
	xorl	%eax, %eax
	cmpl	%esi, (%rcx,%rdx,4)
	je	LBB0_32
## %bb.3:
	leaq	(%rcx,%rdx,4), %rax
	movq	_volumes@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r8d
	testl	%r8d, %r8d
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	jle	LBB0_4
## %bb.5:
	xorl	%r15d, %r15d
	movq	_Volumes@GOTPCREL(%rip), %r11
	xorl	%eax, %eax
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	%r10d, -48(%rbp)                ## 4-byte Spill
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_30:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%esi, (%rcx)
	testl	%esi, %esi
	jne	LBB0_32
## %bb.31:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%r15,%rbx,4), %rdi
	addq	$8, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	movl	%eax, %r14d
	callq	_memset
	leaq	(%r15,%rbx,4), %rdi
	addq	$4, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	%r14d, %eax
LBB0_32:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	20(%r13), %edx
	movl	$1, %edi
	leaq	L_.str(%rip), %rsi
	callq	_vkprintf
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_close
LBB0_27:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_pthread_mutex_unlock
	leaq	16(%r13), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	addq	$12, %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
LBB0_28:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movq	_volumes@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %r9d
	movl	-48(%rbp), %r10d                ## 4-byte Reload
	movq	_Volumes@GOTPCREL(%rip), %r11
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	movslq	%r8d, %rcx
	cmpq	%rcx, %r15
	jge	LBB0_30
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	(%r11), %rcx
	movq	(%rcx,%r15,8), %r12
	movl	(%r12), %ecx
	movl	%ecx, %edx
	andl	%r9d, %edx
	cmpl	%r10d, %edx
	je	LBB0_29
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%r12), %edx
	testl	%edx, %edx
	jle	LBB0_29
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%r12), %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx,%rdi,8), %r13
	cmpl	%r14d, (%r13)
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=2
	incq	%rdi
	cmpq	%rdi, %rdx
	jne	LBB0_10
	jmp	LBB0_29
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%r9d, %ebx
	xorl	%r9d, %ecx
	movl	%ecx, (%r12)
	movl	4(%r13), %edi
	testl	%esi, %esi
	je	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	testl	%edi, %edi
	js	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	callq	_close
	movl	$-1, 4(%r13)
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$16, %r12
	movq	%r12, %rdi
	callq	_pthread_mutex_lock
	movl	8(%r13), %edi
	testl	%edi, %edi
	js	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	callq	_close
	movl	$-1, 8(%r13)
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_28
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	testl	%edi, %edi
	jns	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	20(%r13), %edi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, 4(%r13)
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	leaq	16(%r12), %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_pthread_mutex_lock
	cmpl	$0, 8(%r13)
	jns	LBB0_27
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	20(%r13), %edi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %edi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	-96(%rbp), %rsi
	callq	_fstat
	testl	%eax, %eax
	jne	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-96(%rbp), %rax
	cmpq	8(%r12), %rax
	jne	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_F_WRLCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_lock_whole_file
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r13)
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_dirs,4,2                       ## @dirs
	.comm	_Dirs,8,3                       ## @Dirs
	.comm	_volumes,4,2                    ## @volumes
	.comm	_Volumes,8,3                    ## @Volumes
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_F_WRLCK,4,2                    ## @F_WRLCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Didn't open %s in write mode.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_change_dir_write_status        ; -- Begin function change_dir_write_status
	.p2align	2
_change_dir_write_status:               ; @change_dir_write_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	w19, #-1
	tbnz	w0, #31, LBB0_9
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _dirs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dirs@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_9
; %bb.2:
	mov	x21, x1
Lloh3:
	adrp	x8, _Dirs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Dirs@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x8]
	mov	w8, #12
	umaddl	x10, w20, w8, x9
	ldr	w8, [x10]
	cmp	w8, w1
	b.ne	LBB0_4
; %bb.3:
	mov	w19, #0
	b	LBB0_9
LBB0_4:
Lloh6:
	adrp	x8, _volumes@GOTPAGE
Lloh7:
	ldr	x8, [x8, _volumes@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, #1
	stp	x9, x10, [sp, #8]               ; 16-byte Folded Spill
	b.lt	LBB0_6
; %bb.5:
	mov	x28, #0
	mov	w19, #0
	mov	w9, #1
	lsl	w22, w9, w20
Lloh9:
	adrp	x27, _Volumes@GOTPAGE
Lloh10:
	ldr	x27, [x27, _Volumes@GOTPAGEOFF]
	lsl	w25, w21, w20
	b	LBB0_14
LBB0_6:
	mov	w19, #0
LBB0_7:
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w21, [x8]
	cbnz	w21, LBB0_9
; %bb.8:
	mov	w8, w20
	mov	w9, #12
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	madd	x20, x8, x9, x10
	add	x0, x20, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x0, x20, #4
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w2, [x26, #20]
	mov	w0, #1
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_vkprintf
	ldr	w0, [sp, #4]                    ; 4-byte Folded Reload
	bl	_close
LBB0_11:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x23
	bl	_pthread_mutex_unlock
	add	x0, x26, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x0, x26, #12
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	add	w19, w19, #1
Lloh13:
	adrp	x8, _volumes@GOTPAGE
Lloh14:
	ldr	x8, [x8, _volumes@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x28, x28, #1
	cmp	x28, w8, sxtw
	b.ge	LBB0_7
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	ldr	x9, [x27]
	ldr	x24, [x9, x28, lsl #3]
	ldr	w9, [x24]
	and	w10, w9, w22
	cmp	w10, w25
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w10, [x24, #4]
	cmp	w10, #1
	b.lt	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x11, [x24, #24]
LBB0_17:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x26, [x11]
	ldr	w12, [x26]
	cmp	w12, w20
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	add	x11, x11, #8
	subs	x10, x10, #1
	b.ne	LBB0_17
	b	LBB0_13
LBB0_19:                                ;   in Loop: Header=BB0_14 Depth=1
	eor	w8, w9, w22
	str	w8, [x24]
	ldr	w0, [x26, #4]
	cbz	w21, LBB0_25
; %bb.20:                               ;   in Loop: Header=BB0_14 Depth=1
	tbnz	w0, #31, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_14 Depth=1
	bl	_close
	mov	w8, #-1
	str	w8, [x26, #4]
LBB0_22:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x23, x24, #16
	mov	x0, x23
	bl	_pthread_mutex_lock
	ldr	w0, [x26, #8]
	tbnz	w0, #31, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_14 Depth=1
	bl	_close
	mov	w8, #-1
	str	w8, [x26, #8]
LBB0_24:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x23
	bl	_pthread_mutex_unlock
	b	LBB0_12
LBB0_25:                                ;   in Loop: Header=BB0_14 Depth=1
	tbz	w0, #31, LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w0, [x26, #20]
Lloh16:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_14 Depth=1
	str	w0, [x26, #4]
LBB0_28:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x23, x24, #16
	mov	x0, x23
	bl	_pthread_mutex_lock
	ldr	w8, [x26, #8]
	tbz	w8, #31, LBB0_11
; %bb.29:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w0, [x26, #20]
Lloh19:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_11
; %bb.30:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x1, sp, #24
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
	bl	_fstat
	cbnz	w0, LBB0_10
; %bb.31:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [sp, #24]
	ldr	x9, [x24, #8]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.32:                               ;   in Loop: Header=BB0_14 Depth=1
Lloh22:
	adrp	x8, _F_WRLCK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _F_WRLCK@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w0, [sp, #4]                    ; 4-byte Folded Reload
	bl	_lock_whole_file
	cbz	x0, LBB0_10
; %bb.33:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	str	w8, [x26, #8]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_dirs,4,2                       ; @dirs
	.comm	_Dirs,8,3                       ; @Dirs
	.comm	_volumes,4,2                    ; @volumes
	.comm	_Volumes,8,3                    ; @Volumes
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_F_WRLCK,4,2                    ; @F_WRLCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Didn't open %s in write mode.\n"

.subsections_via_symbols
