	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_special_file
_write_special_file:                    ## @write_special_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, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	%rsi, %rdi
	callq	_strlen
	movl	%eax, %r13d
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_derive_filename
	jmp	LBB0_3
LBB0_2:
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_odb_pack_name
LBB0_3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_odb_pack_keep
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:
	movl	%eax, %r14d
	testl	%r13d, %r13d
	jle	LBB0_8
## %bb.7:
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_write_or_die
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	$1, %edx
	callq	_write_or_die
LBB0_8:
	movl	%r14d, %edi
	callq	_close
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_die_errno
LBB0_10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r12, (%rax)
	jmp	LBB0_12
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_die_errno
LBB0_12:
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.comm	_errno,8,3                      ## @errno
	.comm	_EEXIST,8,3                     ## @EEXIST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot write %s file '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"\n"

L_.str.2:                               ## @.str.2
	.asciz	"cannot close written %s file '%s'"

	.no_dead_strip	_write_special_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_special_file
_write_special_file:                    ; @write_special_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x4
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	mov	x0, x1
	bl	_strlen
	mov	x23, x0
	cbz	x21, LBB0_2
; %bb.1:
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x19
	bl	_derive_filename
	b	LBB0_3
LBB0_2:
	add	x0, sp, #8
	mov	x1, x24
	mov	x2, x19
	bl	_odb_pack_name
LBB0_3:
	mov	x21, x0
	bl	_odb_pack_keep
	tbnz	w0, #31, LBB0_10
; %bb.4:
	mov	x24, x0
	cmp	w23, #1
	b.lt	LBB0_6
; %bb.5:
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	bl	_write_or_die
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x24
	mov	w2, #1
	bl	_write_or_die
LBB0_6:
	mov	x0, x24
	bl	_close
	cbz	x0, LBB0_8
; %bb.7:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x1, x19
	mov	x2, x21
	bl	_die_errno
LBB0_8:
	cbz	x20, LBB0_12
; %bb.9:
	str	x19, [x20]
	b	LBB0_12
LBB0_10:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _EEXIST@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EEXIST@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.11:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x1, x19
	mov	x2, x21
	bl	_die_errno
LBB0_12:
	add	x0, sp, #8
	bl	_strbuf_release
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.comm	_errno,8,3                      ; @errno
	.comm	_EEXIST,8,3                     ; @EEXIST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot write %s file '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"\n"

l_.str.2:                               ; @.str.2
	.asciz	"cannot close written %s file '%s'"

	.no_dead_strip	_write_special_file
.subsections_via_symbols
