	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pmc_gcr_update           ## -- Begin function intel_pmc_gcr_update
	.p2align	4, 0x90
_intel_pmc_gcr_update:                  ## @intel_pmc_gcr_update
	.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
	movl	%edx, %r15d
	movl	%esi, %r12d
	movl	%edi, %ebx
	movq	_ipcdev@GOTPCREL(%rip), %rax
	leaq	4(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	%ebx, %edi
	callq	_is_gcr_valid
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_ipcdev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%ebx, %edi
	callq	_readl
	movl	%r12d, %edi
	notl	%edi
	andl	%eax, %edi
	andl	%r12d, %r15d
	orl	%r15d, %edi
	movq	_ipcdev@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%ebx, %esi
	callq	_writel
	movq	_ipcdev@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_readl
	andl	%r12d, %eax
	cmpl	%r15d, %eax
	je	LBB0_3
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ipcdev,8,2                     ## @ipcdev
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pmc_gcr_update           ; -- Begin function intel_pmc_gcr_update
	.p2align	2
_intel_pmc_gcr_update:                  ; @intel_pmc_gcr_update
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x24, _ipcdev@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ipcdev@GOTPAGEOFF]
	add	x19, x24, #4
	mov	x0, x19
	bl	_spin_lock
	mov	x0, x22
	bl	_is_gcr_valid
	mov	x20, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w8, [x24]
	add	w0, w8, w22
	bl	_readl
	bic	w8, w0, w21
	and	w23, w23, w21
	orr	w0, w8, w23
	ldr	w8, [x24]
	add	w1, w8, w22
	bl	_writel
	ldr	w8, [x24]
	add	w0, w8, w22
	bl	_readl
	and	w8, w0, w21
	cmp	w8, w23
	b.eq	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x20
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ipcdev,8,2                     ; @ipcdev
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
