	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CtCreateAccount                ## -- Begin function CtCreateAccount
	.p2align	4, 0x90
_CtCreateAccount:                       ## @CtCreateAccount
	.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
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.2:
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_LockList
	movl	$4, %edi
	callq	_ZeroMalloc
	movq	%rax, -48(%rbp)
	movl	(%rax), %edi
	movq	(%r14), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_UniStrCpy
	movl	(%rbx), %edi
	leaq	-80(%rbp), %rsi
	callq	_Search
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	(%rbx), %edi
	callq	_UnlockList
	movq	-48(%rbp), %rdi
	callq	_Free
	movq	_ERR_ACCOUNT_ALREADY_EXISTS@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_CiSetError
LBB0_20:
	movl	%r15d, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	-48(%rbp), %rdi
	callq	_Free
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_UniStrLen
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	40(%r14), %rax
	movq	(%rax), %rcx
	movq	_CLIENT_AUTHTYPE_CERT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_12
## %bb.8:
	movq	16(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.9:
	cmpl	$0, (%rcx)
	je	LBB0_11
## %bb.10:
	cmpq	$0, 8(%rax)
	je	LBB0_11
LBB0_12:
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	cmpl	$0, (%rax)
	je	LBB0_11
LBB0_14:
	movl	$48, %edi
	callq	_ZeroMalloc
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_NewLock
	movl	%eax, 44(%r15)
	movq	40(%r14), %rdi
	callq	_CopyClientAuth
	movl	%eax, 40(%r15)
	movl	$4, %edi
	callq	_ZeroMalloc
	movq	%rax, 32(%r15)
	movq	(%r14), %rsi
	movq	%rax, %rdi
	movl	$4, %edx
	callq	_Copy
	movl	32(%r14), %eax
	movl	%eax, 28(%r15)
	movl	28(%r14), %eax
	movl	%eax, 24(%r15)
	movl	24(%r14), %eax
	movl	%eax, 20(%r15)
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_CloneX
	movl	%eax, 16(%r15)
LBB0_16:
	movq	8(%r14), %rdi
	movq	_SHA1_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_IsZero
	movq	8(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movl	(%r12), %esi
	callq	_Rand
	jmp	LBB0_19
LBB0_6:
	movl	(%rbx), %edi
	callq	_UnlockList
	movq	_ERR_INVALID_VALUE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_11:
	movl	(%rbx), %edi
	callq	_UnlockList
	movq	_ERR_NOT_RSA_1024@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_18:
	movq	8(%r14), %rsi
	movl	(%r12), %edx
	callq	_Copy
LBB0_19:
	xorl	%eax, %eax
	callq	_SystemTime64
	movl	%eax, (%r15)
	movl	%eax, 4(%r15)
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_Insert
	movq	(%r14), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_CLog
	movl	(%rbx), %edi
	callq	_UnlockList
	movq	%rbx, %rdi
	callq	_CiNormalizeAccountVLan
	movq	%rbx, %rdi
	callq	_CiSaveConfigurationFile
	movq	%rbx, %rdi
	callq	_CiNotify
	movl	$1, %r15d
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_ACCOUNT_ALREADY_EXISTS,4,2 ## @ERR_ACCOUNT_ALREADY_EXISTS
	.comm	_ERR_INVALID_VALUE,4,2          ## @ERR_INVALID_VALUE
	.comm	_CLIENT_AUTHTYPE_CERT,8,3       ## @CLIENT_AUTHTYPE_CERT
	.comm	_ERR_NOT_RSA_1024,4,2           ## @ERR_NOT_RSA_1024
	.comm	_SHA1_SIZE,4,2                  ## @SHA1_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LC_NEW_ACCOUNT"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CtCreateAccount                ; -- Begin function CtCreateAccount
	.p2align	2
_CtCreateAccount:                       ; @CtCreateAccount
	.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
	mov	x19, x0
	mov	w0, #0
	cbz	x19, LBB0_5
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_5
; %bb.2:
	ldr	w0, [x19]
	bl	_LockList
	mov	w0, #4
	bl	_ZeroMalloc
	str	x0, [sp, #32]
	ldr	w0, [x0]
	ldr	x8, [x20]
	ldr	w2, [x8]
	mov	w1, #4
	bl	_UniStrCpy
	ldr	w0, [x19]
	mov	x1, sp
	bl	_Search
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w0, [x19]
	bl	_UnlockList
	ldr	x0, [sp, #32]
	bl	_Free
Lloh0:
	adrp	x8, _ERR_ACCOUNT_ALREADY_EXISTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERR_ACCOUNT_ALREADY_EXISTS@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_CiSetError
	mov	w0, #0
LBB0_5:
	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_6:
	ldr	x0, [sp, #32]
	bl	_Free
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_UniStrLen
	cbz	x0, LBB0_17
; %bb.7:
	ldr	x8, [x20, #40]
	ldr	x9, [x8]
Lloh2:
	adrp	x10, _CLIENT_AUTHTYPE_CERT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CLIENT_AUTHTYPE_CERT@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.8:
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_18
; %bb.9:
	ldr	w9, [x9]
	cbz	w9, LBB0_18
; %bb.10:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_18
LBB0_11:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	w8, [x8]
	cbz	w8, LBB0_18
LBB0_13:
	mov	w0, #48
	bl	_ZeroMalloc
	mov	x21, x0
	bl	_NewLock
	str	w0, [x21, #44]
	ldr	x0, [x20, #40]
	bl	_CopyClientAuth
	str	w0, [x21, #40]
	mov	w0, #4
	bl	_ZeroMalloc
	str	x0, [x21, #32]
	ldr	x1, [x20]
	mov	w2, #4
	bl	_Copy
	ldr	w8, [x20, #32]
	str	w8, [x21, #28]
	ldr	d0, [x20, #24]
	stur	d0, [x21, #20]
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_CloneX
	str	w0, [x21, #16]
LBB0_15:
	ldr	x0, [x20, #8]
Lloh5:
	adrp	x22, _SHA1_SIZE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SHA1_SIZE@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_IsZero
	mov	x8, x0
	ldr	x0, [x21, #8]
	cbz	x8, LBB0_19
; %bb.16:
	ldr	w1, [x22]
	bl	_Rand
	b	LBB0_20
LBB0_17:
	ldr	w0, [x19]
	bl	_UnlockList
Lloh7:
	adrp	x8, _ERR_INVALID_VALUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERR_INVALID_VALUE@GOTPAGEOFF]
	b	LBB0_4
LBB0_18:
	ldr	w0, [x19]
	bl	_UnlockList
Lloh9:
	adrp	x8, _ERR_NOT_RSA_1024@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERR_NOT_RSA_1024@GOTPAGEOFF]
	b	LBB0_4
LBB0_19:
	ldr	x1, [x20, #8]
	ldr	w2, [x22]
	bl	_Copy
LBB0_20:
	bl	_SystemTime64
	stp	w0, w0, [x21]
	ldr	w0, [x19]
	mov	x1, x21
	bl	_Insert
	ldr	x8, [x20]
	ldr	w2, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_CLog
	ldr	w0, [x19]
	bl	_UnlockList
	mov	x0, x19
	bl	_CiNormalizeAccountVLan
	mov	x0, x19
	bl	_CiSaveConfigurationFile
	mov	x0, x19
	bl	_CiNotify
	mov	w0, #1
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_ACCOUNT_ALREADY_EXISTS,4,2 ; @ERR_ACCOUNT_ALREADY_EXISTS
	.comm	_ERR_INVALID_VALUE,4,2          ; @ERR_INVALID_VALUE
	.comm	_CLIENT_AUTHTYPE_CERT,8,3       ; @CLIENT_AUTHTYPE_CERT
	.comm	_ERR_NOT_RSA_1024,4,2           ; @ERR_NOT_RSA_1024
	.comm	_SHA1_SIZE,4,2                  ; @SHA1_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LC_NEW_ACCOUNT"

.subsections_via_symbols
