	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function IsConsoleProcess
_IsConsoleProcess:                      ## @IsConsoleProcess
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	movq	_ProcessBasicInformation@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movl	$4, %ecx
	xorl	%r8d, %r8d
	callq	_NtQueryInformationProcessPtr
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	-24(%rbp), %esi
	leaq	-40(%rbp), %rdx
	leaq	-28(%rbp), %r8
	movl	%r14d, %edi
	movl	$8, %ecx
	callq	_NtReadVirtualMemoryPtr
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_NT_SUCCESS
	movl	-28(%rbp), %edx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	cmpl	$8, %edx
	jne	LBB0_5
## %bb.6:
	movq	_IMAGE_SUBSYSTEM_WINDOWS_CUI@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	cmpq	-40(%rbp), %rcx
	sete	%al
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_WARN
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_WARN
LBB0_2:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ProcessBasicInformation,4,2    ## @ProcessBasicInformation
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NtQueryInformationProcess failed with status %08x\n"

	.comm	_TRUE,4,2                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't read virt mem status %08x bytes read %lu\n"

	.comm	_IMAGE_SUBSYSTEM_WINDOWS_CUI,8,3 ## @IMAGE_SUBSYSTEM_WINDOWS_CUI
	.no_dead_strip	_IsConsoleProcess
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function IsConsoleProcess
_IsConsoleProcess:                      ; @IsConsoleProcess
	.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, x0
Lloh0:
	adrp	x8, _ProcessBasicInformation@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ProcessBasicInformation@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	w3, #4
	mov	x4, #0
	bl	_NtQueryInformationProcessPtr
	mov	x20, x0
	bl	_NT_SUCCESS
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w1, [sp, #24]
	add	x2, sp, #16
	add	x4, sp, #12
	mov	x0, x19
	mov	w3, #8
	bl	_NtReadVirtualMemoryPtr
	mov	x19, x0
	bl	_NT_SUCCESS
	ldr	w8, [sp, #12]
	cmp	w0, #0
	ccmp	w8, #8, #0, ne
	b.eq	LBB0_5
; %bb.2:
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
LBB0_4:
	bl	_WARN
Lloh7:
	adrp	x8, _TRUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _IMAGE_SUBSYSTEM_WINDOWS_CUI@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IMAGE_SUBSYSTEM_WINDOWS_CUI@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x9, [sp, #16]
	cmp	x8, x9
	cset	w0, eq
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ProcessBasicInformation,4,2    ; @ProcessBasicInformation
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NtQueryInformationProcess failed with status %08x\n"

	.comm	_TRUE,4,2                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't read virt mem status %08x bytes read %lu\n"

	.comm	_IMAGE_SUBSYSTEM_WINDOWS_CUI,8,3 ; @IMAGE_SUBSYSTEM_WINDOWS_CUI
	.no_dead_strip	_IsConsoleProcess
.subsections_via_symbols
