	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ask_dev                        ## -- Begin function ask_dev
	.p2align	4, 0x90
_ask_dev:                               ## @ask_dev
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_DEV_NAME_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	xorl	%eax, %eax
	callq	_clear
	xorl	%eax, %eax
	callq	_unset_tty
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_puts
LBB0_2:
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_5:
	movl	(%r12), %esi
	decl	%esi
	movq	_stdin@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%r15, %rdi
	callq	_strlen
	cltq
	cmpb	$10, -1(%rax,%r15)
	jne	LBB0_8
## %bb.7:
	movb	$0, -1(%r15,%rax)
LBB0_8:
	testb	$-33, (%r15)
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strcpy
LBB0_10:
	xorl	%eax, %eax
	callq	_set_tty
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DEV_NAME_LEN,4,2               ## @DEV_NAME_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Enter device name [%s]:"

L_.str.2:                               ## @.str.2
	.asciz	"Enter device name:"

	.comm	_stdin,4,2                      ## @stdin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ask_dev                        ; -- Begin function ask_dev
	.p2align	2
_ask_dev:                               ; @ask_dev
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x22, _DEV_NAME_LEN@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DEV_NAME_LEN@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	bl	_clear
	bl	_unset_tty
	cbz	x21, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_puts
LBB0_2:
	cbz	x19, LBB0_4
; %bb.3:
	str	x19, [sp, #-16]!
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
LBB0_5:
	ldr	w8, [x22]
	sub	w1, w8, #1
Lloh11:
	adrp	x8, _stdin@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_fgets
	cbz	x0, LBB0_10
; %bb.6:
	mov	x0, x20
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	sub	x8, x8, #1
	ldrb	w9, [x20, x8]
	cmp	w9, #10
	b.ne	LBB0_8
; %bb.7:
	strb	wzr, [x20, x8]
LBB0_8:
	ldrb	w8, [x20]
	orr	w8, w8, #0x20
	cmp	w8, #32
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	bl	_strcpy
LBB0_10:
	bl	_set_tty
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DEV_NAME_LEN,4,2               ; @DEV_NAME_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Enter device name [%s]:"

l_.str.2:                               ; @.str.2
	.asciz	"Enter device name:"

	.comm	_stdin,4,2                      ; @stdin
.subsections_via_symbols
