	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applespi_translate_fn_key
_applespi_translate_fn_key:             ## @applespi_translate_fn_key
	.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	%esi, %r14d
	movl	%edi, %ebx
	movq	_applespi_fn_codes@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_applespi_find_translation
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_APPLE_FLAG_FKEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_fnmode@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%r14d, %r14d
	sete	%sil
	cmpl	$1, %ecx
	sete	%dl
	andb	%sil, %dl
	testl	%r14d, %r14d
	movzbl	%dl, %r14d
	je	LBB0_4
## %bb.3:
	cmpl	$2, %ecx
	je	LBB0_5
LBB0_4:
	testl	%r14d, %r14d
	je	LBB0_6
LBB0_5:
	movl	4(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_applespi_fn_codes,4,2          ## @applespi_fn_codes
	.comm	_APPLE_FLAG_FKEY,4,2            ## @APPLE_FLAG_FKEY
	.comm	_fnmode,4,2                     ## @fnmode
	.no_dead_strip	_applespi_translate_fn_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applespi_translate_fn_key
_applespi_translate_fn_key:             ; @applespi_translate_fn_key
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _applespi_fn_codes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _applespi_fn_codes@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_applespi_find_translation
	cbz	x0, LBB0_7
; %bb.1:
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _APPLE_FLAG_FKEY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _APPLE_FLAG_FKEY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _fnmode@GOTPAGE
Lloh7:
	ldr	x8, [x8, _fnmode@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
	cmp	w9, #1
	ccmp	w20, #0, #0, eq
	cset	w8, eq
	cbz	w20, LBB0_5
; %bb.3:
	cmp	w9, #2
	b.eq	LBB0_6
	b	LBB0_5
LBB0_4:
	mov	x8, x20
LBB0_5:
	cbz	w8, LBB0_7
LBB0_6:
	ldr	w19, [x0, #4]
LBB0_7:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_applespi_fn_codes,4,2          ; @applespi_fn_codes
	.comm	_APPLE_FLAG_FKEY,4,2            ; @APPLE_FLAG_FKEY
	.comm	_fnmode,4,2                     ; @fnmode
	.no_dead_strip	_applespi_translate_fn_key
.subsections_via_symbols
