	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5h1420_readreg
_s5h1420_readreg:                       ## @s5h1420_readreg
	.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	$104, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	%esi, -100(%rbp)
	leaq	-24(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	$2, -88(%rbp)
	movq	16(%rdi), %rcx
	movl	8(%rcx), %edx
	movl	%edx, -80(%rbp)
	leaq	-100(%rbp), %rdi
	movq	%rdi, -72(%rbp)
	movq	$1, -64(%rbp)
	movl	%edx, -56(%rbp)
	movq	%rax, -48(%rbp)
	movl	$1, -40(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	%edx, -32(%rbp)
	decl	%esi
	movzbl	%sil, %eax
	movl	%eax, -24(%rbp)
	movq	(%rbx), %rdx
	movl	(%rdx,%rax,4), %eax
	movl	%eax, -20(%rbp)
	cmpq	$0, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	leaq	-96(%rbp), %rsi
	movl	$3, %edx
	callq	_i2c_transfer
	cmpl	$3, %eax
	je	LBB0_4
	jmp	LBB0_5
LBB0_2:
	movl	8(%rbx), %edi
	leaq	-72(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.3:
	movl	8(%rbx), %edi
	leaq	-48(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_5
LBB0_4:
	movl	-24(%rbp), %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$104, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_s5h1420_readreg
.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 s5h1420_readreg
lCPI0_0:
	.long	2                               ; 0x2
	.long	0                               ; 0x0
lCPI0_1:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_s5h1420_readreg:                       ; @s5h1420_readreg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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]
	sub	x8, x29, #32
	str	x8, [sp, #8]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	ldr	x9, [x0, #16]
	ldr	w10, [x9, #8]
	str	w10, [sp, #24]
	add	x11, sp, #4
	str	x11, [sp, #32]
Lloh5:
	adrp	x11, lCPI0_1@PAGE
Lloh6:
	ldr	d0, [x11, lCPI0_1@PAGEOFF]
	str	d0, [sp, #40]
	str	w10, [sp, #48]
	str	x8, [sp, #56]
	mov	w8, #1
Lloh7:
	adrp	x11, _I2C_M_RD@GOTPAGE
Lloh8:
	ldr	x11, [x11, _I2C_M_RD@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	stp	w8, w11, [sp, #64]
	str	w10, [sp, #72]
	sub	w8, w1, #1
	and	w8, w8, #0xff
	stur	w8, [x29, #-32]
	ldr	x10, [x0]
	ldr	w8, [x10, w8, uxtw #2]
	stur	w8, [x29, #-28]
	ldr	x8, [x9]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	mov	w2, #3
	bl	_i2c_transfer
	cmp	w0, #3
	b.eq	LBB0_4
	b	LBB0_5
LBB0_2:
	ldr	w0, [x19, #8]
	add	x20, sp, #8
	add	x1, x20, #24
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x19, #8]
	add	x1, x20, #48
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_5
LBB0_4:
	ldur	w0, [x29, #-32]
LBB0_5:
	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_7
; %bb.6:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdrp	Lloh5, Lloh7
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_s5h1420_readreg
.subsections_via_symbols
