	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ms_ergonomy_kb_quirk
_ms_ergonomy_kb_quirk:                  ## @ms_ergonomy_kb_quirk
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	(%rsi), %r8d
	movq	_HID_USAGE_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r8d, %ebx
	movq	_HID_UP_CONSUMER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
## %bb.1:
	movq	_HID_USAGE@GOTPCREL(%rip), %rax
	andl	(%rax), %r8d
	cmpl	$670, %r8d                      ## imm = 0x29E
	je	LBB0_8
## %bb.2:
	xorl	%eax, %eax
	cmpl	$669, %r8d                      ## imm = 0x29D
	jne	LBB0_11
## %bb.3:
	movq	_KEY_PROG1@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_HID_UP_MSVENDOR@GOTPCREL(%rip), %r9
	xorl	%eax, %eax
	cmpl	(%r9), %ebx
	jne	LBB0_11
## %bb.5:
	movq	_HID_USAGE@GOTPCREL(%rip), %rax
	andl	(%rax), %r8d
	leal	-65280(%r8), %ebx
	cmpl	$5, %ebx
	ja	LBB0_12
## %bb.6:
	movq	(%rdi), %r14
	movl	$-1, %eax
	leaq	LJTI0_0(%rip), %r8
	movslq	(%r8,%rbx,4), %rbx
	addq	%r8, %rbx
	jmpq	*%rbx
LBB0_7:
	movq	_KEY_KPEQUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ms_map_key_clear
	movq	_KEY_KPLEFTPAREN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_set_bit
	movq	_KEY_KPRIGHTPAREN@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_8:
	movq	_KEY_PROG2@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edi
	callq	_ms_map_key_clear
LBB0_10:
	movl	$1, %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	cmpl	$64775, %r8d                    ## imm = 0xFD07
	je	LBB0_19
## %bb.13:
	cmpl	$64774, %r8d                    ## imm = 0xFD06
	jne	LBB0_15
## %bb.14:
	movq	_KEY_CHAT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_16:
	movq	_EV_REL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_REL_WHEEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	callq	_hid_map_usage_clear
	jmp	LBB0_10
LBB0_17:
	movq	_EV_REP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %esi
	callq	_set_bit
	movq	_KEY_F13@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ms_map_key_clear
	movq	_KEY_F14@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_set_bit
	movq	_KEY_F15@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_set_bit
	movq	_KEY_F16@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_set_bit
	movq	_KEY_F17@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_set_bit
	movq	_KEY_F18@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_set_bit
	jmp	LBB0_10
LBB0_19:
	movq	_KEY_PHONE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_16
	.long	L0_0_set_11
	.long	L0_0_set_15
	.long	L0_0_set_15
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_HID_USAGE_PAGE,4,2             ## @HID_USAGE_PAGE
	.comm	_HID_UP_CONSUMER,4,2            ## @HID_UP_CONSUMER
	.comm	_HID_USAGE,4,2                  ## @HID_USAGE
	.comm	_KEY_PROG1,4,2                  ## @KEY_PROG1
	.comm	_KEY_PROG2,4,2                  ## @KEY_PROG2
	.comm	_HID_UP_MSVENDOR,4,2            ## @HID_UP_MSVENDOR
	.comm	_KEY_CHAT,4,2                   ## @KEY_CHAT
	.comm	_KEY_PHONE,4,2                  ## @KEY_PHONE
	.comm	_KEY_KPEQUAL,4,2                ## @KEY_KPEQUAL
	.comm	_KEY_KPLEFTPAREN,4,2            ## @KEY_KPLEFTPAREN
	.comm	_KEY_KPRIGHTPAREN,4,2           ## @KEY_KPRIGHTPAREN
	.comm	_EV_REL,4,2                     ## @EV_REL
	.comm	_REL_WHEEL,4,2                  ## @REL_WHEEL
	.comm	_EV_REP,4,2                     ## @EV_REP
	.comm	_KEY_F13,4,2                    ## @KEY_F13
	.comm	_KEY_F14,4,2                    ## @KEY_F14
	.comm	_KEY_F15,4,2                    ## @KEY_F15
	.comm	_KEY_F16,4,2                    ## @KEY_F16
	.comm	_KEY_F17,4,2                    ## @KEY_F17
	.comm	_KEY_F18,4,2                    ## @KEY_F18
	.no_dead_strip	_ms_ergonomy_kb_quirk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ms_ergonomy_kb_quirk
_ms_ergonomy_kb_quirk:                  ; @ms_ergonomy_kb_quirk
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w9, [x1]
Lloh0:
	adrp	x10, _HID_USAGE_PAGE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _HID_USAGE_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	and	w10, w10, w9
Lloh3:
	adrp	x11, _HID_UP_CONSUMER@GOTPAGE
