	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cougar_fix_g6_mapping
_cougar_fix_g6_mapping:                 ## @cougar_fix_g6_mapping
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_cougar_mapping@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	movq	_COUGAR_KEY_G6@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rsi
	je	LBB0_5
## %bb.2:
	addq	$8, %rcx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$8, %rcx
	cmpq	%rdx, %rsi
	jne	LBB0_3
LBB0_5:
	movq	_g6_is_space@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	movq	_KEY_SPACE@GOTPCREL(%rip), %rcx
	cmoveq	_KEY_F18@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rax)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	popq	%rbp
	jmp	_pr_info                        ## TAILCALL
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
	popq	%rbp
	jmp	_pr_warn                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cougar_mapping,8,3             ## @cougar_mapping
	.comm	_COUGAR_KEY_G6,8,3              ## @COUGAR_KEY_G6
	.comm	_g6_is_space,8,3                ## @g6_is_space
	.comm	_KEY_SPACE,8,3                  ## @KEY_SPACE
	.comm	_KEY_F18,8,3                    ## @KEY_F18
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cougar: G6 mapped to %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"space"

L_.str.2:                               ## @.str.2
	.asciz	"F18"

L_.str.3:                               ## @.str.3
	.asciz	"cougar: no mappings defined for G6/spacebar"

	.no_dead_strip	_cougar_fix_g6_mapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cougar_fix_g6_mapping
_cougar_fix_g6_mapping:                 ; @cougar_fix_g6_mapping
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _cougar_mapping@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cougar_mapping@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldr	x8, [x10]
	ldr	x11, [x8]
	cbz	x11, LBB0_6
; %bb.1:
Lloh3:
	adrp	x9, _COUGAR_KEY_G6@GOTPAGE
Lloh4:
	ldr	x9, [x9, _COUGAR_KEY_G6@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x11, x9
	b.eq	LBB0_5
; %bb.2:
	add	x10, x10, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x10]
	ldr	x11, [x8]
	cbz	x11, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #8
	cmp	x11, x9
	b.ne	LBB0_3
LBB0_5:
Lloh6:
	adrp	x9, _g6_is_space@GOTPAGE
Lloh7:
	ldr	x9, [x9, _g6_is_space@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _KEY_SPACE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _KEY_SPACE@GOTPAGEOFF]
Lloh11:
	adrp	x11, _KEY_F18@GOTPAGE
Lloh12:
	ldr	x11, [x11, _KEY_F18@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x11, x10, eq
	ldr	x9, [x9]
Lloh13:
	adrp	x10, l_.str.1@PAGE
Lloh14:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh15:
	adrp	x11, l_.str.2@PAGE
Lloh16:
	add	x11, x11, l_.str.2@PAGEOFF
	str	x9, [x8, #8]
	csel	x1, x11, x10, eq
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	b	_pr_info
LBB0_6:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	b	_pr_warn
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_cougar_mapping,8,3             ; @cougar_mapping
	.comm	_COUGAR_KEY_G6,8,3              ; @COUGAR_KEY_G6
	.comm	_g6_is_space,8,3                ; @g6_is_space
	.comm	_KEY_SPACE,8,3                  ; @KEY_SPACE
	.comm	_KEY_F18,8,3                    ; @KEY_F18
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cougar: G6 mapped to %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"space"

l_.str.2:                               ; @.str.2
	.asciz	"F18"

l_.str.3:                               ; @.str.3
	.asciz	"cougar: no mappings defined for G6/spacebar"

	.no_dead_strip	_cougar_fix_g6_mapping
.subsections_via_symbols
