	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function erst_writer
_erst_writer:                           ## @erst_writer
	.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	%r9, %r12
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%edi, %r15d
	movq	_erst_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	-104(%rbx), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$104, %edx
	callq	_memset
	movl	-56(%rbx), %edi
	movq	_CPER_SIG_RECORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CPER_SIG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movq	_CPER_RECORD_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbx)
	movq	_CPER_SIG_END@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbx)
	movl	$1, -104(%rbx)
	movq	_CPER_SEV_FATAL@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	%rax, -72(%rbx)
	movq	_CPER_VALID_TIMESTAMP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbx)
	xorl	%eax, %eax
	callq	_get_seconds
	movl	%eax, -80(%rbx)
	leal	104(%r12), %eax
	movl	%eax, -100(%rbx)
	movq	_CPER_CREATOR_PSTORE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbx)
	movq	_CPER_NOTIFY_MCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbx)
	xorl	%eax, %eax
	callq	_cper_next_record_id
	movl	%eax, -96(%rbx)
	movq	_CPER_HW_ERROR_FLAGS_PREVERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbx)
	movl	$104, -48(%rbx)
	movq	%r12, -40(%rbx)
	movq	_CPER_SEC_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbx)
	movq	$0, -16(%rbx)
	movq	_CPER_SEC_PRIMARY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbx)
	cmpl	$129, %r15d
	je	LBB0_1
## %bb.2:
	cmpl	$128, %r15d
	jne	LBB0_5
## %bb.3:
	movq	_CPER_SECTION_TYPE_MCE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_CPER_SECTION_TYPE_DMESG@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 80(%r13)
	movq	(%r14), %rax
	movq	%rax, 72(%r13)
	movq	%r13, %rdi
	callq	_erst_write
	movl	8(%r13), %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_erst_info,8,3                  ## @erst_info
	.comm	_CPER_SIG_RECORD,4,2            ## @CPER_SIG_RECORD
	.comm	_CPER_SIG_SIZE,4,2              ## @CPER_SIG_SIZE
	.comm	_CPER_RECORD_REV,4,2            ## @CPER_RECORD_REV
	.comm	_CPER_SIG_END,4,2               ## @CPER_SIG_END
	.comm	_CPER_SEV_FATAL,8,3             ## @CPER_SEV_FATAL
	.comm	_CPER_VALID_TIMESTAMP,4,2       ## @CPER_VALID_TIMESTAMP
	.comm	_CPER_CREATOR_PSTORE,4,2        ## @CPER_CREATOR_PSTORE
	.comm	_CPER_NOTIFY_MCE,4,2            ## @CPER_NOTIFY_MCE
	.comm	_CPER_HW_ERROR_FLAGS_PREVERR,4,2 ## @CPER_HW_ERROR_FLAGS_PREVERR
	.comm	_CPER_SEC_REV,4,2               ## @CPER_SEC_REV
	.comm	_CPER_SEC_PRIMARY,4,2           ## @CPER_SEC_PRIMARY
	.comm	_CPER_SECTION_TYPE_DMESG,4,2    ## @CPER_SECTION_TYPE_DMESG
	.comm	_CPER_SECTION_TYPE_MCE,4,2      ## @CPER_SECTION_TYPE_MCE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_erst_writer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function erst_writer
_erst_writer:                           ; @erst_writer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x5
	mov	x19, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _erst_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _erst_info@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	sub	x20, x23, #104
	mov	w25, #104
	mov	x0, x20
	mov	w1, #0
	mov	w2, #104
	bl	_memset
	ldur	w0, [x23, #-56]
Lloh3:
	adrp	x8, _CPER_SIG_RECORD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CPER_SIG_RECORD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _CPER_SIG_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CPER_SIG_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_memcpy
Lloh9:
	adrp	x8, _CPER_RECORD_REV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CPER_RECORD_REV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _CPER_SIG_END@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CPER_SIG_END@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x23, #-64]
	mov	w8, #1
	stur	w8, [x23, #-104]
Lloh15:
	adrp	x24, _CPER_SEV_FATAL@GOTPAGE
Lloh16:
	ldr	x24, [x24, _CPER_SEV_FATAL@GOTPAGEOFF]
	ldr	x8, [x24]
	stur	x8, [x23, #-72]
Lloh17:
	adrp	x8, _CPER_VALID_TIMESTAMP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CPER_VALID_TIMESTAMP@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	stur	w8, [x23, #-76]
	bl	_get_seconds
	stur	w0, [x23, #-80]
	add	w8, w22, #104
	stur	w8, [x23, #-100]
Lloh20:
	adrp	x8, _CPER_CREATOR_PSTORE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CPER_CREATOR_PSTORE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _CPER_NOTIFY_MCE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CPER_NOTIFY_MCE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	stp	w9, w8, [x23, #-88]
	bl	_cper_next_record_id
Lloh26:
	adrp	x8, _CPER_HW_ERROR_FLAGS_PREVERR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CPER_HW_ERROR_FLAGS_PREVERR@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	stp	w0, w8, [x23, #-96]
	stur	w25, [x23, #-48]
	stur	x22, [x23, #-40]
Lloh29:
	adrp	x8, _CPER_SEC_REV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CPER_SEC_REV@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	stur	w8, [x23, #-8]
	stur	xzr, [x23, #-16]
Lloh32:
	adrp	x8, _CPER_SEC_PRIMARY@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CPER_SEC_PRIMARY@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	stur	w8, [x23, #-20]
	cmp	w21, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_5
; %bb.2:
Lloh35:
	adrp	x8, _CPER_SECTION_TYPE_MCE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CPER_SECTION_TYPE_MCE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh37:
	adrp	x8, _CPER_SECTION_TYPE_DMESG@GOTPAGE
Lloh38:
	ldr	x8, [x8, _CPER_SECTION_TYPE_DMESG@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	str	w8, [x20, #80]
	ldr	x8, [x24]
	str	x8, [x20, #72]
	mov	x0, x20
	bl	_erst_write
	ldr	w8, [x20, #8]
	str	w8, [x19]
	b	LBB0_6
LBB0_5:
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_erst_info,8,3                  ; @erst_info
	.comm	_CPER_SIG_RECORD,4,2            ; @CPER_SIG_RECORD
	.comm	_CPER_SIG_SIZE,4,2              ; @CPER_SIG_SIZE
	.comm	_CPER_RECORD_REV,4,2            ; @CPER_RECORD_REV
	.comm	_CPER_SIG_END,4,2               ; @CPER_SIG_END
	.comm	_CPER_SEV_FATAL,8,3             ; @CPER_SEV_FATAL
	.comm	_CPER_VALID_TIMESTAMP,4,2       ; @CPER_VALID_TIMESTAMP
	.comm	_CPER_CREATOR_PSTORE,4,2        ; @CPER_CREATOR_PSTORE
	.comm	_CPER_NOTIFY_MCE,4,2            ; @CPER_NOTIFY_MCE
	.comm	_CPER_HW_ERROR_FLAGS_PREVERR,4,2 ; @CPER_HW_ERROR_FLAGS_PREVERR
	.comm	_CPER_SEC_REV,4,2               ; @CPER_SEC_REV
	.comm	_CPER_SEC_PRIMARY,4,2           ; @CPER_SEC_PRIMARY
	.comm	_CPER_SECTION_TYPE_DMESG,4,2    ; @CPER_SECTION_TYPE_DMESG
	.comm	_CPER_SECTION_TYPE_MCE,4,2      ; @CPER_SECTION_TYPE_MCE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_erst_writer
.subsections_via_symbols
