	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msp_reset                      ## -- Begin function msp_reset
	.p2align	4, 0x90
_msp_reset:                             ## @msp_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	$3, -80(%rbp)
	leaq	_msp_reset.reset_off(%rip), %rax
	movq	%rax, -72(%rbp)
	movq	_I2C_M_IGNORE_NAK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	8(%rdi), %ecx
	movl	%ecx, -60(%rbp)
	movl	$3, -56(%rbp)
	leaq	_msp_reset.reset_on(%rip), %rdx
	movq	%rdx, -48(%rbp)
	movl	%eax, -40(%rbp)
	movl	%ecx, -36(%rbp)
	movl	$3, -128(%rbp)
	leaq	_msp_reset.write(%rip), %rax
	movq	%rax, -120(%rbp)
	movl	$0, -112(%rbp)
	movl	%ecx, -108(%rbp)
	movl	$2, -104(%rbp)
	leaq	-24(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movl	%ecx, -84(%rbp)
	movq	_msp_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movl	$3, %esi
	callq	_dev_dbg_lvl
	movl	4(%rbx), %edi
	leaq	-80(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.1:
	movl	4(%rbx), %edi
	leaq	-56(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.2:
	movl	4(%rbx), %edi
	leaq	-128(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	$2, %ecx
	je	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movl	$-1, %eax
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$120, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @msp_reset.reset_off
_msp_reset.reset_off:
	.long	129                             ## 0x81
	.long	128                             ## 0x80
	.long	0                               ## 0x0

	.p2align	2                               ## @msp_reset.reset_on
_msp_reset.reset_on:
	.long	129                             ## 0x81
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.p2align	2                               ## @msp_reset.write
_msp_reset.write:
	.long	129                             ## 0x81
	.long	0                               ## 0x0
	.long	30                              ## 0x1e

	.comm	_I2C_M_IGNORE_NAK,4,2           ## @I2C_M_IGNORE_NAK
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_msp_debug,4,2                  ## @msp_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"msp_reset\n"

L_.str.1:                               ## @.str.1
	.asciz	"chip reset failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msp_reset                      ; -- Begin function msp_reset
	.p2align	2
_msp_reset:                             ; @msp_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	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, #-24]
	mov	w8, #3
	str	w8, [sp, #48]
Lloh3:
	adrp	x9, _msp_reset.reset_off@PAGE
Lloh4:
	add	x9, x9, _msp_reset.reset_off@PAGEOFF
	str	x9, [sp, #56]
Lloh5:
	adrp	x9, _I2C_M_IGNORE_NAK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I2C_M_IGNORE_NAK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	ldr	w10, [x0, #8]
	stp	w9, w10, [sp, #64]
	str	w8, [sp, #72]
Lloh8:
	adrp	x11, _msp_reset.reset_on@PAGE
Lloh9:
	add	x11, x11, _msp_reset.reset_on@PAGEOFF
	str	x11, [sp, #80]
	stp	w9, w10, [sp, #88]
	str	w8, [sp]
Lloh10:
	adrp	x8, _msp_reset.write@PAGE
Lloh11:
	add	x8, x8, _msp_reset.write@PAGEOFF
	str	x8, [sp, #8]
	stp	wzr, w10, [sp, #16]
	mov	w8, #2
	str	w8, [sp, #24]
	sub	x8, x29, #32
	str	x8, [sp, #32]
Lloh12:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	stp	w8, w10, [sp, #40]
Lloh15:
	adrp	x8, _msp_debug@GOTPAGE
Lloh16:
	ldr	x8, [x8, _msp_debug@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	mov	w1, #3
	bl	_dev_dbg_lvl
	ldr	w0, [x19, #4]
	add	x20, sp, #48
	add	x1, sp, #48
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.1:
	ldr	w0, [x19, #4]
	add	x1, x20, #24
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	mov	x1, sp
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	w0, #-1
LBB0_5:
	ldur	x8, [x29, #-24]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @msp_reset.reset_off
_msp_reset.reset_off:
	.long	129                             ; 0x81
	.long	128                             ; 0x80
	.long	0                               ; 0x0

	.p2align	2                               ; @msp_reset.reset_on
_msp_reset.reset_on:
	.long	129                             ; 0x81
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.p2align	2                               ; @msp_reset.write
_msp_reset.write:
	.long	129                             ; 0x81
	.long	0                               ; 0x0
	.long	30                              ; 0x1e

	.comm	_I2C_M_IGNORE_NAK,4,2           ; @I2C_M_IGNORE_NAK
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_msp_debug,4,2                  ; @msp_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"msp_reset\n"

l_.str.1:                               ; @.str.1
	.asciz	"chip reset failed\n"

.subsections_via_symbols
