	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_input_ff_upload                ## -- Begin function input_ff_upload
	.p2align	4, 0x90
_input_ff_upload:                       ## @input_ff_upload
	.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	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	_EV_FF@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	12(%rbx), %esi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	(%r12), %rdi
	movq	_FF_EFFECT_MIN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jl	LBB0_6
## %bb.4:
	movq	_FF_EFFECT_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jg	LBB0_6
## %bb.5:
	movl	8(%rbx), %esi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movq	(%r12), %rdi
	movq	_FF_PERIODIC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_13
## %bb.9:
	movq	16(%r12), %rdi
	movq	_FF_WAVEFORM_MIN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jl	LBB0_30
## %bb.10:
	movq	_FF_WAVEFORM_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jg	LBB0_30
## %bb.11:
	movl	8(%rbx), %esi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_30
## %bb.12:
	movq	(%r12), %rdi
LBB0_13:
	movl	40(%r15), %esi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_14
LBB0_15:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movslq	8(%r12), %r13
	cmpq	$-1, %r13
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_16
## %bb.22:
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_check_effect_access
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_28
## %bb.23:
	leaq	(,%r13,2), %r14
	addq	%r13, %r14
	shlq	$3, %r14
	addq	32(%r15), %r14
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_check_effects_compatible
	testl	%eax, %eax
	jne	LBB0_26
## %bb.24:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_6:
	addq	$4, %rbx
	leaq	L_.str(%rip), %rsi
LBB0_7:
	movq	%rbx, %rdi
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_29:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	addq	$4, %rbx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_14:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_compat_effect
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_29
	jmp	LBB0_15
LBB0_16:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_20
## %bb.17:
	movq	24(%r15), %rcx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%r13,8)
	je	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%r13
	cmpq	%r13, %rax
	jne	LBB0_18
LBB0_20:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
LBB0_21:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_28
LBB0_25:
	movl	%r13d, 8(%r12)
	xorl	%r14d, %r14d
LBB0_26:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	*8(%r15)
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_28
## %bb.27:
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movq	32(%r15), %rax
	movslq	%r13d, %rcx
	leaq	(%rcx,%rcx,2), %rdx
	movups	(%r12), %xmm0
	movups	%xmm0, (%rax,%rdx,8)
	movq	16(%r12), %rsi
	movq	%rsi, 16(%rax,%rdx,8)
	movq	24(%r15), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
	xorl	%r14d, %r14d
LBB0_28:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_FF,8,3                      ## @EV_FF
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_FF_EFFECT_MIN,8,3              ## @FF_EFFECT_MIN
	.comm	_FF_EFFECT_MAX,8,3              ## @FF_EFFECT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid or not supported effect type in upload\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FF_PERIODIC,8,3                ## @FF_PERIODIC
	.comm	_FF_WAVEFORM_MIN,8,3            ## @FF_WAVEFORM_MIN
	.comm	_FF_WAVEFORM_MAX,8,3            ## @FF_WAVEFORM_MAX
L_.str.1:                               ## @.str.1
	.asciz	"invalid or not supported wave form in upload\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_input_ff_upload                ; -- Begin function input_ff_upload
	.p2align	2
_input_ff_upload:                       ; @input_ff_upload
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x21, [x0, #16]
Lloh0:
	adrp	x8, _EV_FF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EV_FF@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	ldr	w1, [x19, #12]
	bl	_test_bit
	cbz	w0, LBB0_14
; %bb.1:
	ldr	x0, [x22]
Lloh3:
	adrp	x8, _FF_EFFECT_MIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FF_EFFECT_MIN@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _FF_EFFECT_MAX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FF_EFFECT_MAX@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #0, ge
	b.gt	LBB0_12
; %bb.2:
	ldr	w1, [x19, #8]
	bl	_test_bit
	cbz	w0, LBB0_12
; %bb.3:
	ldr	x0, [x22]
Lloh9:
	adrp	x8, _FF_PERIODIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FF_PERIODIC@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.4:
	ldr	x0, [x22, #16]
Lloh12:
	adrp	x8, _FF_WAVEFORM_MIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FF_WAVEFORM_MIN@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _FF_WAVEFORM_MAX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FF_WAVEFORM_MAX@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #0, ge
	b.gt	LBB0_17
; %bb.5:
	ldr	w1, [x19, #8]
	bl	_test_bit
	cbz	w0, LBB0_17
; %bb.6:
	ldr	x0, [x22]
LBB0_7:
	ldr	w1, [x21, #40]
	bl	_test_bit
	cbz	w0, LBB0_18
LBB0_8:
	add	x23, x21, #16
	mov	x0, x23
	bl	_mutex_lock
	ldr	w24, [x22, #8]
	cmn	w24, #1
	b.eq	LBB0_19
; %bb.9:
	mov	x0, x21
	mov	x1, x24
	mov	x2, x20
	bl	_check_effect_access
	mov	x25, x0
	cbnz	w0, LBB0_28
; %bb.10:
	sxtw	x8, w24
	ldr	x9, [x21, #32]
	mov	w10, #24
	madd	x25, x8, x10, x9
	mov	x0, x22
	mov	x1, x25
	bl	_check_effects_compatible
	cbnz	w0, LBB0_26
; %bb.11:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_24
LBB0_12:
	add	x0, x19, #4
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
LBB0_13:
	bl	_dev_dbg
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh24:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_16:
	mov	x0, x25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	add	x0, x19, #4
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_18:
	mov	x0, x21
	mov	x1, x22
	bl	_compat_effect
	mov	x25, x0
	cbnz	w0, LBB0_16
	b	LBB0_8
LBB0_19:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.20:
	mov	x24, #0
	ldr	x9, [x21, #24]
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x24, lsl #3]
	cbz	x10, LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	add	x24, x24, #1
	cmp	x8, x24
	b.ne	LBB0_21
LBB0_23:
Lloh28:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_28
LBB0_25:
	mov	x25, #0
	str	w24, [x22, #8]
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
LBB0_26:
	ldr	x8, [x21, #8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x25
	blr	x8
	mov	x25, x0
	cbnz	w0, LBB0_28
; %bb.27:
	mov	x0, x19
	bl	_spin_lock_irq
	ldr	x8, [x21, #32]
	mov	w9, #24
	smaddl	x8, w24, w9, x8
	ldr	x9, [x22, #16]
	ldr	q0, [x22]
	str	q0, [x8]
	str	x9, [x8, #16]
	ldr	x8, [x21, #24]
	str	x20, [x8, w24, sxtw #3]
	mov	x0, x19
	bl	_spin_unlock_irq
LBB0_28:
	mov	x0, x23
	bl	_mutex_unlock
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_FF,8,3                      ; @EV_FF
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_FF_EFFECT_MIN,8,3              ; @FF_EFFECT_MIN
	.comm	_FF_EFFECT_MAX,8,3              ; @FF_EFFECT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid or not supported effect type in upload\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FF_PERIODIC,8,3                ; @FF_PERIODIC
	.comm	_FF_WAVEFORM_MIN,8,3            ; @FF_WAVEFORM_MIN
	.comm	_FF_WAVEFORM_MAX,8,3            ; @FF_WAVEFORM_MAX
l_.str.1:                               ; @.str.1
	.asciz	"invalid or not supported wave form in upload\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
.subsections_via_symbols
