	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ddb_input_init
_ddb_input_init:                        ## @ddb_input_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
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %r14
	movslq	%ecx, %r15
	shlq	$4, %r15
	leaq	(%r14,%r15), %rdi
	movslq	%edx, %rcx
	movq	%rdi, (%rax,%rcx,8)
	movl	%r12d, (%r14,%r15)
	movq	%rbx, 8(%r14,%r15)
	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	%r12d, %r8d
	addl	(%rcx), %r8d
	orl	%eax, %r8d
	movl	%r8d, 4(%r14,%r15)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ecx
	callq	_dev_dbg
	cmpq	$0, 8(%r15)
	je	LBB0_1
## %bb.2:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_io_regmap
	movl	(%rbx), %edx
	testl	%edx, %edx
	leal	24(,%rdx,8), %ebx
	cmovel	%edx, %ebx
	addl	%r12d, %ebx
	movl	(%r15), %edi
	movl	(%rax), %r13d
	addl	%ebx, %r13d
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	callq	_dev_dbg
	movq	_input_handler@GOTPCREL(%rip), %rcx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movq	%r14, %r8
	callq	_ddb_irq_set
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %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, input %u, regs %08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"init link %u, input %u, handler %u\n"

	.comm	_input_handler,4,2              ## @input_handler
	.no_dead_strip	_ddb_input_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ddb_input_init
_ddb_input_init:                        ; @ddb_input_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, x1
	mov	x22, x0
	ldp	x8, x20, [x0, #8]
	ldr	x9, [x20, #16]
	add	x19, x9, w3, sxtw #4
	str	x19, [x8, w2, sxtw #3]
	str	w1, [x19]
	str	x0, [x19, #8]
	mov	x0, x19
	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, w21, w9
	orr	w4, w8, w0
	str	w4, [x19, #4]
	ldr	w0, [x20]
	ldr	w2, [x22]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	bl	_dev_dbg
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_io_regmap
	ldr	w8, [x0]
	ldr	w2, [x22]
	lsl	w9, w2, #3
	add	w9, w9, #24
	cmp	w2, #0
	csel	w9, wzr, w9, eq
	ldr	w0, [x20]
	add	w22, w9, w21
	add	w23, w22, w8
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x21
	mov	x4, x23
	bl	_dev_dbg
Lloh4:
	adrp	x3, _input_handler@GOTPAGE
Lloh5:
	ldr	x3, [x3, _input_handler@GOTPAGEOFF]
	mov	x0, x20
	mov	w1, #0
	mov	x2, x23
	mov	x4, x19
	bl	_ddb_irq_set
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	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	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init link %u, input %u, regs %08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"init link %u, input %u, handler %u\n"

	.comm	_input_handler,4,2              ; @input_handler
	.no_dead_strip	_ddb_input_init
.subsections_via_symbols
