	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saitek_raw_event
_saitek_raw_event:                      ## @saitek_raw_event
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movq	%rdi, %r15
	callq	_hid_get_drvdata
	movq	%rax, %r13
	movl	(%rax), %eax
	cmpl	$7, %ebx
	jne	LBB0_9
## %bb.1:
	movq	_SAITEK_RELEASE_MODE_RAT7@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	je	LBB0_9
## %bb.2:
	movl	4(%r14), %eax
	xorl	%ebx, %ebx
	testb	$1, %al
	jne	LBB0_5
## %bb.3:
	movl	$1, %ebx
	testb	$2, %al
	jne	LBB0_5
## %bb.4:
	movl	%eax, %ecx
	andl	$4, %ecx
	xorl	%ebx, %ebx
	cmpl	$1, %ecx
	sbbl	%ebx, %ebx
	orl	$2, %ebx
LBB0_5:
	andl	$-8, %eax
	movl	%eax, 4(%r14)
	cmpl	4(%r13), %ebx
	je	LBB0_18
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_hid_dbg
	cmpl	$-1, 4(%r13)
	je	LBB0_8
## %bb.7:
	orb	$4, 4(%r14)
LBB0_8:
	movl	%ebx, 4(%r13)
	jmp	LBB0_18
LBB0_9:
	cmpl	$8, %ebx
	jne	LBB0_18
## %bb.10:
	movq	_SAITEK_RELEASE_MODE_MMO7@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_18
## %bb.11:
	movl	4(%r14), %ecx
	movl	8(%r14), %eax
	xorl	%r12d, %r12d
	testb	$-128, %cl
	jne	LBB0_14
## %bb.12:
	movl	$1, %r12d
	testb	$1, %al
	jne	LBB0_14
## %bb.13:
	movl	%eax, %edx
	andl	$2, %edx
	xorl	%r12d, %r12d
	cmpl	$1, %edx
	sbbl	%r12d, %r12d
	orl	$2, %r12d
LBB0_14:
	andl	$-129, %ecx
	movl	%ecx, 4(%r14)
	andl	$-4, %eax
	movl	%eax, 8(%r14)
	cmpl	4(%r13), %r12d
	je	LBB0_18
## %bb.15:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_hid_dbg
	cmpl	$-1, 4(%r13)
	je	LBB0_17
## %bb.16:
	orb	$-128, 4(%r14)
LBB0_17:
	movl	%r12d, 4(%r13)
LBB0_18:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SAITEK_RELEASE_MODE_RAT7,4,2   ## @SAITEK_RELEASE_MODE_RAT7
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entered mode %d\n"

	.comm	_SAITEK_RELEASE_MODE_MMO7,4,2   ## @SAITEK_RELEASE_MODE_MMO7
	.no_dead_strip	_saitek_raw_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saitek_raw_event
_saitek_raw_event:                      ; @saitek_raw_event
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x22, x3
	mov	x19, x2
	mov	x21, x0
	bl	_hid_get_drvdata
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w22, #7
	b.ne	LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, _SAITEK_RELEASE_MODE_RAT7@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SAITEK_RELEASE_MODE_RAT7@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w9, w9, w8
	cbz	w9, LBB0_5
; %bb.2:
	ldr	w8, [x19, #4]
	mov	w9, #1
	tst	w8, #0x4
	mov	w10, #2
	csinv	w10, w10, wzr, ne
	tst	w8, #0x2
	csel	w9, w9, w10, ne
	tst	w8, #0x1
	csel	w22, wzr, w9, ne
	and	w8, w8, #0xfffffff8
	str	w8, [x19, #4]
	ldr	w8, [x20, #4]
	cmp	w22, w8
	b.eq	LBB0_12
; %bb.3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_hid_dbg
	ldr	w8, [x20, #4]
	cmn	w8, #1
	b.eq	LBB0_11
; %bb.4:
	ldr	w8, [x19, #4]
	orr	w8, w8, #0x4
	b	LBB0_10
LBB0_5:
	cmp	w22, #8
	b.ne	LBB0_12
; %bb.6:
Lloh5:
	adrp	x9, _SAITEK_RELEASE_MODE_MMO7@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SAITEK_RELEASE_MODE_MMO7@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbz	w8, LBB0_12
; %bb.7:
	ldp	w8, w9, [x19, #4]
	mov	w10, #1
	tst	w9, #0x2
	mov	w11, #2
	csinv	w11, w11, wzr, ne
	tst	w9, #0x1
	csel	w10, w10, w11, ne
	tst	w8, #0x80
	csel	w22, wzr, w10, ne
	and	w8, w8, #0xffffff7f
	and	w9, w9, #0xfffffffc
	stp	w8, w9, [x19, #4]
	ldr	w8, [x20, #4]
	cmp	w22, w8
	b.eq	LBB0_12
; %bb.8:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_hid_dbg
	ldr	w8, [x20, #4]
	cmn	w8, #1
	b.eq	LBB0_11
; %bb.9:
	ldr	w8, [x19, #4]
	orr	w8, w8, #0x80
LBB0_10:
	str	w8, [x19, #4]
LBB0_11:
	str	w22, [x20, #4]
LBB0_12:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SAITEK_RELEASE_MODE_RAT7,4,2   ; @SAITEK_RELEASE_MODE_RAT7
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entered mode %d\n"

	.comm	_SAITEK_RELEASE_MODE_MMO7,4,2   ; @SAITEK_RELEASE_MODE_MMO7
	.no_dead_strip	_saitek_raw_event
.subsections_via_symbols
