	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsia6b_serio_connect
_fsia6b_serio_connect:                  ## @fsia6b_serio_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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rax)
	movq	_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_serio_set_drvdata
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_input_allocate_device
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, (%rbx)
	movl	8(%rbx), %edi
	movq	(%r14), %rcx
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_DRIVER_DESC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r15)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %eax
	movl	%eax, 24(%r15)
	movq	_BUS_RS232@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movq	_SERIO_FSIA6B@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movl	12(%r14), %eax
	movl	%eax, 12(%r15)
	movl	$256, 8(%r15)                   ## imm = 0x100
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%r14), %rax
	movq	%rax, (%r15)
	movq	_IBUS_SERVO_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_15
## %bb.5:
	xorl	%ebx, %ebx
	movq	_fsia6b_axes@GOTPCREL(%rip), %r14
	movq	_IBUS_SERVO_COUNT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	movl	$1000, %edx                     ## imm = 0x3E8
	movl	$2000, %ecx                     ## imm = 0x7D0
	movl	$2, %r8d
	movl	$2, %r9d
	callq	_input_set_abs_params
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_6
## %bb.7:
	testl	%eax, %eax
	jle	LBB0_15
## %bb.8:
	movq	_switch_config@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	xorl	%r13d, %r13d
	movq	_EV_KEY@GOTPCREL(%rip), %r9
	movq	_BTN_0@GOTPCREL(%rip), %rdi
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	movslq	%eax, %rdx
	cmpq	%rdx, %r13
	jge	LBB0_15
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movb	(%r8,%r13), %dl
	leal	-52(%rdx), %esi
	cmpb	$-4, %sil
	jb	LBB0_22
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpb	$49, %dl
	jb	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movslq	%r12d, %r12
	movl	$48, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r9), %esi
	movq	(%rdi), %rdx
	addq	%r12, %rdx
	movq	%r15, %rdi
	movq	%r15, %r14
	movq	%r9, %r15
	callq	_input_set_capability
	movq	_BTN_0@GOTPCREL(%rip), %rdi
	movq	%r15, %r9
	movq	%r14, %r15
	movq	_switch_config@GOTPCREL(%rip), %rax
	incq	%r12
	movq	(%rax), %r8
	movsbl	(%r8,%r13), %eax
	incl	%ebx
	cmpl	%eax, %ebx
	jl	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_IBUS_SERVO_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_21
LBB0_15:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_serio_open
	movl	%eax, %r13d
	testl	%eax, %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_19
## %bb.16:
	movq	(%rbx), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_17
## %bb.18:
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_serio_close
	jmp	LBB0_19
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_20
LBB0_22:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_19:
	movq	%r15, %rdi
	callq	_input_free_device
LBB0_20:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_serio_set_drvdata
	movq	%rbx, %rdi
	callq	_kfree
LBB0_21:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	xorl	%r13d, %r13d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SYNC,4,2                       ## @SYNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/input0"

	.comm	_DRIVER_DESC,4,2                ## @DRIVER_DESC
	.comm	_BUS_RS232,4,2                  ## @BUS_RS232
	.comm	_SERIO_FSIA6B,4,2               ## @SERIO_FSIA6B
	.comm	_IBUS_SERVO_COUNT,4,2           ## @IBUS_SERVO_COUNT
	.comm	_fsia6b_axes,8,3                ## @fsia6b_axes
	.comm	_switch_config,8,3              ## @switch_config
L_.str.1:                               ## @.str.1
	.asciz	"Invalid switch configuration supplied for fsia6b.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_BTN_0,8,3                      ## @BTN_0
	.no_dead_strip	_fsia6b_serio_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsia6b_serio_connect
