	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function IntGetConsoleCommandHistoryLength
_IntGetConsoleCommandHistoryLength:     ## @IntGetConsoleCommandHistoryLength
	.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	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	callq	_wcslen
	jmp	LBB0_4
LBB0_3:
	callq	_strlen
LBB0_4:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_NtCurrentPeb
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	shll	$2, %ebx
	movl	%ebx, -72(%rbp)
	movq	%r12, -56(%rbp)
	movq	%r12, -48(%rbp)
	movl	$1, %edi
	movl	%ebx, %esi
	callq	_CsrAllocateCaptureBuffer
	testl	%eax, %eax
	je	LBB0_11
## %bb.6:
	movl	%eax, %r12d
	leaq	-80(%rbp), %r15
	leal	16(%r15), %ecx
	movl	%eax, %edi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_CsrCaptureMessageBuffer
	movq	_CONSRV_SERVERDLL_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ConsolepGetCommandHistoryLength@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CSR_CREATE_API_NUMBER
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	movl	$40, %ecx
	callq	_CsrClientCallServer
	movl	%r12d, %edi
	callq	_CsrFreeCaptureBuffer
	movl	-80(%rbp), %edi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	movl	-68(%rbp), %r15d
	jmp	LBB0_10
LBB0_8:
	movq	_ERROR_INVALID_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
LBB0_9:
	xorl	%r15d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str(%rip), %rdi
	callq	_DPRINT1
	movq	_ERROR_NOT_ENOUGH_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	jmp	LBB0_10
LBB0_12:
	movl	-80(%rbp), %edi
	callq	_BaseSetLastNTError
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR_INVALID_PARAMETER,4,2    ## @ERROR_INVALID_PARAMETER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CsrAllocateCaptureBuffer failed!\n"

	.comm	_ERROR_NOT_ENOUGH_MEMORY,4,2    ## @ERROR_NOT_ENOUGH_MEMORY
	.comm	_CONSRV_SERVERDLL_INDEX,4,2     ## @CONSRV_SERVERDLL_INDEX
	.comm	_ConsolepGetCommandHistoryLength,4,2 ## @ConsolepGetCommandHistoryLength
	.no_dead_strip	_IntGetConsoleCommandHistoryLength
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function IntGetConsoleCommandHistoryLength
_IntGetConsoleCommandHistoryLength:     ; @IntGetConsoleCommandHistoryLength
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	cbz	x1, LBB0_6
; %bb.2:
	bl	_wcslen
	mov	x21, x0
	cbz	w0, LBB0_7
LBB0_3:
	bl	_NtCurrentPeb
	ldr	x8, [x0]
	ldr	w8, [x8]
	str	w8, [sp, #40]
	lsl	w21, w21, #2
	str	w21, [sp, #8]
	stp	x20, x20, [sp, #24]
	mov	w0, #1
	mov	x1, x21
	bl	_CsrAllocateCaptureBuffer
	cbz	w0, LBB0_11
; %bb.4:
	mov	x20, x0
	mov	x8, sp
	add	w3, w8, #16
	mov	x1, x19
	mov	x2, x21
	bl	_CsrCaptureMessageBuffer
Lloh0:
	adrp	x8, _CONSRV_SERVERDLL_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONSRV_SERVERDLL_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ConsolepGetCommandHistoryLength@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ConsolepGetCommandHistoryLength@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_CSR_CREATE_API_NUMBER
	mov	x2, x0
	mov	x0, sp
	mov	x1, x20
	mov	w3, #40
	bl	_CsrClientCallServer
	mov	x0, x20
	bl	_CsrFreeCaptureBuffer
	ldr	w0, [sp]
	bl	_NT_SUCCESS
	cbz	w0, LBB0_12
; %bb.5:
	ldr	w0, [sp, #12]
	b	LBB0_10
LBB0_6:
	bl	_strlen
	mov	x21, x0
	cbnz	w0, LBB0_3
LBB0_7:
Lloh6:
	adrp	x8, _ERROR_INVALID_PARAMETER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERROR_INVALID_PARAMETER@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	bl	_SetLastError
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	add	sp, sp, #96
	ret
LBB0_11:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINT1
Lloh10:
	adrp	x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGEOFF]
	b	LBB0_8
LBB0_12:
	ldr	w0, [sp]
	bl	_BaseSetLastNTError
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR_INVALID_PARAMETER,4,2    ; @ERROR_INVALID_PARAMETER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CsrAllocateCaptureBuffer failed!\n"

	.comm	_ERROR_NOT_ENOUGH_MEMORY,4,2    ; @ERROR_NOT_ENOUGH_MEMORY
	.comm	_CONSRV_SERVERDLL_INDEX,4,2     ; @CONSRV_SERVERDLL_INDEX
	.comm	_ConsolepGetCommandHistoryLength,4,2 ; @ConsolepGetCommandHistoryLength
	.no_dead_strip	_IntGetConsoleCommandHistoryLength
.subsections_via_symbols
