	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nxt2004_init
_nxt2004_init:                          ## @nxt2004_init
	.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
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %r12
	movl	$0, -52(%rbp)
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	movl	$30, %esi
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	_NXT2004_DEFAULT_FIRMWARE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	movl	(%rbx), %esi
	movq	(%r12), %rax
	movl	(%rax), %edx
	leaq	-64(%rbp), %rdi
	callq	_request_firmware
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.1:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movq	-64(%rbp), %rsi
	movq	%r15, %rdi
	callq	_nxt2004_load_firmware
	movl	%eax, %r14d
	movq	-64(%rbp), %rdi
	callq	_release_firmware
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	callq	_printk
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r14d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_printk
	movl	$1, -52(%rbp)
	leaq	-52(%rbp), %r15
	movq	%r12, %rdi
	movl	$25, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	%r12, %rdi
	callq	_nxt2004_microcontroller_init
	movq	%r12, %rdi
	callq	_nxt200x_microcontroller_stop
	movq	%r12, %rdi
	callq	_nxt200x_microcontroller_stop
	movq	%r12, %rdi
	callq	_nxt2004_microcontroller_init
	movq	%r12, %rdi
	callq	_nxt200x_microcontroller_stop
	movl	$255, -52(%rbp)
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movl	$215, -52(%rbp)
	movq	%r12, %rdi
	movl	$87, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movabsq	$1090921693191, %rax            ## imm = 0xFE00000007
	movq	%rax, -52(%rbp)
	movq	%r12, %rdi
	movl	$53, %esi
	movq	%r15, %rdx
	movl	$2, %ecx
	callq	_nxt200x_writebytes
	movl	$18, -52(%rbp)
	movq	%r12, %rdi
	movl	$52, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$128, -52(%rbp)
	movq	%r12, %rdi
	movl	$33, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$33, -52(%rbp)
	movq	%r12, %rdi
	movl	$10, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$1, -52(%rbp)
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	$126, -52(%rbp)
	movq	%r12, %rdi
	movl	$233, %esi
	movq	%r15, %rdx
	movl	$2, %ecx
	callq	_nxt200x_writebytes
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$204, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$16, -52(%rbp)
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$1, -52(%rbp)
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movl	$112, -52(%rbp)
	movq	%r12, %rdi
	movl	$129, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movabsq	$403726925873, %rax             ## imm = 0x5E00000031
	movq	%rax, -52(%rbp)
	movl	$102, -44(%rbp)
	movq	%r12, %rdi
	movl	$130, %esi
	movq	%r15, %rdx
	movl	$3, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$136, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$17, -52(%rbp)
	movq	%r12, %rdi
	movl	$136, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$64, -52(%rbp)
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$16, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readbytes
	movl	$16, -52(%rbp)
	movq	%r12, %rdi
	movl	$16, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	%r12, %rdi
	movl	$10, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readbytes
	movl	$33, -52(%rbp)
	movq	%r12, %rdi
	movl	$10, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	%r12, %rdi
	callq	_nxt2004_microcontroller_init
	movl	$33, -52(%rbp)
	movq	%r12, %rdi
	movl	$10, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$126, -52(%rbp)
	movq	%r12, %rdi
	movl	$233, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$234, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$16, -52(%rbp)
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$8, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$4, -52(%rbp)
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$129, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	$128, -52(%rbp)
	movl	$0, -44(%rbp)
	movq	%r12, %rdi
	movl	$130, %esi
	movq	%r15, %rdx
	movl	$3, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$136, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$17, -52(%rbp)
	movq	%r12, %rdi
	movl	$136, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readreg_multibyte
	movl	$68, -52(%rbp)
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writereg_multibyte
	movq	%r12, %rdi
	movl	$16, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_readbytes
	movl	$18, -52(%rbp)
	movq	%r12, %rdi
	movl	$16, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$4, -52(%rbp)
	movq	%r12, %rdi
	movl	$19, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$22, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$4, -52(%rbp)
	movq	%r12, %rdi
	movl	$20, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movl	$0, -52(%rbp)
	movq	%r12, %rdi
	movl	$20, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	%r12, %rdi
	movl	$23, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	%r12, %rdi
	movl	$20, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	movq	%r12, %rdi
	movl	$23, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_nxt200x_writebytes
	jmp	LBB0_6
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nxt2004: Waiting for firmware upload (%s)...\n"

	.comm	_NXT2004_DEFAULT_FIRMWARE,4,2   ## @NXT2004_DEFAULT_FIRMWARE
L_.str.1:                               ## @.str.1
	.asciz	"nxt2004: Waiting for firmware upload(2)...\n"

L_.str.2:                               ## @.str.2
	.asciz	"nxt2004: No firmware uploaded (timeout or file not found?)\n"

L_.str.3:                               ## @.str.3
	.asciz	"nxt2004: Writing firmware to device failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"nxt2004: Firmware upload complete\n"

	.no_dead_strip	_nxt2004_init
.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 nxt2004_init
lCPI0_0:
	.long	7                               ; 0x7
	.long	254                             ; 0xfe
lCPI0_1:
	.long	126                             ; 0x7e
	.long	0                               ; 0x0
lCPI0_2:
	.long	94                              ; 0x5e
	.long	102                             ; 0x66
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nxt2004_init:                          ; @nxt2004_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x19, [x0]
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #30
	mov	w3, #1
	bl	_nxt200x_writebytes
