	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function itd1000_read_reg
_itd1000_read_reg:                      ## @itd1000_read_reg
	.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	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	%esi, -72(%rbp)
	leaq	-72(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	$1, -56(%rbp)
	movq	16(%rdi), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-68(%rbp), %rcx
	movq	%rcx, -40(%rbp)
	movl	$1, -32(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -28(%rbp)
	movl	%eax, -24(%rbp)
	decl	%esi
	movzbl	%sil, %esi
	leaq	(,%rsi,4), %rdx
	addq	8(%rdi), %rdx
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$1, %ecx
	callq	_itd1000_write_regs
	movl	(%rbx), %edi
	leaq	-64(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	jne	LBB0_1
## %bb.2:
	movl	-68(%rbp), %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_itd_warn
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"itd1000 I2C read failed\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_itd1000_read_reg
.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 itd1000_read_reg
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_itd1000_read_reg:                      ; @itd1000_read_reg
	.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, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	str	w1, [sp, #4]
	add	x8, sp, #4
	str	x8, [sp, #8]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	ldp	x9, x8, [x0, #8]
	ldr	w8, [x8]
	mov	x10, sp
	str	x10, [sp, #32]
	mov	w10, #1
Lloh5:
	adrp	x11, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x11, [x11, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
	stp	w10, w11, [sp, #40]
	str	w8, [sp, #24]
	str	w8, [sp, #48]
	sub	w8, w1, #1
	and	w1, w8, #0xff
	add	x2, x9, w1, uxtw #2
	mov	w3, #1
	bl	_itd1000_write_regs
	ldr	w0, [x19]
	add	x1, sp, #8
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [sp]
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_itd_warn
Lloh10:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldur	x8, [x29, #-24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"itd1000 I2C read failed\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_itd1000_read_reg
.subsections_via_symbols
