	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StSetServerCert                ## -- Begin function StSetServerCert
	.p2align	4, 0x90
_StSetServerCert:                       ## @StSetServerCert
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rsi), %rdi
	movq	_ERR_PROTOCOL_ERROR@GOTPCREL(%rip), %r13
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	movq	%rsi, %rbx
	movq	8(%rsi), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.2:
	cmpl	$0, (%rdi)
	je	LBB0_3
## %bb.4:
	movq	(%r15), %r14
	movq	(%r14), %r12
	callq	_CheckXandK
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movl	$1, (%rbx)
	movq	16(%rbx), %rdi
	cmpl	$0, 4(%rdi)
	jne	LBB0_8
## %bb.6:
	callq	_DownloadAndSaveIntermediateCertificatesIfNecessary
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	$0, (%rbx)
LBB0_8:
	movq	8(%rbx), %rdx
	movq	16(%rbx), %rsi
	movq	%r12, %rdi
	callq	_SetCedarCert
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ALog
	movq	%r14, %rdi
	callq	_IncrementServerConfigRevision
	movq	_ERR_NO_ERROR@GOTPCREL(%rip), %r13
	jmp	LBB0_9
LBB0_3:
	movq	_ERR_NOT_RSA_1024@GOTPCREL(%rip), %r13
LBB0_9:
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERVER_ADMIN_ONLY,4,2          ## @SERVER_ADMIN_ONLY
	.comm	_ERR_PROTOCOL_ERROR,4,2         ## @ERR_PROTOCOL_ERROR
	.comm	_ERR_NOT_RSA_1024,4,2           ## @ERR_NOT_RSA_1024
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LA_SET_SERVER_CERT"

	.comm	_ERR_NO_ERROR,4,2               ## @ERR_NO_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StSetServerCert                ; -- Begin function StSetServerCert
	.p2align	2
_StSetServerCert:                       ; @StSetServerCert
	.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	x19, x0
	ldr	x0, [x1, #16]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x1
	ldr	x1, [x1, #8]
	cbz	x1, LBB0_8
; %bb.2:
	ldr	w8, [x0]
	cbz	w8, LBB0_10
; %bb.3:
	ldr	x20, [x19]
	ldr	x22, [x20]
	bl	_CheckXandK
	cbz	w0, LBB0_8
; %bb.4:
	mov	w8, #1
	str	w8, [x21]
	ldr	x0, [x21, #16]
	ldr	w8, [x0, #4]
	cbnz	w8, LBB0_7
; %bb.5:
	bl	_DownloadAndSaveIntermediateCertificatesIfNecessary
	cbnz	w0, LBB0_7
; %bb.6:
	str	wzr, [x21]
LBB0_7:
	ldp	x2, x1, [x21, #8]
	mov	x0, x22
	bl	_SetCedarCert
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, #0
	bl	_ALog
	mov	x0, x20
	bl	_IncrementServerConfigRevision
Lloh2:
	adrp	x8, _ERR_NO_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERR_NO_ERROR@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x8, _ERR_PROTOCOL_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERR_PROTOCOL_ERROR@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	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
LBB0_10:
Lloh6:
	adrp	x8, _ERR_NOT_RSA_1024@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERR_NOT_RSA_1024@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SERVER_ADMIN_ONLY,4,2          ; @SERVER_ADMIN_ONLY
	.comm	_ERR_PROTOCOL_ERROR,4,2         ; @ERR_PROTOCOL_ERROR
	.comm	_ERR_NOT_RSA_1024,4,2           ; @ERR_NOT_RSA_1024
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LA_SET_SERVER_CERT"

	.comm	_ERR_NO_ERROR,4,2               ; @ERR_NO_ERROR
.subsections_via_symbols
