	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mms114_get_version
_mms114_get_version:                    ## @mms114_get_version
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	8(%rdi), %r14
	movl	(%rdi), %eax
	cmpl	$129, %eax
	je	LBB0_5
## %bb.1:
	xorl	%r15d, %r15d
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.2:
	movq	_MMS152_FW_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	___mms114_read_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	8(%rbx), %rdi
	movq	_MMS152_COMPAT_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %ecx
	movl	-56(%rbp), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_dev_info
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_5:
	movq	_MMS114_TSP_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$6, %edx
	callq	___mms114_read_reg
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %ecx
	movl	-52(%rbp), %r8d
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MMS152_FW_REV,4,2              ## @MMS152_FW_REV
	.comm	_MMS152_COMPAT_GROUP,4,2        ## @MMS152_COMPAT_GROUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TSP FW Rev: bootloader 0x%x / core 0x%x / config 0x%x, Compat group: %c\n"

	.comm	_MMS114_TSP_REV,4,2             ## @MMS114_TSP_REV
L_.str.1:                               ## @.str.1
	.asciz	"TSP Rev: 0x%x, HW Rev: 0x%x, Firmware Ver: 0x%x\n"

	.no_dead_strip	_mms114_get_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mms114_get_version
_mms114_get_version:                    ; @mms114_get_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	x19, [x0, #8]
	ldr	w8, [x0]
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.2:
Lloh3:
	adrp	x8, _MMS152_FW_REV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMS152_FW_REV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x3, sp, #16
	mov	x0, x20
	mov	w2, #3
	bl	___mms114_read_reg
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_9
; %bb.3:
	ldr	x0, [x20, #8]
Lloh6:
	adrp	x8, _MMS152_COMPAT_GROUP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMS152_COMPAT_GROUP@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldp	w2, w3, [sp, #16]
	ldr	w4, [sp, #24]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	str	x0, [sp]
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _MMS114_TSP_REV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MMS114_TSP_REV@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x3, sp, #16
	mov	x0, x20
	mov	w2, #6
	bl	___mms114_read_reg
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_9
; %bb.6:
	ldp	w2, w3, [sp, #16]
	ldr	w4, [sp, #28]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_info
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldur	x8, [x29, #-24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MMS152_FW_REV,4,2              ; @MMS152_FW_REV
	.comm	_MMS152_COMPAT_GROUP,4,2        ; @MMS152_COMPAT_GROUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TSP FW Rev: bootloader 0x%x / core 0x%x / config 0x%x, Compat group: %c\n"

	.comm	_MMS114_TSP_REV,4,2             ; @MMS114_TSP_REV
l_.str.1:                               ; @.str.1
	.asciz	"TSP Rev: 0x%x, HW Rev: 0x%x, Firmware Ver: 0x%x\n"

	.no_dead_strip	_mms114_get_version
.subsections_via_symbols
