	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getkeyid
_getkeyid:                              ## @getkeyid
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	$2, %esi
	callq	_open
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_fdopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_setbuf
	jmp	LBB0_3
LBB0_1:
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	callq	_fprintf
	movl	(%rbx), %edi
	callq	_fflush
	leaq	-64(%rbp), %rdi
	callq	_COUNTOF
	decl	%eax
	je	LBB0_4
## %bb.5:
	movslq	%eax, %r14
	xorl	%ebx, %ebx
	movq	_EOF@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_getc
	cmpl	$10, %eax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	(%r12), %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movb	%al, -64(%rbp,%rbx)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_6
## %bb.9:
	movq	%r14, %rbx
	jmp	LBB0_10
LBB0_4:
	xorl	%ebx, %ebx
LBB0_10:
	movb	$0, -64(%rbp,%rbx)
	movq	_stdin@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	callq	_fclose
LBB0_12:
	leaq	-64(%rbp), %rdi
	callq	_atoi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/tty"

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

	.comm	_stdin,8,3                      ## @stdin
	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.comm	_EOF,4,2                        ## @EOF
	.comm	__O_TEXT,4,2                    ## @_O_TEXT
	.no_dead_strip	_getkeyid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getkeyid
_getkeyid:                              ; @getkeyid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, 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	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #2
	bl	_open
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fdopen
Lloh7:
	adrp	x21, _stdin@GOTPAGE
Lloh8:
	ldr	x21, [x21, _stdin@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	mov	x1, #0
	bl	_setbuf
	b	LBB0_3
LBB0_2:
	ldr	x19, [x21]
LBB0_3:
Lloh9:
	adrp	x22, _stderr@GOTPAGE
Lloh10:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_fprintf
	ldr	w0, [x22]
	bl	_fflush
	add	x20, sp, #4
	add	x0, sp, #4
	bl	_COUNTOF
	mov	x22, #0
	subs	w8, w0, #1
	b.eq	LBB0_9
; %bb.4:
	sxtw	x23, w8
Lloh13:
	adrp	x24, _EOF@GOTPAGE
Lloh14:
	ldr	x24, [x24, _EOF@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_getc
	cmp	w0, #10
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	strb	w0, [x20, x22]
	add	x8, x22, #1
	mov	x22, x8
	cmp	x23, x8
	b.ne	LBB0_5
; %bb.8:
	mov	x22, x23
LBB0_9:
	strb	wzr, [x20, x22]
	ldr	x8, [x21]
	cmp	x19, x8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_fclose
LBB0_11:
	add	x0, sp, #4
	bl	_atoi
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/tty"

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

	.comm	_stdin,8,3                      ; @stdin
	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.comm	_EOF,4,2                        ; @EOF
	.comm	__O_TEXT,4,2                    ; @_O_TEXT
	.no_dead_strip	_getkeyid
.subsections_via_symbols
