	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_i2c_read_block
_em28xx_i2c_read_block:                 ## @em28xx_i2c_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leal	(%rbx,%rdx), %eax
	imull	$65280, %ecx, %edi              ## imm = 0xFF00
	addl	$256, %edi                      ## imm = 0x100
	cmpl	%edi, %eax
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movq	%r9, %r12
	movl	%edx, %eax
	sarl	$8, %eax
	movl	%eax, -56(%rbp)
	movzbl	%dl, %eax
	movl	%eax, -52(%rbp)
	movl	%esi, %eax
	shlq	$2, %rax
	movq	(%r13), %rdi
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	%rax, %rdi
	xorl	%eax, %eax
	testl	%ecx, %ecx
	sete	%al
	leaq	-56(,%rax,4), %rsi
	addq	%rbp, %rsi
	incl	%ecx
	movl	%ecx, %edx
	callq	_i2c_master_send
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	cmpq	$0, 8(%r13)
	movl	$64, %eax
	movl	$4, %r14d
	cmovel	%eax, %r14d
	testl	%ebx, %ebx
	jle	LBB0_10
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, %r15d
	movl	%r14d, %ebx
	cmovll	%r15d, %ebx
	movq	(%r13), %rdi
	addq	-72(%rbp), %rdi                 ## 8-byte Folded Reload
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_i2c_master_recv
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	%ebx, %rax
	leaq	(%r12,%rax,4), %r12
	subl	%ebx, %r15d
	jg	LBB0_5
## %bb.7:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_em28xx_i2c_read_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_i2c_read_block
_em28xx_i2c_read_block:                 ; @em28xx_i2c_read_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	w8, #65280
	orr	w9, wzr, #0x100
	madd	w8, w3, w8, w9
	add	w9, w4, w2
	cmp	w9, w8
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_8
LBB0_2:
	mov	x20, x5
	mov	x19, x4
	mov	x22, x1
	mov	x21, x0
	asr	w8, w2, #8
	and	w9, w2, #0xff
	stp	w8, w9, [sp]
	ldr	x8, [x0]
	add	x0, x8, w1, uxtw #2
	cmp	w3, #0
	cset	w8, eq
	mov	x9, sp
	add	x1, x9, w8, uxtw #2
	add	w2, w3, #1
	bl	_i2c_master_send
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	x8, [x21, #8]
	cmp	x8, #0
	mov	w8, #4
	mov	w9, #64
	csel	w23, w9, w8, eq
	cmp	w19, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w24, w22
	mov	x25, x19
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w25, w23
	csel	w22, w25, w23, lt
	ldr	x8, [x21]
	add	x0, x8, x24, lsl #2
	mov	x1, x20
	mov	x2, x22
	bl	_i2c_master_recv
	tbnz	w0, #31, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w25, w25, w22
	add	x20, x20, w22, sxtw #2
	cmp	w25, #0
	b.gt	LBB0_5
	b	LBB0_8
LBB0_7:
	mov	x19, x0
LBB0_8:
	ldr	x8, [sp, #8]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_em28xx_i2c_read_block
.subsections_via_symbols
