	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secocec_rx_done
_secocec_rx_done:                       ## @secocec_rx_done
	.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
	movl	%esi, %r15d
	callq	_cec_get_drvdata
	movq	8(%rax), %r14
	movl	$0, -44(%rbp)
	movq	_SECOCEC_STATUS_RX_OVERFLOW_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	testl	%r15d, %ebx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_2:
	movq	_SECOCEC_STATUS_RX_ERROR_MASK@GOTPCREL(%rip), %r13
	testl	%r15d, (%r13)
	je	LBB0_6
## %bb.3:
	andl	%r15d, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movq	_SECOCEC_STATUS_MSG_RECEIVED_MASK@GOTPCREL(%rip), %rax
	movl	(%r13), %esi
	orl	(%rax), %esi
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	movl	(%r12), %ebx
LBB0_5:
	orl	%ebx, %esi
	movq	_SECOCEC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_smb_wr16                       ## TAILCALL
LBB0_6:
	movq	_SECOCEC_READ_DATA_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	-44(%rbp), %rsi
	callq	_smb_rd16
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	-44(%rbp), %edi
	incl	%edi
	movq	_CEC_MAX_MSG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movq	_SECOCEC_READ_BYTE0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	-44(%rbp), %rsi
	callq	_smb_rd16
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SECOCEC_STATUS_RX_OVERFLOW_MASK,4,2 ## @SECOCEC_STATUS_RX_OVERFLOW_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received more than 16 bytes. Discarding"

	.comm	_SECOCEC_STATUS_RX_ERROR_MASK,4,2 ## @SECOCEC_STATUS_RX_ERROR_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Message received with errors. Discarding"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SECOCEC_READ_DATA_LENGTH,8,3   ## @SECOCEC_READ_DATA_LENGTH
	.comm	_CEC_MAX_MSG_SIZE,4,2           ## @CEC_MAX_MSG_SIZE
	.comm	_SECOCEC_READ_BYTE0,8,3         ## @SECOCEC_READ_BYTE0
	.comm	_SECOCEC_READ_OPERATION_ID,8,3  ## @SECOCEC_READ_OPERATION_ID
	.comm	_SECOCEC_READ_DATA_00,8,3       ## @SECOCEC_READ_DATA_00
	.comm	_SECOCEC_STATUS_MSG_RECEIVED_MASK,4,2 ## @SECOCEC_STATUS_MSG_RECEIVED_MASK
	.comm	_SECOCEC_STATUS,4,2             ## @SECOCEC_STATUS
	.no_dead_strip	_secocec_rx_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secocec_rx_done
_secocec_rx_done:                       ; @secocec_rx_done
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	bl	_cec_get_drvdata
	ldr	x20, [x0, #8]
	str	wzr, [sp, #12]
Lloh0:
	adrp	x21, _SECOCEC_STATUS_RX_OVERFLOW_MASK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SECOCEC_STATUS_RX_OVERFLOW_MASK@GOTPAGEOFF]
	ldr	w8, [x21]
	ands	w22, w8, w19
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_2:
Lloh4:
	adrp	x23, _SECOCEC_STATUS_RX_ERROR_MASK@GOTPAGE
Lloh5:
	ldr	x23, [x23, _SECOCEC_STATUS_RX_ERROR_MASK@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w19
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
Lloh8:
	adrp	x8, _SECOCEC_STATUS_MSG_RECEIVED_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SECOCEC_STATUS_MSG_RECEIVED_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldr	w9, [x21]
	cmp	w22, #0
	csel	w9, wzr, w9, eq
	orr	w1, w8, w9
Lloh11:
	adrp	x8, _SECOCEC_STATUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SECOCEC_STATUS@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_smb_wr16
LBB0_4:
Lloh14:
	adrp	x8, _SECOCEC_READ_DATA_LENGTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SECOCEC_READ_DATA_LENGTH@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	add	x1, sp, #12
	bl	_smb_rd16
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w8, [sp, #12]
	add	w0, w8, #1
Lloh17:
	adrp	x8, _CEC_MAX_MSG_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CEC_MAX_MSG_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_min
Lloh20:
	adrp	x8, _SECOCEC_READ_BYTE0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SECOCEC_READ_BYTE0@GOTPAGEOFF]
Lloh22:
	ldr	x0, [x8]
	add	x1, sp, #12
	bl	_smb_rd16
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SECOCEC_STATUS_RX_OVERFLOW_MASK,4,2 ; @SECOCEC_STATUS_RX_OVERFLOW_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received more than 16 bytes. Discarding"

	.comm	_SECOCEC_STATUS_RX_ERROR_MASK,4,2 ; @SECOCEC_STATUS_RX_ERROR_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Message received with errors. Discarding"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SECOCEC_READ_DATA_LENGTH,8,3   ; @SECOCEC_READ_DATA_LENGTH
	.comm	_CEC_MAX_MSG_SIZE,4,2           ; @CEC_MAX_MSG_SIZE
	.comm	_SECOCEC_READ_BYTE0,8,3         ; @SECOCEC_READ_BYTE0
	.comm	_SECOCEC_READ_OPERATION_ID,8,3  ; @SECOCEC_READ_OPERATION_ID
	.comm	_SECOCEC_READ_DATA_00,8,3       ; @SECOCEC_READ_DATA_00
	.comm	_SECOCEC_STATUS_MSG_RECEIVED_MASK,4,2 ; @SECOCEC_STATUS_MSG_RECEIVED_MASK
	.comm	_SECOCEC_STATUS,4,2             ; @SECOCEC_STATUS
	.no_dead_strip	_secocec_rx_done
.subsections_via_symbols
