	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cougar_raw_event
_cougar_raw_event:                      ## @cougar_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, %r14
	callq	_hid_get_drvdata
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpl	$0, (%rcx)
	je	LBB0_13
## %bb.1:
	movq	8(%rcx), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.2:
	cmpl	$0, 4(%rbx)
	je	LBB0_12
## %bb.3:
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_12
## %bb.4:
	movq	_COUGAR_FIELD_CODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzbl	(%r15,%rax), %edx
	movq	_COUGAR_FIELD_ACTION@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	(%r15,%rax), %r8b
	movq	_cougar_mapping@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rax
	movsbl	(%rax), %esi
	testl	%esi, %esi
	je	LBB0_10
## %bb.5:
	cmpl	%esi, %edx
	je	LBB0_9
## %bb.6:
	addq	$8, %rcx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rax
	movsbl	(%rax), %esi
	testl	%esi, %esi
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	addq	$8, %rcx
	cmpl	%esi, %edx
	jne	LBB0_7
LBB0_9:
	movq	_EV_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movsbl	1(%rax), %edx
	movzbl	%r8b, %ecx
	callq	_input_event
	movl	(%rbx), %edi
	callq	_input_sync
	jmp	LBB0_12
LBB0_10:
	testb	%r8b, %r8b
	je	LBB0_12
## %bb.11:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_hid_warn
LBB0_12:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_COUGAR_FIELD_CODE,8,3          ## @COUGAR_FIELD_CODE
	.comm	_COUGAR_FIELD_ACTION,8,3        ## @COUGAR_FIELD_ACTION
	.comm	_cougar_mapping,8,3             ## @cougar_mapping
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unmapped special key code %0x: ignoring\n"

	.no_dead_strip	_cougar_raw_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cougar_raw_event
_cougar_raw_event:                      ; @cougar_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	x20, x2
	mov	x19, x0
	bl	_hid_get_drvdata
	ldr	x21, [x0, #8]
	ldr	w8, [x0]
	cmp	w8, #0
	ccmp	x21, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_13
LBB0_2:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_12
; %bb.3:
	ldr	w0, [x21]
	cbz	w0, LBB0_12
; %bb.4:
Lloh0:
	adrp	x8, _COUGAR_FIELD_CODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COUGAR_FIELD_CODE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldrb	w2, [x20, x8]
Lloh3:
	adrp	x8, _COUGAR_FIELD_ACTION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _COUGAR_FIELD_ACTION@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldrb	w3, [x20, x8]
Lloh6:
	adrp	x8, _cougar_mapping@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cougar_mapping@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x8]
	ldr	x8, [x9]
	ldrsb	w10, [x8]
	cbz	w10, LBB0_10
; %bb.5:
	cmp	w2, w10
	b.eq	LBB0_9
; %bb.6:
	add	x9, x9, #8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x9]
	ldrsb	w10, [x8]
	cbz	w10, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x9, x9, #8
	cmp	w2, w10
	b.ne	LBB0_7
LBB0_9:
Lloh9:
	adrp	x9, _EV_KEY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EV_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	ldrsb	w2, [x8, #1]
	bl	_input_event
	ldr	w0, [x21]
	bl	_input_sync
	b	LBB0_12
LBB0_10:
	cbz	w3, LBB0_12
; %bb.11:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_hid_warn
LBB0_12:
Lloh14:
	adrp	x8, _EPERM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_COUGAR_FIELD_CODE,8,3          ; @COUGAR_FIELD_CODE
	.comm	_COUGAR_FIELD_ACTION,8,3        ; @COUGAR_FIELD_ACTION
	.comm	_cougar_mapping,8,3             ; @cougar_mapping
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unmapped special key code %0x: ignoring\n"

	.no_dead_strip	_cougar_raw_event
.subsections_via_symbols
