	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reg_write16
_reg_write16:                           ## @reg_write16
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	8(%rdi), %r15
	movl	%esi, %edi
	callq	_REG2ADDR
	movl	%eax, -52(%rbp)
	movl	%ebx, %eax
	sarl	$8, %eax
	movl	%eax, -48(%rbp)
	movl	%ebx, -44(%rbp)
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_set_page
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	leaq	-52(%rbp), %rsi
	movq	%r15, %rdi
	movl	$12, %edx
	callq	_i2c_master_send
	testl	%eax, %eax
	jns	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_dev_err
LBB0_3:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error %d writing to 0x%x\n"

	.no_dead_strip	_reg_write16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reg_write16
_reg_write16:                           ; @reg_write16
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	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]
	str	x8, [sp, #24]
	ldr	x21, [x0, #8]
	mov	x0, x1
	bl	_REG2ADDR
	asr	w8, w22, #8
	stp	w0, w8, [sp, #12]
	str	w22, [sp, #20]
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x20
	bl	_set_page
	tbnz	w0, #31, LBB0_3
; %bb.1:
	add	x1, sp, #12
	mov	x0, x21
	mov	w2, #12
	bl	_i2c_master_send
	tbz	w0, #31, LBB0_3
; %bb.2:
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_dev_err
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x8, [sp, #24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error %d writing to 0x%x\n"

	.no_dead_strip	_reg_write16
.subsections_via_symbols
