	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_cl_irq_write               ## -- Begin function mei_cl_irq_write
	.p2align	4, 0x90
_mei_cl_irq_write:                      ## @mei_cl_irq_write
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, 8(%r12)
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_32
LBB0_5:
	movq	8(%r12), %r13
	movq	(%r15), %rax
	movq	%rax, %rbx
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_6
LBB0_10:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %r14
	movq	24(%r15), %rax
	addq	%rbx, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_mei_hbuf_empty_slots
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	subq	%rbx, %r14
	movl	%eax, %edi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_mei_slots2data
	movq	%rax, %rbx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_mei_dma_ring_empty_slots
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_mei_slots2data
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	-64(%rbp), %rdi
	movq	%r15, %rsi
	callq	_mei_msg_hdr_init
	leaq	16(%r14), %rax
	cmpq	%rbx, %rax
	jbe	LBB0_13
## %bb.14:
	testq	%r13, %r13
	je	LBB0_19
## %bb.15:
	cmpq	$24, %rbx
	jb	LBB0_19
## %bb.16:
	movl	$1, -52(%rbp)
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	cmpq	%r13, %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	ja	LBB0_18
## %bb.17:
	movl	$1, -56(%rbp)
	movq	%r14, %r13
LBB0_18:
	leaq	-112(%rbp), %rbx
	movq	$8, -64(%rbp)
	movq	%r13, -112(%rbp)
	movl	$8, %r14d
	jmp	LBB0_22
LBB0_6:
	movq	%r12, %rdi
	callq	_mei_cl_tx_flow_ctrl_creds
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	je	LBB0_33
## %bb.9:
	movq	(%r15), %rbx
	jmp	LBB0_10
LBB0_11:
	movq	_EOVERFLOW@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_28
LBB0_13:
	movq	%r14, -64(%rbp)
	movl	$1, -56(%rbp)
	movq	%r14, %r13
	jmp	LBB0_21
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_28
LBB0_19:
	movq	%rbx, %r13
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mei_hbuf_depth
	xorl	%ebx, %ebx
	cmpq	-88(%rbp), %rax                 ## 8-byte Folded Reload
	jne	LBB0_32
## %bb.20:
	addq	$-16, %r13
	movq	%r13, -64(%rbp)
	movq	%r13, %r14
LBB0_21:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_22:
	cmpl	$0, -52(%rbp)
	je	LBB0_24
## %bb.23:
	movq	24(%r15), %rsi
	addq	(%r15), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_mei_dma_ring_write
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %r14
LBB0_24:
	leaq	-64(%rbp), %rsi
	movl	$16, %edx
	movq	%rbx, %rcx
	movq	%r14, %r8
	callq	_mei_write_message
	movl	%eax, %ebx
	testl	%eax, %eax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_25
LBB0_28:
	movl	%ebx, (%r12)
	addq	$8, %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
LBB0_31:
	callq	_list_move_tail
