	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nhmex_mbox_hw_config
_nhmex_mbox_hw_config:                  ## @nhmex_mbox_hw_config
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rax), %r13
	xorl	%edi, %edi
	cmpl	$-1, 32(%rsi)
	setne	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_2:
	movq	_nhmex_uncore_mbox_extra_regs@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_14
## %bb.3:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movzbl	%al, %edi
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_1
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%rbx), %eax
	movq	_EXTRA_REG_NHMEX_M_PLD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	$1, %eax
	cmovel	%eax, %r12d
	leal	(,%r12,8), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	$255, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	notl	%eax
	andl	%eax, 32(%r15)
	movl	%r12d, %r13d
	shll	$4, %r13d
	movl	$65535, %eax                    ## imm = 0xFFFF
	movl	%r13d, %ecx
	shll	%cl, %eax
	notl	%eax
	andl	%eax, 36(%r15)
	movq	%rbx, %rdi
	callq	_nhmex_mbox_extra_reg_idx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%eax, 32(%r15)
	movl	%r13d, %ecx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	shll	%cl, %r14d
	orl	%r14d, 36(%r15)
	movslq	(%r15), %rax
	movq	%rax, 40(%r15)
	incl	%r12d
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, 20(%rbx)
	leaq	20(%rbx), %rbx
	je	LBB0_14
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %eax
	andl	8(%r15), %eax
	cmpl	%eax, 4(%rbx)
	jne	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	12(%rbx), %eax
	notl	%eax
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%rbx), %r14d
	movl	32(%r15), %edi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	___BITS_VALUE
	cmpl	%eax, %r14d
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%rbx), %r14d
	movl	32(%r15), %edi
	movl	$1, %esi
	movl	$8, %edx
	callq	___BITS_VALUE
	cmpl	%eax, %r14d
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edi, %edi
	cmpl	$2, -48(%rbp)                   ## 4-byte Folded Reload
	setge	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_1
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %r14d
	imull	(%r13), %r14d
	addl	(%rbx), %r14d
	movb	$1, %al
	cmpl	$65534, %r14d                   ## imm = 0xFFFE
	ja	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$255, 16(%rbx)
	setge	%al
	jmp	LBB0_11
LBB0_14:
	movq	_EXTRA_REG_NHMEX_M_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movl	4(%r15), %ecx
	movq	_NHMEX_M_PMON_MM_CFG_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%ecx, %edx
	xorl	%eax, %eax
	cmpl	$1, %edx
	movl	$0, %edx
	sbbl	%edx, %edx
	orl	%ecx, %edx
	movslq	%edx, %rcx
	movq	%rcx, 24(%r15)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_15
## %bb.16:
	movq	_NHMEX_M1_MSR_PMU_MM_CFG@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_15:
	movq	_NHMEX_M0_MSR_PMU_MM_CFG@GOTPCREL(%rip), %rcx
LBB0_17:
	movl	(%rcx), %ecx
	movl	%ecx, 20(%r15)
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_nhmex_uncore_mbox_extra_regs,8,3 ## @nhmex_uncore_mbox_extra_regs
	.comm	_EXTRA_REG_NHMEX_M_PLD,4,2      ## @EXTRA_REG_NHMEX_M_PLD
	.comm	_EXTRA_REG_NHMEX_M_FILTER,4,2   ## @EXTRA_REG_NHMEX_M_FILTER
	.comm	_NHMEX_M_PMON_MM_CFG_EN,4,2     ## @NHMEX_M_PMON_MM_CFG_EN
	.comm	_NHMEX_M0_MSR_PMU_MM_CFG,4,2    ## @NHMEX_M0_MSR_PMU_MM_CFG
	.comm	_NHMEX_M1_MSR_PMU_MM_CFG,4,2    ## @NHMEX_M1_MSR_PMU_MM_CFG
	.no_dead_strip	_nhmex_mbox_hw_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function nhmex_mbox_hw_config
