	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function IFX_MEI_MailboxWrite
_IFX_MEI_MailboxWrite:                  ## @IFX_MEI_MailboxWrite
	.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
	movq	%rsi, %rax
	movq	%rdi, %rbx
	movl	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	movq	_MEI_TO_ARC_MAILBOX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%edx, %r14d
	shrl	$31, %r14d
	addl	%edx, %r14d
	sarl	%r14d
	movq	%rax, %rdx
	movl	%r14d, %ecx
	callq	_IFX_MEI_DMAWrite
	movq	_MEI_TO_ARC_MAILBOXR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_IFX_MEI_DMAWrite
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_DSL_DEV_PRIVATE
	movl	$1, (%rax)
	movq	_ME_ME2ARC_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MEI_TO_ARC_MSGAV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_IFX_MEI_LongWordWriteOffset
	movq	_WHILE_DELAY@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_6
## %bb.1:
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, %r15d
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ME_ME2ARC_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rdx
	callq	_IFX_MEI_LongWordReadOffset
	movl	-44(%rbp), %eax
	notl	%eax
	movq	_MEI_TO_ARC_MSGAV@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	movl	(%r13), %eax
	cmpl	%eax, %r15d
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_IFX_MEI_EMSG
	movq	_DSL_DEV_MEI_ERR_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	(%r13), %eax
	jmp	LBB0_5
LBB0_6:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSL_DEV_MEI_ERR_SUCCESS,4,2    ## @DSL_DEV_MEI_ERR_SUCCESS
	.comm	_MEI_TO_ARC_MAILBOX,4,2         ## @MEI_TO_ARC_MAILBOX
	.comm	_MEI_TO_ARC_MAILBOXR,4,2        ## @MEI_TO_ARC_MAILBOXR
	.comm	_ME_ME2ARC_INT,8,3              ## @ME_ME2ARC_INT
	.comm	_MEI_TO_ARC_MSGAV,4,2           ## @MEI_TO_ARC_MSGAV
	.comm	_WHILE_DELAY,4,2                ## @WHILE_DELAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	">>> Timeout waiting for ARC to clear MEI_TO_ARC_MSGAV!!! MEI_TO_ARC message size = %d DWORDs <<<\n"

	.comm	_DSL_DEV_MEI_ERR_FAILURE,4,2    ## @DSL_DEV_MEI_ERR_FAILURE
	.no_dead_strip	_IFX_MEI_MailboxWrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function IFX_MEI_MailboxWrite
_IFX_MEI_MailboxWrite:                  ; @IFX_MEI_MailboxWrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [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 w27, -88
	.cfi_offset w28, -96
	mov	x8, x1
	mov	x19, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x9, _MEI_TO_ARC_MAILBOX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MEI_TO_ARC_MAILBOX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	cmp	w2, #0
	cinc	w9, w2, lt
	asr	w20, w9, #1
	mov	x2, x8
	mov	x3, x20
	bl	_IFX_MEI_DMAWrite
Lloh3:
	adrp	x8, _MEI_TO_ARC_MAILBOXR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEI_TO_ARC_MAILBOXR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w22, #1
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #1
	bl	_IFX_MEI_DMAWrite
	mov	x21, x0
	mov	x0, x19
	bl	_DSL_DEV_PRIVATE
	str	w22, [x0]
Lloh6:
	adrp	x23, _ME_ME2ARC_INT@GOTPAGE
Lloh7:
	ldr	x23, [x23, _ME_ME2ARC_INT@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh8:
	adrp	x24, _MEI_TO_ARC_MSGAV@GOTPAGE
Lloh9:
	ldr	x24, [x24, _MEI_TO_ARC_MSGAV@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_IFX_MEI_LongWordWriteOffset
Lloh10:
	adrp	x25, _WHILE_DELAY@GOTPAGE
Lloh11:
	ldr	x25, [x25, _WHILE_DELAY@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w26, #0
Lloh12:
	adrp	x22, l_.str@PAGE
Lloh13:
	add	x22, x22, l_.str@PAGEOFF
Lloh14:
	adrp	x27, _DSL_DEV_MEI_ERR_FAILURE@GOTPAGE
Lloh15:
	ldr	x27, [x27, _DSL_DEV_MEI_ERR_FAILURE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w26, w8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	bl	_IFX_MEI_LongWordReadOffset
	ldr	w8, [sp, #12]
	ldr	w9, [x24]
	bics	wzr, w9, w8
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, #1
	ldr	w8, [x25]
	cmp	w26, w8
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_IFX_MEI_EMSG
	ldr	w21, [x27]
	ldr	w8, [x25]
	b	LBB0_2
LBB0_6:
	mov	x0, x21
	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	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DSL_DEV_MEI_ERR_SUCCESS,4,2    ; @DSL_DEV_MEI_ERR_SUCCESS
	.comm	_MEI_TO_ARC_MAILBOX,4,2         ; @MEI_TO_ARC_MAILBOX
	.comm	_MEI_TO_ARC_MAILBOXR,4,2        ; @MEI_TO_ARC_MAILBOXR
	.comm	_ME_ME2ARC_INT,8,3              ; @ME_ME2ARC_INT
	.comm	_MEI_TO_ARC_MSGAV,4,2           ; @MEI_TO_ARC_MSGAV
	.comm	_WHILE_DELAY,4,2                ; @WHILE_DELAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	">>> Timeout waiting for ARC to clear MEI_TO_ARC_MSGAV!!! MEI_TO_ARC message size = %d DWORDs <<<\n"

	.comm	_DSL_DEV_MEI_ERR_FAILURE,4,2    ; @DSL_DEV_MEI_ERR_FAILURE
	.no_dead_strip	_IFX_MEI_MailboxWrite
.subsections_via_symbols
