	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CtSetAccount                   ## -- Begin function CtSetAccount
	.p2align	4, 0x90
_CtSetAccount:                          ## @CtSetAccount
	.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	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r12d, %r12d
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.2:
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_LockList
	movl	$4, %edi
	callq	_ZeroMalloc
	movq	%rax, -56(%rbp)
	movl	(%rax), %edi
	movq	24(%rbx), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_UniStrCpy
	movl	(%r14), %edi
	leaq	-88(%rbp), %rsi
	callq	_Search
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	-56(%rbp), %rdi
	callq	_Free
	movq	32(%rbx), %rax
	movq	(%rax), %rcx
	movq	_CLIENT_AUTHTYPE_CERT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.5:
	movq	16(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.6:
	cmpl	$0, (%rcx)
	je	LBB0_8
## %bb.7:
	cmpq	$0, 8(%rax)
	je	LBB0_8
LBB0_10:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	cmpl	$0, (%rax)
	je	LBB0_8
LBB0_12:
	movl	(%r15), %edi
	callq	_Lock
	movl	40(%r15), %edi
	callq	_CiFreeClientAuth
	movq	32(%rbx), %rdi
	callq	_CopyClientAuth
	movl	%eax, 40(%r15)
	movq	32(%r15), %rdi
	callq	_Free
	movl	$4, %edi
	callq	_ZeroMalloc
	movq	%rax, 32(%r15)
	movq	24(%rbx), %rsi
	movq	%rax, %rdi
	movl	$4, %edx
	callq	_Copy
	movl	16(%rbx), %eax
	movl	%eax, 24(%r15)
	movl	12(%rbx), %eax
	movl	%eax, 20(%r15)
	movl	8(%rbx), %eax
	movl	%eax, 16(%r15)
	movq	(%rbx), %rax
	movq	8(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_FreeX
	movq	(%rbx), %rax
LBB0_15:
	movq	%rax, %rdi
	callq	_CloneX
	jmp	LBB0_19
LBB0_3:
	movl	(%r14), %edi
	callq	_UnlockList
	movq	-56(%rbp), %rdi
	callq	_Free
	movq	_ERR_ACCOUNT_NOT_FOUND@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movl	(%r14), %edi
	callq	_UnlockList
	movq	_ERR_NOT_RSA_1024@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_CiSetError
	jmp	LBB0_20
LBB0_16:
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	callq	_FreeX
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	movq	%rax, 8(%r15)
	xorl	%eax, %eax
	callq	_SystemTime64
	movl	%eax, 4(%r15)
	movl	(%r15), %edi
	callq	_Unlock
	movl	(%r14), %edi
	callq	_UnlockList
	movq	%r14, %rdi
	callq	_CiSaveConfigurationFile
	movq	%r14, %rdi
	callq	_CiNotify
	movl	$1, %r12d
LBB0_20:
	movl	%r12d, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_ACCOUNT_NOT_FOUND,4,2      ## @ERR_ACCOUNT_NOT_FOUND
	.comm	_CLIENT_AUTHTYPE_CERT,8,3       ## @CLIENT_AUTHTYPE_CERT
	.comm	_ERR_NOT_RSA_1024,4,2           ## @ERR_NOT_RSA_1024
	.comm	_ERR_ACCOUNT_ACTIVE,4,2         ## @ERR_ACCOUNT_ACTIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CtSetAccount                   ; -- Begin function CtSetAccount
	.p2align	2
_CtSetAccount:                          ; @CtSetAccount
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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_20
; %bb.1:
	mov	x21, x1
	cbz	x1, LBB0_20
; %bb.2:
	ldr	w0, [x19]
	bl	_LockList
	mov	w0, #4
	bl	_ZeroMalloc
	str	x0, [sp, #40]
	ldr	w0, [x0]
	ldr	x8, [x21, #24]
	ldr	w2, [x8]
	mov	w1, #4
	bl	_UniStrCpy
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_Search
	cbz	x0, LBB0_13
; %bb.3:
	mov	x20, x0
	ldr	x0, [sp, #40]
	bl	_Free
	ldr	x8, [x21, #32]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _CLIENT_AUTHTYPE_CERT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CLIENT_AUTHTYPE_CERT@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.4:
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_14
; %bb.5:
	ldr	w9, [x9]
	cbz	w9, LBB0_14
; %bb.6:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_14
LBB0_7:
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
LBB0_9:
	ldr	w0, [x20]
	bl	_Lock
	ldr	w0, [x20, #40]
	bl	_CiFreeClientAuth
	ldr	x0, [x21, #32]
	bl	_CopyClientAuth
	str	w0, [x20, #40]
	ldr	x0, [x20, #32]
	bl	_Free
	mov	w0, #4
	bl	_ZeroMalloc
	str	x0, [x20, #32]
	ldr	x1, [x21, #24]
	mov	w2, #4
	bl	_Copy
	ldr	w8, [x21, #16]
	str	w8, [x20, #24]
	ldr	d0, [x21, #8]
	str	d0, [x20, #16]
	ldr	x0, [x21]
	ldr	x8, [x20, #8]
	cbz	x0, LBB0_16
; %bb.10:
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x8
	bl	_FreeX
	ldr	x0, [x21]
LBB0_12:
	bl	_CloneX
	b	LBB0_19
LBB0_13:
	ldr	w0, [x19]
	bl	_UnlockList
	ldr	x0, [sp, #40]
	bl	_Free
Lloh3:
	adrp	x8, _ERR_ACCOUNT_NOT_FOUND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_ACCOUNT_NOT_FOUND@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
	ldr	w0, [x19]
	bl	_UnlockList
Lloh5:
	adrp	x8, _ERR_NOT_RSA_1024@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERR_NOT_RSA_1024@GOTPAGEOFF]
LBB0_15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_CiSetError
	mov	w0, #0
	b	LBB0_20
LBB0_16:
	cbz	x8, LBB0_18
; %bb.17:
	mov	x0, x8
	bl	_FreeX
LBB0_18:
	mov	x0, #0
LBB0_19:
	str	x0, [x20, #8]
	bl	_SystemTime64
	str	w0, [x20, #4]
	ldr	w0, [x20]
	bl	_Unlock
	ldr	w0, [x19]
	bl	_UnlockList
	mov	x0, x19
	bl	_CiSaveConfigurationFile
	mov	x0, x19
	bl	_CiNotify
	mov	w0, #1
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_ACCOUNT_NOT_FOUND,4,2      ; @ERR_ACCOUNT_NOT_FOUND
	.comm	_CLIENT_AUTHTYPE_CERT,8,3       ; @CLIENT_AUTHTYPE_CERT
	.comm	_ERR_NOT_RSA_1024,4,2           ; @ERR_NOT_RSA_1024
	.comm	_ERR_ACCOUNT_ACTIVE,4,2         ; @ERR_ACCOUNT_ACTIVE
.subsections_via_symbols