LBB0_32:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movl	$0, (%r12)
	movq	_MEI_WRITING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	addq	%r13, (%r15)
	cmpq	$0, -104(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_26
LBB0_29:
	xorl	%ebx, %ebx
	cmpl	$0, -56(%rbp)
	je	LBB0_32
## %bb.30:
	addq	$8, %r15
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_31
LBB0_33:
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_cl_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_32
LBB0_26:
	movq	%r12, %rdi
	callq	_mei_cl_tx_flow_ctrl_creds_reduce
	testq	%rax, %rax
	je	LBB0_29
## %bb.27:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No flow control credentials: not sending.\n"

	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_MEI_WRITING,4,2                ## @MEI_WRITING
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_cl_irq_write               ; -- Begin function mei_cl_irq_write
	.p2align	2
_mei_cl_irq_write:                      ; @mei_cl_irq_write
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x21, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_30
LBB0_3:
	mov	w0, #1
	bl	_WARN_ON
	cbnz	x0, LBB0_2
LBB0_4:
	ldr	x22, [x21, #8]
	ldr	x25, [x19]
	mov	x23, x25
	cbz	x25, LBB0_12
LBB0_5:
	ldp	x24, x26, [x19, #16]
	mov	x0, x22
	bl	_mei_hbuf_empty_slots
	tbnz	w0, #31, LBB0_15
; %bb.6:
	sub	x24, x24, x23
	add	x8, x26, x23
	str	x8, [sp]                        ; 8-byte Folded Spill
	mov	w26, w0
	mov	x0, x26
	bl	_mei_slots2data
	mov	x27, x0
	mov	x0, x22
	bl	_mei_dma_ring_empty_slots
	mov	x28, x0
	bl	_mei_slots2data
	mov	x23, x0
	add	x0, sp, #16
	mov	x1, x19
	bl	_mei_msg_hdr_init
	add	x8, x24, #16
	cmp	x8, x27
	b.ls	LBB0_17
; %bb.7:
	cbz	x28, LBB0_18
; %bb.8:
	cmp	x27, #24
	b.lo	LBB0_18
; %bb.9:
	mov	w8, #1
	str	w8, [sp, #28]
	mov	x26, x23
	cmp	x24, x23
	b.hi	LBB0_11
; %bb.10:
	str	w8, [sp, #24]
	mov	x26, x24
LBB0_11:
	add	x23, sp, #8
	mov	w24, #8
	stp	x26, x24, [sp, #8]
	b	LBB0_21
LBB0_12:
	mov	x0, x21
	bl	_mei_cl_tx_flow_ctrl_creds
	mov	x23, x0
	tbnz	w0, #31, LBB0_24
; %bb.13:
	cbz	w23, LBB0_29
; %bb.14:
	ldr	x23, [x19]
	b	LBB0_5
LBB0_15:
Lloh3:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_24
LBB0_17:
	str	x24, [sp, #16]
	mov	w8, #1
	str	w8, [sp, #24]
	b	LBB0_20
LBB0_18:
	mov	x0, x22
	bl	_mei_hbuf_depth
	cmp	x0, x26
	b.ne	LBB0_28
; %bb.19:
	sub	x24, x27, #16
	str	x24, [sp, #16]
LBB0_20:
	mov	x26, x24
	ldr	x23, [sp]                       ; 8-byte Folded Reload
LBB0_21:
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_23
; %bb.22:
	ldr	x8, [x19, #24]
	ldr	x9, [x19]
	add	x1, x8, x9
	mov	x0, x22
	mov	x2, x26
	bl	_mei_dma_ring_write
	ldr	x24, [sp, #16]
LBB0_23:
	add	x1, sp, #16
	mov	x0, x22
	mov	w2, #16
	mov	x3, x23
	mov	x4, x24
	bl	_mei_write_message
	mov	x23, x0
	cbz	w0, LBB0_25
LBB0_24:
	str	w23, [x21]
	add	x0, x19, #8
	mov	x1, x20
	bl	_list_move_tail
	b	LBB0_30
LBB0_25:
Lloh5:
	adrp	x8, _MEI_WRITING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MEI_WRITING@GOTPAGEOFF]
	str	wzr, [x21]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x21, #4]
	ldr	x8, [x19]
	add	x8, x8, x26
	str	x8, [x19]
	cbz	x25, LBB0_31
LBB0_26:
	ldr	w8, [sp, #24]
	cbz	w8, LBB0_28
; %bb.27:
	add	x0, x19, #8
	mov	x1, x22
	bl	_list_move_tail
LBB0_28:
	mov	w23, #0
	b	LBB0_30
LBB0_29:
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x1, x21
	bl	_cl_dbg
LBB0_30:
	mov	x0, x23
	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_31:
	mov	x0, x21
	bl	_mei_cl_tx_flow_ctrl_creds_reduce
	cbz	x0, LBB0_26
; %bb.32:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No flow control credentials: not sending.\n"

	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_MEI_WRITING,4,2                ; @MEI_WRITING
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
