	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_maint_init                ## -- Begin function diva_maint_init
	.p2align	4, 0x90
_diva_maint_init:                       ## @diva_maint_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %eax
	cmpq	$16384, %rsi                    ## imm = 0x4000
	jb	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.2:
	movq	_dbg_queue@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jne	LBB0_8
## %bb.3:
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	_TraceFilter@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
	movq	_TraceFilterIdent@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	movq	_TraceFilterChannel@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	movq	_dbg_base@GOTPCREL(%rip), %r13
	movq	%rbx, (%r13)
	movq	_start_sec@GOTPCREL(%rip), %rdi
	movq	_start_usec@GOTPCREL(%rip), %rsi
	callq	_diva_os_get_time
	movq	_DBG_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	$2048, 16(%rbx)                 ## imm = 0x800
	leaq	32(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movl	$0, 8224(%rbx)
	leaq	8272(%rbx), %rdi
	movq	%rdi, 8240(%rbx)
	movq	%rdi, (%r14)
	addq	$8288, %rbx                     ## imm = 0x2060
	addq	$-2584, %r12                    ## imm = 0xF5E8
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_queueInit
	xorl	%eax, %eax
	testl	%r15d, %r15d
	sete	%al
	movq	_external_dbg_queue@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movq	_dbg_q_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_diva_os_initialize_spin_lock
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	_dbg_adapter_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_diva_os_initialize_spin_lock
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_dbg_q_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_diva_os_destroy_spin_lock
LBB0_7:
	movq	$0, (%r14)
	movq	$0, (%r13)
	movl	$0, (%rbx)
	movl	$-1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_dbg_queue,8,3                  ## @dbg_queue
	.comm	_TraceFilter,8,3                ## @TraceFilter
	.comm	_TraceFilterIdent,4,2           ## @TraceFilterIdent
	.comm	_TraceFilterChannel,4,2         ## @TraceFilterChannel
	.comm	_dbg_base,8,3                   ## @dbg_base
	.comm	_start_sec,4,2                  ## @start_sec
	.comm	_start_usec,4,2                 ## @start_usec
	.comm	_DBG_MAGIC,8,3                  ## @DBG_MAGIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KERNEL MODE BUFFER\n"

	.comm	_external_dbg_queue,4,2         ## @external_dbg_queue
	.comm	_dbg_q_lock,4,2                 ## @dbg_q_lock
L_.str.1:                               ## @.str.1
	.asciz	"dbg_init"

	.comm	_dbg_adapter_lock,4,2           ## @dbg_adapter_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_maint_init                ; -- Begin function diva_maint_init
	.p2align	2
_diva_maint_init:                       ; @diva_maint_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	mov	w0, #-1
	cmp	x1, #4, lsl #12                 ; =16384
	b.lo	LBB0_7
; %bb.1:
	cbz	x21, LBB0_7
; %bb.2:
Lloh0:
	adrp	x22, _dbg_queue@GOTPAGE
Lloh1:
	ldr	x22, [x22, _dbg_queue@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_7
; %bb.3:
	mov	x19, x2
	mov	x20, x1
Lloh2:
	adrp	x8, _TraceFilter@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TraceFilter@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	xzr, [x8]
Lloh5:
	adrp	x8, _TraceFilterIdent@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TraceFilterIdent@GOTPAGEOFF]
	mov	w9, #-1
Lloh7:
	str	w9, [x8]
Lloh8:
	adrp	x8, _TraceFilterChannel@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TraceFilterChannel@GOTPAGEOFF]
Lloh10:
	str	w9, [x8]
Lloh11:
	adrp	x23, _dbg_base@GOTPAGE
Lloh12:
	ldr	x23, [x23, _dbg_base@GOTPAGEOFF]
	str	x21, [x23]
Lloh13:
	adrp	x0, _start_sec@GOTPAGE
Lloh14:
	ldr	x0, [x0, _start_sec@GOTPAGEOFF]
Lloh15:
	adrp	x1, _start_usec@GOTPAGE
Lloh16:
	ldr	x1, [x1, _start_usec@GOTPAGEOFF]
	bl	_diva_os_get_time
Lloh17:
	adrp	x8, _DBG_MAGIC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DBG_MAGIC@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	w8, [x21]
	mov	w8, #2048
	str	w8, [x21, #16]
	add	x0, x21, #32
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	str	wzr, [x21, #8224]
	mov	w8, #8272
	add	x0, x21, x8
	str	x0, [x21, #8240]
	str	x0, [x22]
	mov	w8, #8288
	add	x1, x21, x8
	sub	x2, x20, #2584
	bl	_queueInit
	cmp	w19, #0
	cset	w8, eq
Lloh22:
	adrp	x19, _external_dbg_queue@GOTPAGE
Lloh23:
	ldr	x19, [x19, _external_dbg_queue@GOTPAGEOFF]
	str	w8, [x19]
Lloh24:
	adrp	x0, _dbg_q_lock@GOTPAGE
Lloh25:
	ldr	x0, [x0, _dbg_q_lock@GOTPAGEOFF]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_diva_os_initialize_spin_lock
	cbnz	x0, LBB0_6
; %bb.4:
Lloh28:
	adrp	x0, _dbg_adapter_lock@GOTPAGE
Lloh29:
	ldr	x0, [x0, _dbg_adapter_lock@GOTPAGEOFF]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_diva_os_initialize_spin_lock
	cbz	x0, LBB0_7
; %bb.5:
Lloh32:
	adrp	x0, _dbg_q_lock@GOTPAGE
Lloh33:
	ldr	x0, [x0, _dbg_q_lock@GOTPAGEOFF]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_diva_os_destroy_spin_lock
LBB0_6:
	str	xzr, [x22]
	str	xzr, [x23]
	mov	w0, #-1
	str	wzr, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_dbg_queue,8,3                  ; @dbg_queue
	.comm	_TraceFilter,8,3                ; @TraceFilter
	.comm	_TraceFilterIdent,4,2           ; @TraceFilterIdent
	.comm	_TraceFilterChannel,4,2         ; @TraceFilterChannel
	.comm	_dbg_base,8,3                   ; @dbg_base
	.comm	_start_sec,4,2                  ; @start_sec
	.comm	_start_usec,4,2                 ; @start_usec
	.comm	_DBG_MAGIC,8,3                  ; @DBG_MAGIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KERNEL MODE BUFFER\n"

	.comm	_external_dbg_queue,4,2         ; @external_dbg_queue
	.comm	_dbg_q_lock,4,2                 ; @dbg_q_lock
l_.str.1:                               ; @.str.1
	.asciz	"dbg_init"

	.comm	_dbg_adapter_lock,4,2           ; @dbg_adapter_lock
.subsections_via_symbols
