	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_guc_send_mmio            ## -- Begin function intel_guc_send_mmio
	.p2align	4, 0x90
_intel_guc_send_mmio:                   ## @intel_guc_send_mmio
	.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	%r8d, %ebx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %r12
	callq	_guc_to_gt
	movq	(%rax), %r14
	xorl	%edi, %edi
	testl	%r15d, %r15d
	sete	%dil
	callq	_GEM_BUG_ON
	xorl	%edi, %edi
	cmpl	%r15d, 4(%r12)
	setl	%dil
	callq	_GEM_BUG_ON
	movq	_INTEL_GUC_MSG_CODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	andl	(%r13), %edi
	callq	_GEM_BUG_ON
	movl	(%r13), %eax
	movq	_INTEL_GUC_ACTION_REGISTER_COMMAND_TRANSPORT_BUFFER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setne	%cl
	movq	_INTEL_GUC_ACTION_DEREGISTER_COMMAND_TRANSPORT_BUFFER@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_GEM_BUG_ON
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	8(%r12), %esi
	movq	%r14, %rdi
	callq	_intel_uncore_forcewake_get
	testl	%r15d, %r15d
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	jle	LBB0_1
## %bb.2:
	movl	%r15d, -64(%rbp)                ## 4-byte Spill
	movl	%r15d, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_guc_send_reg
	movl	(%r13,%r15,4), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_uncore_write
	incq	%r15
	cmpq	%r15, %rbx
	jne	LBB0_3
## %bb.4:
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	decl	%esi
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %esi
LBB0_5:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_guc_send_reg
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_uncore_posting_read
	movq	%r12, %rdi
	callq	_intel_guc_notify
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_guc_send_reg
	movq	_INTEL_GUC_MSG_TYPE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_INTEL_GUC_MSG_TYPE_RESPONSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_INTEL_GUC_MSG_TYPE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r8d
	leaq	-44(%rbp), %rcx
	movq	%rcx, (%rsp)
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r8d, %ecx
	movl	$10, %r8d
	movl	$10, %r9d
	callq	___intel_wait_for_register_fw
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_9:
	movl	(%r13), %esi
	movl	-44(%rbp), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_DRM_ERROR
	jmp	LBB0_15
LBB0_6:
	movl	-44(%rbp), %edi
	callq	_INTEL_GUC_MSG_IS_RESPONSE_SUCCESS
	testl	%eax, %eax
	je	LBB0_7
LBB0_10:
	testq	%r15, %r15
	je	LBB0_14
## %bb.11:
	movl	4(%r12), %esi
	decl	%esi
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_min
	testl	%eax, %eax
	jle	LBB0_14
## %bb.12:
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leaq	1(%rbx), %r13
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_guc_send_reg
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_uncore_read
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%rbx,4)
	movq	%r13, %rbx
	cmpq	%r13, %r15
	jne	LBB0_13
LBB0_14:
	movl	-44(%rbp), %edi
	callq	_INTEL_GUC_MSG_TO_DATA
	movl	%eax, %ebx
LBB0_15:
	movl	8(%r12), %esi
	movq	%r14, %rdi
	callq	_intel_uncore_forcewake_put
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.8:
	negl	%ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_GUC_MSG_CODE_MASK,4,2    ## @INTEL_GUC_MSG_CODE_MASK
	.comm	_INTEL_GUC_ACTION_REGISTER_COMMAND_TRANSPORT_BUFFER,4,2 ## @INTEL_GUC_ACTION_REGISTER_COMMAND_TRANSPORT_BUFFER
	.comm	_INTEL_GUC_ACTION_DEREGISTER_COMMAND_TRANSPORT_BUFFER,4,2 ## @INTEL_GUC_ACTION_DEREGISTER_COMMAND_TRANSPORT_BUFFER
	.comm	_INTEL_GUC_MSG_TYPE_MASK,4,2    ## @INTEL_GUC_MSG_TYPE_MASK
	.comm	_INTEL_GUC_MSG_TYPE_RESPONSE,4,2 ## @INTEL_GUC_MSG_TYPE_RESPONSE
	.comm	_INTEL_GUC_MSG_TYPE_SHIFT,4,2   ## @INTEL_GUC_MSG_TYPE_SHIFT
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MMIO: GuC action %#x failed with error %d %#x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_guc_send_mmio            ; -- Begin function intel_guc_send_mmio
	.p2align	2