lCPI0_0:
	.long	3                               ; 0x3
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nhmex_mbox_hw_config:                  ; @nhmex_mbox_hw_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x22, [x8, #8]
	ldr	w8, [x1, #32]
	cmn	w8, #1
	cset	w0, ne
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_2:
Lloh3:
	adrp	x8, _nhmex_uncore_mbox_extra_regs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nhmex_uncore_mbox_extra_regs@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x8]
	ldr	w8, [x21]
	cbz	w8, LBB0_14
; %bb.3:
	mov	w25, #0
	mov	w23, #65534
Lloh6:
	adrp	x24, _EXTRA_REG_NHMEX_M_PLD@GOTPAGE
Lloh7:
	ldr	x24, [x24, _EXTRA_REG_NHMEX_M_PLD@GOTPAGEOFF]
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	movi	d9, #0x00ffff000000ff
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, #16]
	cmp	w8, #254
	cset	w0, gt
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_12
	b	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #8]
	ldp	w9, w10, [x21, #4]
	and	w8, w10, w8
	cmp	w9, w8
	b.ne	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x21, #12]
	bics	wzr, w8, w9
	b.ne	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w26, [x21, #16]
	ldr	w0, [x19, #32]
	mov	w1, #0
	mov	w2, #8
	bl	___BITS_VALUE
	cmp	w26, w0
	b.eq	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w26, [x21, #16]
	ldr	w0, [x19, #32]
	mov	w1, #1
	mov	w2, #8
	bl	___BITS_VALUE
	cmp	w26, w0
	b.eq	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w25, #1
	cset	w0, gt
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_1
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x22]
	ldr	x10, [x20]
	ldr	w10, [x10]
	madd	w26, w10, w9, w8
	cmp	w26, w23
	b.ls	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_1
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, #16]
	ldr	w9, [x24]
	cmp	w8, w9
	csinc	w25, w25, wzr, ne
	dup.2s	v0, w25
	ushl.2s	v0, v0, v8
	str	q0, [sp]                        ; 16-byte Folded Spill
	ushl.2s	v0, v9, v0
	ldr	d1, [x19, #32]
	bic.8b	v0, v1, v0
	str	d0, [x19, #32]
	mov	x0, x21
	bl	_nhmex_mbox_extra_reg_idx
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	fmov	w8, s0
	lsl	w8, w0, w8
	ldp	w9, w10, [x19, #32]
	orr	w8, w9, w8
	mov.s	w9, v0[1]
	lsl	w9, w26, w9
	orr	w9, w10, w9
	stp	w8, w9, [x19, #32]
	ldrsw	x8, [x19]
	str	x8, [x19, #40]
	add	w25, w25, #1
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, #20]!
	cbnz	w8, LBB0_5
LBB0_14:
Lloh10:
	adrp	x8, _EXTRA_REG_NHMEX_M_FILTER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EXTRA_REG_NHMEX_M_FILTER@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w8, [x19, #4]
Lloh13:
	adrp	x9, _NHMEX_M_PMON_MM_CFG_EN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NHMEX_M_PMON_MM_CFG_EN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	csinv	w8, w8, wzr, ne
	sxtw	x8, w8
	str	x8, [x19, #24]
	ldr	x8, [x20]
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.15:
	mov	w0, #0
Lloh16:
	adrp	x8, _NHMEX_M1_MSR_PMU_MM_CFG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NHMEX_M1_MSR_PMU_MM_CFG@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
	mov	w0, #0
Lloh18:
	adrp	x8, _NHMEX_M0_MSR_PMU_MM_CFG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NHMEX_M0_MSR_PMU_MM_CFG@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	str	w8, [x19, #20]
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_nhmex_uncore_mbox_extra_regs,8,3 ; @nhmex_uncore_mbox_extra_regs
	.comm	_EXTRA_REG_NHMEX_M_PLD,4,2      ; @EXTRA_REG_NHMEX_M_PLD
	.comm	_EXTRA_REG_NHMEX_M_FILTER,4,2   ; @EXTRA_REG_NHMEX_M_FILTER
	.comm	_NHMEX_M_PMON_MM_CFG_EN,4,2     ; @NHMEX_M_PMON_MM_CFG_EN
	.comm	_NHMEX_M0_MSR_PMU_MM_CFG,4,2    ; @NHMEX_M0_MSR_PMU_MM_CFG
	.comm	_NHMEX_M1_MSR_PMU_MM_CFG,4,2    ; @NHMEX_M1_MSR_PMU_MM_CFG
	.no_dead_strip	_nhmex_mbox_hw_config
.subsections_via_symbols
