	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_smbus_read_block         ## -- Begin function cyapa_smbus_read_block
	.p2align	4, 0x90
_cyapa_smbus_read_block:                ## @cyapa_smbus_read_block
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SMBUS_BYTE_BLOCK_CMD_MASK@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	(%rdi), %r15
	movq	_SMBUS_GROUP_BLOCK_CMD_MASK@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_3
## %bb.9:
	movq	_SMBUS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_SMBUS_ENCODE_RW
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_i2c_smbus_read_block_data
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
	jmp	LBB0_8
LBB0_3:
	testq	%r14, %r14
	je	LBB0_7
## %bb.4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_SMBUS_ENCODE_IDX
	movq	_SMBUS_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_SMBUS_ENCODE_RW
	movslq	(%r12), %rcx
	movslq	%ebx, %rbx
	imulq	%rbx, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_block_data
	incl	%ebx
	movslq	(%r12), %rcx
	movslq	%ebx, %rdx
	imulq	%rcx, %rdx
	cmpq	%r14, %rdx
	jb	LBB0_5
LBB0_6:
	testq	%rax, %rax
	jne	LBB0_8
LBB0_7:
	xorl	%r14d, %r14d
LBB0_8:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMBUS_BYTE_BLOCK_CMD_MASK,4,2  ## @SMBUS_BYTE_BLOCK_CMD_MASK
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_SMBUS_GROUP_BLOCK_CMD_MASK,4,2 ## @SMBUS_GROUP_BLOCK_CMD_MASK
	.comm	_SMBUS_READ,4,2                 ## @SMBUS_READ
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ## @I2C_SMBUS_BLOCK_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_smbus_read_block         ; -- Begin function cyapa_smbus_read_block
	.p2align	2
_cyapa_smbus_read_block:                ; @cyapa_smbus_read_block
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _SMBUS_BYTE_BLOCK_CMD_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMBUS_BYTE_BLOCK_CMD_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.1:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	ldr	x22, [x0]
Lloh3:
	adrp	x8, _SMBUS_GROUP_BLOCK_CMD_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMBUS_GROUP_BLOCK_CMD_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _SMBUS_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMBUS_READ@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_SMBUS_ENCODE_RW
	mov	x1, x0
	mov	x0, x22
	mov	x2, x20
	bl	_i2c_smbus_read_block_data
	b	LBB0_7
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_9
LBB0_4:
	cbz	x19, LBB0_8
; %bb.5:
	mov	w23, #0
Lloh12:
	adrp	x24, _SMBUS_READ@GOTPAGE
Lloh13:
	ldr	x24, [x24, _SMBUS_READ@GOTPAGEOFF]
Lloh14:
	adrp	x25, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh15:
	ldr	x25, [x25, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_SMBUS_ENCODE_IDX
	ldr	w1, [x24]
	bl	_SMBUS_ENCODE_RW
	mov	x1, x0
	ldr	w8, [x25]
	mul	w8, w8, w23
	add	x2, x20, w8, sxtw #2
	mov	x0, x22
	bl	_i2c_smbus_read_block_data
	add	w23, w23, #1
	ldrsw	x8, [x25]
	sxtw	x9, w23
	mul	x8, x8, x9
	cmp	x8, x19
	b.lo	LBB0_6
LBB0_7:
	cbnz	x0, LBB0_9
LBB0_8:
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SMBUS_BYTE_BLOCK_CMD_MASK,4,2  ; @SMBUS_BYTE_BLOCK_CMD_MASK
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_SMBUS_GROUP_BLOCK_CMD_MASK,4,2 ; @SMBUS_GROUP_BLOCK_CMD_MASK
	.comm	_SMBUS_READ,4,2                 ; @SMBUS_READ
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ; @I2C_SMBUS_BLOCK_MAX
.subsections_via_symbols
