	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hxtool_ca                      ## -- Begin function hxtool_ca
	.p2align	4, 0x90
_hxtool_ca:                             ## @hxtool_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -80(%rbp)
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	cmpq	$0, 136(%r15)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 16(%r15)
	je	LBB0_2
LBB0_3:
	cmpq	$0, 128(%r15)
	jne	LBB0_7
LBB0_4:
	cmpq	$0, 112(%r15)
	jne	LBB0_7
## %bb.5:
	cmpq	$0, 16(%r15)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
	cmpq	$0, 128(%r15)
	je	LBB0_4
LBB0_7:
	cmpq	$0, 8(%r15)
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_9:
	cmpq	$0, 80(%r15)
	je	LBB0_12
## %bb.10:
	cmpq	$0, 72(%r15)
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_12:
	movl	(%r15), %edi
	testl	%edi, %edi
	je	LBB0_13
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
	callq	_parse_time
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_16
## %bb.15:
	movl	(%r15), %edx
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_16
LBB0_13:
	xorl	%r14d, %r14d
LBB0_16:
	movq	136(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_25
## %bb.17:
	movq	$0, -56(%rbp)
	movq	_context@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	-56(%rbp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_hx509_certs_init
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	(%r12), %edi
	movq	136(%r15), %r8
	leaq	L_.str.6(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_19:
	movl	(%r12), %edi
	leaq	-72(%rbp), %rsi
	callq	_hx509_query_alloc
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.7(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_21:
	movq	-72(%rbp), %rdi
	movq	_HX509_QUERY_OPTION_PRIVATE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hx509_query_match_option
	cmpq	$0, 40(%r15)
	jne	LBB0_23
## %bb.22:
	movq	-72(%rbp), %rdi
	movq	_HX509_QUERY_OPTION_KU_KEYCERTSIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hx509_query_match_option
LBB0_23:
	movl	(%r12), %edi
	movq	-56(%rbp), %rsi
	movq	-72(%rbp), %rdx
	leaq	-112(%rbp), %rcx
	callq	_hx509_certs_find
	movl	%eax, %ebx
	movl	(%r12), %edi
	movq	-72(%rbp), %rsi
	callq	_hx509_query_free
	leaq	-56(%rbp), %rdi
	callq	_hx509_certs_free
	testl	%ebx, %ebx
	je	LBB0_33
## %bb.24:
	movl	(%r12), %edi
	leaq	L_.str.8(%rip), %rcx
	movl	$1, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_err
	jmp	LBB0_33
LBB0_25:
	cmpq	$0, 16(%r15)
	je	LBB0_31
## %bb.26:
	cmpq	$0, 112(%r15)
	jne	LBB0_29
## %bb.27:
	cmpq	$0, 128(%r15)
	jne	LBB0_29
## %bb.28:
	leaq	L_.str.9(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_29:
	cmpl	$0, 120(%r15)
	je	LBB0_33
## %bb.30:
	leaq	L_.str.10(%rip), %rsi
	jmp	LBB0_32
LBB0_31:
	leaq	L_.str.11(%rip), %rsi
LBB0_32:
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_33:
	movq	128(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_40
## %bb.34:
	leaq	-88(%rbp), %rsi
	callq	_read_private_key
	testl	%eax, %eax
	je	LBB0_36
## %bb.35:
	leaq	L_.str.12(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_36:
	movq	_context@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-88(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	callq	_hx509_private_key2SPKI
	testl	%eax, %eax
	je	LBB0_38
## %bb.37:
	leaq	L_.str.13(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_38:
	cmpq	$0, 16(%r15)
	je	LBB0_40
## %bb.39:
	movq	-88(%rbp), %rax
	movq	%rax, -64(%rbp)
LBB0_40:
	movl	120(%r15), %esi
	testl	%esi, %esi
	je	LBB0_48
## %bb.41:
	movq	_context@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	-56(%rbp), %rdx
	callq	__hx509_request_parse
	testl	%eax, %eax
	je	LBB0_43
## %bb.42:
	movl	(%rbx), %edi
	movl	120(%r15), %r8d
	leaq	L_.str.14(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_43:
	movl	(%rbx), %edi
	movl	-56(%rbp), %esi
	leaq	-80(%rbp), %rdx
	callq	_hx509_request_get_name
	testl	%eax, %eax
	je	LBB0_45
## %bb.44:
	movl	(%rbx), %edi
	leaq	L_.str.15(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_45:
	movl	(%rbx), %edi
	movl	-56(%rbp), %esi
	leaq	-96(%rbp), %rdx
	callq	_hx509_request_get_SubjectPublicKeyInfo
	testl	%eax, %eax
	je	LBB0_47
## %bb.46:
	movl	(%rbx), %edi
	leaq	L_.str.16(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_47:
	leaq	-56(%rbp), %rdi
	callq	_hx509_request_free
LBB0_48:
	cmpq	$0, 112(%r15)
	je	LBB0_61
## %bb.49:
	movq	_context@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_asn1_oid_id_pkcs1_rsaEncryption@GOTPCREL(%rip), %rsi
	leaq	-56(%rbp), %rdx
	callq	__hx509_generate_private_key_init
	testl	%eax, %eax
	je	LBB0_51
## %bb.50:
	movl	(%r12), %edi
	leaq	L_.str.17(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_51:
	cmpq	$0, 48(%r15)
	je	LBB0_53
## %bb.52:
	movl	(%r12), %edi
	movq	-56(%rbp), %rsi
	callq	__hx509_generate_private_key_is_ca
LBB0_53:
	movl	104(%r15), %edx
	testl	%edx, %edx
	je	LBB0_55
## %bb.54:
	movl	(%r12), %edi
	movq	-56(%rbp), %rsi
	callq	__hx509_generate_private_key_bits
LBB0_55:
	movl	(%r12), %edi
	movq	-56(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	callq	__hx509_generate_private_key
	movl	%eax, %ebx
	leaq	-56(%rbp), %rdi
	callq	__hx509_generate_private_key_free
	testl	%ebx, %ebx
	je	LBB0_57
## %bb.56:
	movl	(%r12), %edi
	leaq	L_.str.17(%rip), %rcx
	movl	$1, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_57:
	movl	(%r12), %edi
	movq	-64(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	callq	_hx509_private_key2SPKI
	testl	%eax, %eax
	je	LBB0_59
## %bb.58:
	leaq	L_.str.13(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_59:
	cmpq	$0, 16(%r15)
	je	LBB0_61
## %bb.60:
	movq	-64(%rbp), %rax
	movq	%rax, -88(%rbp)
LBB0_61:
	movq	96(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_64
## %bb.62:
	leaq	-64(%rbp), %rsi
	callq	_read_private_key
	testl	%eax, %eax
	je	LBB0_64
## %bb.63:
	leaq	L_.str.18(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_64:
	movq	88(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_69
## %bb.65:
	cmpq	$0, -80(%rbp)
	je	LBB0_67
## %bb.66:
	leaq	-80(%rbp), %rdi
	callq	_hx509_name_free
	movq	88(%r15), %rsi
LBB0_67:
	movq	_context@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	-80(%rbp), %rdx
	callq	_hx509_parse_name
	testl	%eax, %eax
	je	LBB0_69
## %bb.68:
	movl	(%rbx), %edi
	leaq	L_.str.19(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_69:
	movq	_context@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	-44(%rbp), %rsi
	callq	_hx509_ca_tbs_init
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_71
## %bb.70:
	movl	(%r13), %edi
	leaq	L_.str.20(%rip), %rcx
	movl	$1, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_71:
	movq	80(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_79
## %bb.72:
	movl	(%r13), %edi
	leaq	-72(%rbp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_hx509_certs_init
	testl	%eax, %eax
	je	LBB0_74
## %bb.73:
	movl	(%r13), %edi
	movq	80(%r15), %r8
	leaq	L_.str.6(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_74:
	movl	(%r13), %edi
	movq	-72(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_hx509_get_one_cert
	movl	%eax, %ebx
	leaq	-72(%rbp), %rdi
	callq	_hx509_certs_free
	testl	%ebx, %ebx
	je	LBB0_76
## %bb.75:
	movl	(%r13), %edi
	leaq	L_.str.21(%rip), %rcx
	movl	$1, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_76:
	movq	72(%r15), %rbx
	xorl	%eax, %eax
	callq	_hx509_ca_tbs_template_units
	leaq	L_.str.22(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_parse_units
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	movq	-56(%rbp), %rcx
	movl	%eax, %edx
	callq	_hx509_ca_tbs_set_template
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_78
## %bb.77:
	movl	(%r13), %edi
	leaq	L_.str.23(%rip), %rcx
	movl	$1, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_78:
	movq	-56(%rbp), %rdi
	callq	_hx509_cert_free
LBB0_79:
	movq	64(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_85
## %bb.80:
	leaq	-56(%rbp), %rsi
	callq	_der_parse_hex_heim_integer
	testl	%eax, %eax
	je	LBB0_82
## %bb.81:
	leaq	L_.str.24(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_82:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	leaq	-56(%rbp), %rdx
	callq	_hx509_ca_tbs_set_serialnumber
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_84
## %bb.83:
	movl	(%r13), %edi
	leaq	L_.str.20(%rip), %rcx
	movl	$1, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_84:
	leaq	-56(%rbp), %rdi
	callq	_der_free_heim_integer
LBB0_85:
	cmpq	$0, -96(%rbp)
	je	LBB0_89
## %bb.86:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	leaq	-96(%rbp), %rdx
	callq	_hx509_ca_tbs_set_spki
	testl	%eax, %eax
	je	LBB0_87
## %bb.88:
	movl	%eax, %ebx
	movl	(%r13), %edi
	leaq	L_.str.25(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
	jmp	LBB0_89
LBB0_87:
	xorl	%ebx, %ebx
LBB0_89:
	movq	-80(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_93
## %bb.90:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	callq	_hx509_ca_tbs_set_subject
	testl	%eax, %eax
	je	LBB0_91
## %bb.92:
	movl	%eax, %ebx
	movl	(%r13), %edi
	leaq	L_.str.26(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
	jmp	LBB0_93
LBB0_91:
	xorl	%ebx, %ebx
LBB0_93:
	movl	56(%r15), %edx
	testl	%edx, %edx
	je	LBB0_96
## %bb.94:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	callq	_hx509_ca_tbs_add_crl_dp_uri
	testl	%eax, %eax
	je	LBB0_96
## %bb.95:
	movl	%eax, %r12d
	movl	(%r13), %edi
	leaq	L_.str.27(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
	movl	%r12d, %ebx
LBB0_96:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	movq	%r15, %rdx
	callq	_eval_types
	cmpq	$0, 48(%r15)
	je	LBB0_100
## %bb.97:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	movl	32(%r15), %edx
	callq	_hx509_ca_tbs_set_ca
	testl	%eax, %eax
	je	LBB0_98
## %bb.99:
	movl	%eax, %ebx
	movl	(%r13), %edi
	leaq	L_.str.28(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_100:
	cmpq	$0, 40(%r15)
	je	LBB0_104
LBB0_101:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	movl	32(%r15), %edx
	callq	_hx509_ca_tbs_set_proxy
	testl	%eax, %eax
	je	LBB0_102
## %bb.103:
	movl	%eax, %ebx
	movl	(%r13), %edi
	leaq	L_.str.29(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
	jmp	LBB0_104
LBB0_98:
	xorl	%ebx, %ebx
	cmpq	$0, 40(%r15)
	jne	LBB0_101
	jmp	LBB0_104
LBB0_102:
	xorl	%ebx, %ebx
LBB0_104:
	cmpq	$0, 24(%r15)
	je	LBB0_107
## %bb.105:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	callq	_hx509_ca_tbs_set_domaincontroller
	testl	%ebx, %ebx
	je	LBB0_107
## %bb.106:
	movl	(%r13), %edi
	leaq	L_.str.30(%rip), %rcx
	movl	$1, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_107:
	testl	%r14d, %r14d
	je	LBB0_110
## %bb.108:
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	movl	%r14d, %edx
	callq	_hx509_ca_tbs_set_notAfter_lifetime
	testl	%eax, %eax
	je	LBB0_110
## %bb.109:
	movl	(%r13), %edi
	leaq	L_.str.31(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_110:
	cmpq	$0, 16(%r15)
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	je	LBB0_113
## %bb.111:
	movq	-88(%rbp), %rdx
	leaq	-104(%rbp), %rcx
	callq	_hx509_ca_sign_self
	testl	%eax, %eax
	je	LBB0_116
## %bb.112:
	movl	(%r13), %edi
	leaq	L_.str.32(%rip), %rcx
	jmp	LBB0_115
LBB0_113:
	movq	-112(%rbp), %rdx
	leaq	-104(%rbp), %rcx
	callq	_hx509_ca_sign
	testl	%eax, %eax
	je	LBB0_116
## %bb.114:
	movl	(%r13), %edi
	leaq	L_.str.33(%rip), %rcx
LBB0_115:
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_116:
	movq	-64(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_119
## %bb.117:
	movq	-104(%rbp), %rdi
	callq	__hx509_cert_assign_key
	testl	%eax, %eax
	je	LBB0_119
## %bb.118:
	movl	(%r13), %edi
	leaq	L_.str.34(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_119:
	movl	(%r13), %edi
	movq	8(%r15), %rsi
	movq	_HX509_CERTS_CREATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_hx509_certs_init
	testl	%eax, %eax
	je	LBB0_121
## %bb.120:
	movl	(%r13), %edi
	leaq	L_.str.35(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_121:
	movl	(%r13), %edi
	movq	-56(%rbp), %rsi
	movq	-104(%rbp), %rdx
	callq	_hx509_certs_add
	testl	%eax, %eax
	je	LBB0_123
## %bb.122:
	movl	(%r13), %edi
	leaq	L_.str.36(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_123:
	movl	(%r13), %edi
	movq	-56(%rbp), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_hx509_certs_store
	testl	%eax, %eax
	je	LBB0_125
## %bb.124:
	movl	(%r13), %edi
	leaq	L_.str.37(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_err
LBB0_125:
	leaq	-56(%rbp), %rdi
	callq	_hx509_certs_free
	cmpq	$0, -80(%rbp)
	je	LBB0_127
## %bb.126:
	leaq	-80(%rbp), %rdi
	callq	_hx509_name_free
LBB0_127:
	movq	-112(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_129
## %bb.128:
	callq	_hx509_cert_free
LBB0_129:
	movq	-104(%rbp), %rdi
	callq	_hx509_cert_free
	leaq	-96(%rbp), %rdi
	callq	_free_SubjectPublicKeyInfo
	movq	-88(%rbp), %rax
	cmpq	-64(%rbp), %rax
	je	LBB0_131
## %bb.130:
	leaq	-88(%rbp), %rdi
	callq	_hx509_private_key_free
LBB0_131:
	leaq	-64(%rbp), %rdi
	callq	_hx509_private_key_free
	leaq	-44(%rbp), %rdi
	callq	_hx509_ca_tbs_free
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"--ca-certificate argument missing (not using --self-signed)"

L_.str.1:                               ## @.str.1
	.asciz	"--ca-private-key argument missing (using --self-signed)"

L_.str.2:                               ## @.str.2
	.asciz	"--certificate argument missing"

L_.str.3:                               ## @.str.3
	.asciz	"--template-certificate not no --template-fields"

L_.str.4:                               ## @.str.4
	.asciz	"day"

L_.str.5:                               ## @.str.5
	.asciz	"Invalid lifetime: %s"

	.comm	_context,4,2                    ## @context
L_.str.6:                               ## @.str.6
	.asciz	"hx509_certs_init: %s"

L_.str.7:                               ## @.str.7
	.asciz	"hx509_query_alloc: %d"

	.comm	_HX509_QUERY_OPTION_PRIVATE_KEY,4,2 ## @HX509_QUERY_OPTION_PRIVATE_KEY
	.comm	_HX509_QUERY_OPTION_KU_KEYCERTSIGN,4,2 ## @HX509_QUERY_OPTION_KU_KEYCERTSIGN
L_.str.8:                               ## @.str.8
	.asciz	"no CA certificate found"

L_.str.9:                               ## @.str.9
	.asciz	"no signing private key"

L_.str.10:                              ## @.str.10
	.asciz	"can't be self-signing and have a request at the same time"

L_.str.11:                              ## @.str.11
	.asciz	"missing ca key"

L_.str.12:                              ## @.str.12
	.asciz	"read_private_key"

L_.str.13:                              ## @.str.13
	.asciz	"hx509_private_key2SPKI: %d\n"

L_.str.14:                              ## @.str.14
	.asciz	"parse_request: %s"

L_.str.15:                              ## @.str.15
	.asciz	"get name"

L_.str.16:                              ## @.str.16
	.asciz	"get spki"

	.comm	_asn1_oid_id_pkcs1_rsaEncryption,4,2 ## @asn1_oid_id_pkcs1_rsaEncryption
L_.str.17:                              ## @.str.17
	.asciz	"generate private key"

L_.str.18:                              ## @.str.18
	.asciz	"read_private_key for certificate"

L_.str.19:                              ## @.str.19
	.asciz	"hx509_parse_name"

L_.str.20:                              ## @.str.20
	.asciz	"hx509_ca_tbs_init"

L_.str.21:                              ## @.str.21
	.asciz	"no template certificate found"

L_.str.22:                              ## @.str.22
	.space	1

L_.str.23:                              ## @.str.23
	.asciz	"hx509_ca_tbs_set_template"

L_.str.24:                              ## @.str.24
	.asciz	"der_parse_hex_heim_integer"

L_.str.25:                              ## @.str.25
	.asciz	"hx509_ca_tbs_set_spki"

L_.str.26:                              ## @.str.26
	.asciz	"hx509_ca_tbs_set_subject"

L_.str.27:                              ## @.str.27
	.asciz	"hx509_ca_tbs_add_crl_dp_uri"

L_.str.28:                              ## @.str.28
	.asciz	"hx509_ca_tbs_set_ca"

L_.str.29:                              ## @.str.29
	.asciz	"hx509_ca_tbs_set_proxy"

L_.str.30:                              ## @.str.30
	.asciz	"hx509_ca_tbs_set_domaincontroller"

L_.str.31:                              ## @.str.31
	.asciz	"hx509_ca_tbs_set_notAfter_lifetime"

L_.str.32:                              ## @.str.32
	.asciz	"hx509_ca_sign_self"

L_.str.33:                              ## @.str.33
	.asciz	"hx509_ca_sign"

L_.str.34:                              ## @.str.34
	.asciz	"_hx509_cert_assign_key"

	.comm	_HX509_CERTS_CREATE,4,2         ## @HX509_CERTS_CREATE
L_.str.35:                              ## @.str.35
	.asciz	"hx509_certs_init"

L_.str.36:                              ## @.str.36
	.asciz	"hx509_certs_add"

L_.str.37:                              ## @.str.37
	.asciz	"hx509_certs_store"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hxtool_ca                      ; -- Begin function hxtool_ca
	.p2align	2
_hxtool_ca:                             ; @hxtool_ca
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	stur	xzr, [x29, #-48]
	stp	xzr, xzr, [sp, #48]
	stp	xzr, xzr, [sp, #32]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19, #136]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
LBB0_2:
	ldr	x8, [x19, #128]
	cbnz	x8, LBB0_7
LBB0_3:
	ldr	x8, [x19, #112]
	cbnz	x8, LBB0_7
; %bb.4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.5:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_3
LBB0_7:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_9
; %bb.8:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_9:
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_14
LBB0_11:
	ldr	w0, [x19]
	cbz	w0, LBB0_15
LBB0_12:
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_parse_time
	mov	x20, x0
	tbz	w0, #31, LBB0_16
; %bb.13:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_errx
	b	LBB0_16
LBB0_14:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	w0, [x19]
	cbnz	w0, LBB0_12
LBB0_15:
	mov	w20, #0
LBB0_16:
	ldr	x1, [x19, #136]
Lloh12:
	adrp	x22, _context@GOTPAGE
Lloh13:
	ldr	x22, [x22, _context@GOTPAGEOFF]
	cbz	x1, LBB0_25
; %bb.17:
	str	xzr, [sp, #16]
	ldr	w0, [x22]
	add	x4, sp, #16
	mov	w2, #0
	mov	x3, #0
	bl	_hx509_certs_init
	cbz	w0, LBB0_19
; %bb.18:
	mov	x2, x0
	ldr	w0, [x22]
	ldr	x8, [x19, #136]
	str	x8, [sp]
Lloh14:
	adrp	x3, l_.str.6@PAGE
Lloh15:
	add	x3, x3, l_.str.6@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_19:
	ldr	w0, [x22]
	add	x1, sp, #8
	bl	_hx509_query_alloc
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_21
; %bb.20:
	str	x0, [sp]
Lloh16:
	adrp	x1, l_.str.7@PAGE
Lloh17:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_21:
	ldr	x0, [sp, #8]
Lloh18:
	adrp	x8, _HX509_QUERY_OPTION_PRIVATE_KEY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HX509_QUERY_OPTION_PRIVATE_KEY@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_hx509_query_match_option
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_23
; %bb.22:
	ldr	x0, [sp, #8]
Lloh21:
	adrp	x8, _HX509_QUERY_OPTION_KU_KEYCERTSIGN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HX509_QUERY_OPTION_KU_KEYCERTSIGN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_hx509_query_match_option
LBB0_23:
	ldr	w0, [x22]
	ldp	x2, x1, [sp, #8]
	sub	x3, x29, #48
	bl	_hx509_certs_find
	mov	x21, x0
	ldr	w0, [x22]
	ldr	x1, [sp, #8]
	bl	_hx509_query_free
	add	x0, sp, #16
	bl	_hx509_certs_free
	cbz	w21, LBB0_33
; %bb.24:
	ldr	w0, [x22]
Lloh24:
	adrp	x3, l_.str.8@PAGE
Lloh25:
	add	x3, x3, l_.str.8@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
	b	LBB0_33
LBB0_25:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_31
; %bb.26:
	ldr	x8, [x19, #112]
	cbnz	x8, LBB0_29
; %bb.27:
	ldr	x8, [x19, #128]
	cbnz	x8, LBB0_29
; %bb.28:
Lloh26:
	adrp	x1, l_.str.9@PAGE
Lloh27:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_29:
	ldr	w8, [x19, #120]
	cbz	w8, LBB0_33
; %bb.30:
Lloh28:
	adrp	x1, l_.str.10@PAGE
Lloh29:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_32
LBB0_31:
Lloh30:
	adrp	x1, l_.str.11@PAGE
Lloh31:
	add	x1, x1, l_.str.11@PAGEOFF
LBB0_32:
	mov	w0, #1
	bl	_errx
LBB0_33:
	ldr	x0, [x19, #128]
	cbz	x0, LBB0_40
; %bb.34:
	add	x1, sp, #48
	bl	_read_private_key
	cbz	w0, LBB0_36
; %bb.35:
Lloh32:
	adrp	x1, l_.str.12@PAGE
Lloh33:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_36:
	ldr	w0, [x22]
	ldr	x1, [sp, #48]
	add	x2, sp, #24
	bl	_hx509_private_key2SPKI
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_38
; %bb.37:
	str	x0, [sp]
Lloh34:
	adrp	x1, l_.str.13@PAGE
Lloh35:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_38:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_40
; %bb.39:
	ldr	x8, [sp, #48]
	str	x8, [sp, #40]
LBB0_40:
	ldr	w1, [x19, #120]
	cbz	w1, LBB0_48
; %bb.41:
	ldr	w0, [x22]
	add	x2, sp, #16
	bl	__hx509_request_parse
	cbz	w0, LBB0_43
; %bb.42:
	mov	x2, x0
	ldr	w0, [x22]
	ldr	w8, [x19, #120]
	str	x8, [sp]
Lloh36:
	adrp	x3, l_.str.14@PAGE
Lloh37:
	add	x3, x3, l_.str.14@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_43:
	ldr	w0, [x22]
	ldr	w1, [sp, #16]
	add	x2, sp, #32
	bl	_hx509_request_get_name
	cbz	w0, LBB0_45
; %bb.44:
	mov	x2, x0
	ldr	w0, [x22]
Lloh38:
	adrp	x3, l_.str.15@PAGE
Lloh39:
	add	x3, x3, l_.str.15@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_45:
	ldr	w0, [x22]
	ldr	w1, [sp, #16]
	add	x2, sp, #24
	bl	_hx509_request_get_SubjectPublicKeyInfo
	cbz	w0, LBB0_47
; %bb.46:
	mov	x2, x0
	ldr	w0, [x22]
Lloh40:
	adrp	x3, l_.str.16@PAGE
Lloh41:
	add	x3, x3, l_.str.16@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_47:
	add	x0, sp, #16
	bl	_hx509_request_free
LBB0_48:
	ldr	x8, [x19, #112]
	cbz	x8, LBB0_61
; %bb.49:
	ldr	w0, [x22]
Lloh42:
	adrp	x1, _asn1_oid_id_pkcs1_rsaEncryption@GOTPAGE
Lloh43:
	ldr	x1, [x1, _asn1_oid_id_pkcs1_rsaEncryption@GOTPAGEOFF]
	add	x2, sp, #16
	bl	__hx509_generate_private_key_init
	cbz	w0, LBB0_51
; %bb.50:
	mov	x2, x0
	ldr	w0, [x22]
Lloh44:
	adrp	x3, l_.str.17@PAGE
Lloh45:
	add	x3, x3, l_.str.17@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_51:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_53
; %bb.52:
	ldr	w0, [x22]
	ldr	x1, [sp, #16]
	bl	__hx509_generate_private_key_is_ca
LBB0_53:
	ldr	w2, [x19, #104]
	cbz	w2, LBB0_55
; %bb.54:
	ldr	w0, [x22]
	ldr	x1, [sp, #16]
	bl	__hx509_generate_private_key_bits
LBB0_55:
	ldr	w0, [x22]
	ldr	x1, [sp, #16]
	add	x2, sp, #40
	bl	__hx509_generate_private_key
	mov	x21, x0
	add	x0, sp, #16
	bl	__hx509_generate_private_key_free
	cbz	w21, LBB0_57
; %bb.56:
	ldr	w0, [x22]
Lloh46:
	adrp	x3, l_.str.17@PAGE
Lloh47:
	add	x3, x3, l_.str.17@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_57:
	ldr	w0, [x22]
	ldr	x1, [sp, #40]
	add	x2, sp, #24
	bl	_hx509_private_key2SPKI
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_59
; %bb.58:
	str	x0, [sp]
Lloh48:
	adrp	x1, l_.str.13@PAGE
Lloh49:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_59:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_61
; %bb.60:
	ldr	x8, [sp, #40]
	str	x8, [sp, #48]
LBB0_61:
	ldr	x0, [x19, #96]
	cbz	x0, LBB0_64
; %bb.62:
	add	x1, sp, #40
	bl	_read_private_key
	cbz	w0, LBB0_64
; %bb.63:
Lloh50:
	adrp	x1, l_.str.18@PAGE
Lloh51:
	add	x1, x1, l_.str.18@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_64:
	ldr	x1, [x19, #88]
	cbz	x1, LBB0_69
; %bb.65:
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_67
; %bb.66:
	add	x0, sp, #32
	bl	_hx509_name_free
	ldr	x1, [x19, #88]
LBB0_67:
	ldr	w0, [x22]
	add	x2, sp, #32
	bl	_hx509_parse_name
	cbz	w0, LBB0_69
; %bb.68:
	mov	x2, x0
	ldr	w0, [x22]
Lloh52:
	adrp	x3, l_.str.19@PAGE
Lloh53:
	add	x3, x3, l_.str.19@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_69:
	ldr	w0, [x22]
	sub	x1, x29, #36
	bl	_hx509_ca_tbs_init
	mov	x21, x0
	cbz	w0, LBB0_71
; %bb.70:
	ldr	w0, [x22]
Lloh54:
	adrp	x3, l_.str.20@PAGE
Lloh55:
	add	x3, x3, l_.str.20@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_71:
	ldr	x1, [x19, #80]
	cbz	x1, LBB0_79
; %bb.72:
	ldr	w0, [x22]
	add	x4, sp, #8
	mov	w2, #0
	mov	x3, #0
	bl	_hx509_certs_init
	cbz	w0, LBB0_74
; %bb.73:
	mov	x2, x0
	ldr	w0, [x22]
	ldr	x8, [x19, #80]
	str	x8, [sp]
Lloh56:
	adrp	x3, l_.str.6@PAGE
Lloh57:
	add	x3, x3, l_.str.6@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_74:
	ldr	w0, [x22]
	ldr	x1, [sp, #8]
	add	x2, sp, #16
	bl	_hx509_get_one_cert
	mov	x21, x0
	add	x0, sp, #8
	bl	_hx509_certs_free
	cbz	w21, LBB0_76
; %bb.75:
	ldr	w0, [x22]
Lloh58:
	adrp	x3, l_.str.21@PAGE
Lloh59:
	add	x3, x3, l_.str.21@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_76:
	ldr	x21, [x19, #72]
	bl	_hx509_ca_tbs_template_units
	mov	x1, x0
Lloh60:
	adrp	x2, l_.str.22@PAGE
Lloh61:
	add	x2, x2, l_.str.22@PAGEOFF
	mov	x0, x21
	bl	_parse_units
	mov	x2, x0
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	ldr	x3, [sp, #16]
	bl	_hx509_ca_tbs_set_template
	mov	x21, x0
	cbz	w0, LBB0_78
; %bb.77:
	ldr	w0, [x22]
Lloh62:
	adrp	x3, l_.str.23@PAGE
Lloh63:
	add	x3, x3, l_.str.23@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_78:
	ldr	x0, [sp, #16]
	bl	_hx509_cert_free
LBB0_79:
	ldr	x0, [x19, #64]
	cbz	x0, LBB0_85
; %bb.80:
	add	x1, sp, #16
	bl	_der_parse_hex_heim_integer
	cbz	w0, LBB0_82
; %bb.81:
Lloh64:
	adrp	x1, l_.str.24@PAGE
Lloh65:
	add	x1, x1, l_.str.24@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_82:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	add	x2, sp, #16
	bl	_hx509_ca_tbs_set_serialnumber
	mov	x21, x0
	cbz	w0, LBB0_84
; %bb.83:
	ldr	w0, [x22]
Lloh66:
	adrp	x3, l_.str.20@PAGE
Lloh67:
	add	x3, x3, l_.str.20@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_84:
	add	x0, sp, #16
	bl	_der_free_heim_integer
LBB0_85:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_88
; %bb.86:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	add	x2, sp, #24
	bl	_hx509_ca_tbs_set_spki
	mov	x21, x0
	cbz	w0, LBB0_88
; %bb.87:
	ldr	w0, [x22]
Lloh68:
	adrp	x3, l_.str.25@PAGE
Lloh69:
	add	x3, x3, l_.str.25@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_88:
	ldr	x2, [sp, #32]
	cbz	x2, LBB0_91
; %bb.89:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	bl	_hx509_ca_tbs_set_subject
	mov	x21, x0
	cbz	w0, LBB0_91
; %bb.90:
	ldr	w0, [x22]
Lloh70:
	adrp	x3, l_.str.26@PAGE
Lloh71:
	add	x3, x3, l_.str.26@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_91:
	ldr	w2, [x19, #56]
	cbz	w2, LBB0_94
; %bb.92:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	mov	x3, #0
	bl	_hx509_ca_tbs_add_crl_dp_uri
	mov	x21, x0
	cbz	w0, LBB0_94
; %bb.93:
	ldr	w0, [x22]
Lloh72:
	adrp	x3, l_.str.27@PAGE
Lloh73:
	add	x3, x3, l_.str.27@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_94:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	mov	x2, x19
	bl	_eval_types
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_97
; %bb.95:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	ldr	w2, [x19, #32]
	bl	_hx509_ca_tbs_set_ca
	mov	x21, x0
	cbz	w0, LBB0_97
; %bb.96:
	ldr	w0, [x22]
Lloh74:
	adrp	x3, l_.str.28@PAGE
Lloh75:
	add	x3, x3, l_.str.28@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_97:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_100
; %bb.98:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	ldr	w2, [x19, #32]
	bl	_hx509_ca_tbs_set_proxy
	mov	x21, x0
	cbz	w0, LBB0_100
; %bb.99:
	ldr	w0, [x22]
Lloh76:
	adrp	x3, l_.str.29@PAGE
Lloh77:
	add	x3, x3, l_.str.29@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_100:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_103
; %bb.101:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	bl	_hx509_ca_tbs_set_domaincontroller
	cbz	w21, LBB0_103
; %bb.102:
	ldr	w0, [x22]
Lloh78:
	adrp	x3, l_.str.30@PAGE
Lloh79:
	add	x3, x3, l_.str.30@PAGEOFF
	mov	w1, #1
	mov	x2, x21
	bl	_hx509_err
LBB0_103:
	cbz	w20, LBB0_106
; %bb.104:
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	mov	x2, x20
	bl	_hx509_ca_tbs_set_notAfter_lifetime
	cbz	w0, LBB0_106
; %bb.105:
	mov	x2, x0
	ldr	w0, [x22]
Lloh80:
	adrp	x3, l_.str.31@PAGE
Lloh81:
	add	x3, x3, l_.str.31@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_106:
	ldr	x8, [x19, #16]
	ldr	w0, [x22]
	ldur	w1, [x29, #-36]
	cbz	x8, LBB0_109
; %bb.107:
	ldr	x2, [sp, #48]
	add	x3, sp, #56
	bl	_hx509_ca_sign_self
	cbz	w0, LBB0_112
; %bb.108:
	mov	x2, x0
	ldr	w0, [x22]
Lloh82:
	adrp	x3, l_.str.32@PAGE
Lloh83:
	add	x3, x3, l_.str.32@PAGEOFF
	b	LBB0_111
LBB0_109:
	ldur	x2, [x29, #-48]
	add	x3, sp, #56
	bl	_hx509_ca_sign
	cbz	w0, LBB0_112
; %bb.110:
	mov	x2, x0
	ldr	w0, [x22]
Lloh84:
	adrp	x3, l_.str.33@PAGE
Lloh85:
	add	x3, x3, l_.str.33@PAGEOFF
LBB0_111:
	mov	w1, #1
	bl	_hx509_err
LBB0_112:
	ldr	x1, [sp, #40]
	cbz	x1, LBB0_115
; %bb.113:
	ldr	x0, [sp, #56]
	bl	__hx509_cert_assign_key
	cbz	w0, LBB0_115
; %bb.114:
	mov	x2, x0
	ldr	w0, [x22]
Lloh86:
	adrp	x3, l_.str.34@PAGE
Lloh87:
	add	x3, x3, l_.str.34@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_115:
	ldr	w0, [x22]
	ldr	x1, [x19, #8]
Lloh88:
	adrp	x8, _HX509_CERTS_CREATE@GOTPAGE
Lloh89:
	ldr	x8, [x8, _HX509_CERTS_CREATE@GOTPAGEOFF]
Lloh90:
	ldr	w2, [x8]
	add	x4, sp, #16
	mov	x3, #0
	bl	_hx509_certs_init
	cbz	w0, LBB0_117
; %bb.116:
	mov	x2, x0
	ldr	w0, [x22]
Lloh91:
	adrp	x3, l_.str.35@PAGE
Lloh92:
	add	x3, x3, l_.str.35@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_117:
	ldr	w0, [x22]
	ldr	x1, [sp, #16]
	ldr	x2, [sp, #56]
	bl	_hx509_certs_add
	cbz	w0, LBB0_119
; %bb.118:
	mov	x2, x0
	ldr	w0, [x22]
Lloh93:
	adrp	x3, l_.str.36@PAGE
Lloh94:
	add	x3, x3, l_.str.36@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_119:
	ldr	w0, [x22]
	ldr	x1, [sp, #16]
	mov	w2, #0
	mov	x3, #0
	bl	_hx509_certs_store
	cbz	w0, LBB0_121
; %bb.120:
	mov	x2, x0
	ldr	w0, [x22]
Lloh95:
	adrp	x3, l_.str.37@PAGE
Lloh96:
	add	x3, x3, l_.str.37@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_121:
	add	x0, sp, #16
	bl	_hx509_certs_free
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_123
; %bb.122:
	add	x0, sp, #32
	bl	_hx509_name_free
LBB0_123:
	ldur	x0, [x29, #-48]
	cbz	x0, LBB0_125
; %bb.124:
	bl	_hx509_cert_free
LBB0_125:
	ldr	x0, [sp, #56]
	bl	_hx509_cert_free
	add	x0, sp, #24
	bl	_free_SubjectPublicKeyInfo
	ldp	x9, x8, [sp, #40]
	cmp	x8, x9
	b.eq	LBB0_127
; %bb.126:
	add	x0, sp, #48
	bl	_hx509_private_key_free
LBB0_127:
	add	x0, sp, #40
	bl	_hx509_private_key_free
	sub	x0, x29, #36
	bl	_hx509_ca_tbs_free
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpAdd	Lloh84, Lloh85
	.loh AdrpAdd	Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpAdd	Lloh91, Lloh92
	.loh AdrpAdd	Lloh93, Lloh94
	.loh AdrpAdd	Lloh95, Lloh96
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"--ca-certificate argument missing (not using --self-signed)"

l_.str.1:                               ; @.str.1
	.asciz	"--ca-private-key argument missing (using --self-signed)"

l_.str.2:                               ; @.str.2
	.asciz	"--certificate argument missing"

l_.str.3:                               ; @.str.3
	.asciz	"--template-certificate not no --template-fields"

l_.str.4:                               ; @.str.4
	.asciz	"day"

l_.str.5:                               ; @.str.5
	.asciz	"Invalid lifetime: %s"

	.comm	_context,4,2                    ; @context
l_.str.6:                               ; @.str.6
	.asciz	"hx509_certs_init: %s"

l_.str.7:                               ; @.str.7
	.asciz	"hx509_query_alloc: %d"

	.comm	_HX509_QUERY_OPTION_PRIVATE_KEY,4,2 ; @HX509_QUERY_OPTION_PRIVATE_KEY
	.comm	_HX509_QUERY_OPTION_KU_KEYCERTSIGN,4,2 ; @HX509_QUERY_OPTION_KU_KEYCERTSIGN
l_.str.8:                               ; @.str.8
	.asciz	"no CA certificate found"

l_.str.9:                               ; @.str.9
	.asciz	"no signing private key"

l_.str.10:                              ; @.str.10
	.asciz	"can't be self-signing and have a request at the same time"

l_.str.11:                              ; @.str.11
	.asciz	"missing ca key"

l_.str.12:                              ; @.str.12
	.asciz	"read_private_key"

l_.str.13:                              ; @.str.13
	.asciz	"hx509_private_key2SPKI: %d\n"

l_.str.14:                              ; @.str.14
	.asciz	"parse_request: %s"

l_.str.15:                              ; @.str.15
	.asciz	"get name"

l_.str.16:                              ; @.str.16
	.asciz	"get spki"

	.comm	_asn1_oid_id_pkcs1_rsaEncryption,4,2 ; @asn1_oid_id_pkcs1_rsaEncryption
l_.str.17:                              ; @.str.17
	.asciz	"generate private key"

l_.str.18:                              ; @.str.18
	.asciz	"read_private_key for certificate"

l_.str.19:                              ; @.str.19
	.asciz	"hx509_parse_name"

l_.str.20:                              ; @.str.20
	.asciz	"hx509_ca_tbs_init"

l_.str.21:                              ; @.str.21
	.asciz	"no template certificate found"

l_.str.22:                              ; @.str.22
	.space	1

l_.str.23:                              ; @.str.23
	.asciz	"hx509_ca_tbs_set_template"

l_.str.24:                              ; @.str.24
	.asciz	"der_parse_hex_heim_integer"

l_.str.25:                              ; @.str.25
	.asciz	"hx509_ca_tbs_set_spki"

l_.str.26:                              ; @.str.26
	.asciz	"hx509_ca_tbs_set_subject"

l_.str.27:                              ; @.str.27
	.asciz	"hx509_ca_tbs_add_crl_dp_uri"

l_.str.28:                              ; @.str.28
	.asciz	"hx509_ca_tbs_set_ca"

l_.str.29:                              ; @.str.29
	.asciz	"hx509_ca_tbs_set_proxy"

l_.str.30:                              ; @.str.30
	.asciz	"hx509_ca_tbs_set_domaincontroller"

l_.str.31:                              ; @.str.31
	.asciz	"hx509_ca_tbs_set_notAfter_lifetime"

l_.str.32:                              ; @.str.32
	.asciz	"hx509_ca_sign_self"

l_.str.33:                              ; @.str.33
	.asciz	"hx509_ca_sign"

l_.str.34:                              ; @.str.34
	.asciz	"_hx509_cert_assign_key"

	.comm	_HX509_CERTS_CREATE,4,2         ; @HX509_CERTS_CREATE
l_.str.35:                              ; @.str.35
	.asciz	"hx509_certs_init"

l_.str.36:                              ; @.str.36
	.asciz	"hx509_certs_add"

l_.str.37:                              ; @.str.37
	.asciz	"hx509_certs_store"

.subsections_via_symbols
