	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidinput_apple_event
_hidinput_apple_event:                  ## @hidinput_apple_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
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_hid_get_drvdata
	movq	%rax, %r12
	movq	8(%r13), %rdx
	movq	_KEY_FN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	testq	%r15, %r15
	setne	%al
	movl	%eax, (%r12)
	movl	(%r13), %esi
LBB0_36:
	movq	%r14, %rdi
	jmp	LBB0_37
LBB0_2:
	movq	_fnmode@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_30
## %bb.3:
	movl	(%rbx), %eax
	movq	_USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS@GOTPCREL(%rip), %r8
	leal	-768(%rax), %ecx
	cmpl	$-227, %ecx
	jae	LBB0_4
## %bb.5:
	movq	_powerbook_fn_keys@GOTPCREL(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movq	_apple_fn_keys@GOTPCREL(%rip), %rsi
LBB0_6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI@GOTPCREL(%rip), %rdi
	movq	%rsi, %rcx
	cmpl	(%r8), %eax
	jg	LBB0_8
## %bb.7:
	movq	_macbookair_fn_keys@GOTPCREL(%rip), %rcx
LBB0_8:
	cmpl	(%rdi), %eax
	cmovlq	%rsi, %rcx
	movq	(%rcx), %rdi
	movq	%rdx, %rsi
	callq	_apple_find_translation
	testq	%rax, %rax
	je	LBB0_22
## %bb.9:
	movq	%rax, %r14
	leaq	16(%rax), %rbx
	movq	16(%rax), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	callq	_test_bit
	movq	%rbx, %rcx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:
	movq	8(%r14), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	leaq	8(%r14), %rcx
LBB0_12:
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	jne	LBB0_21
LBB0_13:
	movq	_APPLE_FLAG_FKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_17
## %bb.14:
	movq	_fnmode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$2, %eax
	je	LBB0_17
## %bb.15:
	cmpl	$1, %eax
	jne	LBB0_20
## %bb.16:
	xorl	%eax, %eax
	cmpl	$0, (%r12)
	sete	%al
	jmp	LBB0_18
LBB0_22:
	movq	_APPLE_NUMLOCK_EMULATION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_30
## %bb.23:
	movq	8(%r13), %rdi
	movl	8(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_25
## %bb.24:
	movq	_LED_NUML@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%r14), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_30
LBB0_25:
	movq	_powerbook_numlock_keys@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	8(%r13), %rsi
	callq	_apple_find_translation
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_38
## %bb.26:
	movq	%rax, %r14
	movq	8(%r13), %rdi
	movl	8(%r12), %esi
	testq	%r15, %r15
	je	LBB0_28
## %bb.27:
	callq	_set_bit
	jmp	LBB0_29
LBB0_30:
	movq	_iso_layout@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_33
## %bb.31:
	movq	8(%rbx), %rax
	movq	_HID_COUNTRY_INTERNATIONAL_ISO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_33
## %bb.32:
	movq	_apple_iso_keyboard@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	8(%r13), %rsi
	callq	_apple_find_translation
	testq	%rax, %rax
	jne	LBB0_35
LBB0_33:
	movq	_swap_opt_cmd@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_38
## %bb.34:
	movq	_swapped_option_cmd_keys@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	8(%r13), %rsi
	callq	_apple_find_translation
	testq	%rax, %rax
	je	LBB0_38
LBB0_35:
	movl	(%r13), %esi
	movq	8(%rax), %rdx
	jmp	LBB0_36
LBB0_17:
	movl	(%r12), %eax
LBB0_18:
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	addq	$8, %r14
	movq	%r14, %rbx
LBB0_20:
	movq	(%rbx), %rdx
LBB0_21:
	movl	(%r13), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_37:
	movq	%r15, %rcx
	callq	_input_event
	movl	$1, %ebx
LBB0_38:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	_clear_bit
LBB0_29:
	movl	(%r13), %esi
	movq	8(%r14), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_input_event
	jmp	LBB0_38
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_FN,8,3                     ## @KEY_FN
	.comm	_fnmode,4,2                     ## @fnmode
	.comm	_USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI,4,2 ## @USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI
	.comm	_USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS,4,2 ## @USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS
	.comm	_macbookair_fn_keys,8,3         ## @macbookair_fn_keys
	.comm	_powerbook_fn_keys,8,3          ## @powerbook_fn_keys
	.comm	_apple_fn_keys,8,3              ## @apple_fn_keys
	.comm	_APPLE_FLAG_FKEY,4,2            ## @APPLE_FLAG_FKEY
	.comm	_APPLE_NUMLOCK_EMULATION,4,2    ## @APPLE_NUMLOCK_EMULATION
	.comm	_LED_NUML,8,3                   ## @LED_NUML
	.comm	_powerbook_numlock_keys,8,3     ## @powerbook_numlock_keys
	.comm	_iso_layout,8,3                 ## @iso_layout
	.comm	_HID_COUNTRY_INTERNATIONAL_ISO,8,3 ## @HID_COUNTRY_INTERNATIONAL_ISO
	.comm	_apple_iso_keyboard,8,3         ## @apple_iso_keyboard
	.comm	_swap_opt_cmd,8,3               ## @swap_opt_cmd
	.comm	_swapped_option_cmd_keys,8,3    ## @swapped_option_cmd_keys
	.no_dead_strip	_hidinput_apple_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidinput_apple_event
_hidinput_apple_event:                  ; @hidinput_apple_event
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
	bl	_hid_get_drvdata
	mov	x22, x0
	ldr	x2, [x21, #8]
Lloh0:
	adrp	x8, _KEY_FN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEY_FN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_6
; %bb.1:
	cmp	x19, #0
	cset	w8, ne
	str	w8, [x22]
LBB0_2:
	ldr	w1, [x21]
LBB0_3:
	mov	x0, x20
	mov	x3, x19
	bl	_input_event
LBB0_4:
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh3:
	adrp	x25, _fnmode@GOTPAGE
Lloh4:
	ldr	x25, [x25, _fnmode@GOTPAGEOFF]
	ldr	w8, [x25]
	cbz	w8, LBB0_21
; %bb.7:
Lloh5:
	adrp	x8, _USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x10, _USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	sub	w11, w9, #768
Lloh11:
	adrp	x12, _powerbook_fn_keys@GOTPAGE
Lloh12:
	ldr	x12, [x12, _powerbook_fn_keys@GOTPAGEOFF]
Lloh13:
	adrp	x13, _apple_fn_keys@GOTPAGE
Lloh14:
	ldr	x13, [x13, _apple_fn_keys@GOTPAGEOFF]
	cmn	w11, #227
	csel	x11, x12, x13, lo
	cmp	w9, w10
	ccmp	w9, w8, #8, le
Lloh15:
	adrp	x8, _macbookair_fn_keys@GOTPAGE
Lloh16:
	ldr	x8, [x8, _macbookair_fn_keys@GOTPAGEOFF]
	csel	x8, x11, x8, lt
	ldr	x0, [x8]
	mov	x1, x2
	bl	_apple_find_translation
	cbz	x0, LBB0_15
; %bb.8:
	mov	x24, x0
	mov	x23, x0
	ldr	x0, [x23, #16]!
	ldr	w1, [x20, #4]
	bl	_test_bit
	mov	x26, x23
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x26, x24
	ldr	x0, [x26, #8]!
	ldr	w1, [x20, #4]
	bl	_test_bit
	cbz	x0, LBB0_11
LBB0_10:
	ldr	x2, [x26]
	cbnz	x2, LBB0_2
LBB0_11:
	ldr	w8, [x24]
Lloh17:
	adrp	x9, _APPLE_FLAG_FKEY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _APPLE_FLAG_FKEY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_28
; %bb.12:
	ldr	w8, [x25]
	cmp	w8, #2
	b.eq	LBB0_28
; %bb.13:
	cmp	w8, #1
	b.ne	LBB0_31
; %bb.14:
	ldr	w8, [x22]
	cmp	w8, #0
	cset	w8, eq
	b	LBB0_29
LBB0_15:
	ldr	w8, [x22, #4]
Lloh20:
	adrp	x9, _APPLE_NUMLOCK_EMULATION@GOTPAGE
Lloh21:
	ldr	x9, [x9, _APPLE_NUMLOCK_EMULATION@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.16:
	ldr	x0, [x21, #8]
	ldr	w1, [x22, #8]
	bl	_test_bit
	cbnz	x0, LBB0_18
; %bb.17:
Lloh23:
	adrp	x8, _LED_NUML@GOTPAGE
Lloh24:
	ldr	x8, [x8, _LED_NUML@GOTPAGEOFF]
Lloh25:
	ldr	x0, [x8]
	ldr	w1, [x20]
	bl	_test_bit
	cbz	x0, LBB0_21
LBB0_18:
Lloh26:
	adrp	x8, _powerbook_numlock_keys@GOTPAGE
Lloh27:
	ldr	x8, [x8, _powerbook_numlock_keys@GOTPAGEOFF]
Lloh28:
	ldr	x0, [x8]
	ldr	x1, [x21, #8]
	bl	_apple_find_translation
	cbz	x0, LBB0_4
; %bb.19:
	mov	x23, x0
	ldr	x0, [x21, #8]
	ldr	w1, [x22, #8]
	cbz	x19, LBB0_32
; %bb.20:
	bl	_set_bit
	b	LBB0_33
LBB0_21:
Lloh29:
	adrp	x8, _iso_layout@GOTPAGE
Lloh30:
	ldr	x8, [x8, _iso_layout@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.22:
	ldr	x8, [x23, #8]
Lloh32:
	adrp	x9, _HID_COUNTRY_INTERNATIONAL_ISO@GOTPAGE
Lloh33:
	ldr	x9, [x9, _HID_COUNTRY_INTERNATIONAL_ISO@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_24
; %bb.23:
Lloh35:
	adrp	x8, _apple_iso_keyboard@GOTPAGE
Lloh36:
	ldr	x8, [x8, _apple_iso_keyboard@GOTPAGEOFF]
Lloh37:
	ldr	x0, [x8]
	ldr	x1, [x21, #8]
	bl	_apple_find_translation
	cbnz	x0, LBB0_26
LBB0_24:
Lloh38:
	adrp	x8, _swap_opt_cmd@GOTPAGE
Lloh39:
	ldr	x8, [x8, _swap_opt_cmd@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	cbz	x8, LBB0_27
; %bb.25:
Lloh41:
	adrp	x8, _swapped_option_cmd_keys@GOTPAGE
Lloh42:
	ldr	x8, [x8, _swapped_option_cmd_keys@GOTPAGEOFF]
Lloh43:
	ldr	x0, [x8]
	ldr	x1, [x21, #8]
	bl	_apple_find_translation
	cbz	x0, LBB0_5
LBB0_26:
	ldr	w1, [x21]
	ldr	x2, [x0, #8]
	b	LBB0_3
LBB0_27:
	mov	w0, #0
	b	LBB0_5
LBB0_28:
	ldr	w8, [x22]
LBB0_29:
	cbz	w8, LBB0_31
; %bb.30:
	add	x23, x24, #8
LBB0_31:
	ldr	x2, [x23]
	b	LBB0_2
LBB0_32:
	bl	_clear_bit
LBB0_33:
	ldr	w1, [x21]
	ldr	x2, [x23, #8]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_FN,8,3                     ; @KEY_FN
	.comm	_fnmode,4,2                     ; @fnmode
	.comm	_USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI,4,2 ; @USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI
	.comm	_USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS,4,2 ; @USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS
	.comm	_macbookair_fn_keys,8,3         ; @macbookair_fn_keys
	.comm	_powerbook_fn_keys,8,3          ; @powerbook_fn_keys
	.comm	_apple_fn_keys,8,3              ; @apple_fn_keys
	.comm	_APPLE_FLAG_FKEY,4,2            ; @APPLE_FLAG_FKEY
	.comm	_APPLE_NUMLOCK_EMULATION,4,2    ; @APPLE_NUMLOCK_EMULATION
	.comm	_LED_NUML,8,3                   ; @LED_NUML
	.comm	_powerbook_numlock_keys,8,3     ; @powerbook_numlock_keys
	.comm	_iso_layout,8,3                 ; @iso_layout
	.comm	_HID_COUNTRY_INTERNATIONAL_ISO,8,3 ; @HID_COUNTRY_INTERNATIONAL_ISO
	.comm	_apple_iso_keyboard,8,3         ; @apple_iso_keyboard
	.comm	_swap_opt_cmd,8,3               ; @swap_opt_cmd
	.comm	_swapped_option_cmd_keys,8,3    ; @swapped_option_cmd_keys
	.no_dead_strip	_hidinput_apple_event
.subsections_via_symbols
