	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_read
_atmel_read:                            ## @atmel_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$7, %rcx
	jb	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%rcx, %rbx
	movq	%rdi, %r13
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movq	8(%rdi), %r12
	movq	(%rdi), %rax
	movq	%rsi, -128(%rbp)                ## 8-byte Spill
	movq	%rsi, (%rax)
	movq	%rcx, 8(%rax)
	movl	4(%r12), %ecx
	movl	%ecx, -88(%rbp)
	movq	$0, -96(%rbp)
	movq	%rax, -112(%rbp)
	movl	$2, -104(%rbp)
	movl	%ecx, -56(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -64(%rbp)
	movq	%rax, -80(%rbp)
	leal	2(%rbx), %eax
	movl	%eax, -72(%rbp)
	movl	(%r12), %r15d
	leaq	-112(%rbp), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_i2c_transfer
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jne	LBB0_4
## %bb.5:
	movq	(%r13), %rsi
	movq	(%rsi), %rdx
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	cmpq	%rcx, %rdx
	jne	LBB0_6
## %bb.7:
	addq	$16, %rsi
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%r15d, %r15d
	cmovsl	%r15d, %eax
	jmp	LBB0_8
LBB0_6:
	addq	$8, %r12
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ECOMM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C read error: register address does not match (%#02x vs %02x)\n"

	.comm	_ECOMM,4,2                      ## @ECOMM
	.no_dead_strip	_atmel_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_read
_atmel_read:                            ; @atmel_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	cmp	x3, #7
	b.lo	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	ldp	x8, x24, [x0]
	stp	x1, x3, [x8]
	ldr	w9, [x24, #4]
	str	w9, [sp, #32]
	str	xzr, [sp, #24]
	str	x8, [sp, #8]
	mov	w10, #2
	str	w10, [sp, #16]
	str	w9, [sp, #64]
Lloh5:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	str	x9, [sp, #56]
	str	x8, [sp, #40]
	add	w8, w20, #2
	str	w8, [sp, #48]
	ldr	w23, [x24]
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x23
	bl	_i2c_transfer
	mov	x23, x0
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x22]
	ldr	x2, [x8]
	cmp	x2, x19
	b.ne	LBB0_6
; %bb.4:
	add	x1, x8, #16
	mov	x0, x21
	mov	x2, x20
	bl	_memcpy
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w23, #0
	csneg	w0, w23, w8, lt
	b	LBB0_8
LBB0_6:
	add	x0, x24, #8
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_dev_err
Lloh13:
	adrp	x8, _ECOMM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ECOMM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C read error: register address does not match (%#02x vs %02x)\n"

	.comm	_ECOMM,4,2                      ; @ECOMM
	.no_dead_strip	_atmel_read
.subsections_via_symbols
