	.file	"extr_hid-apple.c_hidinput_apple_event.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hidinput_apple_event, @function
hidinput_apple_event:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdx
	call	hid_get_drvdata@PLT
	mov	rsi, QWORD PTR [rbx]
	cmp	rsi, QWORD PTR KEY_FN[rip]
	mov	rbp, rax
	je	.L35
	mov	ecx, DWORD PTR fnmode[rip]
	test	ecx, ecx
	je	.L4
	mov	eax, DWORD PTR [r12]
	mov	edi, DWORD PTR powerbook_fn_keys[rip]
	sub	eax, 541
	cmp	eax, 226
	cmovbe	edi, DWORD PTR apple_fn_keys[rip]
	call	apple_find_translation@PLT
	mov	r12, rax
	test	rax, rax
	je	.L7
	mov	esi, DWORD PTR 12[rbp]
	mov	rdi, QWORD PTR [rbx]
	call	test_bit@PLT
	test	rax, rax
	jne	.L8
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR APPLE_FLAG_FKEY[rip], eax
	je	.L9
	mov	eax, DWORD PTR fnmode[rip]
	cmp	eax, 2
	je	.L9
	cmp	eax, 1
	je	.L36
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR 4[rbp]
	test	DWORD PTR APPLE_NUMLOCK_EMULATION[rip], eax
	je	.L13
	mov	esi, DWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [rbx]
	call	test_bit@PLT
	test	rax, rax
	jne	.L14
	mov	esi, DWORD PTR [r14]
	mov	rdi, QWORD PTR LED_NUML[rip]
	call	test_bit@PLT
	test	rax, rax
	jne	.L14
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR 4[rbp]
.L13:
	test	DWORD PTR APPLE_ISO_KEYBOARD[rip], eax
	jne	.L17
.L18:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rsi, QWORD PTR [rbx]
	mov	edi, DWORD PTR apple_iso_keyboard[rip]
	call	apple_find_translation@PLT
	test	rax, rax
	je	.L18
	mov	rdx, QWORD PTR 8[rax]
.L32:
	mov	esi, DWORD PTR 8[rbx]
	mov	rcx, r13
	mov	rdi, r14
	call	input_event@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	mov	edx, DWORD PTR 0[rbp]
	test	edx, edx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	esi, DWORD PTR 12[rbp]
	mov	rdi, QWORD PTR [rbx]
	test	r13, r13
	je	.L15
.L33:
	call	set_bit@PLT
.L16:
	mov	rdx, QWORD PTR 8[r12]
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rsi, QWORD PTR [rbx]
	mov	edi, DWORD PTR powerbook_numlock_keys[rip]
	call	apple_find_translation@PLT
	mov	r12, rax
	mov	eax, 1
	test	r12, r12
	je	.L1
	mov	esi, DWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [rbx]
	test	r13, r13
	jne	.L33
.L15:
	call	clear_bit@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L35:
	xor	eax, eax
	test	r13, r13
	mov	r8d, DWORD PTR 8[rbx]
	mov	rcx, r13
	setne	al
	mov	rdx, rsi
	mov	rdi, r14
	mov	DWORD PTR 0[rbp], eax
	mov	esi, r8d
	call	input_event@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	je	.L7
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	hidinput_apple_event, .-hidinput_apple_event
	.comm	powerbook_numlock_keys,4,4
	.comm	powerbook_fn_keys,4,4
	.comm	fnmode,4,4
	.comm	apple_iso_keyboard,4,4
	.comm	apple_fn_keys,4,4
	.comm	LED_NUML,8,8
	.comm	KEY_FN,8,8
	.comm	APPLE_NUMLOCK_EMULATION,4,4
	.comm	APPLE_ISO_KEYBOARD,4,4
	.comm	APPLE_FLAG_FKEY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_hid-apple.c_hidinput_apple_event.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hidinput_apple_event, %function
