	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx25821_i2c_read               ## -- Begin function cx25821_i2c_read
	.p2align	4, 0x90
_cx25821_i2c_read:                      ## @cx25821_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	$88, %rsp
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	leaq	-88(%rbp), %rax
	movq	%rax, -72(%rbp)
	movl	$0, -64(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movzbl	%sil, %eax
	sarl	$8, %esi
	movl	%esi, -88(%rbp)
	movl	%eax, -84(%rbp)
	movabsq	$8589934660, %rax               ## imm = 0x200000044
	movq	%rax, -80(%rbp)
	movabsq	$17179869252, %rax              ## imm = 0x400000044
	movq	%rax, -56(%rbp)
	movl	4(%rdi), %edi
	leaq	-80(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_xfer
	movl	-20(%rbp), %ecx
	shll	$24, %ecx
	movl	-28(%rbp), %eax
	movl	-24(%rbp), %edx
	shll	$16, %edx
	orl	%ecx, %edx
	shll	$8, %eax
	orl	%edx, %eax
	orl	-32(%rbp), %eax
	movl	%eax, (%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_2
## %bb.1:
	addq	$88, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cx25821_i2c_read
lCPI0_0:
	.long	68                              ; 0x44
	.long	2                               ; 0x2
lCPI0_1:
	.long	68                              ; 0x44
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_cx25821_i2c_read
	.p2align	2
_cx25821_i2c_read:                      ; @cx25821_i2c_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	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	xzr, xzr, [x29, #-40]
	mov	x8, sp
	str	x8, [sp, #16]
	str	wzr, [sp, #24]
	sub	x8, x29, #40
	str	x8, [sp, #40]
Lloh3:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #48]
	asr	w8, w1, #8
	and	w9, w1, #0xff
	stp	w8, w9, [sp]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
Lloh8:
	adrp	x8, lCPI0_1@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #32]
	ldr	w0, [x0, #4]
	add	x1, sp, #8
	mov	w2, #2
	bl	_i2c_xfer
	ldp	w9, w8, [x29, #-32]
	lsl	w9, w9, #16
	orr	w8, w9, w8, lsl #24
	ldp	w10, w9, [x29, #-40]
	orr	w8, w8, w9, lsl #8
	orr	w0, w8, w10
	str	w0, [x19]
	ldur	x8, [x29, #-24]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpAdrp	Lloh6, Lloh8
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
.subsections_via_symbols
