	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_autr_write_file                ## -- Begin function autr_write_file
	.p2align	4, 0x90
_autr_write_file:                       ## @autr_write_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	%r12
	pushq	%rbx
	subq	$2064, %rsp                     ## imm = 0x810
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rsi), %rdi
	movq	(%rdi), %r14
	callq	_log_assert
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_getpid
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.4:
	movl	(%rcx), %r12d
LBB0_5:
	leaq	L_.str.1(%rip), %rdx
	leaq	-2096(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$2048, %esi                     ## imm = 0x800
	movq	%r14, %rcx
	movl	%eax, %r8d
	movl	%r12d, %r9d
	callq	_snprintf
	movq	_VERB_ALGO@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	callq	_verbose
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %rbx
	leaq	-2096(%rbp), %rsi
	movq	%rax, %rdi
	movq	%r15, %rdx
	callq	_autr_write_contents
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	callq	_fflush
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.6(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_log_err
LBB0_11:
	movq	%rbx, %rdi
	callq	__fileno
	movl	%eax, %edi
	callq	__get_osfhandle
	movl	%eax, %edi
	callq	_FlushFileBuffers
	movq	%rbx, %rdi
	callq	_fclose
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.7(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fatal_exit
	leaq	-2096(%rbp), %rdi
	callq	_unlink
	jmp	LBB0_15
LBB0_1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_17
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$2064, %rsp                     ## imm = 0x810
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_err                        ## TAILCALL
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.4(%rip), %rdi
	leaq	-2096(%rbp), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fatal_exit
	jmp	LBB0_15
LBB0_8:
	movq	%rbx, %rdi
	callq	_fclose
	leaq	-2096(%rbp), %rdi
	callq	_unlink
	leaq	L_.str.5(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_fatal_exit
	jmp	LBB0_15
LBB0_13:
	movl	(%r12), %edi
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdx
	callq	_verbose
	leaq	-2096(%rbp), %rdi
	movq	%r14, %rsi
	callq	_rename
	testq	%rax, %rax
	jns	LBB0_15
## %bb.14:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.9(%rip), %rdi
	leaq	-2096(%rbp), %rsi
	movq	%r14, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_fatal_exit
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	addq	$2064, %rsp                     ## imm = 0x810
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"autr_write_file: Module environment is NULL."

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

	.comm	_VERB_ALGO,4,2                  ## @VERB_ALGO
L_.str.2:                               ## @.str.2
	.asciz	"autotrust: write to disk: %s"

L_.str.3:                               ## @.str.3
	.asciz	"w"

L_.str.4:                               ## @.str.4
	.asciz	"could not open autotrust file for writing, %s: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.5:                               ## @.str.5
	.asciz	"could not completely write: %s"

L_.str.6:                               ## @.str.6
	.asciz	"could not fflush(%s): %s"

L_.str.7:                               ## @.str.7
	.asciz	"could not complete write: %s: %s"

L_.str.8:                               ## @.str.8
	.asciz	"autotrust: replaced %s"

L_.str.9:                               ## @.str.9
	.asciz	"rename(%s to %s): %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_autr_write_file                ; -- Begin function autr_write_file
	.p2align	2
_autr_write_file:                       ; @autr_write_file
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #2080
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x0, [x1]
	ldr	x19, [x0]
	bl	_log_assert
	cbz	x21, LBB0_3
; %bb.1:
	bl	_getpid
	mov	x4, x0
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	w5, [x8]
	b	LBB0_6
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	add	sp, sp, #2080
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	b	_log_err
LBB0_5:
	mov	w5, #0
LBB0_6:
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #24
	mov	w1, #2048
	mov	x3, x19
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_snprintf
Lloh10:
	adrp	x22, _VERB_ALGO@GOTPAGE
Lloh11:
	ldr	x22, [x22, _VERB_ALGO@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #24
	bl	_verbose
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x0, sp, #24
	bl	_fopen
	cbz	x0, LBB0_12
; %bb.7:
	mov	x21, x0
	add	x1, sp, #24
	mov	x2, x20
	bl	_autr_write_contents
	cbz	w0, LBB0_14
; %bb.8:
	mov	x0, x21
	bl	_fflush
Lloh16:
	adrp	x20, _errno@GOTPAGE
Lloh17:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w0, [x20]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh18:
	adrp	x0, l_.str.6@PAGE
Lloh19:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_log_err
LBB0_10:
	mov	x0, x21
	bl	__fileno
	bl	__get_osfhandle
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_FlushFileBuffers
	mov	x0, x21
	bl	_fclose
	cbz	x0, LBB0_18
; %bb.11:
	ldr	w0, [x20]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh20:
	adrp	x0, l_.str.7@PAGE
Lloh21:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	x1, x19
	bl	_fatal_exit
	add	x0, sp, #24
	bl	_unlink
	b	LBB0_16
LBB0_12:
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_13:
	add	x1, sp, #24
	b	LBB0_15
LBB0_14:
	mov	x0, x21
	bl	_fclose
	add	x0, sp, #24
	bl	_unlink
Lloh27:
	adrp	x0, l_.str.5@PAGE
Lloh28:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x19
LBB0_15:
	bl	_fatal_exit
LBB0_16:
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.17:
	add	sp, sp, #2080
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	ldr	w0, [x22]
Lloh32:
	adrp	x1, l_.str.8@PAGE
Lloh33:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x2, x19
	bl	_verbose
	add	x0, sp, #24
	mov	x1, x19
	bl	_rename
	tbz	x0, #63, LBB0_16
; %bb.19:
	ldr	w0, [x20]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh34:
	adrp	x0, l_.str.9@PAGE
Lloh35:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_13
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"autr_write_file: Module environment is NULL."

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

	.comm	_VERB_ALGO,4,2                  ; @VERB_ALGO
l_.str.2:                               ; @.str.2
	.asciz	"autotrust: write to disk: %s"

l_.str.3:                               ; @.str.3
	.asciz	"w"

l_.str.4:                               ; @.str.4
	.asciz	"could not open autotrust file for writing, %s: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.5:                               ; @.str.5
	.asciz	"could not completely write: %s"

l_.str.6:                               ; @.str.6
	.asciz	"could not fflush(%s): %s"

l_.str.7:                               ; @.str.7
	.asciz	"could not complete write: %s: %s"

l_.str.8:                               ; @.str.8
	.asciz	"autotrust: replaced %s"

l_.str.9:                               ; @.str.9
	.asciz	"rename(%s to %s): %s"

.subsections_via_symbols
