	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function technisat_usb2_eeprom_lrc_read
_technisat_usb2_eeprom_lrc_read:        ## @technisat_usb2_eeprom_lrc_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movzbl	%sil, %eax
	movq	%rax, -104(%rbp)
	shrl	$8, %esi
	andl	$3, %esi
	orl	$80, %esi
	movl	%esi, -96(%rbp)
	leaq	-104(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	$1, -80(%rbp)
	movl	%esi, -72(%rbp)
	movq	%rdx, -64(%rbp)
	movl	%ecx, -56(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	decl	%ecx
	movslq	%ecx, %r12
	incq	%rbx
	leaq	-96(%rbp), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	decq	%rbx
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_technisat_usb2_calc_lrc
	cmpq	(%r14,%r12,8), %rax
	jne	LBB0_1
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_technisat_usb2_eeprom_lrc_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function technisat_usb2_eeprom_lrc_read
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_technisat_usb2_eeprom_lrc_read:        ; @technisat_usb2_eeprom_lrc_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	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, #-40]
	and	w8, w1, #0xff
	str	x8, [sp]
	mov	w8, #80
	bfxil	w8, w1, #8, #2
	str	w8, [sp, #8]
	mov	x9, sp
	str	x9, [sp, #16]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [sp, #24]
	str	w8, [sp, #32]
	str	x2, [sp, #40]
Lloh5:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w3, w8, [sp, #48]
	sub	w8, w3, #1
	sxtw	x21, w8
	add	x22, x4, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	subs	x22, x22, #1
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_technisat_usb2_calc_lrc
	ldr	x8, [x19, x21, lsl #3]
	cmp	x0, x8
	b.ne	LBB0_1
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_technisat_usb2_eeprom_lrc_read
.subsections_via_symbols
