	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pmc_ipc_raw_cmd          ## -- Begin function intel_pmc_ipc_raw_cmd
	.p2align	4, 0x90
_intel_pmc_ipc_raw_cmd:                 ## @intel_pmc_ipc_raw_cmd
	.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
	movl	%ecx, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_IPC_DATA_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	cmpl	%r15d, %ecx
	jl	LBB0_2
## %bb.1:
	movl	%r9d, %r12d
	sarl	$2, %eax
	cmpl	%r9d, %eax
	jl	LBB0_2
## %bb.4:
	movq	%r8, %r14
	movq	%rdx, %r13
	movl	%edi, -68(%rbp)                 ## 4-byte Spill
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	movq	_ipclock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_ipcdev@GOTPCREL(%rip), %rbx
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.6:
	leaq	-64(%rbp), %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	_IPC_DPTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	16(%rbp), %edi
	callq	_writel
	movq	_IPC_SPTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	24(%rbp), %edi
	callq	_writel
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.7:
	leal	3(%r15), %r13d
	andl	$-4, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	-64(%rbp,%rbx), %edi
	movl	%ebx, %esi
	callq	_ipc_data_writel
	addq	$4, %rbx
	cmpq	%rbx, %r13
	jne	LBB0_8
LBB0_9:
	movq	_IPC_CMD_SIZE@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movq	_IPC_CMD_SUBCMD@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-72(%rbp), %eax                 ## 4-byte Reload
	shll	%cl, %eax
	orl	-68(%rbp), %r15d                ## 4-byte Folded Reload
	orl	%eax, %r15d
	movl	%r15d, %edi
	callq	_ipc_send_command
	xorl	%eax, %eax
	callq	_intel_pmc_ipc_check_status
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	testl	%r12d, %r12d
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_ipc_data_readl
	movl	%eax, (%r14,%rbx)
	addq	$4, %rbx
	decl	%r12d
	jne	LBB0_12
LBB0_13:
	movq	_ipclock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_14
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_ipclock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IPC_DATA_BUFFER_SIZE,4,2       ## @IPC_DATA_BUFFER_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ipclock,4,2                    ## @ipclock
	.comm	_ipcdev,16,3                    ## @ipcdev
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_IPC_DPTR,8,3                   ## @IPC_DPTR
	.comm	_IPC_SPTR,8,3                   ## @IPC_SPTR
	.comm	_IPC_CMD_SIZE,4,2               ## @IPC_CMD_SIZE
	.comm	_IPC_CMD_SUBCMD,4,2             ## @IPC_CMD_SUBCMD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pmc_ipc_raw_cmd          ; -- Begin function intel_pmc_ipc_raw_cmd
	.p2align	2
_intel_pmc_ipc_raw_cmd:                 ; @intel_pmc_ipc_raw_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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 w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	stp	xzr, xzr, [sp, #8]
Lloh3:
	adrp	x8, _IPC_DATA_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPC_DATA_BUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w9, w9, #2
	cmp	w8, w3
	ccmp	w9, w5, #8, ge
	b.ge	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
	mov	x24, x7
	mov	x25, x6
	mov	x19, x5
	mov	x20, x4
	mov	x23, x3
	mov	x26, x2
	mov	x22, x1
	mov	x21, x0
Lloh8:
	adrp	x0, _ipclock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _ipclock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh10:
	adrp	x28, _ipcdev@GOTPAGE
Lloh11:
	ldr	x28, [x28, _ipcdev@GOTPAGEOFF]
	ldr	x8, [x28, #8]
	cbz	x8, LBB0_11
; %bb.3:
	add	x27, sp, #8
	add	x0, sp, #8
	mov	x1, x26
	mov	x2, x23
	bl	_memcpy
	ldr	x8, [x28]
Lloh12:
	adrp	x9, _IPC_DPTR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IPC_DPTR@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x25
	bl	_writel
	ldr	x8, [x28]
Lloh15:
	adrp	x9, _IPC_SPTR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IPC_SPTR@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x24
	bl	_writel
	cmp	w23, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x24, #0
	add	w8, w23, #3
	and	w25, w8, #0xfffffffc
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x27, x24]
	mov	x1, x24
	bl	_ipc_data_writel
	add	x24, x24, #4
	cmp	x25, x24
	b.ne	LBB0_5
LBB0_6:
Lloh18:
	adrp	x8, _IPC_CMD_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IPC_CMD_SIZE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	lsl	w8, w23, w8
Lloh21:
	adrp	x9, _IPC_CMD_SUBCMD@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IPC_CMD_SUBCMD@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	lsl	w9, w22, w9
	orr	w8, w8, w21
	orr	w0, w8, w9
	bl	_ipc_send_command
	bl	_intel_pmc_ipc_check_status
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.7:
	cmp	w19, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x22, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_ipc_data_readl
	str	w0, [x20, x22]
	add	x22, x22, #4
	subs	w19, w19, #1
	b.ne	LBB0_9
LBB0_10:
Lloh24:
	adrp	x0, _ipclock@GOTPAGE
Lloh25:
	ldr	x0, [x0, _ipclock@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_13
LBB0_11:
Lloh26:
	adrp	x0, _ipclock@GOTPAGE
Lloh27:
	ldr	x0, [x0, _ipclock@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh28:
	adrp	x8, _ENODEV@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	ldr	x8, [sp, #24]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_IPC_DATA_BUFFER_SIZE,4,2       ; @IPC_DATA_BUFFER_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ipclock,4,2                    ; @ipclock
	.comm	_ipcdev,16,3                    ; @ipcdev
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_IPC_DPTR,8,3                   ; @IPC_DPTR
	.comm	_IPC_SPTR,8,3                   ; @IPC_SPTR
	.comm	_IPC_CMD_SIZE,4,2               ; @IPC_CMD_SIZE
	.comm	_IPC_CMD_SUBCMD,4,2             ; @IPC_CMD_SUBCMD
.subsections_via_symbols
