	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function as5011_i2c_read
_as5011_i2c_read:                       ## @as5011_i2c_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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -20(%rbp)
	movq	_I2C_M_REV_DIR_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movl	$1, -76(%rbp)
	leaq	-24(%rbp), %rax
	movq	%rax, -72(%rbp)
	movl	4(%rdi), %ecx
	movl	%ecx, -64(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdx
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	movl	%esi, -56(%rbp)
	movl	$1, -52(%rbp)
	movq	%rax, -48(%rbp)
	movl	%ecx, -40(%rbp)
	movl	(%rdi), %edi
	leaq	-80(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movb	-24(%rbp), %al
	movb	%al, (%rbx)
	xorl	%eax, %eax
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_REV_DIR_ADDR,4,2         ## @I2C_M_REV_DIR_ADDR
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_M_NOSTART,4,2              ## @I2C_M_NOSTART
	.no_dead_strip	_as5011_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function as5011_i2c_read
_as5011_i2c_read:                       ; @as5011_i2c_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	stp	w1, wzr, [x29, #-32]
Lloh3:
	adrp	x8, _I2C_M_REV_DIR_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_REV_DIR_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w8, w9, [sp]
	sub	x8, x29, #32
	str	x8, [sp, #8]
Lloh6:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _I2C_M_NOSTART@GOTPAGE
Lloh10:
	ldr	x11, [x11, _I2C_M_NOSTART@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w10, w11, w10
	ldp	w0, w11, [x0]
	str	w11, [sp, #16]
	stp	w10, w9, [sp, #24]
	str	x8, [sp, #32]
	str	w11, [sp, #40]
	mov	x1, sp
	mov	w2, #2
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w0, #0
	ldur	w8, [x29, #-32]
	strb	w8, [x19]
LBB0_2:
	ldur	x8, [x29, #-24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_REV_DIR_ADDR,4,2         ; @I2C_M_REV_DIR_ADDR
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_M_NOSTART,4,2              ; @I2C_M_NOSTART
	.no_dead_strip	_as5011_i2c_read
.subsections_via_symbols