hidinput_apple_event:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r2
	mov	r7, r1
	mov	r6, r3
	mov	r8, r0
	bl	hid_get_drvdata
	ldr	r3, .L42
	ldr	r1, [r4]
	ldr	r3, [r3]
	mov	r5, r0
	cmp	r1, r3
	beq	.L39
	ldr	r9, .L42+4
	ldr	r3, [r9]
	cmp	r3, #0
	bne	.L40
.L4:
	ldr	r3, [r5, #4]
.L13:
	ldr	r2, .L42+8
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L17
.L18:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L40:
	ldr	r3, [r8]
	sub	r3, r3, #540
	sub	r3, r3, #1
	cmp	r3, #226
	ldrhi	r3, .L42+12
	ldrls	r3, .L42+16
	ldr	r0, [r3]
	bl	apple_find_translation
	subs	r8, r0, #0
	beq	.L7
	ldr	r1, [r5, #12]
	ldr	r0, [r4]
	bl	test_bit
	cmp	r0, #0
	bne	.L8
	ldr	r3, .L42+20
	ldr	r2, [r8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L9
	ldr	r3, [r9]
	cmp	r3, #2
	beq	.L9
	cmp	r3, #1
	beq	.L41
.L7:
	ldr	r2, .L42+24
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L13
	ldr	r1, [r5, #8]
	ldr	r0, [r4]
	bl	test_bit
	cmp	r0, #0
	bne	.L14
	ldr	r3, .L42+28
	ldr	r1, [r7]
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	beq	.L4
.L14:
	ldr	r3, .L42+32
	ldr	r1, [r4]
	ldr	r0, [r3]
	bl	apple_find_translation
	subs	r8, r0, #0
	beq	.L19
	cmp	r6, #0
	ldr	r1, [r5, #8]
	ldr	r0, [r4]
	bne	.L37
.L15:
	bl	clear_bit
	b	.L16
.L17:
	ldr	r3, .L42+36
	ldr	r1, [r4]
	ldr	r0, [r3]
	bl	apple_find_translation
	cmp	r0, #0
	beq	.L18
	ldr	r2, [r0, #4]
	mov	r3, r6
	mov	r0, r7
	ldr	r1, [r4, #4]
	bl	input_event
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L41:
	ldr	r3, [r5]
	cmp	r3, #0
	bne	.L7
.L8:
	cmp	r6, #0
	ldr	r1, [r5, #12]
	ldr	r0, [r4]
	beq	.L15
.L37:
	bl	set_bit
.L16:
	mov	r3, r6
	mov	r0, r7
	ldr	r2, [r8, #4]
	ldr	r1, [r4, #4]
	bl	input_event
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L39:
	subs	r3, r6, #0
	movne	r3, #1
	mov	r2, r1
	mov	r0, r7
	ldr	r1, [r4, #4]
	str	r3, [r5]
	mov	r3, r6
	bl	input_event
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L7
	b	.L8
.L19:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L43:
	.align	2
.L42:
	.word	KEY_FN
	.word	fnmode
	.word	APPLE_ISO_KEYBOARD
	.word	powerbook_fn_keys
	.word	apple_fn_keys
	.word	APPLE_FLAG_FKEY
	.word	APPLE_NUMLOCK_EMULATION
	.word	LED_NUML
	.word	powerbook_numlock_keys
	.word	apple_iso_keyboard
	.size	hidinput_apple_event, .-hidinput_apple_event
	.comm	powerbook_numlock_keys,4,4
	.comm	powerbook_fn_keys,4,4
	.comm	fnmode,4,4
	.comm	apple_iso_keyboard,4,4
	.comm	apple_fn_keys,4,4
	.comm	LED_NUML,4,4
	.comm	KEY_FN,4,4
	.comm	APPLE_NUMLOCK_EMULATION,4,4
	.comm	APPLE_ISO_KEYBOARD,4,4
	.comm	APPLE_FLAG_FKEY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