_intel_guc_send_mmio:                   ; @intel_guc_send_mmio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x4
	mov	x21, x3
	mov	x24, x2
	mov	x23, x1
	mov	x19, x0
	bl	_guc_to_gt
	ldr	x20, [x0]
	cmp	w24, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	w8, [x19, #4]
	cmp	w8, w24
	cset	w0, lt
	bl	_GEM_BUG_ON
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _INTEL_GUC_MSG_CODE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INTEL_GUC_MSG_CODE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bic	w0, w8, w9
	bl	_GEM_BUG_ON
	ldr	w8, [x23]
Lloh3:
	adrp	x9, _INTEL_GUC_ACTION_REGISTER_COMMAND_TRANSPORT_BUFFER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INTEL_GUC_ACTION_REGISTER_COMMAND_TRANSPORT_BUFFER@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
Lloh6:
	adrp	x9, _INTEL_GUC_ACTION_DEREGISTER_COMMAND_TRANSPORT_BUFFER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _INTEL_GUC_ACTION_DEREGISTER_COMMAND_TRANSPORT_BUFFER@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ccmp	w8, w9, #4, ne
	cset	w0, ne
	bl	_GEM_BUG_ON
	mov	x0, x19
	bl	_mutex_lock
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_intel_uncore_forcewake_get
	subs	w25, w24, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x26, #0
	mov	w24, w24
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x26
	bl	_guc_send_reg
	mov	x1, x0
	ldr	w2, [x23, x26, lsl #2]
	mov	x0, x20
	bl	_intel_uncore_write
	add	x26, x26, #1
	cmp	x24, x26
	b.ne	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w25, #-1
LBB0_4:
	mov	x0, x19
	mov	x1, x25
	bl	_guc_send_reg
	mov	x1, x0
	mov	x0, x20
	bl	_intel_uncore_posting_read
	mov	x0, x19
	bl	_intel_guc_notify
	mov	x0, x19
	mov	w1, #0
	bl	_guc_send_reg
	mov	x1, x0
Lloh9:
	adrp	x8, _INTEL_GUC_MSG_TYPE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INTEL_GUC_MSG_TYPE_MASK@GOTPAGEOFF]
Lloh11:
	adrp	x9, _INTEL_GUC_MSG_TYPE_RESPONSE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _INTEL_GUC_MSG_TYPE_RESPONSE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	ldr	w8, [x9]
Lloh15:
	adrp	x9, _INTEL_GUC_MSG_TYPE_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _INTEL_GUC_MSG_TYPE_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	lsl	w3, w8, w9
	add	x6, sp, #12
	mov	x0, x20
	mov	w4, #10
	mov	w5, #10
	bl	___intel_wait_for_register_fw
	mov	x24, x0
	cbz	w0, LBB0_6
LBB0_5:
	ldr	w1, [x23]
	ldr	w3, [sp, #12]
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x24
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_6:
	ldr	w0, [sp, #12]
	bl	_INTEL_GUC_MSG_IS_RESPONSE_SUCCESS
	cbz	w0, LBB0_13
LBB0_7:
	cbz	x21, LBB0_11
; %bb.8:
	ldr	w8, [x19, #4]
	sub	w1, w8, #1
	mov	x0, x22
	bl	_min
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x24, #0
	mov	w23, w0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x22, x24, #1
	mov	x0, x19
	mov	x1, x22
	bl	_guc_send_reg
	mov	x1, x0
	mov	x0, x20
	bl	_intel_uncore_read
	str	w0, [x21, x24, lsl #2]
	mov	x24, x22
	cmp	x23, x22
	b.ne	LBB0_10
LBB0_11:
	ldr	w0, [sp, #12]
	bl	_INTEL_GUC_MSG_TO_DATA
	mov	x24, x0
LBB0_12:
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_intel_uncore_forcewake_put
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cbz	w8, LBB0_7
; %bb.14:
	neg	w24, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_GUC_MSG_CODE_MASK,4,2    ; @INTEL_GUC_MSG_CODE_MASK
	.comm	_INTEL_GUC_ACTION_REGISTER_COMMAND_TRANSPORT_BUFFER,4,2 ; @INTEL_GUC_ACTION_REGISTER_COMMAND_TRANSPORT_BUFFER
	.comm	_INTEL_GUC_ACTION_DEREGISTER_COMMAND_TRANSPORT_BUFFER,4,2 ; @INTEL_GUC_ACTION_DEREGISTER_COMMAND_TRANSPORT_BUFFER
	.comm	_INTEL_GUC_MSG_TYPE_MASK,4,2    ; @INTEL_GUC_MSG_TYPE_MASK
	.comm	_INTEL_GUC_MSG_TYPE_RESPONSE,4,2 ; @INTEL_GUC_MSG_TYPE_RESPONSE
	.comm	_INTEL_GUC_MSG_TYPE_SHIFT,4,2   ; @INTEL_GUC_MSG_TYPE_SHIFT
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MMIO: GuC action %#x failed with error %d %#x\n"

.subsections_via_symbols
