	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nxt6000_writereg
_nxt6000_writereg:                      ## @nxt6000_writereg
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	%esi, -40(%rbp)
	movl	%edx, -36(%rbp)
	movl	$2, -64(%rbp)
	leaq	-40(%rbp), %rax
	movq	%rax, -56(%rbp)
	movl	$0, -48(%rbp)
	movq	8(%rdi), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	(%rdi), %edi
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	cmpl	$1, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_dprintk
LBB0_2:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	xorl	%ecx, %ecx
	cmpl	$1, %ebx
	cmovel	%ecx, %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nxt6000: nxt6000_write error (reg: 0x%02X, data: 0x%02X, ret: %d)\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_nxt6000_writereg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nxt6000_writereg
_nxt6000_writereg:                      ; @nxt6000_writereg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	stp	w1, w2, [sp, #32]
	mov	w8, #2
	str	w8, [sp, #8]
	add	x8, sp, #32
	str	x8, [sp, #16]
	str	wzr, [sp, #24]
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	str	w8, [sp, #28]
	ldr	w0, [x0]
	add	x1, sp, #8
	mov	w2, #1
	bl	_i2c_transfer
	mov	x21, x0
	cmp	w0, #1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	mov	x3, x21
	bl	_dprintk
LBB0_2:
Lloh5:
	adrp	x8, _EFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w21, #1
	csneg	w0, wzr, w8, eq
	ldr	x8, [sp, #40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nxt6000: nxt6000_write error (reg: 0x%02X, data: 0x%02X, ret: %d)\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_nxt6000_writereg
.subsections_via_symbols
