	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ddb_output_init
_ddb_output_init:                       ## @ddb_output_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %r15
	movslq	%esi, %r14
	movq	%r14, %r12
	shlq	$4, %r12
	leaq	(%r15,%r12), %rdi
	movq	%rdi, 8(%rbx)
	movl	%r14d, (%r15,%r12)
	movq	%rbx, 8(%r15,%r12)
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %esi
	callq	_io_regmap
	movq	%rax, %r13
	movl	(%rbx), %edi
	callq	_DDB_LINK_TAG
	movq	8(%r13), %rcx
	movl	4(%rcx), %r8d
	imull	%r14d, %r8d
	addl	(%rcx), %r8d
	orl	%eax, %r8d
	movl	%r8d, 4(%r15,%r12)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	8(%r15), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	callq	_dev_dbg
	cmpq	$0, (%r15)
	je	LBB0_1
## %bb.2:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_io_regmap
	movq	(%rax), %rdx
	addq	%r14, %rdx
	movq	_output_handler@GOTPCREL(%rip), %rcx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%rbx, %r8
	callq	_ddb_irq_set
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ddb_dma_init                   ## TAILCALL
LBB0_1:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init link %u, output %u, regs %08x\n"

	.comm	_output_handler,4,2             ## @output_handler
	.no_dead_strip	_ddb_output_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ddb_output_init
_ddb_output_init:                       ; @ddb_output_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	x19, x1
	mov	x22, x0
	ldr	x21, [x0, #16]
	ldr	x8, [x21, #16]
	add	x20, x8, w1, sxtw #4
	str	x20, [x0, #8]
	str	w1, [x20]
	str	x0, [x20, #8]
	mov	x0, x20
	mov	w1, #1
	bl	_io_regmap
	mov	x23, x0
	ldr	w0, [x22]
	bl	_DDB_LINK_TAG
	ldr	x8, [x23, #8]
	ldp	w9, w8, [x8]
	madd	w8, w8, w19, w9
	orr	w4, w8, w0
	str	w4, [x20, #4]
	ldr	w0, [x21, #8]
	ldr	w2, [x22]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_dev_dbg
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.1:
	sxtw	x22, w19
	mov	x0, x20
	mov	w1, #0
	bl	_io_regmap
	ldr	x8, [x0]
	add	x2, x8, x22
Lloh2:
	adrp	x3, _output_handler@GOTPAGE
Lloh3:
	ldr	x3, [x3, _output_handler@GOTPAGEOFF]
	mov	x0, x21
	mov	w1, #0
	mov	x4, x20
	bl	_ddb_irq_set
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	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
	b	_ddb_dma_init
LBB0_2:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init link %u, output %u, regs %08x\n"

	.comm	_output_handler,4,2             ; @output_handler
	.no_dead_strip	_ddb_output_init
.subsections_via_symbols
