	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_device
_read_device:                           ## @read_device
	.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	%rcx, %r12
	movl	%edx, -104(%rbp)                ## 4-byte Spill
	movl	%esi, -100(%rbp)                ## 4-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leal	3(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	addl	$2, %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	8(%r15), %rdi
	movl	$1, -96(%rbp)
	movq	%r14, -88(%rbp)
	movl	$0, -80(%rbp)
	movl	(%r15), %eax
	movl	%eax, -76(%rbp)
	movq	%r13, -64(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -56(%rbp)
	movl	%eax, -52(%rbp)
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movl	-100(%rbp), %eax                ## 4-byte Reload
	movb	%al, (%r14)
	movl	-104(%rbp), %ebx                ## 4-byte Reload
	movl	%ebx, -72(%rbp)
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setle	%al
	movl	$2, %edx
	subl	%eax, %edx
	movq	(%rdi), %rax
	leaq	-96(%rbp), %rsi
	callq	*(%rax)
	movl	%eax, %r14d
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movl	%r14d, %eax
	sarl	$31, %eax
	andl	%r14d, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ## @I2C_SMBUS_BLOCK_MAX
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_read_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_device
_read_device:                           ; @read_device
	.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
	sub	sp, sp, #64
	mov	x20, x3
	mov	x19, x2
	mov	x8, x0
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-40]
Lloh3:
	adrp	x9, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w14, [x9]
	add	w12, w14, #3
	mov	x9, x12
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x12, #15
	and	x10, x10, #0x1fffffff0
	sub	x13, x9, x10
	mov	sp, x13
	add	w12, w14, #2
	mov	x9, x12
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x12, #15
	and	x10, x10, #0x1fffffff0
	sub	x21, x9, x10
	mov	sp, x21
	ldr	x0, [x0, #8]
	mov	w9, #1
	stur	w9, [x29, #-88]
	stur	x13, [x29, #-80]
	ldr	w8, [x8]
	stp	wzr, w8, [x29, #-72]
	stur	x21, [x29, #-56]
Lloh10:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh11:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	stp	w10, w8, [x29, #-48]
	cbz	x3, LBB0_2
; %bb.1:
	strb	w1, [x13]
	stur	w19, [x29, #-64]
	cmp	w19, #1
	cinc	w2, w9, ge
	ldr	x8, [x0]
	ldr	x8, [x8]
	sub	x1, x29, #88
	blr	x8
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	cmp	w22, #0
	csel	w0, w22, wzr, lt
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldur	x8, [x29, #-40]
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_5
; %bb.4:
	sub	sp, x29, #32
	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:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ; @I2C_SMBUS_BLOCK_MAX
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_read_device
.subsections_via_symbols
