	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_scu_ipc_raw_command      ## -- Begin function intel_scu_ipc_raw_command
	.p2align	4, 0x90
_intel_scu_ipc_raw_command:             ## @intel_scu_ipc_raw_command
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movq	%r8, %r14
	movl	%ecx, %ebx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movl	%edi, -76(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%ecx, %edi
	movl	$4, %esi
	callq	_DIV_ROUND_UP
	cmpl	$5, %eax
	jl	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movl	%eax, %r13d
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movq	_ipclock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_ipcdev@GOTPCREL(%rip), %rbx
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.5:
	movl	%r15d, -72(%rbp)                ## 4-byte Spill
	movl	24(%rbp), %r15d
	movl	16(%rbp), %edi
	movq	_IPC_DPTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	_IPC_SPTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel
	leaq	-64(%rbp), %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	testl	%r13d, %r13d
	jle	LBB0_8
## %bb.6:
	movl	%r13d, %r15d
	shlq	$2, %r15
	xorl	%ebx, %ebx
	movq	_ipcdev@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	-64(%rbp,%rbx), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_ipc_data_writel
	addq	$4, %rbx
	cmpq	%rbx, %r15
	jne	LBB0_7
LBB0_8:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	shll	$16, %eax
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	shll	$12, %esi
	orl	-76(%rbp), %esi                 ## 4-byte Folded Reload
	orl	%eax, %esi
	movq	_ipcdev@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_ipc_command
	movq	%rbx, %rdi
	callq	_intel_scu_ipc_check_status
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	testl	%r12d, %r12d
	jle	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	movq	_ipcdev@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_ipc_data_readl
	movl	%eax, (%r14,%rbx)
	addq	$4, %rbx
	decl	%r12d
	jne	LBB0_11
LBB0_12:
	movq	_ipclock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_13
LBB0_4:
	movq	_ipclock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ipcdev,16,3                    ## @ipcdev
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ipclock,4,2                    ## @ipclock
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_IPC_DPTR,8,3                   ## @IPC_DPTR
	.comm	_IPC_SPTR,8,3                   ## @IPC_SPTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_scu_ipc_raw_command      ; -- Begin function intel_scu_ipc_raw_command
	.p2align	2
_intel_scu_ipc_raw_command:             ; @intel_scu_ipc_raw_command
	.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
	mov	x26, x7
	mov	x27, x6
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x25, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	x0, x3
	mov	w1, #4
	bl	_DIV_ROUND_UP
	cmp	w0, #5
	b.lt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_2:
	mov	x24, x0
Lloh5:
	adrp	x0, _ipclock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _ipclock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh7:
	adrp	x28, _ipcdev@GOTPAGE
Lloh8:
	ldr	x28, [x28, _ipcdev@GOTPAGEOFF]
	ldr	x8, [x28, #8]
	cbz	x8, LBB0_13
; %bb.3:
	ldr	x8, [x28]
Lloh9:
	adrp	x9, _IPC_DPTR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IPC_DPTR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x27
	bl	_writel
	ldr	x8, [x28]
Lloh12:
	adrp	x9, _IPC_SPTR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IPC_SPTR@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x26
	bl	_writel
	add	x0, sp, #8
	mov	x1, x25
	mov	x2, x21
	bl	_memcpy
	cmp	w24, #1
	b.lt	LBB0_8
; %bb.4:
	ldr	w1, [sp, #8]
Lloh15:
	adrp	x0, _ipcdev@GOTPAGE
Lloh16:
	ldr	x0, [x0, _ipcdev@GOTPAGEOFF]
	mov	w2, #0
	bl	_ipc_data_writel
	cmp	w24, #1
	b.eq	LBB0_8
; %bb.5:
	ldr	w1, [sp, #12]
Lloh17:
	adrp	x0, _ipcdev@GOTPAGE
Lloh18:
	ldr	x0, [x0, _ipcdev@GOTPAGEOFF]
	mov	w2, #4
	bl	_ipc_data_writel
	cmp	w24, #2
	b.eq	LBB0_8
; %bb.6:
	ldr	w1, [sp, #16]
Lloh19:
	adrp	x0, _ipcdev@GOTPAGE
Lloh20:
	ldr	x0, [x0, _ipcdev@GOTPAGEOFF]
	mov	w2, #8
	bl	_ipc_data_writel
	cmp	w24, #3
	b.eq	LBB0_8
; %bb.7:
	ldr	w1, [sp, #20]
Lloh21:
	adrp	x0, _ipcdev@GOTPAGE
Lloh22:
	ldr	x0, [x0, _ipcdev@GOTPAGEOFF]
	mov	w2, #12
	bl	_ipc_data_writel
LBB0_8:
	orr	w8, w23, w22, lsl #12
	orr	w1, w8, w21, lsl #16
Lloh23:
	adrp	x21, _ipcdev@GOTPAGE
Lloh24:
	ldr	x21, [x21, _ipcdev@GOTPAGEOFF]
	mov	x0, x21
	bl	_ipc_command
	mov	x0, x21
	bl	_intel_scu_ipc_check_status
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.9:
	cmp	w19, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x22, #0
Lloh25:
	adrp	x23, _ipcdev@GOTPAGE
Lloh26:
	ldr	x23, [x23, _ipcdev@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x22
	bl	_ipc_data_readl
	str	w0, [x20, x22]
	add	x22, x22, #4
	subs	w19, w19, #1
	b.ne	LBB0_11
LBB0_12:
Lloh27:
	adrp	x0, _ipclock@GOTPAGE
Lloh28:
	ldr	x0, [x0, _ipclock@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_15
LBB0_13:
Lloh29:
	adrp	x0, _ipclock@GOTPAGE
Lloh30:
	ldr	x0, [x0, _ipclock@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh31:
	adrp	x8, _ENODEV@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_15:
	ldr	x8, [sp, #24]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	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_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_ipcdev,16,3                    ; @ipcdev
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ipclock,4,2                    ; @ipclock
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_IPC_DPTR,8,3                   ; @IPC_DPTR
	.comm	_IPC_SPTR,8,3                   ; @IPC_SPTR
.subsections_via_symbols
