	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skbd_connect
_skbd_connect:                          ## @skbd_connect
	.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	%rsi, %r12
	movq	%rdi, %rbx
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_input_allocate_device
	movq	%rax, %r14
	testq	%r15, %r15
	je	LBB0_9
## %bb.1:
	testq	%r14, %r14
	je	LBB0_9
## %bb.2:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, 16(%r15)
	movq	%r14, (%r15)
	movl	12(%r15), %edi
	movq	(%rbx), %rcx
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movl	8(%r15), %edi
	movq	_skbd_keycode@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movl	$4, %edx
	callq	_memcpy
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r14)
	movl	12(%r15), %eax
	movl	%eax, 56(%r14)
	movq	_BUS_RS232@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r14)
	movq	_SERIO_STOWAWAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movabsq	$1099511627777, %rax            ## imm = 0x10000000001
	movq	%rax, 40(%r14)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rbx), %rax
	movq	%rax, 32(%r14)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	movl	%eax, %r13d
	movq	_EV_REP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	orl	%r13d, %eax
	movq	8(%r14), %rcx
	movl	%eax, (%rcx)
	movl	8(%r15), %eax
	movl	%eax, 28(%r14)
	movl	$1, 16(%r14)
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, 20(%r14)
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movl	24(%r14), %esi
	callq	_set_bit
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	movl	24(%r14), %esi
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_clear_bit
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_serio_set_drvdata
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_serio_open
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	(%r15), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_serio_close
LBB0_8:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_serio_set_drvdata
	movl	%r12d, %r13d
LBB0_9:
	movq	%r14, %rdi
	callq	_input_free_device
	movq	%r15, %rdi
	callq	_kfree
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/input0"

	.comm	_skbd_keycode,8,3               ## @skbd_keycode
L_.str.1:                               ## @.str.1
	.asciz	"Stowaway Keyboard"

	.comm	_BUS_RS232,4,2                  ## @BUS_RS232
	.comm	_SERIO_STOWAWAY,4,2             ## @SERIO_STOWAWAY
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_EV_REP,4,2                     ## @EV_REP
	.no_dead_strip	_skbd_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function skbd_connect
lCPI0_0:
	.long	1                               ; 0x1
	.long	256                             ; 0x100
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_skbd_connect:                          ; @skbd_connect
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	bl	_input_allocate_device
	mov	x21, x0
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	neg	w22, w23
	b	LBB0_9
LBB0_2:
	str	x20, [x19, #16]
	str	x21, [x19]
	ldr	w0, [x19, #12]
	mov	x23, x20
	ldr	x3, [x23], #8
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x24, _skbd_keycode@GOTPAGE
Lloh9:
	ldr	x24, [x24, _skbd_keycode@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	w2, #4
	bl	_memcpy
Lloh10:
	adrp	x8, l_.str.1@PAGE
Lloh11:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x21]
	ldr	w8, [x19, #12]
	str	w8, [x21, #56]
Lloh12:
	adrp	x8, _BUS_RS232@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BUS_RS232@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _SERIO_STOWAWAY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SERIO_STOWAWAY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #48]
Lloh18:
	adrp	x8, lCPI0_0@PAGE
Lloh19:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x21, #40]
	str	x23, [x21, #32]
Lloh20:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_BIT_MASK
	mov	x23, x0
Lloh23:
	adrp	x8, _EV_REP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EV_REP@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_BIT_MASK
	orr	w8, w0, w23
	ldr	x9, [x21, #8]
	str	w8, [x9]
	ldr	w8, [x19, #8]
	str	w8, [x21, #28]
	mov	w8, #1
	str	w8, [x21, #16]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	str	w0, [x21, #20]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x23, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	w0, [x8, x23, lsl #2]
	ldr	w1, [x21, #24]
	bl	_set_bit
	add	x23, x23, #1
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_4
LBB0_5:
	ldr	w1, [x21, #24]
	mov	w0, #0
	bl	_clear_bit
	mov	x0, x20
	mov	x1, x19
	bl	_serio_set_drvdata
	mov	x0, x20
	mov	x1, x22
	bl	_serio_open
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	x0, [x19]
	bl	_input_register_device
	mov	x22, x0
	cbz	w0, LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_serio_close
LBB0_8:
	mov	x0, x20
	mov	x1, #0
	bl	_serio_set_drvdata
LBB0_9:
	mov	x0, x21
	bl	_input_free_device
	mov	x0, x19
	bl	_kfree
LBB0_10:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdrp	Lloh18, Lloh20
	.loh AdrpLdr	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/input0"

	.comm	_skbd_keycode,8,3               ; @skbd_keycode
l_.str.1:                               ; @.str.1
	.asciz	"Stowaway Keyboard"

	.comm	_BUS_RS232,4,2                  ; @BUS_RS232
	.comm	_SERIO_STOWAWAY,4,2             ; @SERIO_STOWAWAY
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_EV_REP,4,2                     ; @EV_REP
	.no_dead_strip	_skbd_connect
.subsections_via_symbols
