	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prompt_Create                  ## -- Begin function prompt_Create
	.p2align	4, 0x90
_prompt_Create:                         ## @prompt_Create
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	$104, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	_PROMPT_DESCRIPTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 96(%rbx)
	movq	_prompt_UpdateSet@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 92(%rbx)
	movq	_prompt_IsSet@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%rbx)
	movq	_prompt_Read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 84(%rbx)
	movq	_prompt_Write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%rbx)
	movq	_PROMPT_STD@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_5
## %bb.2:
	movq	_STDIN_FILENO@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_ttyname
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r15), %ecx
	movl	%ecx, (%rbx)
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rbx)
	movq	_stdout@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 72(%rbx)
	movq	$0, 64(%rbx)
	movq	_LOCAL_AUTH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 56(%rbx)
	leaq	L_.str(%rip), %rcx
	movq	%rcx, 40(%rbx)
	movq	48(%rbx), %rdi
	movq	%rax, %rsi
	movl	$7, %edx
	callq	_strncpy
	movq	48(%rbx), %rax
	movb	$0, 7(%rax)
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	addq	$76, %rsi
	callq	_tcgetattr
	jmp	LBB0_9
LBB0_5:
	movl	%r12d, 4(%rbx)
	movl	%r12d, (%rbx)
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edi
	callq	_fdopen
	movl	%eax, 72(%rbx)
	movq	%r15, 64(%rbx)
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	jne	LBB0_6
## %bb.7:
	movq	_LOCAL_AUTH@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_LOCAL_NO_AUTH@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %rax
	movq	%rax, 56(%rbx)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	48(%rbx), %rax
	movb	$0, (%rax)
LBB0_9:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movq	%r14, 16(%rbx)
	movq	%rbx, %rdi
	callq	_log_RegisterPrompt
	jmp	LBB0_10
LBB0_3:
	movq	%rbx, %rdi
	callq	_free
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROMPT_DESCRIPTOR,4,2          ## @PROMPT_DESCRIPTOR
	.comm	_prompt_UpdateSet,4,2           ## @prompt_UpdateSet
	.comm	_prompt_IsSet,4,2               ## @prompt_IsSet
	.comm	_prompt_Read,4,2                ## @prompt_Read
	.comm	_prompt_Write,4,2               ## @prompt_Write
	.comm	_PROMPT_STD,4,2                 ## @PROMPT_STD
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_stdout,4,2                     ## @stdout
	.comm	_LOCAL_AUTH,8,3                 ## @LOCAL_AUTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Controller"

L_.str.1:                               ## @.str.1
	.asciz	"a+"

	.comm	_LOCAL_NO_AUTH,8,3              ## @LOCAL_NO_AUTH
L_.str.2:                               ## @.str.2
	.asciz	"unknown"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prompt_Create                  ; -- Begin function prompt_Create
	.p2align	2
_prompt_Create:                         ; @prompt_Create
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	mov	w0, #104
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _PROMPT_DESCRIPTOR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROMPT_DESCRIPTOR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #96]
Lloh3:
	adrp	x8, _prompt_UpdateSet@GOTPAGE
Lloh4:
	ldr	x8, [x8, _prompt_UpdateSet@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _prompt_IsSet@GOTPAGE
Lloh7:
	ldr	x9, [x9, _prompt_IsSet@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #88]
Lloh9:
	adrp	x8, _prompt_Read@GOTPAGE
Lloh10:
	ldr	x8, [x8, _prompt_Read@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _prompt_Write@GOTPAGE
Lloh13:
	ldr	x9, [x9, _prompt_Write@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #80]
Lloh15:
	adrp	x8, _PROMPT_STD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PROMPT_STD@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.2:
Lloh18:
	adrp	x21, _STDIN_FILENO@GOTPAGE
Lloh19:
	ldr	x21, [x21, _STDIN_FILENO@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_ttyname
	cbz	x0, LBB0_6
; %bb.3:
	mov	x1, x0
	ldr	w8, [x21]
	str	w8, [x19]
Lloh20:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _stdout@GOTPAGE
Lloh24:
	ldr	x9, [x9, _stdout@GOTPAGEOFF]
	str	w8, [x19, #4]
Lloh25:
	ldr	w8, [x9]
	str	w8, [x19, #72]
Lloh26:
	adrp	x8, _LOCAL_AUTH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LOCAL_AUTH@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	stp	x8, xzr, [x19, #56]
Lloh29:
	adrp	x8, l_.str@PAGE
Lloh30:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19, #40]
	ldr	x0, [x19, #48]
	mov	w2, #7
	bl	_strncpy
	ldr	x8, [x19, #48]
	strb	wzr, [x8, #7]
	ldr	w0, [x19]
	add	x1, x19, #76
	bl	_tcgetattr
	b	LBB0_5
LBB0_4:
	stp	w22, w22, [x19]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_fdopen
	str	w0, [x19, #72]
	str	x21, [x19, #64]
	ldr	x8, [x21]
Lloh33:
	adrp	x9, _LOCAL_NO_AUTH@GOTPAGE
Lloh34:
	ldr	x9, [x9, _LOCAL_NO_AUTH@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh35:
	adrp	x10, _LOCAL_AUTH@GOTPAGE
Lloh36:
	ldr	x10, [x10, _LOCAL_AUTH@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	x8, [x8]
	str	x8, [x19, #56]
Lloh37:
	adrp	x8, l_.str.2@PAGE
Lloh38:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x19, #40]
	ldr	x8, [x19, #48]
	strb	wzr, [x8]
LBB0_5:
	movi.2s	v0, #1
	str	d0, [x19, #8]
	stp	xzr, xzr, [x19, #24]
	str	x20, [x19, #16]
	mov	x0, x19
	bl	_log_RegisterPrompt
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PROMPT_DESCRIPTOR,4,2          ; @PROMPT_DESCRIPTOR
	.comm	_prompt_UpdateSet,4,2           ; @prompt_UpdateSet
	.comm	_prompt_IsSet,4,2               ; @prompt_IsSet
	.comm	_prompt_Read,4,2                ; @prompt_Read
	.comm	_prompt_Write,4,2               ; @prompt_Write
	.comm	_PROMPT_STD,4,2                 ; @PROMPT_STD
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_stdout,4,2                     ; @stdout
	.comm	_LOCAL_AUTH,8,3                 ; @LOCAL_AUTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Controller"

l_.str.1:                               ; @.str.1
	.asciz	"a+"

	.comm	_LOCAL_NO_AUTH,8,3              ; @LOCAL_NO_AUTH
l_.str.2:                               ; @.str.2
	.asciz	"unknown"

.subsections_via_symbols
