	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atkbdc_init                    ## -- Begin function atkbdc_init
	.p2align	4, 0x90
_atkbdc_init:                           ## @atkbdc_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	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	movq	%rax, %rbx
	movq	%r14, 32(%rax)
	leaq	24(%rax), %rdi
	xorl	%esi, %esi
	callq	_pthread_mutex_init
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	movl	$48, %esi
	callq	_bzero
	leaq	L_.str(%rip), %r15
	movq	%r15, -80(%rbp)
	movq	_KBD_STS_CTL_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	$1, -72(%rbp)
	movq	_IOPORT_F_INOUT@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)
	movq	_atkbdc_sts_ctl_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	%rbx, -64(%rbp)
	movq	%r14, %rdi
	callq	_register_inout
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	%r14, %rdi
	movl	$48, %esi
	callq	_bzero
	movq	%r15, -80(%rbp)
	movq	_KBD_DATA_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	$1, -72(%rbp)
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)
	movq	_atkbdc_data_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	%rbx, -64(%rbp)
	movq	%r14, %rdi
	callq	_register_inout
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	_KBD_DEV_IRQ@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_pci_irq_reserve
	movq	(%r14), %rax
	movq	%rax, 16(%rbx)
	movq	_AUX_DEV_IRQ@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_pci_irq_reserve
	movq	(%r14), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_ps2kbd_init
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_ps2mouse_init
	movl	%eax, (%rbx)
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atkdbc"

	.comm	_KBD_STS_CTL_PORT,4,2           ## @KBD_STS_CTL_PORT
	.comm	_IOPORT_F_INOUT,8,3             ## @IOPORT_F_INOUT
	.comm	_atkbdc_sts_ctl_handler,4,2     ## @atkbdc_sts_ctl_handler
	.comm	_KBD_DATA_PORT,4,2              ## @KBD_DATA_PORT
	.comm	_atkbdc_data_handler,4,2        ## @atkbdc_data_handler
	.comm	_KBD_DEV_IRQ,8,3                ## @KBD_DEV_IRQ
	.comm	_AUX_DEV_IRQ,8,3                ## @AUX_DEV_IRQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atkbdc_init                    ; -- Begin function atkbdc_init
	.p2align	2
_atkbdc_init:                           ; @atkbdc_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x0
	mov	w21, #1
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	mov	x19, x0
	str	x20, [x0, #32]
	add	x0, x0, #24
	mov	x1, #0
	bl	_pthread_mutex_init
	mov	x0, sp
	mov	w1, #48
	bl	_bzero
Lloh0:
	adrp	x20, l_.str@PAGE
Lloh1:
	add	x20, x20, l_.str@PAGEOFF
	str	x20, [sp]
Lloh2:
	adrp	x8, _KBD_STS_CTL_PORT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KBD_STS_CTL_PORT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	str	w21, [sp, #8]
Lloh5:
	adrp	x22, _IOPORT_F_INOUT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _IOPORT_F_INOUT@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [sp, #32]
Lloh7:
	adrp	x8, _atkbdc_sts_ctl_handler@GOTPAGE
Lloh8:
	ldr	x8, [x8, _atkbdc_sts_ctl_handler@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	str	x19, [sp, #16]
	mov	x0, sp
	bl	_register_inout
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	mov	x0, sp
	mov	w1, #48
	bl	_bzero
	str	x20, [sp]
Lloh10:
	adrp	x8, _KBD_DATA_PORT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _KBD_DATA_PORT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	str	w21, [sp, #8]
	ldr	x8, [x22]
	str	x8, [sp, #32]
Lloh13:
	adrp	x8, _atkbdc_data_handler@GOTPAGE
Lloh14:
	ldr	x8, [x8, _atkbdc_data_handler@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	str	x19, [sp, #16]
	mov	x0, sp
	bl	_register_inout
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
Lloh16:
	adrp	x20, _KBD_DEV_IRQ@GOTPAGE
Lloh17:
	ldr	x20, [x20, _KBD_DEV_IRQ@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_pci_irq_reserve
	ldr	x8, [x20]
	str	x8, [x19, #16]
Lloh18:
	adrp	x20, _AUX_DEV_IRQ@GOTPAGE
Lloh19:
	ldr	x20, [x20, _AUX_DEV_IRQ@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_pci_irq_reserve
	ldr	x8, [x20]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_ps2kbd_init
	str	w0, [x19, #4]
	mov	x0, x19
	bl	_ps2mouse_init
	str	w0, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atkdbc"

	.comm	_KBD_STS_CTL_PORT,4,2           ; @KBD_STS_CTL_PORT
	.comm	_IOPORT_F_INOUT,8,3             ; @IOPORT_F_INOUT
	.comm	_atkbdc_sts_ctl_handler,4,2     ; @atkbdc_sts_ctl_handler
	.comm	_KBD_DATA_PORT,4,2              ; @KBD_DATA_PORT
	.comm	_atkbdc_data_handler,4,2        ; @atkbdc_data_handler
	.comm	_KBD_DEV_IRQ,8,3                ; @KBD_DEV_IRQ
	.comm	_AUX_DEV_IRQ,8,3                ; @AUX_DEV_IRQ
.subsections_via_symbols
