	.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
	movq	_HID_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rsi), %eax
	xorl	%ebx, %ebx
	cmpl	$65285, %eax                    ## imm = 0xFF05
	je	LBB0_6
## %bb.1:
	cmpl	$64775, %eax                    ## imm = 0xFD07
	je	LBB0_5
## %bb.2:
	cmpl	$64774, %eax                    ## imm = 0xFD06
	jne	LBB0_7
## %bb.3:
	movq	_KEY_CHAT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	(%rdi), %r14
	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
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_set_bit
	jmp	LBB0_7
LBB0_5:
	movq	_KEY_PHONE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	callq	_ms_map_key_clear
	movl	$1, %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_USAGE,4,2                  ## @HID_USAGE
	.comm	_KEY_CHAT,4,2                   ## @KEY_CHAT
	.comm	_KEY_PHONE,4,2                  ## @KEY_PHONE
	.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	w8, [x1]
Lloh0:
	adrp	x9, _HID_USAGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HID_USAGE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
	mov	w9, #65285
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.1:
	mov	w9, #64775
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.2:
	mov	w9, #64774
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _KEY_CHAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KEY_CHAT@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	ldr	x19, [x0]
Lloh5:
	adrp	x8, _EV_REP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EV_REP@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_set_bit
Lloh8:
	adrp	x8, _KEY_F13@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KEY_F13@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_ms_map_key_clear
Lloh11:
	adrp	x8, _KEY_F14@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KEY_F14@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh14:
	adrp	x8, _KEY_F15@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KEY_F15@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh17:
	adrp	x8, _KEY_F16@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KEY_F16@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh20:
	adrp	x8, _KEY_F17@GOTPAGE
Lloh21:
	ldr	x8, [x8, _KEY_F17@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh23:
	adrp	x8, _KEY_F18@GOTPAGE
Lloh24:
	ldr	x8, [x8, _KEY_F18@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
LBB0_5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
Lloh26:
	adrp	x8, _KEY_PHONE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _KEY_PHONE@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	bl	_ms_map_key_clear
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_USAGE,4,2                  ; @HID_USAGE
	.comm	_KEY_CHAT,4,2                   ; @KEY_CHAT
	.comm	_KEY_PHONE,4,2                  ; @KEY_PHONE
	.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
