	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onyx_read_register
_onyx_read_register:                    ## @onyx_read_register
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	_ONYX_REG_CONTROL@GOTPCREL(%rip), %r15
	cmpq	%rsi, (%r15)
	jne	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	callq	_i2c_smbus_read_byte_data
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	%rax, (%r14)
	movq	(%rbx), %rcx
	movq	(%r15), %rdx
	movq	_FIRSTREGISTER@GOTPCREL(%rip), %rsi
	subq	(%rsi), %rdx
	movq	%rax, (%rcx,%rdx,8)
	jmp	LBB0_5
LBB0_1:
	movq	_FIRSTREGISTER@GOTPCREL(%rip), %rax
	subq	(%rax), %rsi
	movq	(%rbx), %rax
	movq	(%rax,%rsi,8), %rax
	movq	%rax, (%r14)
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ONYX_REG_CONTROL,8,3           ## @ONYX_REG_CONTROL
	.comm	_FIRSTREGISTER,8,3              ## @FIRSTREGISTER
	.no_dead_strip	_onyx_read_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onyx_read_register
_onyx_read_register:                    ; @onyx_read_register
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x21, _ONYX_REG_CONTROL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ONYX_REG_CONTROL@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, x1
	b.ne	LBB0_3
; %bb.1:
	ldr	w0, [x20, #8]
	bl	_i2c_smbus_read_byte_data
	tbnz	x0, #63, LBB0_4
; %bb.2:
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
	ldr	x9, [x20]
	ldr	x10, [x21]
Lloh2:
	adrp	x11, _FIRSTREGISTER@GOTPAGE
Lloh3:
	ldr	x11, [x11, _FIRSTREGISTER@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x11]
	sub	x10, x10, x11
	str	x8, [x9, x10, lsl #3]
	b	LBB0_5
LBB0_3:
	mov	w0, #0
Lloh5:
	adrp	x8, _FIRSTREGISTER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FIRSTREGISTER@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh7:
	ldr	x8, [x8]
	sub	x8, x1, x8
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [x19]
	b	LBB0_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ONYX_REG_CONTROL,8,3           ; @ONYX_REG_CONTROL
	.comm	_FIRSTREGISTER,8,3              ; @FIRSTREGISTER
	.no_dead_strip	_onyx_read_register
.subsections_via_symbols
