	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kovaplus_sysfs_set_actual_profile
_kovaplus_sysfs_set_actual_profile:     ## @kovaplus_sysfs_set_actual_profile
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movl	%eax, %edi
	callq	_hid_get_drvdata
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_to_usb_interface
	movl	%eax, %edi
	callq	_interface_to_usbdev
	movq	%rax, %r12
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	cmpq	$5, -48(%rbp)
	jb	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_kovaplus_set_actual_profile
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_6
LBB0_5:
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_kovaplus_profile_activated
	movq	_KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	-48(%rbp), %rax
	incq	%rax
	movq	%rax, -88(%rbp)
	movq	%rax, -80(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -72(%rbp)
	movl	4(%r15), %edi
	leaq	-88(%rbp), %rsi
	callq	_roccat_report_event
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r14d, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1,4,2 ## @KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1
	.no_dead_strip	_kovaplus_sysfs_set_actual_profile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kovaplus_sysfs_set_actual_profile
_kovaplus_sysfs_set_actual_profile:     ; @kovaplus_sysfs_set_actual_profile
	.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	x19, x3
	mov	x22, x2
	ldr	x8, [x0]
	ldr	x21, [x8]
	mov	x0, x21
	bl	_dev_get_drvdata
	bl	_hid_get_drvdata
	mov	x20, x0
	mov	x0, x21
	bl	_to_usb_interface
	bl	_interface_to_usbdev
	mov	x21, x0
	add	x2, sp, #40
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtoul
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	x8, [sp, #40]
	cmp	x8, #5
	b.lo	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_3:
	mov	x0, x20
	bl	_mutex_lock
	ldr	x1, [sp, #40]
	mov	x0, x21
	bl	_kovaplus_set_actual_profile
	cbz	w0, LBB0_5
; %bb.4:
	mov	x22, x0
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_6
LBB0_5:
	ldr	x1, [sp, #40]
	mov	x0, x20
	bl	_kovaplus_profile_activated
Lloh3:
	adrp	x8, _KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	ldr	x8, [sp, #40]
	add	x8, x8, #1
	stp	x8, x8, [sp]
	stp	xzr, xzr, [sp, #16]
	ldr	w0, [x20, #4]
	mov	x1, sp
	bl	_roccat_report_event
	mov	x0, x20
	bl	_mutex_unlock
	mov	x22, x19
LBB0_6:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1,4,2 ; @KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1
	.no_dead_strip	_kovaplus_sysfs_set_actual_profile
.subsections_via_symbols