Lloh4:
	ldr	x11, [x11, _HID_UP_CONSUMER@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _HID_USAGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HID_USAGE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w9
	cmp	w8, #670
	b.eq	LBB0_8
; %bb.2:
	cmp	w8, #669
	b.ne	LBB0_13
; %bb.3:
Lloh9:
	adrp	x8, _KEY_PROG1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KEY_PROG1@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
Lloh11:
	adrp	x11, _HID_UP_MSVENDOR@GOTPAGE
Lloh12:
	ldr	x11, [x11, _HID_UP_MSVENDOR@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_13
; %bb.5:
Lloh14:
	adrp	x10, _HID_USAGE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _HID_USAGE@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	and	w9, w10, w9
	mov	w10, #-65280
	add	w10, w9, w10
	cmp	w10, #5
	b.hi	LBB0_10
; %bb.6:
	mov	x8, x0
	ldr	x19, [x0]
	mov	w0, #-1
Lloh17:
	adrp	x9, lJTI0_0@PAGE
Lloh18:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x11, LBB0_7
	ldrb	w12, [x9, x10]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_7:
Lloh19:
	adrp	x8, _KEY_KPEQUAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _KEY_KPEQUAL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_ms_map_key_clear
Lloh22:
	adrp	x8, _KEY_KPLEFTPAREN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _KEY_KPLEFTPAREN@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh25:
	adrp	x8, _KEY_KPRIGHTPAREN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _KEY_KPRIGHTPAREN@GOTPAGEOFF]
	b	LBB0_17
LBB0_8:
Lloh27:
	adrp	x8, _KEY_PROG2@GOTPAGE
Lloh28:
	ldr	x8, [x8, _KEY_PROG2@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	bl	_ms_map_key_clear
	mov	w0, #1
	b	LBB0_14
LBB0_10:
	mov	w8, #64775
	cmp	w9, w8
	b.eq	LBB0_18
; %bb.11:
	mov	w8, #64774
	cmp	w9, w8
	b.ne	LBB0_13
; %bb.12:
Lloh29:
	adrp	x8, _KEY_CHAT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _KEY_CHAT@GOTPAGEOFF]
	b	LBB0_9
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh31:
	adrp	x9, _EV_REL@GOTPAGE
Lloh32:
	ldr	x9, [x9, _EV_REL@GOTPAGEOFF]
Lloh33:
	ldr	w4, [x9]
Lloh34:
	adrp	x9, _REL_WHEEL@GOTPAGE
Lloh35:
	ldr	x9, [x9, _REL_WHEEL@GOTPAGEOFF]
Lloh36:
	ldr	w5, [x9]
	mov	x0, x8
	bl	_hid_map_usage_clear
	mov	w0, #1
	b	LBB0_14
LBB0_16:
Lloh37:
	adrp	x8, _EV_REP@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EV_REP@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_set_bit
Lloh40:
	adrp	x8, _KEY_F13@GOTPAGE
Lloh41:
	ldr	x8, [x8, _KEY_F13@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_ms_map_key_clear
Lloh43:
	adrp	x8, _KEY_F14@GOTPAGE
Lloh44:
	ldr	x8, [x8, _KEY_F14@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh46:
	adrp	x8, _KEY_F15@GOTPAGE
Lloh47:
	ldr	x8, [x8, _KEY_F15@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh49:
	adrp	x8, _KEY_F16@GOTPAGE
Lloh50:
	ldr	x8, [x8, _KEY_F16@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh52:
	adrp	x8, _KEY_F17@GOTPAGE
Lloh53:
	ldr	x8, [x8, _KEY_F17@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh55:
	adrp	x8, _KEY_F18@GOTPAGE
Lloh56:
	ldr	x8, [x8, _KEY_F18@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
	mov	w0, #1
	b	LBB0_14
LBB0_18:
Lloh57:
	adrp	x8, _KEY_PHONE@GOTPAGE
Lloh58:
	ldr	x8, [x8, _KEY_PHONE@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh57, Lloh58
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_15-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
	.byte	(LBB0_16-LBB0_7)>>2
                                        ; -- End function
	.comm	_HID_USAGE_PAGE,4,2             ; @HID_USAGE_PAGE
	.comm	_HID_UP_CONSUMER,4,2            ; @HID_UP_CONSUMER
	.comm	_HID_USAGE,4,2                  ; @HID_USAGE
	.comm	_KEY_PROG1,4,2                  ; @KEY_PROG1
	.comm	_KEY_PROG2,4,2                  ; @KEY_PROG2
	.comm	_HID_UP_MSVENDOR,4,2            ; @HID_UP_MSVENDOR
	.comm	_KEY_CHAT,4,2                   ; @KEY_CHAT
	.comm	_KEY_PHONE,4,2                  ; @KEY_PHONE
	.comm	_KEY_KPEQUAL,4,2                ; @KEY_KPEQUAL
	.comm	_KEY_KPLEFTPAREN,4,2            ; @KEY_KPLEFTPAREN
	.comm	_KEY_KPRIGHTPAREN,4,2           ; @KEY_KPRIGHTPAREN
	.comm	_EV_REL,4,2                     ; @EV_REL
	.comm	_REL_WHEEL,4,2                  ; @REL_WHEEL
	.comm	_EV_REP,4,2                     ; @EV_REP
	.comm	_KEY_F13,4,2                    ; @KEY_F13
	.comm	_KEY_F14,4,2                    ; @KEY_F14
	.comm	_KEY_F15,4,2                    ; @KEY_F15
	.comm	_KEY_F16,4,2                    ; @KEY_F16
	.comm	_KEY_F17,4,2                    ; @KEY_F17
	.comm	_KEY_F18,4,2                    ; @KEY_F18
	.no_dead_strip	_ms_ergonomy_kb_quirk
.subsections_via_symbols
