	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exc3000_read_frame
_exc3000_read_frame:                    ## @exc3000_read_frame
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$2, %edx
	callq	_i2c_master_send
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	cmpl	$2, %eax
	jne	LBB0_2
## %bb.3:
	movq	_EXC3000_LEN_FRAME@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_i2c_master_recv
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	cmpl	(%r15), %eax
	jne	LBB0_2
## %bb.5:
	movq	%r14, %rdi
	callq	_get_unaligned_le16
	cmpl	(%r15), %eax
	jne	LBB0_7
## %bb.6:
	movq	16(%r14), %rcx
	movq	_EXC3000_MT_EVENT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_9
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"'"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_EXC3000_LEN_FRAME,4,2          ## @EXC3000_LEN_FRAME
	.comm	_EXC3000_MT_EVENT,8,3           ## @EXC3000_MT_EVENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_exc3000_read_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exc3000_read_frame
_exc3000_read_frame:                    ; @exc3000_read_frame
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #2
	bl	_i2c_master_send
	tbnz	w0, #31, LBB0_9
; %bb.1:
	cmp	w0, #2
	b.ne	LBB0_7
; %bb.2:
Lloh2:
	adrp	x21, _EXC3000_LEN_FRAME@GOTPAGE
Lloh3:
	ldr	x21, [x21, _EXC3000_LEN_FRAME@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x20
	mov	x1, x19
	bl	_i2c_master_recv
	tbnz	w0, #31, LBB0_9
; %bb.3:
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_get_unaligned_le16
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.5:
	ldr	x8, [x19, #16]
Lloh4:
	adrp	x9, _EXC3000_MT_EVENT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EXC3000_MT_EVENT@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"'"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_EXC3000_LEN_FRAME,4,2          ; @EXC3000_LEN_FRAME
	.comm	_EXC3000_MT_EVENT,8,3           ; @EXC3000_MT_EVENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_exc3000_read_frame
.subsections_via_symbols