Lloh3:
	adrp	x21, _NXT2004_DEFAULT_FIRMWARE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _NXT2004_DEFAULT_FIRMWARE@GOTPAGEOFF]
	ldr	w8, [x21]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	ldr	w1, [x21]
	ldr	x8, [x19]
	ldr	w2, [x8]
	add	x0, sp, #16
	bl	_request_firmware
	mov	x21, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
	cbz	w21, LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printk
	b	LBB0_5
LBB0_2:
	ldr	x1, [sp, #16]
	mov	x0, x20
	bl	_nxt2004_load_firmware
	mov	x21, x0
	ldr	x0, [sp, #16]
	bl	_release_firmware
	cbz	w21, LBB0_4
; %bb.3:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printk
	b	LBB0_5
LBB0_4:
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printk
	mov	w24, #1
	str	w24, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #25
	mov	w3, #1
	bl	_nxt200x_writebytes
	mov	x0, x19
	bl	_nxt2004_microcontroller_init
	mov	x0, x19
	bl	_nxt200x_microcontroller_stop
	mov	x0, x19
	bl	_nxt200x_microcontroller_stop
	mov	x0, x19
	bl	_nxt2004_microcontroller_init
	mov	x0, x19
	bl	_nxt200x_microcontroller_stop
	mov	w8, #255
	str	w8, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	mov	w8, #215
	str	w8, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #87
	mov	w3, #1
	bl	_nxt200x_writebytes
Lloh15:
	adrp	x8, lCPI0_0@PAGE
Lloh16:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #53
	mov	w3, #2
	bl	_nxt200x_writebytes
	mov	w20, #18
	str	w20, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #52
	mov	w3, #1
	bl	_nxt200x_writebytes
	mov	w21, #128
	str	w21, [sp, #24]
	mov	w22, #33
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #33
	mov	w3, #1
	bl	_nxt200x_writebytes
	str	w22, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #10
	mov	w3, #1
	bl	_nxt200x_writebytes
	str	w24, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
Lloh17:
	adrp	x8, lCPI0_1@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #233
	mov	w3, #2
	bl	_nxt200x_writebytes
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #204
	mov	w3, #1
	bl	_nxt200x_writebytes
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	mov	w23, #16
	str	w23, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	str	w24, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	mov	w8, #112
	str	w8, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #129
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	mov	w8, #49
	str	w8, [sp, #24]
Lloh19:
	adrp	x8, lCPI0_2@PAGE
Lloh20:
	ldr	d0, [x8, lCPI0_2@PAGEOFF]
	stur	d0, [sp, #28]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #130
	mov	w3, #3
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #136
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	mov	w24, #17
	str	w24, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #136
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	mov	w8, #64
	str	w8, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #16
	mov	w3, #1
	bl	_nxt200x_readbytes
	str	w23, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #16
	mov	w3, #1
	bl	_nxt200x_writebytes
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #10
	mov	w3, #1
	bl	_nxt200x_readbytes
	str	w22, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #10
	mov	w3, #1
	bl	_nxt200x_writebytes
	mov	x0, x19
	bl	_nxt2004_microcontroller_init
	str	w22, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #10
	mov	w3, #1
	bl	_nxt200x_writebytes
	mov	w8, #126
	str	w8, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #233
	mov	w3, #1
	bl	_nxt200x_writebytes
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #234
	mov	w3, #1
	bl	_nxt200x_writebytes
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	str	w23, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #8
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	mov	w22, #4
	str	w22, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #129
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	stp	wzr, wzr, [sp, #28]
	str	w21, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #130
	mov	w3, #3
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #136
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	str	w24, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #136
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_readreg_multibyte
	mov	w8, #68
	str	w8, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	mov	w3, #1
	bl	_nxt200x_writereg_multibyte
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #16
	mov	w3, #1
	bl	_nxt200x_readbytes
	str	w20, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #16
	mov	w3, #1
	bl	_nxt200x_writebytes
	str	w22, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #19
	mov	w3, #1
	bl	_nxt200x_writebytes
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #22
	mov	w3, #1
	bl	_nxt200x_writebytes
	str	w22, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #20
	mov	w3, #1
	bl	_nxt200x_writebytes
	str	wzr, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #20
	mov	w3, #1
	bl	_nxt200x_writebytes
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #23
	mov	w3, #1
	bl	_nxt200x_writebytes
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #20
	mov	w3, #1
	bl	_nxt200x_writebytes
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #23
	mov	w3, #1
	bl	_nxt200x_writebytes
	mov	w21, #0
LBB0_5:
	ldr	x8, [sp, #40]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdr	Lloh19, Lloh20
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nxt2004: Waiting for firmware upload (%s)...\n"

	.comm	_NXT2004_DEFAULT_FIRMWARE,4,2   ; @NXT2004_DEFAULT_FIRMWARE
l_.str.1:                               ; @.str.1
	.asciz	"nxt2004: Waiting for firmware upload(2)...\n"

l_.str.2:                               ; @.str.2
	.asciz	"nxt2004: No firmware uploaded (timeout or file not found?)\n"

l_.str.3:                               ; @.str.3
	.asciz	"nxt2004: Writing firmware to device failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"nxt2004: Firmware upload complete\n"

	.no_dead_strip	_nxt2004_init
.subsections_via_symbols
