	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ngene_init
_ngene_init:                            ## @ngene_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %r14
	addq	$32, %rdi
	movq	_event_tasklet@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_tasklet_init
	movl	$49152, %edi                    ## imm = 0xC000
	addq	24(%rbx), %rdi
	xorl	%esi, %esi
	movl	$544, %edx                      ## imm = 0x220
	callq	_memset_io
	movl	$50176, %edi                    ## imm = 0xC400
	addq	24(%rbx), %rdi
	xorl	%esi, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_memset_io
	movq	_MAX_STREAM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	16(%rbx), %rcx
	addq	$8, %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, (%rcx)
	movl	%edx, -8(%rcx)
	incq	%rdx
	movslq	(%rax), %rsi
	addq	$16, %rcx
	cmpq	%rsi, %rdx
	jl	LBB0_2
LBB0_3:
	movq	$0, 8(%rbx)
	movq	_NGENE_INT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_ngwritel
	movq	_NGENE_INT_COUNTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ngreadl
	movl	%eax, (%rbx)
	movq	_DEV_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ngreadl
	andl	$15, %eax
	movl	%eax, 4(%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_info                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_event_tasklet,4,2              ## @event_tasklet
	.comm	_MAX_STREAM,4,2                 ## @MAX_STREAM
	.comm	_NGENE_INT_ENABLE,4,2           ## @NGENE_INT_ENABLE
	.comm	_NGENE_INT_COUNTS,4,2           ## @NGENE_INT_COUNTS
	.comm	_DEV_VER,4,2                    ## @DEV_VER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device version %d\n"

	.no_dead_strip	_ngene_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ngene_init
_ngene_init:                            ; @ngene_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x19, [x0, #40]
	add	x0, x0, #32
Lloh0:
	adrp	x8, _event_tasklet@GOTPAGE
Lloh1:
	ldr	x8, [x8, _event_tasklet@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_tasklet_init
	ldr	x8, [x20, #24]
	add	x0, x8, #12, lsl #12            ; =49152
	mov	w1, #0
	mov	w2, #544
	bl	_memset_io
	ldr	x8, [x20, #24]
	mov	w9, #50176
	add	x0, x8, x9
	mov	w1, #0
	mov	w2, #256
	bl	_memset_io
Lloh3:
	adrp	x8, _MAX_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_STREAM@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x9, #0
	ldr	x10, [x20, #16]
	add	x10, x10, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	x20, [x10]
	stur	w9, [x10, #-8]
	add	x9, x9, #1
	ldrsw	x11, [x8]
	add	x10, x10, #16
	cmp	x9, x11
	b.lt	LBB0_2
LBB0_3:
	str	xzr, [x20, #8]
Lloh5:
	adrp	x8, _NGENE_INT_ENABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NGENE_INT_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_ngwritel
Lloh8:
	adrp	x8, _NGENE_INT_COUNTS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NGENE_INT_COUNTS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_ngreadl
	str	w0, [x20]
Lloh11:
	adrp	x8, _DEV_VER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DEV_VER@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_ngreadl
	and	w2, w0, #0xf
	str	w2, [x20, #4]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_info
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_event_tasklet,4,2              ; @event_tasklet
	.comm	_MAX_STREAM,4,2                 ; @MAX_STREAM
	.comm	_NGENE_INT_ENABLE,4,2           ; @NGENE_INT_ENABLE
	.comm	_NGENE_INT_COUNTS,4,2           ; @NGENE_INT_COUNTS
	.comm	_DEV_VER,4,2                    ; @DEV_VER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device version %d\n"

	.no_dead_strip	_ngene_init
.subsections_via_symbols
