	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smi_read
_smi_read:                              ## @smi_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	xorl	%eax, %eax
	callq	_smi_start
	movl	$10, %edi
	movl	$4, %esi
	callq	_smi_writeBits
	movl	$4, %edi
	movl	$3, %esi
	callq	_smi_writeBits
	movl	$1, %edi
	movl	$1, %esi
	callq	_smi_writeBits
	xorl	%eax, %eax
	callq	_smi_waitAck
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movl	%r15d, %eax
	movzbl	%al, %edi
	movl	$8, %esi
	callq	_smi_writeBits
	xorl	%eax, %eax
	callq	_smi_waitAck
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movl	%r15d, %eax
	movzbl	%ah, %edi
	movl	$8, %esi
	callq	_smi_writeBits
	xorl	%eax, %eax
	callq	_smi_waitAck
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movl	$8, %edi
	callq	_smi_readBits
	movl	%eax, %r15d
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_smi_writeBits
	movl	$8, %edi
	callq	_smi_readBits
	movl	%eax, %ebx
	movl	$1, %edi
	movl	$1, %esi
	callq	_smi_writeBits
	xorl	%eax, %eax
	callq	_smi_stop
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movzbl	%r15b, %eax
	shll	$8, %ebx
	movzwl	%bx, %ecx
	orl	%eax, %ecx
	movl	%ecx, (%r14)
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_smi_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smi_read
_smi_read:                              ; @smi_read
	.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
	bl	_smi_start
	mov	w0, #10
	mov	w1, #4
	bl	_smi_writeBits
	mov	w0, #4
	mov	w1, #3
	bl	_smi_writeBits
	mov	w0, #1
	mov	w1, #1
	bl	_smi_writeBits
	bl	_smi_waitAck
	cbnz	x0, LBB0_3
; %bb.1:
	and	w0, w20, #0xff
	mov	w1, #8
	bl	_smi_writeBits
	bl	_smi_waitAck
	cbnz	x0, LBB0_3
; %bb.2:
	ubfx	w0, w20, #8, #8
	mov	w1, #8
	bl	_smi_writeBits
	bl	_smi_waitAck
	cbz	x0, LBB0_5
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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_5:
	mov	w0, #8
	bl	_smi_readBits
	mov	x20, x0
	mov	w0, #0
	mov	w1, #1
	bl	_smi_writeBits
	mov	w0, #8
	bl	_smi_readBits
	mov	x21, x0
	mov	w0, #1
	mov	w1, #1
	bl	_smi_writeBits
	bl	_smi_stop
	mov	w0, #0
	cbz	x19, LBB0_4
; %bb.6:
	and	w8, w20, #0xff
	bfi	w8, w21, #8, #8
	str	w8, [x19]
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_smi_read
.subsections_via_symbols
