	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function biosmptable_check_mpcth
_biosmptable_check_mpcth:               ## @biosmptable_check_mpcth
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$1048576, %ebx                  ## imm = 0x100000
	jl	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ebx, %esi
LBB0_2:
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_28
LBB0_3:
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$8, %edx
	callq	_memread
	testl	%eax, %eax
	je	LBB0_27
## %bb.6:
	movl	4(%r14), %r15d
	movq	_MPCTH_SIG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_strlen
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
LBB0_27:
	movq	%r14, %rdi
	callq	_free
	xorl	%r14d, %r14d
	jmp	LBB0_28
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_warnx
LBB0_28:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r14), %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	callq	_memread
	testl	%eax, %eax
	je	LBB0_27
## %bb.11:
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_28
## %bb.12:
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.13:
	movl	%eax, %esi
	jmp	LBB0_25
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r15d, %esi
	jmp	LBB0_2
LBB0_14:
	leaq	-1(%rax), %rdx
	movl	$1, %ecx
	cmpq	$8, %rdx
	jae	LBB0_16
## %bb.15:
	movl	%eax, %esi
	jmp	LBB0_24
LBB0_16:
	movq	%rdx, %rcx
	andq	$-8, %rcx
	movd	%eax, %xmm0
	leaq	-8(%rcx), %rdi
	movq	%rdi, %rsi
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %ebx
	andl	$3, %ebx
	cmpq	$24, %rdi
	jae	LBB0_18
## %bb.17:
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
	jmp	LBB0_20
LBB0_18:
	andq	$-4, %rsi
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movdqu	4(%r14,%rdi,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	20(%r14,%rdi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	36(%r14,%rdi,4), %xmm1
	movdqu	52(%r14,%rdi,4), %xmm3
	movdqu	68(%r14,%rdi,4), %xmm4
	paddd	%xmm1, %xmm4
	paddd	%xmm2, %xmm4
	movdqu	84(%r14,%rdi,4), %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm0, %xmm2
	movdqu	100(%r14,%rdi,4), %xmm0
	paddd	%xmm4, %xmm0
	movdqu	116(%r14,%rdi,4), %xmm1
	paddd	%xmm2, %xmm1
	addq	$32, %rdi
	addq	$-4, %rsi
	jne	LBB0_19
LBB0_20:
	testq	%rbx, %rbx
	je	LBB0_22
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	leaq	(,%rdi,4), %rsi
	orq	$4, %rsi
	movdqu	(%r14,%rsi), %xmm2
	paddd	%xmm2, %xmm0
	movdqu	16(%r14,%rsi), %xmm2
	paddd	%xmm2, %xmm1
	addq	$8, %rdi
	decq	%rbx
	jne	LBB0_21
LBB0_22:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %esi
	cmpq	%rcx, %rdx
	je	LBB0_25
## %bb.23:
	orq	$1, %rcx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	addl	(%r14,%rcx,4), %esi
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_24
LBB0_25:
	testl	%esi, %esi
	je	LBB0_28
## %bb.26:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad mpcth address (0x%jx)\n"

L_.str.1:                               ## @.str.1
	.asciz	"unable to malloc space for MP Configuration Table Header"

	.comm	_MPCTH_SIG,4,2                  ## @MPCTH_SIG
L_.str.2:                               ## @.str.2
	.asciz	"bad mpcth signature"

L_.str.3:                               ## @.str.3
	.asciz	"unable to realloc space for mpcth (len %u)"

L_.str.4:                               ## @.str.4
	.asciz	"bad mpcth checksum (%d)"

	.no_dead_strip	_biosmptable_check_mpcth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function biosmptable_check_mpcth
_biosmptable_check_mpcth:               ; @biosmptable_check_mpcth
	.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
	mov	x20, x0
	cmp	w20, #256, lsl #12              ; =1048576
	b.lt	LBB0_2
; %bb.1:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	b	LBB0_8
LBB0_2:
	mov	w0, #8
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #8
	bl	_memread
	cbz	w0, LBB0_7
; %bb.4:
	ldr	w21, [x19, #4]
Lloh2:
	adrp	x8, _MPCTH_SIG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MPCTH_SIG@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_11
; %bb.5:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_6:
	bl	_warnx
LBB0_7:
	mov	x0, x19
	bl	_free
LBB0_8:
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	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
LBB0_10:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	b	LBB0_9
LBB0_11:
	ldr	w21, [x19]
	mov	x0, x19
	mov	x1, x21
	bl	_realloc
	mov	x19, x0
	cbz	x0, LBB0_16
; %bb.12:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_memread
	cbz	w0, LBB0_7
; %bb.13:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.14:
	b.ne	LBB0_17
; %bb.15:
	mov	x12, x8
	b	LBB0_24
LBB0_16:
	str	x21, [sp]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warnx
	b	LBB0_9
LBB0_17:
	sub	x10, x8, #1
	cmp	x10, #16
	b.hs	LBB0_19
; %bb.18:
	mov	w9, #1
	mov	x12, x8
	b	LBB0_22
LBB0_19:
	and	x11, x10, #0xfffffffffffffff0
	orr	x9, x11, #0x1
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w8
	add	x12, x19, #36
	mov	x13, x11
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x12, #-32]
	ldp	q6, q7, [x12], #64
	add.4s	v1, v4, v1
	add.4s	v0, v5, v0
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	subs	x13, x13, #16
	b.ne	LBB0_20
; %bb.21:
	add.4s	v0, v0, v1
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w12, s0
	cmp	x10, x11
	b.eq	LBB0_24
LBB0_22:
	sub	x8, x8, x9
	add	x9, x19, x9, lsl #2
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9], #4
	add	w12, w10, w12
	subs	x8, x8, #1
	b.ne	LBB0_23
LBB0_24:
	cbz	w12, LBB0_9
; %bb.25:
	str	x12, [sp]
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad mpcth address (0x%jx)\n"

l_.str.1:                               ; @.str.1
	.asciz	"unable to malloc space for MP Configuration Table Header"

	.comm	_MPCTH_SIG,4,2                  ; @MPCTH_SIG
l_.str.2:                               ; @.str.2
	.asciz	"bad mpcth signature"

l_.str.3:                               ; @.str.3
	.asciz	"unable to realloc space for mpcth (len %u)"

l_.str.4:                               ; @.str.4
	.asciz	"bad mpcth checksum (%d)"

	.no_dead_strip	_biosmptable_check_mpcth
.subsections_via_symbols
