	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_create_file
_try_create_file:                       ## @try_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r15
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	%edx, %edi
	callq	_S_ISGITLINK
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_lstat
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	%r12, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_mkdir
	jmp	LBB0_4
LBB0_5:
	movq	_has_symlinks@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.6:
	movl	%ebx, %edi
	callq	_S_ISLNK
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_symlink
LBB0_4:
	xorl	%ebx, %ebx
	testl	%eax, %eax
	setne	%bl
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	-48(%rbp), %edi
	callq	_S_ISDIR
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_18
	jmp	LBB0_3
LBB0_8:
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_EXCL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	testb	$64, %bl
	movl	$438, %eax                      ## imm = 0x1B6
	movl	$511, %edx                      ## imm = 0x1FF
	cmovel	%eax, %edx
	movq	%r12, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	%eax, %ebx
	movq	(%r13), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %r8
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_convert_to_working_tree
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	-64(%rbp), %r14
	movq	-56(%rbp), %r15
LBB0_12:
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_write_in_full
	movl	%ebx, %r14d
	movq	%rax, %rbx
	testq	%rax, %rax
	jns	LBB0_14
## %bb.13:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_error_errno
LBB0_14:
	leaq	-64(%rbp), %rdi
	callq	_strbuf_release
	movl	%r14d, %edi
	callq	_close
	testq	%rax, %rax
	jns	LBB0_17
## %bb.15:
	testq	%rbx, %rbx
	js	LBB0_17
## %bb.16:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_error_errno
	movl	%eax, %ebx
	jmp	LBB0_18
LBB0_9:
	movl	$1, %ebx
	jmp	LBB0_18
LBB0_17:
	sarq	$63, %rbx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,16,3               ## @STRBUF_INIT
	.comm	_has_symlinks,8,3               ## @has_symlinks
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write to '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"closing file '%s'"

	.no_dead_strip	_try_create_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_create_file
_try_create_file:                       ; @try_create_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x4
	mov	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	str	q0, [sp, #16]
	mov	x0, x2
	bl	_S_ISGITLINK
	cbz	x0, LBB0_3
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_lstat
	cbz	w0, LBB0_8
LBB0_2:
	mov	x0, x19
	mov	w1, #511
	bl	_mkdir
	b	LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _has_symlinks@GOTPAGE
Lloh4:
	ldr	x8, [x8, _has_symlinks@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.4:
	mov	x0, x22
	bl	_S_ISLNK
	cbz	x0, LBB0_10
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	bl	_symlink
LBB0_6:
	cmp	w0, #0
	cset	w0, ne
LBB0_7:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbz	x0, LBB0_2
; %bb.9:
	mov	w0, #0
	b	LBB0_7
LBB0_10:
Lloh6:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w8, w9
	tst	w22, #0x40
	mov	w8, #511
	mov	w9, #438
	csel	w2, w9, w8, eq
	mov	x0, x19
	bl	_open
	tbnz	w0, #31, LBB0_16
; %bb.11:
	mov	x22, x0
	ldr	x8, [x23]
	ldr	w0, [x8]
	add	x4, sp, #16
	mov	x1, x19
	mov	x2, x20
	mov	x3, x21
	bl	_convert_to_working_tree
	ldp	x8, x9, [sp, #16]
	cmp	x0, #0
	csel	x2, x21, x8, eq
	csel	x1, x20, x9, eq
	mov	x0, x22
	bl	_write_in_full
	mov	x20, x0
	tbz	x0, #63, LBB0_13
; %bb.12:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_error_errno
LBB0_13:
	add	x0, sp, #16
	bl	_strbuf_release
	mov	x0, x22
	bl	_close
	tbz	x0, #63, LBB0_17
; %bb.14:
	tbnz	x20, #63, LBB0_17
; %bb.15:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_error_errno
                                        ; kill: def $w0 killed $w0 def $x0
	b	LBB0_7
LBB0_16:
	mov	w0, #1
	b	LBB0_7
LBB0_17:
	asr	x0, x20, #63
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,16,3               ; @STRBUF_INIT
	.comm	_has_symlinks,8,3               ; @has_symlinks
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write to '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"closing file '%s'"

	.no_dead_strip	_try_create_file
.subsections_via_symbols
