	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isc_file_safecreate            ## -- Begin function isc_file_safecreate
	.p2align	4, 0x90
_isc_file_safecreate:                   ## @isc_file_safecreate
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_REQUIRE
	xorl	%edi, %edi
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%r14)
	sete	%dil
LBB0_2:
	callq	_REQUIRE
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_file_stats
	movq	_ISC_R_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_6
## %bb.3:
	movq	_S_IFREG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -40(%rbp)
	je	LBB0_4
## %bb.5:
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	%rax, %rbx
	movq	_ISC_R_FILENOTFOUND@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_13
## %bb.7:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_EXCL@GOTPCREL(%rip), %rax
LBB0_8:
	orl	(%rax), %esi
	movq	_S_IRUSR@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_fdopen
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, (%r14)
	movq	(%r12), %rbx
	jmp	LBB0_13
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_isc__errno2result
	movq	%rax, %rbx
	jmp	LBB0_13
LBB0_4:
	movq	_ISC_R_INVALIDFILE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_13
LBB0_11:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_isc__errno2result
	movq	%rax, %rbx
	movl	%r15d, %edi
	callq	_close
LBB0_13:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISC_R_SUCCESS,8,3              ## @ISC_R_SUCCESS
	.comm	_S_IFREG,4,2                    ## @S_IFREG
	.comm	_ISC_R_INVALIDFILE,8,3          ## @ISC_R_INVALIDFILE
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_ISC_R_FILENOTFOUND,8,3         ## @ISC_R_FILENOTFOUND
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isc_file_safecreate            ; -- Begin function isc_file_safecreate
	.p2align	2
_isc_file_safecreate:                   ; @isc_file_safecreate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_REQUIRE
	cbz	x19, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_REQUIRE
	add	x1, sp, #8
	mov	x0, x20
	bl	_file_stats
Lloh0:
	adrp	x22, _ISC_R_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ISC_R_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [sp, #8]
Lloh2:
	adrp	x9, _S_IFREG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _S_IFREG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.5:
Lloh5:
	adrp	x8, _O_TRUNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _O_TRUNC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	x21, x0
Lloh10:
	adrp	x8, _ISC_R_FILENOTFOUND@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ISC_R_FILENOTFOUND@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.7:
Lloh13:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
LBB0_8:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _S_IRUSR@GOTPAGE
Lloh22:
	ldr	x10, [x10, _S_IRUSR@GOTPAGEOFF]
	orr	w1, w8, w9
Lloh23:
	ldr	w8, [x10]
Lloh24:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh25:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.9:
	mov	x20, x0
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fdopen
	cbz	x0, LBB0_13
; %bb.10:
	str	x0, [x19]
	ldr	x21, [x22]
	b	LBB0_14
LBB0_11:
Lloh29:
	adrp	x8, _errno@GOTPAGE
Lloh30:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_isc__errno2result
	mov	x21, x0
	b	LBB0_14
LBB0_12:
Lloh32:
	adrp	x8, _ISC_R_INVALIDFILE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ISC_R_INVALIDFILE@GOTPAGEOFF]
Lloh34:
	ldr	x21, [x8]
	b	LBB0_14
LBB0_13:
Lloh35:
	adrp	x8, _errno@GOTPAGE
Lloh36:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_isc__errno2result
	mov	x21, x0
	mov	x0, x20
	bl	_close
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ISC_R_SUCCESS,8,3              ; @ISC_R_SUCCESS
	.comm	_S_IFREG,4,2                    ; @S_IFREG
	.comm	_ISC_R_INVALIDFILE,8,3          ; @ISC_R_INVALIDFILE
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_ISC_R_FILENOTFOUND,8,3         ; @ISC_R_FILENOTFOUND
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

.subsections_via_symbols
