	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_functionkey
_set_functionkey:                       ## @set_functionkey
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_8
LBB0_2:
	movq	%rbx, %rdi
	callq	_atoi
	movl	%eax, %ebx
	movq	_NUM_FKEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.3:
	cmpl	%esi, %ebx
	jg	LBB0_9
## %bb.4:
	movq	%r14, %rdi
	callq	_strlen
	movl	%eax, -24(%rbp)
	movq	_MAXFK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	jle	LBB0_5
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_warnx                          ## TAILCALL
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_warnx                          ## TAILCALL
LBB0_5:
	movq	%r14, %rsi
	callq	_strncpy
	decl	%ebx
	movl	%ebx, -32(%rbp)
	movq	_SETFKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	xorl	%edi, %edi
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	leaq	L_.str.4(%rip), %rdi
	callq	_warn
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_load_default_functionkeys      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"load"

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

	.comm	_NUM_FKEYS,4,2                  ## @NUM_FKEYS
L_.str.2:                               ## @.str.2
	.asciz	"function key number must be between 1 and %d"

	.comm	_MAXFK,4,2                      ## @MAXFK
L_.str.3:                               ## @.str.3
	.asciz	"function key string too long (%d > %d)"

	.comm	_SETFKEY,4,2                    ## @SETFKEY
L_.str.4:                               ## @.str.4
	.asciz	"setting function key"

	.no_dead_strip	_set_functionkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_functionkey
_set_functionkey:                       ; @set_functionkey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	w0, LBB0_10
LBB0_2:
	mov	x0, x20
	bl	_atoi
Lloh4:
	adrp	x8, _NUM_FKEYS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NUM_FKEYS@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	subs	w20, w0, #1
	b.lt	LBB0_6
; %bb.3:
	cmp	w0, w1
	b.gt	LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_strlen
	str	w0, [sp, #24]
Lloh7:
	adrp	x8, _MAXFK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAXFK@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	cmp	w0, w2
	b.le	LBB0_7
; %bb.5:
	mov	x1, x0
	str	x2, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warnx
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_warnx
LBB0_7:
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_strncpy
	str	w20, [sp, #16]
Lloh14:
	adrp	x8, _SETFKEY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SETFKEY@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	w0, #0
	bl	_ioctl
	tbz	x0, #63, LBB0_9
; %bb.8:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warn
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_load_default_functionkeys
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"load"

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

	.comm	_NUM_FKEYS,4,2                  ; @NUM_FKEYS
l_.str.2:                               ; @.str.2
	.asciz	"function key number must be between 1 and %d"

	.comm	_MAXFK,4,2                      ; @MAXFK
l_.str.3:                               ; @.str.3
	.asciz	"function key string too long (%d > %d)"

	.comm	_SETFKEY,4,2                    ; @SETFKEY
l_.str.4:                               ; @.str.4
	.asciz	"setting function key"

	.no_dead_strip	_set_functionkey
.subsections_via_symbols
