	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_hecc_mailbox_read
_ti_hecc_mailbox_read:                  ## @ti_hecc_mailbox_read
	.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	%ecx, %ebx
	movq	%rdx, %r12
	movq	%rsi, %r13
	callq	_rx_offload_to_priv
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_BIT
	movl	%eax, %r14d
	movq	_HECC_CANMID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_hecc_read_mbx
	movq	_HECC_CANMID_IDE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_CAN_EFF_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_CAN_EFF_FLAG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	sarl	$18, %eax
	movq	_CAN_SFF_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
LBB0_3:
	movl	%eax, (%r13)
	movq	_HECC_CANMCF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_hecc_read_mbx
	movq	_HECC_CANMCF_RTR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_CAN_RTR_FLAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r13)
LBB0_5:
	andl	$15, %eax
	movl	%eax, %edi
	callq	_get_can_dlc
	movl	%eax, 4(%r13)
	movq	_HECC_CANMDL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_hecc_read_mbx
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	cmpl	$5, 4(%r13)
	jl	LBB0_7
## %bb.6:
	movq	_HECC_CANMDH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_hecc_read_mbx
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movl	%eax, 4(%rcx)
LBB0_7:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_hecc_read_stamp
	movl	%eax, (%r12)
	movq	_HECC_RX_LAST_MBOX@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	movl	$0, %edi
	cmpl	%ebx, (%rax)
	jne	LBB0_9
## %bb.8:
	movq	_HECC_CANRML@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hecc_read
	xorl	%edi, %edi
	testl	%r14d, %eax
	setne	%dil
LBB0_9:
	callq	_unlikely
	movq	_ENOBUFS@GOTPCREL(%rip), %rcx
	subl	(%rcx), %r12d
	testq	%rax, %rax
	movl	$1, %ebx
	cmovnel	%r12d, %ebx
	movq	_HECC_CANRMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_hecc_write
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HECC_CANMID,4,2                ## @HECC_CANMID
	.comm	_HECC_CANMID_IDE,4,2            ## @HECC_CANMID_IDE
	.comm	_CAN_EFF_MASK,4,2               ## @CAN_EFF_MASK
	.comm	_CAN_EFF_FLAG,4,2               ## @CAN_EFF_FLAG
	.comm	_CAN_SFF_MASK,4,2               ## @CAN_SFF_MASK
	.comm	_HECC_CANMCF,4,2                ## @HECC_CANMCF
	.comm	_HECC_CANMCF_RTR,4,2            ## @HECC_CANMCF_RTR
	.comm	_CAN_RTR_FLAG,4,2               ## @CAN_RTR_FLAG
	.comm	_HECC_CANMDL,4,2                ## @HECC_CANMDL
	.comm	_HECC_CANMDH,4,2                ## @HECC_CANMDH
	.comm	_HECC_RX_LAST_MBOX,4,2          ## @HECC_RX_LAST_MBOX
	.comm	_HECC_CANRML,4,2                ## @HECC_CANRML
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_HECC_CANRMP,4,2                ## @HECC_CANRMP
	.no_dead_strip	_ti_hecc_mailbox_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_hecc_mailbox_read
_ti_hecc_mailbox_read:                  ; @ti_hecc_mailbox_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x3
	mov	x22, x2
	mov	x23, x1
	bl	_rx_offload_to_priv
	mov	x19, x0
	mov	x0, x21
	bl	_BIT
	mov	x20, x0
Lloh0:
	adrp	x8, _HECC_CANMID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HECC_CANMID@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_hecc_read_mbx
Lloh3:
	adrp	x8, _HECC_CANMID_IDE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HECC_CANMID_IDE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _CAN_EFF_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAN_EFF_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh9:
	adrp	x9, _CAN_EFF_FLAG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CAN_EFF_FLAG@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	b	LBB0_3
LBB0_2:
Lloh12:
	adrp	x8, _CAN_SFF_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAN_SFF_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w0, asr #18
LBB0_3:
	str	w8, [x23]
Lloh15:
	adrp	x8, _HECC_CANMCF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HECC_CANMCF@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_hecc_read_mbx
Lloh18:
	adrp	x8, _HECC_CANMCF_RTR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HECC_CANMCF_RTR@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.4:
Lloh21:
	adrp	x8, _CAN_RTR_FLAG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CAN_RTR_FLAG@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x23]
LBB0_5:
	and	w0, w0, #0xf
	bl	_get_can_dlc
	str	w0, [x23, #4]
Lloh24:
	adrp	x8, _HECC_CANMDL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HECC_CANMDL@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_hecc_read_mbx
	bl	_cpu_to_be32
	ldr	x8, [x23, #8]
	str	w0, [x8]
	ldr	w8, [x23, #4]
	cmp	w8, #5
	b.lt	LBB0_7
; %bb.6:
Lloh27:
	adrp	x8, _HECC_CANMDH@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HECC_CANMDH@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_hecc_read_mbx
	bl	_cpu_to_be32
	ldr	x8, [x23, #8]
	str	w0, [x8, #4]
LBB0_7:
	mov	x0, x19
	mov	x1, x21
	bl	_hecc_read_stamp
	str	w0, [x22]
Lloh30:
	adrp	x8, _HECC_RX_LAST_MBOX@GOTPAGE
Lloh31:
	ldr	x8, [x8, _HECC_RX_LAST_MBOX@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.8:
Lloh33:
	adrp	x8, _HECC_CANRML@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HECC_CANRML@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hecc_read
	tst	w0, w20
	cset	w0, ne
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	bl	_unlikely
Lloh36:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	cmp	x0, #0
	mov	w9, #1
	csneg	w21, w9, w8, eq
Lloh39:
	adrp	x8, _HECC_CANRMP@GOTPAGE
Lloh40:
	ldr	x8, [x8, _HECC_CANRMP@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_hecc_write
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_HECC_CANMID,4,2                ; @HECC_CANMID
	.comm	_HECC_CANMID_IDE,4,2            ; @HECC_CANMID_IDE
	.comm	_CAN_EFF_MASK,4,2               ; @CAN_EFF_MASK
	.comm	_CAN_EFF_FLAG,4,2               ; @CAN_EFF_FLAG
	.comm	_CAN_SFF_MASK,4,2               ; @CAN_SFF_MASK
	.comm	_HECC_CANMCF,4,2                ; @HECC_CANMCF
	.comm	_HECC_CANMCF_RTR,4,2            ; @HECC_CANMCF_RTR
	.comm	_CAN_RTR_FLAG,4,2               ; @CAN_RTR_FLAG
	.comm	_HECC_CANMDL,4,2                ; @HECC_CANMDL
	.comm	_HECC_CANMDH,4,2                ; @HECC_CANMDH
	.comm	_HECC_RX_LAST_MBOX,4,2          ; @HECC_RX_LAST_MBOX
	.comm	_HECC_CANRML,4,2                ; @HECC_CANRML
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_HECC_CANRMP,4,2                ; @HECC_CANRMP
	.no_dead_strip	_ti_hecc_mailbox_read
.subsections_via_symbols
