	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msp_read
_msp_read:                              ## @msp_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	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$3, -112(%rbp)
	leaq	-52(%rbp), %rax
	movq	%rax, -104(%rbp)
	movl	$0, -96(%rbp)
	movl	8(%rdi), %eax
	movl	%eax, -92(%rbp)
	movl	$2, -88(%rbp)
	leaq	-60(%rbp), %rcx
	movq	%rcx, -80(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -72(%rbp)
	movl	%eax, -68(%rbp)
	leal	1(%r15), %eax
	movl	%eax, -52(%rbp)
	movl	%edx, %eax
	sarl	$8, %eax
	movl	%eax, -48(%rbp)
	movzbl	%r14b, %eax
	movl	%eax, -44(%rbp)
	movl	4(%rdi), %edi
	leaq	-112(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	je	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_dev_warn
	movl	$10, %edi
	callq	_msecs_to_jiffies
	movl	%eax, %edi
	callq	_schedule_timeout_interruptible
	movl	4(%r12), %edi
	leaq	-112(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_dev_warn
	movl	$10, %edi
	callq	_msecs_to_jiffies
	movl	%eax, %edi
	callq	_schedule_timeout_interruptible
	movl	4(%r12), %edi
	leaq	-112(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	jne	LBB0_3
LBB0_4:
	movl	-60(%rbp), %ebx
	shll	$8, %ebx
	orl	-56(%rbp), %ebx
	movq	_msp_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, (%rsp)
	leaq	L_.str.2(%rip), %rcx
	movq	%r12, %rdi
	movl	$3, %esi
	movl	%r15d, %r8d
	movl	%r14d, %r9d
	callq	_dev_dbg_lvl
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_dev_warn
	movl	$10, %edi
	callq	_msecs_to_jiffies
	movl	%eax, %edi
	callq	_schedule_timeout_interruptible
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	movq	%r12, %rdi
	callq	_msp_reset
	movl	$-1, %ebx
	jmp	LBB0_5
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O error #%d (read 0x%02x/0x%02x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"resetting chip, sound will go off.\n"

	.comm	_msp_debug,4,2                  ## @msp_debug
L_.str.2:                               ## @.str.2
	.asciz	"msp_read(0x%x, 0x%x): 0x%x\n"

	.no_dead_strip	_msp_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msp_read
_msp_read:                              ; @msp_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	w8, #3
	str	w8, [sp, #32]
	sub	x8, x29, #52
	str	x8, [sp, #40]
	ldp	w0, w8, [x0, #4]
	stp	wzr, w8, [sp, #48]
	mov	w9, #2
	str	w9, [sp, #56]
	sub	x9, x29, #60
	str	x9, [sp, #64]
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #72]
	add	w8, w1, #1
	asr	w9, w2, #8
	stp	w8, w9, [x29, #-52]
	and	w8, w2, #0xff
	stur	w8, [x29, #-44]
	add	x1, sp, #32
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.eq	LBB0_3
; %bb.1:
	stp	x20, x21, [sp, #8]
	str	xzr, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	mov	w0, #10
	bl	_msecs_to_jiffies
	bl	_schedule_timeout_interruptible
	ldr	w0, [x19, #4]
	add	x1, sp, #32
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.eq	LBB0_3
; %bb.2:
	mov	x8, x21
	str	x8, [sp, #16]
	mov	x8, x20
	mov	w9, #1
	stp	x9, x8, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	mov	w0, #10
	bl	_msecs_to_jiffies
	bl	_schedule_timeout_interruptible
	ldr	w0, [x19, #4]
	add	x1, sp, #32
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_6
LBB0_3:
	ldp	w8, w9, [x29, #-60]
	orr	w22, w9, w8, lsl #8
Lloh10:
	adrp	x8, _msp_debug@GOTPAGE
Lloh11:
	ldr	x8, [x8, _msp_debug@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x3, l_.str.2@PAGE
Lloh14:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w1, #3
	mov	x4, x20
	mov	x5, x21
	mov	x6, x22
	bl	_dev_dbg_lvl
LBB0_4:
	ldur	x8, [x29, #-40]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x22
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_6:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	mov	w8, #2
	stp	x20, x21, [sp, #8]
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	mov	w0, #10
	bl	_msecs_to_jiffies
	bl	_schedule_timeout_interruptible
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	mov	x0, x19
	bl	_msp_reset
	mov	w22, #-1
	b	LBB0_4
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O error #%d (read 0x%02x/0x%02x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"resetting chip, sound will go off.\n"

	.comm	_msp_debug,4,2                  ; @msp_debug
l_.str.2:                               ; @.str.2
	.asciz	"msp_read(0x%x, 0x%x): 0x%x\n"

	.no_dead_strip	_msp_read
.subsections_via_symbols