_fsia6b_serio_connect:                  ; @fsia6b_serio_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
	stp	xzr, xzr, [x0, #24]
Lloh3:
	adrp	x8, _SYNC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYNC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_serio_set_drvdata
	bl	_input_allocate_device
	cbz	x0, LBB0_17
; %bb.2:
	mov	x21, x0
	str	x22, [sp]                       ; 8-byte Folded Spill
	str	x0, [x20]
	ldr	w0, [x20, #8]
	ldr	x3, [x19]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh8:
	adrp	x8, _DRIVER_DESC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRIVER_DESC@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	stp	w9, w8, [x21, #24]
Lloh11:
	adrp	x8, _BUS_RS232@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BUS_RS232@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _SERIO_FSIA6B@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SERIO_FSIA6B@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #16]
	ldr	w8, [x19, #12]
	mov	w9, #256
	stp	w9, w8, [x21, #8]
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	add	x8, x19, #8
	str	x8, [x21]
Lloh17:
	adrp	x23, _IBUS_SERVO_COUNT@GOTPAGE
Lloh18:
	ldr	x23, [x23, _IBUS_SERVO_COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.3:
	mov	x22, #0
Lloh19:
	adrp	x19, _fsia6b_axes@GOTPAGE
Lloh20:
	ldr	x19, [x19, _fsia6b_axes@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w1, [x8, x22, lsl #2]
	mov	x0, x21
	mov	w2, #1000
	mov	w3, #2000
	mov	w4, #2
	mov	w5, #2
	bl	_input_set_abs_params
	add	x22, x22, #1
	ldrsw	x9, [x23]
	cmp	x22, x9
	b.lt	LBB0_4
; %bb.5:
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.6:
	mov	x24, #0
	mov	w25, #0
Lloh21:
	adrp	x26, _switch_config@GOTPAGE
Lloh22:
	ldr	x26, [x26, _switch_config@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh23:
	adrp	x27, _EV_KEY@GOTPAGE
Lloh24:
	ldr	x27, [x27, _EV_KEY@GOTPAGEOFF]
Lloh25:
	adrp	x28, _BTN_0@GOTPAGE
Lloh26:
	ldr	x28, [x28, _BTN_0@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x24, x24, #1
	cmp	x24, w9, sxtw
	b.ge	LBB0_14
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldrb	w10, [x8, x24]
	sub	w11, w10, #52
	cmn	w11, #4
	b.lo	LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	w10, #49
	b.lo	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x22, #0
	sxtw	x19, w25
LBB0_11:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x27]
	ldr	x8, [x28]
	add	x9, x19, x22
	add	x2, x9, x8
	mov	x0, x21
	bl	_input_set_capability
	ldr	x8, [x26]
	ldrsb	w9, [x8, x24]
	add	x22, x22, #1
	add	w10, w22, #48
	cmp	w10, w9
	b.lt	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	add	w25, w25, w22
	ldr	w9, [x23]
	b	LBB0_7
LBB0_13:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_21
LBB0_14:
	ldp	x1, x19, [sp]                   ; 16-byte Folded Reload
	mov	x0, x19
	bl	_serio_open
	mov	x22, x0
	cbnz	w0, LBB0_19
; %bb.15:
	ldr	x0, [x20]
	bl	_input_register_device
	mov	x22, x0
	cbz	w0, LBB0_21
; %bb.16:
	mov	x0, x19
	bl	_serio_close
	b	LBB0_19
LBB0_17:
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_20
LBB0_18:
	ldr	x0, [x20]
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh35:
	adrp	x8, _EINVAL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w22, w8
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
LBB0_19:
	mov	x0, x21
	bl	_input_free_device
LBB0_20:
	mov	x0, x19
	mov	x1, #0
	bl	_serio_set_drvdata
	mov	x0, x20
	bl	_kfree
LBB0_21:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SYNC,4,2                       ; @SYNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/input0"

	.comm	_DRIVER_DESC,4,2                ; @DRIVER_DESC
	.comm	_BUS_RS232,4,2                  ; @BUS_RS232
	.comm	_SERIO_FSIA6B,4,2               ; @SERIO_FSIA6B
	.comm	_IBUS_SERVO_COUNT,4,2           ; @IBUS_SERVO_COUNT
	.comm	_fsia6b_axes,8,3                ; @fsia6b_axes
	.comm	_switch_config,8,3              ; @switch_config
l_.str.1:                               ; @.str.1
	.asciz	"Invalid switch configuration supplied for fsia6b.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_BTN_0,8,3                      ; @BTN_0
	.no_dead_strip	_fsia6b_serio_connect
.subsections_via_symbols
