	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_restore
_write_restore:                         ## @write_restore
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rcx
	movq	8(%rdi), %rdx
	movq	24(%rdi), %rsi
	movq	16(%rax), %r13
	movq	(%rsi), %rsi
	movq	%rsi, 24(%r13)
	movq	(%rcx), %rcx
	movq	%rcx, 16(%r13)
	movq	(%rdx), %rcx
	movq	%rcx, 8(%r13)
	movq	8(%rax), %r15
	leaq	L_.str(%rip), %rdx
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	callq	_hc_fopen
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	-48(%rbp), %edi
	movq	__IONBF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_setvbuf
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_event_log_error
	leaq	-48(%rbp), %rdi
	callq	_hc_fclose
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_event_log_error
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_5:
	leaq	8(%r13), %r12
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	movl	$40, %esi
	movl	$1, %edx
	callq	_hc_fwrite
	cmpq	$0, (%r13)
	je	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	leaq	L_.str.3(%rip), %r14
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hc_fprintf
	movl	$10, %edi
	movq	%r15, %rsi
	callq	_hc_fputc
	incq	%rbx
	cmpq	(%r13), %rbx
	jb	LBB0_7
LBB0_8:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_hc_fflush
	movq	%rbx, %rdi
	callq	_hc_fileno
	movl	%eax, %edi
	callq	_fsync
	movq	%rbx, %rdi
	callq	_hc_fclose
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	$0, 16(%r12)
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wb"

L_.str.1:                               ## @.str.1
	.asciz	"%s: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	__IONBF,4,2                     ## @_IONBF
L_.str.2:                               ## @.str.2
	.asciz	"setvbuf file '%s': %s"

L_.str.3:                               ## @.str.3
	.asciz	"%s"

	.no_dead_strip	_write_restore
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_restore
_write_restore:                         ; @write_restore
	.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
	ldr	x8, [x0, #16]
	ldr	w9, [x8]
	cbz	w9, LBB0_4
; %bb.1:
	mov	x20, x0
	ldp	x9, x10, [x0]
	ldr	x11, [x0, #24]
	ldr	x11, [x11]
	ldr	x9, [x9]
	ldp	x21, x19, [x8, #8]
	stp	x9, x11, [x19, #16]
	ldr	x8, [x10]
	mov	x22, x19
	str	x8, [x22, #8]!
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	x1, x21
	bl	_hc_fopen
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w0, [sp, #8]
Lloh2:
	adrp	x8, __IONBF@GOTPAGE
Lloh3:
	ldr	x8, [x8, __IONBF@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x1, #0
	mov	w3, #0
	bl	_setvbuf
	cbz	x0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_event_log_error
	add	x0, sp, #8
	bl	_hc_fclose
	mov	w0, #-1
	b	LBB0_10
LBB0_4:
	mov	w0, #0
	b	LBB0_10
LBB0_5:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_event_log_error
	mov	w0, #-1
	b	LBB0_10
LBB0_6:
	add	x3, sp, #8
	mov	x0, x19
	mov	w1, #40
	mov	w2, #1
	bl	_hc_fwrite
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.7:
	mov	x21, #0
Lloh15:
	adrp	x20, l_.str.3@PAGE
Lloh16:
	add	x20, x20, l_.str.3@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	w2, [x8, x21, lsl #2]
	add	x0, sp, #8
	mov	x1, x20
	bl	_hc_fprintf
	add	x1, sp, #8
	mov	w0, #10
	bl	_hc_fputc
	add	x21, x21, #1
	ldr	x8, [x19]
	cmp	x21, x8
	b.lo	LBB0_8
LBB0_9:
	add	x0, sp, #8
	bl	_hc_fflush
	add	x0, sp, #8
	bl	_hc_fileno
	bl	_fsync
	add	x0, sp, #8
	bl	_hc_fclose
	mov	w0, #0
	stp	xzr, xzr, [x22, #8]
	str	xzr, [x22]
LBB0_10:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wb"

l_.str.1:                               ; @.str.1
	.asciz	"%s: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	__IONBF,4,2                     ; @_IONBF
l_.str.2:                               ; @.str.2
	.asciz	"setvbuf file '%s': %s"

l_.str.3:                               ; @.str.3
	.asciz	"%s"

	.no_dead_strip	_write_restore
.subsections_via_symbols
