	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_ca
_check_ca:                              ## @check_ca
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_KU_KEY_CERT_SIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ku_reject
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_8
## %bb.1:
	movl	(%rbx), %ecx
	movq	_EXFLAG_BCONS@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_EXFLAG_CA@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	setne	%al
	jmp	LBB0_8
LBB0_3:
	movq	_V1_ROOT@GOTPCREL(%rip), %rdx
	movl	%ecx, %esi
	notl	%esi
	movl	$3, %eax
	testl	%esi, (%rdx)
	je	LBB0_8
## %bb.4:
	movq	_EXFLAG_KUSAGE@GOTPCREL(%rip), %rdx
	movl	$4, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_8
## %bb.5:
	movq	_EXFLAG_NSCERT@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.6:
	movq	_NS_ANY_CA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$5, %eax
	testl	%ecx, 4(%rbx)
	jne	LBB0_8
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KU_KEY_CERT_SIGN,4,2           ## @KU_KEY_CERT_SIGN
	.comm	_EXFLAG_BCONS,4,2               ## @EXFLAG_BCONS
	.comm	_EXFLAG_CA,4,2                  ## @EXFLAG_CA
	.comm	_V1_ROOT,4,2                    ## @V1_ROOT
	.comm	_EXFLAG_KUSAGE,4,2              ## @EXFLAG_KUSAGE
	.comm	_EXFLAG_NSCERT,4,2              ## @EXFLAG_NSCERT
	.comm	_NS_ANY_CA,4,2                  ## @NS_ANY_CA
	.no_dead_strip	_check_ca
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_ca
_check_ca:                              ; @check_ca
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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, _KU_KEY_CERT_SIGN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KU_KEY_CERT_SIGN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ku_reject
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_11
LBB0_2:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _EXFLAG_BCONS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EXFLAG_BCONS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, _EXFLAG_CA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EXFLAG_CA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	b	LBB0_11
LBB0_4:
Lloh9:
	adrp	x9, _V1_ROOT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V1_ROOT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #3
	b	LBB0_11
LBB0_6:
Lloh12:
	adrp	x9, _EXFLAG_KUSAGE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EXFLAG_KUSAGE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	mov	w0, #4
	b	LBB0_11
LBB0_8:
Lloh15:
	adrp	x9, _EXFLAG_NSCERT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EXFLAG_NSCERT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.9:
	ldr	w8, [x19, #4]
Lloh18:
	adrp	x9, _NS_ANY_CA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NS_ANY_CA@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.10:
	mov	w0, #5
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_KU_KEY_CERT_SIGN,4,2           ; @KU_KEY_CERT_SIGN
	.comm	_EXFLAG_BCONS,4,2               ; @EXFLAG_BCONS
	.comm	_EXFLAG_CA,4,2                  ; @EXFLAG_CA
	.comm	_V1_ROOT,4,2                    ; @V1_ROOT
	.comm	_EXFLAG_KUSAGE,4,2              ; @EXFLAG_KUSAGE
	.comm	_EXFLAG_NSCERT,4,2              ; @EXFLAG_NSCERT
	.comm	_NS_ANY_CA,4,2                  ; @NS_ANY_CA
	.no_dead_strip	_check_ca
.subsections_via_symbols
