	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad5686_i2c_read
_ad5686_i2c_read:                       ## @ad5686_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	8(%rdi), %edi
	callq	_to_i2c_client
	movq	%rax, %r12
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movl	$3, -92(%rbp)
	movq	(%r14), %rcx
	movq	(%rcx), %rdx
	incq	%rdx
	movq	%rdx, -88(%rbp)
	movl	8(%r12), %edx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	movl	%edx, -80(%rbp)
	movl	%eax, -72(%rbp)
	movl	$2, -68(%rbp)
	addq	$8, %rcx
	movq	%rcx, -64(%rbp)
	movl	%edx, -56(%rbp)
	movq	_AD5686_CMD_NOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AD5686_CMD
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_AD5686_ADDR
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	(%r14), %rcx
	movl	%eax, 12(%rcx)
	movl	4(%r12), %edi
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	(%r14), %rax
	movl	8(%rax), %edi
	callq	_be16_to_cpu
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_AD5686_CMD_NOOP,4,2            ## @AD5686_CMD_NOOP
	.no_dead_strip	_ad5686_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad5686_i2c_read
_ad5686_i2c_read:                       ; @ad5686_i2c_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	w0, [x0, #8]
	bl	_to_i2c_client
	mov	x21, x0
	ldr	w8, [x0]
	mov	w9, #3
	stp	w8, w9, [sp, #8]
	ldr	x9, [x19]
	ldr	x10, [x9], #8
	add	x10, x10, #1
	str	x10, [sp, #16]
Lloh3:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
	ldr	w11, [x0, #8]
Lloh5:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w11, [sp, #24]
	str	w8, [sp, #32]
	mov	w8, #2
	str	w8, [sp, #36]
	str	x9, [sp, #40]
	str	w11, [sp, #48]
Lloh6:
	adrp	x8, _AD5686_CMD_NOOP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AD5686_CMD_NOOP@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_AD5686_CMD
	mov	x22, x0
	mov	x0, x20
	bl	_AD5686_ADDR
	orr	w0, w0, w22
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	w0, [x8, #12]
	ldr	w0, [x21, #4]
	add	x1, sp, #8
	mov	w2, #2
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	w0, [x8, #8]
	bl	_be16_to_cpu
LBB0_2:
	ldur	x8, [x29, #-40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_AD5686_CMD_NOOP,4,2            ; @AD5686_CMD_NOOP
	.no_dead_strip	_ad5686_i2c_read
.subsections_via_symbols
