	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_memory_error_data_from_mce
_get_memory_error_data_from_mce:        ## @get_memory_error_data_from_mce
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	16(%rsi), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$3, %edx
	callq	_GET_BITFIELD
	movl	%eax, %edx
	movq	_NUM_CHANNELS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_10
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rbx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	(%r15), %rax
	movq	32(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.2:
	movq	%rdx, %r15
	movl	(%rbx), %edi
	callq	*%rcx
	movl	%eax, (%r13)
	cmpl	$2, %eax
	jae	LBB0_12
## %bb.3:
	movl	4(%rbx), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%edi, (%rax)
	movl	(%r13), %esi
	callq	_get_mci_for_node_id
	testq	%rax, %rax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_14
## %bb.4:
	movq	(%rax), %r14
	movq	24(%r14), %rdi
	movq	_tad_dram_rule@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	8(%rbx), %r13
	movl	-52(%rbp), %edi
	callq	_TAD_LIMIT
	movl	$1, %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movl	$1, %ebx
	movslq	%edx, %rdx
	movq	%rdx, (%r12)
	movq	(%r14), %rcx
	movq	_FULL_MIRRORING@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rcx
	je	LBB0_7
## %bb.5:
	movq	_ADDR_RANGE_MIRRORING@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rcx
	jne	LBB0_19
## %bb.6:
	cmpq	%rax, %r13
	jg	LBB0_19
LBB0_7:
	leal	2(%r15), %ecx
	andb	$3, %cl
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orq	%rax, %rdx
	movq	%rdx, (%r12)
	jmp	LBB0_8
LBB0_10:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	jmp	LBB0_13
LBB0_11:
	movabsq	$7520857881602715470, %rax      ## imm = 0x685F746567206F4E
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	$2697313, 8(%rcx)               ## imm = 0x292861
	jmp	LBB0_15
LBB0_12:
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_13:
	xorl	%eax, %eax
	callq	_sprintf
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	leaq	L_.str.3(%rip), %rsi
	callq	_strcpy
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_16:
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, 8(%r14)
	xorl	%ebx, %ebx
	cmpq	$0, 16(%r14)
	je	LBB0_17
## %bb.9:
	leal	1(%r15), %ecx
	andb	$3, %cl
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orq	%rax, %rdx
	movq	%rdx, (%r12)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_CHANNELS,4,2               ## @NUM_CHANNELS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid channel 0x%x"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"No get_ha()"

L_.str.2:                               ## @.str.2
	.asciz	"Impossible bank %d"

L_.str.3:                               ## @.str.3
	.asciz	"mci socket got corrupted!"

	.comm	_tad_dram_rule,8,3              ## @tad_dram_rule
	.comm	_FULL_MIRRORING,8,3             ## @FULL_MIRRORING
	.comm	_ADDR_RANGE_MIRRORING,8,3       ## @ADDR_RANGE_MIRRORING
	.no_dead_strip	_get_memory_error_data_from_mce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_memory_error_data_from_mce
_get_memory_error_data_from_mce:        ; @get_memory_error_data_from_mce
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x5
	mov	x19, x4
	mov	x23, x3
	mov	x24, x2
	mov	x22, x1
	mov	x25, x0
	ldr	w0, [x1, #16]
	mov	w1, #0
	mov	w2, #3
	bl	_GET_BITFIELD
	mov	x20, x0
Lloh0:
	adrp	x8, _NUM_CHANNELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_CHANNELS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_7
; %bb.1:
	ldr	x8, [x25]
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_8
; %bb.2:
	ldr	w0, [x22]
	blr	x8
	str	w0, [x23]
	cmp	w0, #2
	b.hs	LBB0_9
; %bb.3:
	ldr	w0, [x22, #4]
	str	w0, [x24]
	ldr	w1, [x23]
	bl	_get_mci_for_node_id
	cbz	x0, LBB0_16
; %bb.4:
	ldr	x21, [x0]
	ldr	x0, [x21, #24]
Lloh3:
	adrp	x8, _tad_dram_rule@GOTPAGE
Lloh4:
	ldr	x8, [x8, _tad_dram_rule@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	x22, [x22, #8]
	ldr	w0, [sp, #12]
	bl	_TAD_LIMIT
	mov	w9, #1
	lsl	w8, w9, w20
	sxtw	x8, w8
	str	x8, [x19]
	ldr	x10, [x21]
Lloh6:
	adrp	x11, _FULL_MIRRORING@GOTPAGE
Lloh7:
	ldr	x11, [x11, _FULL_MIRRORING@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x10, x11
	b.eq	LBB0_13
; %bb.5:
Lloh9:
	adrp	x11, _ADDR_RANGE_MIRRORING@GOTPAGE
Lloh10:
	ldr	x11, [x11, _ADDR_RANGE_MIRRORING@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x10, x11
	ccmp	x22, x0, #0, eq
	b.le	LBB0_13
; %bb.6:
	mov	w9, #0
	b	LBB0_14
LBB0_7:
	str	x20, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_8:
	mov	w8, #10337
	movk	w8, #41, lsl #16
	str	w8, [x21, #8]
Lloh14:
	adrp	x8, l_.str.1@PAGE
Lloh15:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh16:
	ldr	x8, [x8]
	str	x8, [x21]
	b	LBB0_11
LBB0_9:
	ldr	w8, [x22]
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	mov	x0, x21
	bl	_sprintf
LBB0_11:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	add	w10, w20, #2
	and	w10, w10, #0x3
	lsl	w10, w9, w10
	orr	x8, x10, x8
	str	x8, [x19]
LBB0_14:
	str	w9, [x21, #8]
	ldr	x9, [x21, #16]
	cbz	x9, LBB0_17
; %bb.15:
	mov	w0, #0
	add	w9, w20, #1
	and	w9, w9, #0x3
	mov	w10, #1
	lsl	w9, w10, w9
	orr	x8, x8, x9
	str	x8, [x19]
	b	LBB0_12
LBB0_16:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_strcpy
	b	LBB0_11
LBB0_17:
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAddLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_CHANNELS,4,2               ; @NUM_CHANNELS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid channel 0x%x"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"No get_ha()"

l_.str.2:                               ; @.str.2
	.asciz	"Impossible bank %d"

l_.str.3:                               ; @.str.3
	.asciz	"mci socket got corrupted!"

	.comm	_tad_dram_rule,8,3              ; @tad_dram_rule
	.comm	_FULL_MIRRORING,8,3             ; @FULL_MIRRORING
	.comm	_ADDR_RANGE_MIRRORING,8,3       ; @ADDR_RANGE_MIRRORING
	.no_dead_strip	_get_memory_error_data_from_mce
.subsections_via_symbols
