	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_keyrates
_set_keyrates:                          ## @set_keyrates
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_strtol
	testl	%eax, %eax
	js	LBB0_26
## %bb.7:
	movq	-40(%rbp), %rbx
	cmpb	$46, (%rbx)
	jne	LBB0_26
## %bb.8:
	movl	%eax, %r14d
	incq	%rbx
	movq	%rbx, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_strtol
	testl	%eax, %eax
	js	LBB0_26
## %bb.9:
	cmpb	$0, (%rbx)
	je	LBB0_26
## %bb.10:
	movq	-40(%rbp), %rcx
	cmpb	$0, (%rcx)
	je	LBB0_11
LBB0_26:
	leaq	L_.str.3(%rip), %rdi
	callq	_warnx
	jmp	LBB0_24
LBB0_1:
	movl	$3, %ebx
	movl	$31, %r15d
	movl	$1000, %r14d                    ## imm = 0x3E8
	movl	$500, %eax                      ## imm = 0x1F4
	jmp	LBB0_21
LBB0_3:
	movl	$1, %ebx
	movl	$15, %r15d
	movl	$500, %r14d                     ## imm = 0x1F4
	movl	$125, %eax
	jmp	LBB0_21
LBB0_5:
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
LBB0_21:
	movl	%r14d, -40(%rbp)
	movl	%eax, -36(%rbp)
	movq	_KDSETREPEAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_ioctl
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:
	movq	_KDSETRAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$5, %ebx
	orl	%r15d, %ebx
	xorl	%edi, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_ioctl
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	leaq	L_.str.4(%rip), %rdi
	callq	_warn
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_27
## %bb.25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_ndelays@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r15d, %r15d
	movl	$0, %ebx
	cmpl	$2, %ecx
	jl	LBB0_16
## %bb.12:
	decl	%ecx
	movq	_delays@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, %esi
	xorl	%ebx, %ebx
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpl	(%rdx,%rbx,4), %r14d
	jle	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	cmpq	%rbx, %rsi
	jne	LBB0_13
## %bb.15:
	movl	%ecx, %ebx
LBB0_16:
	movq	_nrepeats@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$2, %ecx
	jl	LBB0_21
## %bb.17:
	decl	%ecx
	movq	_repeats@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, %esi
	xorl	%r15d, %r15d
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpl	(%rdx,%r15,4), %eax
	jle	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%r15
	cmpq	%r15, %rsi
	jne	LBB0_18
## %bb.20:
	movl	%ecx, %r15d
	jmp	LBB0_21
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"slow"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"argument to -r must be delay.repeat or slow|normal|fast"

	.comm	_ndelays,4,2                    ## @ndelays
	.comm	_delays,8,3                     ## @delays
	.comm	_nrepeats,4,2                   ## @nrepeats
	.comm	_repeats,8,3                    ## @repeats
	.comm	_KDSETREPEAT,4,2                ## @KDSETREPEAT
	.comm	_KDSETRAD,4,2                   ## @KDSETRAD
L_.str.4:                               ## @.str.4
	.asciz	"setting keyboard rate"

	.no_dead_strip	_set_keyrates
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_keyrates
_set_keyrates:                          ; @set_keyrates
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_9
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	w0, LBB0_10
; %bb.2:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	w0, LBB0_11
; %bb.3:
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #0
	bl	_strtol
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	x8, [sp, #16]
	ldrb	w9, [x8]
	cmp	w9, #46
	b.ne	LBB0_8
; %bb.5:
	mov	x19, x0
	add	x20, x8, #1
	str	x20, [sp, #16]
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #0
	bl	_strtol
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldrb	w8, [x20]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	x8, [sp, #16]
	ldrb	w8, [x8]
	cbz	w8, LBB0_17
LBB0_8:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warnx
	b	LBB0_15
LBB0_9:
	mov	w20, #3
	mov	w21, #31
	mov	w19, #1000
	mov	w0, #500
	b	LBB0_12
LBB0_10:
	mov	w20, #1
	mov	w21, #15
	mov	w19, #500
	mov	w0, #125
	b	LBB0_12
LBB0_11:
	mov	w19, #0
	mov	w21, #0
	mov	w20, #0
LBB0_12:
	stp	w19, w0, [sp, #16]
Lloh11:
	adrp	x8, _KDSETREPEAT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KDSETREPEAT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x8, sp, #16
	str	x8, [sp]
	mov	w0, #0
	bl	_ioctl
	cbz	x0, LBB0_15
; %bb.13:
Lloh14:
	adrp	x8, _KDSETRAD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KDSETRAD@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	orr	w8, w21, w20, lsl #5
	str	x8, [sp]
	mov	w0, #0
	bl	_ioctl
	cbz	x0, LBB0_15
; %bb.14:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warn
LBB0_15:
	ldr	x8, [sp, #24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_17:
Lloh22:
	adrp	x8, _ndelays@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ndelays@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x8]
	cmp	w9, #2
	b.lt	LBB0_21
; %bb.18:
	mov	x8, #0
	sub	w20, w9, #1
Lloh25:
	adrp	x9, _delays@GOTPAGE
Lloh26:
	ldr	x9, [x9, _delays@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9, x8, lsl #2]
	cmp	w19, w10
	b.le	LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	add	x8, x8, #1
	cmp	x20, x8
	b.ne	LBB0_19
	b	LBB0_23
LBB0_21:
	mov	w20, #0
	b	LBB0_23
LBB0_22:
	mov	x20, x8
LBB0_23:
Lloh28:
	adrp	x8, _nrepeats@GOTPAGE
Lloh29:
	ldr	x8, [x8, _nrepeats@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x8]
	cmp	w9, #2
	b.lt	LBB0_27
; %bb.24:
	mov	x8, #0
	sub	w21, w9, #1
Lloh31:
	adrp	x9, _repeats@GOTPAGE
Lloh32:
	ldr	x9, [x9, _repeats@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9, x8, lsl #2]
	cmp	w0, w10
	b.le	LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	add	x8, x8, #1
	cmp	x21, x8
	b.ne	LBB0_25
	b	LBB0_12
LBB0_27:
	mov	w21, #0
	b	LBB0_12
LBB0_28:
	mov	x21, x8
	b	LBB0_12
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"slow"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"argument to -r must be delay.repeat or slow|normal|fast"

	.comm	_ndelays,4,2                    ; @ndelays
	.comm	_delays,8,3                     ; @delays
	.comm	_nrepeats,4,2                   ; @nrepeats
	.comm	_repeats,8,3                    ; @repeats
	.comm	_KDSETREPEAT,4,2                ; @KDSETREPEAT
	.comm	_KDSETRAD,4,2                   ; @KDSETRAD
l_.str.4:                               ; @.str.4
	.asciz	"setting keyboard rate"

	.no_dead_strip	_set_keyrates
.subsections_via_symbols
