	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pyra_sysfs_write_settings
_pyra_sysfs_write_settings:             ## @pyra_sysfs_write_settings
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, %r14
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_kobj_to_dev
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movl	%eax, %edi
	callq	_hid_get_drvdata
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_to_usb_interface
	movl	%eax, %edi
	callq	_interface_to_usbdev
	testq	%r14, %r14
	jne	LBB0_2
## %bb.1:
	movq	_PYRA_SIZE_SETTINGS@GOTPCREL(%rip), %r14
	cmpq	%r15, (%r14)
	jne	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rbx
	movl	8(%r12), %edi
	callq	_ARRAY_SIZE
	cmpq	%rax, %rbx
	jge	LBB0_2
## %bb.4:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_pyra_set_settings
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r15), %rsi
	movq	%r12, %rdi
	callq	_profile_activated
	movq	_PYRA_MOUSE_EVENT_BUTTON_TYPE_PROFILE_2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	(%r15), %rax
	incq	%rax
	movq	%rax, -72(%rbp)
	movq	$0, -64(%rbp)
	movl	4(%r12), %edi
	leaq	-72(%rbp), %rsi
	callq	_roccat_report_event
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	(%r14), %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_PYRA_SIZE_SETTINGS,8,3         ## @PYRA_SIZE_SETTINGS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PYRA_MOUSE_EVENT_BUTTON_TYPE_PROFILE_2,4,2 ## @PYRA_MOUSE_EVENT_BUTTON_TYPE_PROFILE_2
	.no_dead_strip	_pyra_sysfs_write_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pyra_sysfs_write_settings
_pyra_sysfs_write_settings:             ; @pyra_sysfs_write_settings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x5
	mov	x23, x4
	mov	x19, x3
	mov	x0, x1
	bl	_kobj_to_dev
	ldr	x8, [x0]
	ldr	x22, [x8]
	mov	x0, x22
	bl	_dev_get_drvdata
	bl	_hid_get_drvdata
	mov	x20, x0
	mov	x0, x22
	bl	_to_usb_interface
	bl	_interface_to_usbdev
	cbnz	x23, LBB0_5
; %bb.1:
Lloh0:
	adrp	x23, _PYRA_SIZE_SETTINGS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PYRA_SIZE_SETTINGS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x21
	b.ne	LBB0_5
; %bb.2:
	mov	x22, x0
	ldr	x21, [x19]
	ldr	w0, [x20, #8]
	bl	_ARRAY_SIZE
	cmp	x21, x0
	b.ge	LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x22
	mov	x1, x19
	bl	_pyra_set_settings
	cbz	w0, LBB0_7
; %bb.4:
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	ldr	x1, [x19]
	mov	x0, x20
	bl	_profile_activated
Lloh5:
	adrp	x8, _PYRA_MOUSE_EVENT_BUTTON_TYPE_PROFILE_2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PYRA_MOUSE_EVENT_BUTTON_TYPE_PROFILE_2@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	x8, [x19]
	add	x8, x8, #1
	stp	x8, xzr, [sp, #8]
	ldr	w0, [x20, #4]
	add	x1, sp, #8
	bl	_roccat_report_event
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w21, [x23]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PYRA_SIZE_SETTINGS,8,3         ; @PYRA_SIZE_SETTINGS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PYRA_MOUSE_EVENT_BUTTON_TYPE_PROFILE_2,4,2 ; @PYRA_MOUSE_EVENT_BUTTON_TYPE_PROFILE_2
	.no_dead_strip	_pyra_sysfs_write_settings
.subsections_via_symbols
