	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raceproof_create_file          ## -- Begin function raceproof_create_file
	.p2align	4, 0x90
_raceproof_create_file:                 ## @raceproof_create_file
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movsbl	(%rdi), %edi
	callq	_assert
	movl	$1, %r12d
	movl	$3, %r14d
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	movl	%r12d, %r13d
	sarl	$31, %r13d
	andl	%r12d, %r13d
	decl	%r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=2
	movq	_REMOVE_DIR_EMPTY_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	callq	_remove_dir_recursively
	decl	%r12d
	testl	%eax, %eax
	jne	LBB0_17
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	*-64(%rbp)                      ## 8-byte Folded Reload
	movl	%eax, %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_EISDIR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	testl	%r12d, %r12d
	jle	LBB0_6
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=2
	cmpl	$0, -44(%rbp)
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=2
	leaq	-48(%rbp), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_strbuf_addstr
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %r12d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_ENOENT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	jle	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	-48(%rbp), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_strbuf_addstr
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-48(%rbp), %edi
	callq	_safe_create_leading_directories
	movq	_SCLD_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_1
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	_SCLD_VANISHED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	leal	-1(%r14), %eax
	cmpl	$1, %r14d
	movl	%eax, %r14d
	ja	LBB0_11
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	decl	%r14d
	jmp	LBB0_2
LBB0_17:
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r15d, (%rax)
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,8,2                ## @STRBUF_INIT
	.comm	_errno,4,2                      ## @errno
	.comm	_EISDIR,4,2                     ## @EISDIR
	.comm	_REMOVE_DIR_EMPTY_ONLY,4,2      ## @REMOVE_DIR_EMPTY_ONLY
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_SCLD_OK,4,2                    ## @SCLD_OK
	.comm	_SCLD_VANISHED,4,2              ## @SCLD_VANISHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raceproof_create_file          ; -- Begin function raceproof_create_file
	.p2align	2
_raceproof_create_file:                 ; @raceproof_create_file
	.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
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldrsb	w0, [x0]
	bl	_assert
	mov	w24, #1
	mov	w25, #3
Lloh3:
	adrp	x23, _errno@GOTPAGE
Lloh4:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh5:
	adrp	x26, _EISDIR@GOTPAGE
Lloh6:
	ldr	x26, [x26, _EISDIR@GOTPAGEOFF]
Lloh7:
	adrp	x28, _SCLD_OK@GOTPAGE
Lloh8:
	ldr	x28, [x28, _SCLD_OK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w24, #0
	csel	w8, w24, wzr, lt
	sub	w8, w8, #1
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=2
Lloh9:
	adrp	x8, _REMOVE_DIR_EMPTY_ONLY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REMOVE_DIR_EMPTY_ONLY@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_remove_dir_recursively
	cbnz	w0, LBB0_15
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	mov	x1, x19
	blr	x20
	mov	x22, x0
	ldr	w27, [x23]
	cbz	w0, LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	w8, [x26]
	cmp	w27, w8
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=2
	subs	w24, w24, #1
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=2
	add	x0, sp, #8
	mov	x1, x21
	bl	_strbuf_addstr
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w24, [sp, #4]                   ; 4-byte Folded Reload
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w27, w8
	ccmp	w25, #1, #8, eq
	b.lt	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_1 Depth=1
	add	x0, sp, #8
	mov	x1, x21
	bl	_strbuf_addstr
LBB0_12:                                ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [sp, #8]
	bl	_safe_create_leading_directories
	ldr	w8, [x28]
	cmp	w0, w8
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
Lloh15:
	adrp	x8, _SCLD_VANISHED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SCLD_VANISHED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, w8
	ccmp	w25, #1, #0, eq
	sub	w25, w25, #1
	b.hi	LBB0_12
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w25, w25, #1
	b	LBB0_1
LBB0_15:
	add	x0, sp, #8
	bl	_strbuf_release
	str	w27, [x23]
	mov	x0, x22
	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	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,8,2                ; @STRBUF_INIT
	.comm	_errno,4,2                      ; @errno
	.comm	_EISDIR,4,2                     ; @EISDIR
	.comm	_REMOVE_DIR_EMPTY_ONLY,4,2      ; @REMOVE_DIR_EMPTY_ONLY
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SCLD_OK,4,2                    ; @SCLD_OK
	.comm	_SCLD_VANISHED,4,2              ; @SCLD_VANISHED
.subsections_via_symbols
