gl_linkedhash_list.c:gl_linked_nx_create_empty:
   45|      2|{
   46|      2|  struct gl_list_impl *list =
   47|      2|    (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
   48|       |
   49|      2|  if (list == NULL)
  ------------------
  |  Branch (49:7): [True: 0, False: 2]
  ------------------
   50|      0|    return NULL;
   51|       |
   52|      2|  list->base.vtable = implementation;
   53|      2|  list->base.equals_fn = equals_fn;
   54|      2|  list->base.hashcode_fn = hashcode_fn;
   55|      2|  list->base.dispose_fn = dispose_fn;
   56|      2|  list->base.allow_duplicates = allow_duplicates;
   57|      2|#if WITH_HASHTABLE
   58|      2|  list->table_size = 11;
   59|      2|  list->table =
   60|      2|    (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t));
   61|      2|  if (list->table == NULL)
  ------------------
  |  Branch (61:7): [True: 0, False: 2]
  ------------------
   62|      0|    goto fail;
   63|      2|#endif
   64|      2|  list->root.next = &list->root;
   65|      2|  list->root.prev = &list->root;
   66|      2|  list->count = 0;
   67|       |
   68|      2|  return list;
   69|       |
   70|      0|#if WITH_HASHTABLE
   71|      0| fail:
   72|      0|  free (list);
   73|      0|  return NULL;
   74|      2|#endif
   75|      2|}

gl_list_nx_create_empty:
  607|      2|{
  608|      2|  return implementation->nx_create_empty (implementation, equals_fn,
  609|      2|                                          hashcode_fn, dispose_fn,
  610|      2|                                          allow_duplicates);
  611|      2|}

_gnutls_register_accel_crypto:
   33|      2|{
   34|      2|#if defined(ASM_X86)
   35|      2|	register_x86_crypto();
   36|      2|#endif
   37|       |
   38|       |#if defined(ASM_AARCH64)
   39|       |	register_aarch64_crypto();
   40|       |#endif
   41|       |
   42|      2|	return;
   43|      2|}

_gnutls_afalg_init:
  858|      2|{
  859|      2|	return 0;
  860|      2|}

_gnutls_cryptodev_init:
  500|      2|{
  501|      2|	return 0;
  502|      2|}

register_x86_crypto:
 1086|      2|{
 1087|      2|	unsigned capabilities = 0;
 1088|      2|	char *p;
 1089|      2|	p = secure_getenv("GNUTLS_CPUID_OVERRIDE");
 1090|      2|	if (p) {
  ------------------
  |  Branch (1090:6): [True: 0, False: 2]
  ------------------
 1091|      0|		capabilities = strtol(p, NULL, 0);
 1092|      0|	}
 1093|       |
 1094|      2|	register_x86_intel_crypto(capabilities);
 1095|      2|#ifdef ENABLE_PADLOCK
 1096|      2|	register_x86_padlock_crypto(capabilities);
 1097|      2|#endif
 1098|      2|}
x86-common.c:register_x86_intel_crypto:
  806|      2|{
  807|      2|	int ret;
  808|      2|	enum x86_cpu_vendor vendor;
  809|       |
  810|      2|	memset(GNUTLS_x86_cpuid_s, 0, sizeof(GNUTLS_x86_cpuid_s));
  811|       |
  812|      2|	vendor = check_x86_cpu_vendor();
  813|      2|	if (vendor == X86_CPU_VENDOR_OTHER) {
  ------------------
  |  Branch (813:6): [True: 0, False: 2]
  ------------------
  814|      0|		return;
  815|      0|	}
  816|       |
  817|      2|	if (capabilities == 0) {
  ------------------
  |  Branch (817:6): [True: 2, False: 0]
  ------------------
  818|      2|		if (!read_cpuid_vals(GNUTLS_x86_cpuid_s))
  ------------------
  |  Branch (818:7): [True: 0, False: 2]
  ------------------
  819|      0|			return;
  820|      2|		if (!check_4th_gen_intel_features(GNUTLS_x86_cpuid_s[1])) {
  ------------------
  |  Branch (820:7): [True: 0, False: 2]
  ------------------
  821|      0|			GNUTLS_x86_cpuid_s[1] &= ~bit_AVX;
  822|       |
  823|       |			/* Clear AVX2 bits as well, according to what
  824|       |			 * OpenSSL does.  Should we clear
  825|       |			 * bit_AVX512DQ, bit_AVX512PF, bit_AVX512ER,
  826|       |			 * and bit_AVX512CD? */
  827|      0|			GNUTLS_x86_cpuid_s[2] &=
  828|      0|				~(bit_AVX2 | bit_AVX512F | bit_AVX512IFMA |
  829|      0|				  bit_AVX512BW | bit_AVX512BW);
  830|      0|		}
  831|      2|	} else {
  832|      0|		capabilities_to_intel_cpuid(capabilities);
  833|      0|	}
  834|       |
  835|       |	/* CRYPTOGAMS uses the (1 << 30) bit as an indicator of Intel CPUs */
  836|      2|	if (vendor == X86_CPU_VENDOR_INTEL) {
  ------------------
  |  Branch (836:6): [True: 2, False: 0]
  ------------------
  837|      2|		GNUTLS_x86_cpuid_s[0] |= 1 << 30;
  838|      2|	} else {
  839|      0|		GNUTLS_x86_cpuid_s[0] &= ~(1 << 30);
  840|      0|	}
  841|       |
  842|      2|	if (check_ssse3()) {
  ------------------
  |  Branch (842:6): [True: 2, False: 0]
  ------------------
  843|      2|		_gnutls_debug_log("Intel SSSE3 was detected\n");
  ------------------
  |  |  149|      2|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      2|	do {                                          \
  |  |  |  |  145|      2|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      2|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      2|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      2|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  844|       |
  845|      2|		ret = gnutls_crypto_single_cipher_register(
  846|      2|			GNUTLS_CIPHER_AES_128_GCM, 90,
  847|      2|			&_gnutls_aes_gcm_x86_ssse3, 0);
  848|      2|		if (ret < 0) {
  ------------------
  |  Branch (848:7): [True: 0, False: 2]
  ------------------
  849|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  850|      0|		}
  851|       |
  852|      2|		ret = gnutls_crypto_single_cipher_register(
  853|      2|			GNUTLS_CIPHER_AES_192_GCM, 90,
  854|      2|			&_gnutls_aes_gcm_x86_ssse3, 0);
  855|      2|		if (ret < 0) {
  ------------------
  |  Branch (855:7): [True: 0, False: 2]
  ------------------
  856|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|      0|		}
  858|       |
  859|      2|		ret = gnutls_crypto_single_cipher_register(
  860|      2|			GNUTLS_CIPHER_AES_256_GCM, 90,
  861|      2|			&_gnutls_aes_gcm_x86_ssse3, 0);
  862|      2|		if (ret < 0) {
  ------------------
  |  Branch (862:7): [True: 0, False: 2]
  ------------------
  863|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  864|      0|		}
  865|       |
  866|      2|		ret = gnutls_crypto_single_cipher_register(
  867|      2|			GNUTLS_CIPHER_AES_128_CBC, 90, &_gnutls_aes_ssse3, 0);
  868|      2|		if (ret < 0) {
  ------------------
  |  Branch (868:7): [True: 0, False: 2]
  ------------------
  869|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  870|      0|		}
  871|       |
  872|      2|		ret = gnutls_crypto_single_cipher_register(
  873|      2|			GNUTLS_CIPHER_AES_192_CBC, 90, &_gnutls_aes_ssse3, 0);
  874|      2|		if (ret < 0) {
  ------------------
  |  Branch (874:7): [True: 0, False: 2]
  ------------------
  875|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  876|      0|		}
  877|       |
  878|      2|		ret = gnutls_crypto_single_cipher_register(
  879|      2|			GNUTLS_CIPHER_AES_256_CBC, 90, &_gnutls_aes_ssse3, 0);
  880|      2|		if (ret < 0) {
  ------------------
  |  Branch (880:7): [True: 0, False: 2]
  ------------------
  881|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  882|      0|		}
  883|      2|	}
  884|       |
  885|      2|	if (check_sha() || check_ssse3()) {
  ------------------
  |  Branch (885:6): [True: 0, False: 2]
  |  Branch (885:21): [True: 2, False: 0]
  ------------------
  886|      2|		if (check_sha())
  ------------------
  |  Branch (886:7): [True: 0, False: 2]
  ------------------
  887|      2|			_gnutls_debug_log("Intel SHA was detected\n");
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  888|       |
  889|      2|		ret = gnutls_crypto_single_digest_register(
  890|      2|			GNUTLS_DIG_SHA1, 80, &_gnutls_sha_x86_ssse3, 0);
  891|      2|		if (ret < 0) {
  ------------------
  |  Branch (891:7): [True: 0, False: 2]
  ------------------
  892|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  893|      0|		}
  894|       |
  895|      2|		ret = gnutls_crypto_single_digest_register(
  896|      2|			GNUTLS_DIG_SHA224, 80, &_gnutls_sha_x86_ssse3, 0);
  897|      2|		if (ret < 0) {
  ------------------
  |  Branch (897:7): [True: 0, False: 2]
  ------------------
  898|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  899|      0|		}
  900|       |
  901|      2|		ret = gnutls_crypto_single_digest_register(
  902|      2|			GNUTLS_DIG_SHA256, 80, &_gnutls_sha_x86_ssse3, 0);
  903|      2|		if (ret < 0) {
  ------------------
  |  Branch (903:7): [True: 0, False: 2]
  ------------------
  904|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  905|      0|		}
  906|       |
  907|      2|		ret = gnutls_crypto_single_mac_register(
  908|      2|			GNUTLS_MAC_SHA1, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  909|      2|		if (ret < 0)
  ------------------
  |  Branch (909:7): [True: 0, False: 2]
  ------------------
  910|      2|			gnutls_assert();
  ------------------
  |  |   34|      2|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  911|       |
  912|      2|		ret = gnutls_crypto_single_mac_register(
  913|      2|			GNUTLS_MAC_SHA224, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  914|      2|		if (ret < 0)
  ------------------
  |  Branch (914:7): [True: 0, False: 2]
  ------------------
  915|      2|			gnutls_assert();
  ------------------
  |  |   34|      2|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  916|       |
  917|      2|		ret = gnutls_crypto_single_mac_register(
  918|      2|			GNUTLS_MAC_SHA256, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  919|      2|		if (ret < 0)
  ------------------
  |  Branch (919:7): [True: 0, False: 2]
  ------------------
  920|      2|			gnutls_assert();
  ------------------
  |  |   34|      2|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  921|       |
  922|      2|		ret = gnutls_crypto_single_digest_register(
  923|      2|			GNUTLS_DIG_SHA384, 80, &_gnutls_sha_x86_ssse3, 0);
  924|      2|		if (ret < 0)
  ------------------
  |  Branch (924:7): [True: 0, False: 2]
  ------------------
  925|      2|			gnutls_assert();
  ------------------
  |  |   34|      2|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  926|       |
  927|      2|		ret = gnutls_crypto_single_digest_register(
  928|      2|			GNUTLS_DIG_SHA512, 80, &_gnutls_sha_x86_ssse3, 0);
  929|      2|		if (ret < 0)
  ------------------
  |  Branch (929:7): [True: 0, False: 2]
  ------------------
  930|      2|			gnutls_assert();
  ------------------
  |  |   34|      2|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  931|      2|		ret = gnutls_crypto_single_mac_register(
  932|      2|			GNUTLS_MAC_SHA384, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  933|      2|		if (ret < 0)
  ------------------
  |  Branch (933:7): [True: 0, False: 2]
  ------------------
  934|      2|			gnutls_assert();
  ------------------
  |  |   34|      2|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  935|       |
  936|      2|		ret = gnutls_crypto_single_mac_register(
  937|      2|			GNUTLS_MAC_SHA512, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  938|      2|		if (ret < 0)
  ------------------
  |  Branch (938:7): [True: 0, False: 2]
  ------------------
  939|      2|			gnutls_assert();
  ------------------
  |  |   34|      2|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|      2|	}
  941|       |
  942|      2|	if (check_optimized_aes()) {
  ------------------
  |  Branch (942:6): [True: 2, False: 0]
  ------------------
  943|      2|		_gnutls_debug_log("Intel AES accelerator was detected\n");
  ------------------
  |  |  149|      2|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      2|	do {                                          \
  |  |  |  |  145|      2|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      2|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      2|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      2|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  944|      2|		ret = gnutls_crypto_single_cipher_register(
  945|      2|			GNUTLS_CIPHER_AES_128_CBC, 80, &_gnutls_aesni_x86, 0);
  946|      2|		if (ret < 0) {
  ------------------
  |  Branch (946:7): [True: 0, False: 2]
  ------------------
  947|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  948|      0|		}
  949|       |
  950|      2|		ret = gnutls_crypto_single_cipher_register(
  951|      2|			GNUTLS_CIPHER_AES_192_CBC, 80, &_gnutls_aesni_x86, 0);
  952|      2|		if (ret < 0) {
  ------------------
  |  Branch (952:7): [True: 0, False: 2]
  ------------------
  953|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  954|      0|		}
  955|       |
  956|      2|		ret = gnutls_crypto_single_cipher_register(
  957|      2|			GNUTLS_CIPHER_AES_256_CBC, 80, &_gnutls_aesni_x86, 0);
  958|      2|		if (ret < 0) {
  ------------------
  |  Branch (958:7): [True: 0, False: 2]
  ------------------
  959|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  960|      0|		}
  961|       |
  962|      2|		ret = gnutls_crypto_single_cipher_register(
  963|      2|			GNUTLS_CIPHER_AES_128_CCM, 80,
  964|      2|			&_gnutls_aes_ccm_x86_aesni, 0);
  965|      2|		if (ret < 0) {
  ------------------
  |  Branch (965:7): [True: 0, False: 2]
  ------------------
  966|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  967|      0|		}
  968|       |
  969|      2|		ret = gnutls_crypto_single_cipher_register(
  970|      2|			GNUTLS_CIPHER_AES_256_CCM, 80,
  971|      2|			&_gnutls_aes_ccm_x86_aesni, 0);
  972|      2|		if (ret < 0) {
  ------------------
  |  Branch (972:7): [True: 0, False: 2]
  ------------------
  973|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  974|      0|		}
  975|       |
  976|      2|		ret = gnutls_crypto_single_cipher_register(
  977|      2|			GNUTLS_CIPHER_AES_128_CCM_8, 80,
  978|      2|			&_gnutls_aes_ccm_x86_aesni, 0);
  979|      2|		if (ret < 0) {
  ------------------
  |  Branch (979:7): [True: 0, False: 2]
  ------------------
  980|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  981|      0|		}
  982|       |
  983|      2|		ret = gnutls_crypto_single_cipher_register(
  984|      2|			GNUTLS_CIPHER_AES_256_CCM_8, 80,
  985|      2|			&_gnutls_aes_ccm_x86_aesni, 0);
  986|      2|		if (ret < 0) {
  ------------------
  |  Branch (986:7): [True: 0, False: 2]
  ------------------
  987|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  988|      0|		}
  989|       |
  990|      2|		ret = gnutls_crypto_single_cipher_register(
  991|      2|			GNUTLS_CIPHER_AES_128_XTS, 80,
  992|      2|			&_gnutls_aes_xts_x86_aesni, 0);
  993|      2|		if (ret < 0) {
  ------------------
  |  Branch (993:7): [True: 0, False: 2]
  ------------------
  994|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  995|      0|		}
  996|       |
  997|      2|		ret = gnutls_crypto_single_cipher_register(
  998|      2|			GNUTLS_CIPHER_AES_256_XTS, 80,
  999|      2|			&_gnutls_aes_xts_x86_aesni, 0);
 1000|      2|		if (ret < 0) {
  ------------------
  |  Branch (1000:7): [True: 0, False: 2]
  ------------------
 1001|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1002|      0|		}
 1003|       |
 1004|      2|#ifdef ASM_X86_64
 1005|      2|		if (check_pclmul()) {
  ------------------
  |  Branch (1005:7): [True: 2, False: 0]
  ------------------
 1006|       |			/* register GCM ciphers */
 1007|      2|			if (check_avx_movbe()) {
  ------------------
  |  Branch (1007:8): [True: 2, False: 0]
  ------------------
 1008|      2|				_gnutls_debug_log(
  ------------------
  |  |  149|      2|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      2|	do {                                          \
  |  |  |  |  145|      2|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      2|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      2|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      2|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1009|      2|					"Intel GCM accelerator (AVX) was detected\n");
 1010|      2|				ret = gnutls_crypto_single_cipher_register(
 1011|      2|					GNUTLS_CIPHER_AES_128_GCM, 80,
 1012|      2|					&_gnutls_aes_gcm_pclmul_avx, 0);
 1013|      2|				if (ret < 0) {
  ------------------
  |  Branch (1013:9): [True: 0, False: 2]
  ------------------
 1014|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1015|      0|				}
 1016|       |
 1017|      2|				ret = gnutls_crypto_single_cipher_register(
 1018|      2|					GNUTLS_CIPHER_AES_192_GCM, 80,
 1019|      2|					&_gnutls_aes_gcm_pclmul_avx, 0);
 1020|      2|				if (ret < 0) {
  ------------------
  |  Branch (1020:9): [True: 0, False: 2]
  ------------------
 1021|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1022|      0|				}
 1023|       |
 1024|      2|				ret = gnutls_crypto_single_cipher_register(
 1025|      2|					GNUTLS_CIPHER_AES_256_GCM, 80,
 1026|      2|					&_gnutls_aes_gcm_pclmul_avx, 0);
 1027|      2|				if (ret < 0) {
  ------------------
  |  Branch (1027:9): [True: 0, False: 2]
  ------------------
 1028|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1029|      0|				}
 1030|      2|			} else {
 1031|      0|				_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|      0|					"Intel GCM accelerator was detected\n");
 1033|      0|				ret = gnutls_crypto_single_cipher_register(
 1034|      0|					GNUTLS_CIPHER_AES_128_GCM, 80,
 1035|      0|					&_gnutls_aes_gcm_pclmul, 0);
 1036|      0|				if (ret < 0) {
  ------------------
  |  Branch (1036:9): [True: 0, False: 0]
  ------------------
 1037|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1038|      0|				}
 1039|       |
 1040|      0|				ret = gnutls_crypto_single_cipher_register(
 1041|      0|					GNUTLS_CIPHER_AES_192_GCM, 80,
 1042|      0|					&_gnutls_aes_gcm_pclmul, 0);
 1043|      0|				if (ret < 0) {
  ------------------
  |  Branch (1043:9): [True: 0, False: 0]
  ------------------
 1044|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1045|      0|				}
 1046|       |
 1047|      0|				ret = gnutls_crypto_single_cipher_register(
 1048|      0|					GNUTLS_CIPHER_AES_256_GCM, 80,
 1049|      0|					&_gnutls_aes_gcm_pclmul, 0);
 1050|      0|				if (ret < 0) {
  ------------------
  |  Branch (1050:9): [True: 0, False: 0]
  ------------------
 1051|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1052|      0|				}
 1053|      0|			}
 1054|      2|		} else
 1055|      0|#endif
 1056|      0|		{
 1057|      0|			ret = gnutls_crypto_single_cipher_register(
 1058|      0|				GNUTLS_CIPHER_AES_128_GCM, 80,
 1059|      0|				&_gnutls_aes_gcm_x86_aesni, 0);
 1060|      0|			if (ret < 0) {
  ------------------
  |  Branch (1060:8): [True: 0, False: 0]
  ------------------
 1061|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1062|      0|			}
 1063|       |
 1064|      0|			ret = gnutls_crypto_single_cipher_register(
 1065|      0|				GNUTLS_CIPHER_AES_192_GCM, 80,
 1066|      0|				&_gnutls_aes_gcm_x86_aesni, 0);
 1067|      0|			if (ret < 0) {
  ------------------
  |  Branch (1067:8): [True: 0, False: 0]
  ------------------
 1068|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1069|      0|			}
 1070|       |
 1071|      0|			ret = gnutls_crypto_single_cipher_register(
 1072|      0|				GNUTLS_CIPHER_AES_256_GCM, 80,
 1073|      0|				&_gnutls_aes_gcm_x86_aesni, 0);
 1074|      0|			if (ret < 0) {
  ------------------
  |  Branch (1074:8): [True: 0, False: 0]
  ------------------
 1075|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1076|      0|			}
 1077|      0|		}
 1078|      2|	} else {
 1079|      0|		_gnutls_priority_update_non_aesni();
 1080|      0|	}
 1081|       |
 1082|      2|	return;
 1083|      2|}
x86-common.c:check_x86_cpu_vendor:
  785|      2|{
  786|      2|	unsigned int a, b, c, d;
  787|       |
  788|      2|	if (!__get_cpuid(0, &a, &b, &c, &d)) {
  ------------------
  |  Branch (788:6): [True: 0, False: 2]
  ------------------
  789|      0|		return X86_CPU_VENDOR_OTHER;
  790|      0|	}
  791|       |
  792|      2|	if (memcmp(&b, "Genu", 4) == 0 && memcmp(&d, "ineI", 4) == 0 &&
  ------------------
  |  Branch (792:6): [True: 2, False: 0]
  |  Branch (792:36): [True: 2, False: 0]
  ------------------
  793|      2|	    memcmp(&c, "ntel", 4) == 0) {
  ------------------
  |  Branch (793:6): [True: 2, False: 0]
  ------------------
  794|      2|		return X86_CPU_VENDOR_INTEL;
  795|      2|	}
  796|       |
  797|      0|	if (memcmp(&b, "Auth", 4) == 0 && memcmp(&d, "enti", 4) == 0 &&
  ------------------
  |  Branch (797:6): [True: 0, False: 0]
  |  Branch (797:36): [True: 0, False: 0]
  ------------------
  798|      0|	    memcmp(&c, "cAMD", 4) == 0) {
  ------------------
  |  Branch (798:6): [True: 0, False: 0]
  ------------------
  799|      0|		return X86_CPU_VENDOR_AMD;
  800|      0|	}
  801|       |
  802|      0|	return X86_CPU_VENDOR_OTHER;
  803|      0|}
x86-common.c:read_cpuid_vals:
  144|      2|{
  145|      2|	unsigned t1, t2, t3;
  146|      2|	vals[0] = vals[1] = vals[2] = vals[3] = 0;
  147|       |
  148|      2|	if (!__get_cpuid(1, &t1, &t2, &vals[1], &vals[0]))
  ------------------
  |  Branch (148:6): [True: 0, False: 2]
  ------------------
  149|      0|		return 0;
  150|       |	/* suppress AVX512; it works conditionally on certain CPUs on the original code */
  151|      2|	vals[1] &= 0xfffff7ff;
  152|       |
  153|      2|	get_cpuid_level7(&t1, &vals[2], &t2, &t3);
  ------------------
  |  |  140|      2|#define get_cpuid_level7(a, b, c, d) __get_cpuid_count(7, 0, a, b, c, d)
  ------------------
  154|       |
  155|      2|	return 1;
  156|      2|}
x86-common.c:check_4th_gen_intel_features:
  163|      2|{
  164|      2|	uint32_t xcr0;
  165|       |
  166|      2|	if ((ecx & bit_OSXSAVE) != bit_OSXSAVE)
  ------------------
  |  Branch (166:6): [True: 0, False: 2]
  ------------------
  167|      0|		return 0;
  168|       |
  169|       |#if defined(_MSC_VER) && !defined(__clang__)
  170|       |	xcr0 = _xgetbv(0);
  171|       |#else
  172|      2|	__asm__("xgetbv" : "=a"(xcr0) : "c"(0) : "%edx");
  173|      2|#endif
  174|       |	/* Check if xmm and ymm state are enabled in XCR0. */
  175|      2|	return (xcr0 & 6) == 6;
  176|      2|}
x86-common.c:check_ssse3:
  242|      4|{
  243|      4|	return (GNUTLS_x86_cpuid_s[1] & bit_SSSE3);
  244|      4|}
x86-common.c:check_sha:
  247|      4|{
  248|      4|	return (GNUTLS_x86_cpuid_s[2] & bit_SHA);
  249|      4|}
x86-common.c:check_optimized_aes:
  237|      2|{
  238|      2|	return (GNUTLS_x86_cpuid_s[1] & bit_AES);
  239|      2|}
x86-common.c:check_pclmul:
  259|      2|{
  260|      2|	return (GNUTLS_x86_cpuid_s[1] & bit_PCLMUL);
  261|      2|}
x86-common.c:check_avx_movbe:
  253|      2|{
  254|      2|	return (GNUTLS_x86_cpuid_s[1] & (bit_AVX | bit_MOVBE)) ==
  255|      2|	       (bit_AVX | bit_MOVBE);
  256|      2|}
x86-common.c:register_x86_padlock_crypto:
  379|      2|{
  380|      2|	int ret, phe;
  381|      2|	unsigned edx;
  382|       |
  383|      2|	if (check_zhaoxin() == 0)
  ------------------
  |  Branch (383:6): [True: 2, False: 0]
  ------------------
  384|      2|		return;
  385|       |
  386|      0|	memset(GNUTLS_x86_cpuid_s, 0, sizeof(GNUTLS_x86_cpuid_s));
  387|       |
  388|      0|	if (capabilities == 0) {
  ------------------
  |  Branch (388:6): [True: 0, False: 0]
  ------------------
  389|      0|		if (!read_cpuid_vals(GNUTLS_x86_cpuid_s))
  ------------------
  |  Branch (389:7): [True: 0, False: 0]
  ------------------
  390|      0|			return;
  391|      0|		edx = padlock_capability();
  392|      0|	} else {
  393|      0|		capabilities_to_intel_cpuid(capabilities);
  394|      0|		edx = capabilities_to_zhaoxin_edx(capabilities);
  395|      0|	}
  396|       |
  397|      0|	if (check_ssse3()) {
  ------------------
  |  Branch (397:6): [True: 0, False: 0]
  ------------------
  398|      0|		_gnutls_debug_log("Zhaoxin SSSE3 was detected\n");
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|       |
  400|      0|		ret = gnutls_crypto_single_cipher_register(
  401|      0|			GNUTLS_CIPHER_AES_128_GCM, 90,
  402|      0|			&_gnutls_aes_gcm_x86_ssse3, 0);
  403|      0|		if (ret < 0) {
  ------------------
  |  Branch (403:7): [True: 0, False: 0]
  ------------------
  404|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  405|      0|		}
  406|       |
  407|      0|		ret = gnutls_crypto_single_cipher_register(
  408|      0|			GNUTLS_CIPHER_AES_192_GCM, 90,
  409|      0|			&_gnutls_aes_gcm_x86_ssse3, 0);
  410|      0|		if (ret < 0) {
  ------------------
  |  Branch (410:7): [True: 0, False: 0]
  ------------------
  411|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|      0|		}
  413|       |
  414|      0|		ret = gnutls_crypto_single_cipher_register(
  415|      0|			GNUTLS_CIPHER_AES_256_GCM, 90,
  416|      0|			&_gnutls_aes_gcm_x86_ssse3, 0);
  417|      0|		if (ret < 0) {
  ------------------
  |  Branch (417:7): [True: 0, False: 0]
  ------------------
  418|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  419|      0|		}
  420|       |
  421|      0|		ret = gnutls_crypto_single_cipher_register(
  422|      0|			GNUTLS_CIPHER_AES_128_CBC, 90, &_gnutls_aes_ssse3, 0);
  423|      0|		if (ret < 0) {
  ------------------
  |  Branch (423:7): [True: 0, False: 0]
  ------------------
  424|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  425|      0|		}
  426|       |
  427|      0|		ret = gnutls_crypto_single_cipher_register(
  428|      0|			GNUTLS_CIPHER_AES_192_CBC, 90, &_gnutls_aes_ssse3, 0);
  429|      0|		if (ret < 0) {
  ------------------
  |  Branch (429:7): [True: 0, False: 0]
  ------------------
  430|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  431|      0|		}
  432|       |
  433|      0|		ret = gnutls_crypto_single_cipher_register(
  434|      0|			GNUTLS_CIPHER_AES_256_CBC, 90, &_gnutls_aes_ssse3, 0);
  435|      0|		if (ret < 0) {
  ------------------
  |  Branch (435:7): [True: 0, False: 0]
  ------------------
  436|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  437|      0|		}
  438|      0|	}
  439|       |
  440|      0|	if (check_sha() || check_ssse3()) {
  ------------------
  |  Branch (440:6): [True: 0, False: 0]
  |  Branch (440:21): [True: 0, False: 0]
  ------------------
  441|      0|		if (check_sha())
  ------------------
  |  Branch (441:7): [True: 0, False: 0]
  ------------------
  442|      0|			_gnutls_debug_log("Zhaoxin SHA was detected\n");
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  443|       |
  444|      0|		ret = gnutls_crypto_single_digest_register(
  445|      0|			GNUTLS_DIG_SHA1, 80, &_gnutls_sha_x86_ssse3, 0);
  446|      0|		if (ret < 0) {
  ------------------
  |  Branch (446:7): [True: 0, False: 0]
  ------------------
  447|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|      0|		}
  449|       |
  450|      0|		ret = gnutls_crypto_single_digest_register(
  451|      0|			GNUTLS_DIG_SHA224, 80, &_gnutls_sha_x86_ssse3, 0);
  452|      0|		if (ret < 0) {
  ------------------
  |  Branch (452:7): [True: 0, False: 0]
  ------------------
  453|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  454|      0|		}
  455|       |
  456|      0|		ret = gnutls_crypto_single_digest_register(
  457|      0|			GNUTLS_DIG_SHA256, 80, &_gnutls_sha_x86_ssse3, 0);
  458|      0|		if (ret < 0) {
  ------------------
  |  Branch (458:7): [True: 0, False: 0]
  ------------------
  459|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  460|      0|		}
  461|       |
  462|      0|		ret = gnutls_crypto_single_mac_register(
  463|      0|			GNUTLS_MAC_SHA1, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  464|      0|		if (ret < 0)
  ------------------
  |  Branch (464:7): [True: 0, False: 0]
  ------------------
  465|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|       |
  467|      0|		ret = gnutls_crypto_single_mac_register(
  468|      0|			GNUTLS_MAC_SHA224, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  469|      0|		if (ret < 0)
  ------------------
  |  Branch (469:7): [True: 0, False: 0]
  ------------------
  470|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  471|       |
  472|      0|		ret = gnutls_crypto_single_mac_register(
  473|      0|			GNUTLS_MAC_SHA256, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  474|      0|		if (ret < 0)
  ------------------
  |  Branch (474:7): [True: 0, False: 0]
  ------------------
  475|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  476|       |
  477|      0|		ret = gnutls_crypto_single_digest_register(
  478|      0|			GNUTLS_DIG_SHA384, 80, &_gnutls_sha_x86_ssse3, 0);
  479|      0|		if (ret < 0)
  ------------------
  |  Branch (479:7): [True: 0, False: 0]
  ------------------
  480|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  481|       |
  482|      0|		ret = gnutls_crypto_single_digest_register(
  483|      0|			GNUTLS_DIG_SHA512, 80, &_gnutls_sha_x86_ssse3, 0);
  484|      0|		if (ret < 0)
  ------------------
  |  Branch (484:7): [True: 0, False: 0]
  ------------------
  485|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|      0|		ret = gnutls_crypto_single_mac_register(
  487|      0|			GNUTLS_MAC_SHA384, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  488|      0|		if (ret < 0)
  ------------------
  |  Branch (488:7): [True: 0, False: 0]
  ------------------
  489|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  490|       |
  491|      0|		ret = gnutls_crypto_single_mac_register(
  492|      0|			GNUTLS_MAC_SHA512, 80, &_gnutls_hmac_sha_x86_ssse3, 0);
  493|      0|		if (ret < 0)
  ------------------
  |  Branch (493:7): [True: 0, False: 0]
  ------------------
  494|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|      0|	}
  496|       |
  497|      0|	if (check_optimized_aes()) {
  ------------------
  |  Branch (497:6): [True: 0, False: 0]
  ------------------
  498|      0|		_gnutls_debug_log("Zhaoxin AES accelerator was detected\n");
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  499|      0|		ret = gnutls_crypto_single_cipher_register(
  500|      0|			GNUTLS_CIPHER_AES_128_CBC, 80, &_gnutls_aesni_x86, 0);
  501|      0|		if (ret < 0) {
  ------------------
  |  Branch (501:7): [True: 0, False: 0]
  ------------------
  502|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  503|      0|		}
  504|       |
  505|      0|		ret = gnutls_crypto_single_cipher_register(
  506|      0|			GNUTLS_CIPHER_AES_192_CBC, 80, &_gnutls_aesni_x86, 0);
  507|      0|		if (ret < 0) {
  ------------------
  |  Branch (507:7): [True: 0, False: 0]
  ------------------
  508|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  509|      0|		}
  510|       |
  511|      0|		ret = gnutls_crypto_single_cipher_register(
  512|      0|			GNUTLS_CIPHER_AES_256_CBC, 80, &_gnutls_aesni_x86, 0);
  513|      0|		if (ret < 0) {
  ------------------
  |  Branch (513:7): [True: 0, False: 0]
  ------------------
  514|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  515|      0|		}
  516|       |
  517|      0|		ret = gnutls_crypto_single_cipher_register(
  518|      0|			GNUTLS_CIPHER_AES_128_CCM, 80,
  519|      0|			&_gnutls_aes_ccm_x86_aesni, 0);
  520|      0|		if (ret < 0) {
  ------------------
  |  Branch (520:7): [True: 0, False: 0]
  ------------------
  521|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  522|      0|		}
  523|       |
  524|      0|		ret = gnutls_crypto_single_cipher_register(
  525|      0|			GNUTLS_CIPHER_AES_256_CCM, 80,
  526|      0|			&_gnutls_aes_ccm_x86_aesni, 0);
  527|      0|		if (ret < 0) {
  ------------------
  |  Branch (527:7): [True: 0, False: 0]
  ------------------
  528|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  529|      0|		}
  530|       |
  531|      0|		ret = gnutls_crypto_single_cipher_register(
  532|      0|			GNUTLS_CIPHER_AES_128_CCM_8, 80,
  533|      0|			&_gnutls_aes_ccm_x86_aesni, 0);
  534|      0|		if (ret < 0) {
  ------------------
  |  Branch (534:7): [True: 0, False: 0]
  ------------------
  535|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  536|      0|		}
  537|       |
  538|      0|		ret = gnutls_crypto_single_cipher_register(
  539|      0|			GNUTLS_CIPHER_AES_256_CCM_8, 80,
  540|      0|			&_gnutls_aes_ccm_x86_aesni, 0);
  541|      0|		if (ret < 0) {
  ------------------
  |  Branch (541:7): [True: 0, False: 0]
  ------------------
  542|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  543|      0|		}
  544|       |
  545|      0|		ret = gnutls_crypto_single_cipher_register(
  546|      0|			GNUTLS_CIPHER_AES_128_XTS, 80,
  547|      0|			&_gnutls_aes_xts_x86_aesni, 0);
  548|      0|		if (ret < 0) {
  ------------------
  |  Branch (548:7): [True: 0, False: 0]
  ------------------
  549|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  550|      0|		}
  551|       |
  552|      0|		ret = gnutls_crypto_single_cipher_register(
  553|      0|			GNUTLS_CIPHER_AES_256_XTS, 80,
  554|      0|			&_gnutls_aes_xts_x86_aesni, 0);
  555|      0|		if (ret < 0) {
  ------------------
  |  Branch (555:7): [True: 0, False: 0]
  ------------------
  556|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|      0|		}
  558|       |
  559|      0|#ifdef ASM_X86_64
  560|      0|		if (check_pclmul()) {
  ------------------
  |  Branch (560:7): [True: 0, False: 0]
  ------------------
  561|       |			/* register GCM ciphers */
  562|      0|			_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  563|      0|				"Zhaoxin GCM accelerator was detected\n");
  564|      0|			if (check_avx_movbe() && check_fast_pclmul()) {
  ------------------
  |  Branch (564:8): [True: 0, False: 0]
  |  Branch (564:29): [True: 0, False: 0]
  ------------------
  565|      0|				_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  566|      0|					"Zhaoxin GCM accelerator (AVX) was detected\n");
  567|      0|				ret = gnutls_crypto_single_cipher_register(
  568|      0|					GNUTLS_CIPHER_AES_128_GCM, 80,
  569|      0|					&_gnutls_aes_gcm_pclmul_avx, 0);
  570|      0|				if (ret < 0) {
  ------------------
  |  Branch (570:9): [True: 0, False: 0]
  ------------------
  571|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|      0|				}
  573|       |
  574|      0|				ret = gnutls_crypto_single_cipher_register(
  575|      0|					GNUTLS_CIPHER_AES_192_GCM, 80,
  576|      0|					&_gnutls_aes_gcm_pclmul_avx, 0);
  577|      0|				if (ret < 0) {
  ------------------
  |  Branch (577:9): [True: 0, False: 0]
  ------------------
  578|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|      0|				}
  580|       |
  581|      0|				ret = gnutls_crypto_single_cipher_register(
  582|      0|					GNUTLS_CIPHER_AES_256_GCM, 80,
  583|      0|					&_gnutls_aes_gcm_pclmul_avx, 0);
  584|      0|				if (ret < 0) {
  ------------------
  |  Branch (584:9): [True: 0, False: 0]
  ------------------
  585|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  586|      0|				}
  587|      0|			} else {
  588|      0|				ret = gnutls_crypto_single_cipher_register(
  589|      0|					GNUTLS_CIPHER_AES_128_GCM, 80,
  590|      0|					&_gnutls_aes_gcm_pclmul, 0);
  591|      0|				if (ret < 0) {
  ------------------
  |  Branch (591:9): [True: 0, False: 0]
  ------------------
  592|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  593|      0|				}
  594|       |
  595|      0|				ret = gnutls_crypto_single_cipher_register(
  596|      0|					GNUTLS_CIPHER_AES_192_GCM, 80,
  597|      0|					&_gnutls_aes_gcm_pclmul, 0);
  598|      0|				if (ret < 0) {
  ------------------
  |  Branch (598:9): [True: 0, False: 0]
  ------------------
  599|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  600|      0|				}
  601|       |
  602|      0|				ret = gnutls_crypto_single_cipher_register(
  603|      0|					GNUTLS_CIPHER_AES_256_GCM, 80,
  604|      0|					&_gnutls_aes_gcm_pclmul, 0);
  605|      0|				if (ret < 0) {
  ------------------
  |  Branch (605:9): [True: 0, False: 0]
  ------------------
  606|      0|					gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  607|      0|				}
  608|      0|			}
  609|      0|		} else
  610|      0|#endif
  611|      0|		{
  612|      0|			ret = gnutls_crypto_single_cipher_register(
  613|      0|				GNUTLS_CIPHER_AES_128_GCM, 80,
  614|      0|				&_gnutls_aes_gcm_x86_aesni, 0);
  615|      0|			if (ret < 0) {
  ------------------
  |  Branch (615:8): [True: 0, False: 0]
  ------------------
  616|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  617|      0|			}
  618|       |
  619|      0|			ret = gnutls_crypto_single_cipher_register(
  620|      0|				GNUTLS_CIPHER_AES_192_GCM, 80,
  621|      0|				&_gnutls_aes_gcm_x86_aesni, 0);
  622|      0|			if (ret < 0) {
  ------------------
  |  Branch (622:8): [True: 0, False: 0]
  ------------------
  623|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  624|      0|			}
  625|       |
  626|      0|			ret = gnutls_crypto_single_cipher_register(
  627|      0|				GNUTLS_CIPHER_AES_256_GCM, 80,
  628|      0|				&_gnutls_aes_gcm_x86_aesni, 0);
  629|      0|			if (ret < 0) {
  ------------------
  |  Branch (629:8): [True: 0, False: 0]
  ------------------
  630|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  631|      0|			}
  632|      0|		}
  633|      0|	}
  634|       |
  635|      0|	if (check_padlock(edx)) {
  ------------------
  |  Branch (635:6): [True: 0, False: 0]
  ------------------
  636|      0|		_gnutls_debug_log("Padlock AES accelerator was detected\n");
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  637|      0|		ret = gnutls_crypto_single_cipher_register(
  638|      0|			GNUTLS_CIPHER_AES_128_CBC, 80, &_gnutls_aes_padlock, 0);
  639|      0|		if (ret < 0) {
  ------------------
  |  Branch (639:7): [True: 0, False: 0]
  ------------------
  640|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  641|      0|		}
  642|       |
  643|      0|		ret = gnutls_crypto_single_cipher_register(
  644|      0|			GNUTLS_CIPHER_AES_192_CBC, 80, &_gnutls_aes_padlock, 0);
  645|      0|		if (ret < 0) {
  ------------------
  |  Branch (645:7): [True: 0, False: 0]
  ------------------
  646|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  647|      0|		}
  648|       |
  649|       |		/* register GCM ciphers */
  650|      0|		ret = gnutls_crypto_single_cipher_register(
  651|      0|			GNUTLS_CIPHER_AES_128_GCM, 90, &_gnutls_aes_gcm_padlock,
  652|      0|			0);
  653|      0|		if (ret < 0) {
  ------------------
  |  Branch (653:7): [True: 0, False: 0]
  ------------------
  654|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  655|      0|		}
  656|       |
  657|      0|		ret = gnutls_crypto_single_cipher_register(
  658|      0|			GNUTLS_CIPHER_AES_256_CBC, 80, &_gnutls_aes_padlock, 0);
  659|      0|		if (ret < 0) {
  ------------------
  |  Branch (659:7): [True: 0, False: 0]
  ------------------
  660|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  661|      0|		}
  662|       |
  663|      0|		ret = gnutls_crypto_single_cipher_register(
  664|      0|			GNUTLS_CIPHER_AES_256_GCM, 90, &_gnutls_aes_gcm_padlock,
  665|      0|			0);
  666|      0|		if (ret < 0) {
  ------------------
  |  Branch (666:7): [True: 0, False: 0]
  ------------------
  667|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  668|      0|		}
  669|      0|	}
  670|       |
  671|      0|	if (!check_optimized_aes() && !check_padlock(edx))
  ------------------
  |  Branch (671:6): [True: 0, False: 0]
  |  Branch (671:32): [True: 0, False: 0]
  ------------------
  672|      0|		_gnutls_priority_update_non_aesni();
  673|       |
  674|      0|#ifdef HAVE_LIBNETTLE
  675|      0|	phe = check_phe(edx);
  676|       |
  677|      0|	if (phe && check_phe_partial()) {
  ------------------
  |  Branch (677:6): [True: 0, False: 0]
  |  Branch (677:13): [True: 0, False: 0]
  ------------------
  678|      0|		_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  679|      0|			"Padlock SHA1 and SHA256 (partial) accelerator was detected\n");
  680|      0|		if (check_phe_sha512(edx)) {
  ------------------
  |  Branch (680:7): [True: 0, False: 0]
  ------------------
  681|      0|			_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  682|      0|				"Padlock SHA512 (partial) accelerator was detected\n");
  683|      0|			ret = gnutls_crypto_single_digest_register(
  684|      0|				GNUTLS_DIG_SHA384, 80, &_gnutls_sha_padlock, 0);
  685|      0|			if (ret < 0) {
  ------------------
  |  Branch (685:8): [True: 0, False: 0]
  ------------------
  686|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|      0|			}
  688|       |
  689|      0|			ret = gnutls_crypto_single_digest_register(
  690|      0|				GNUTLS_DIG_SHA512, 80, &_gnutls_sha_padlock, 0);
  691|      0|			if (ret < 0) {
  ------------------
  |  Branch (691:8): [True: 0, False: 0]
  ------------------
  692|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  693|      0|			}
  694|       |
  695|      0|			ret = gnutls_crypto_single_mac_register(
  696|      0|				GNUTLS_MAC_SHA384, 80,
  697|      0|				&_gnutls_hmac_sha_padlock, 0);
  698|      0|			if (ret < 0) {
  ------------------
  |  Branch (698:8): [True: 0, False: 0]
  ------------------
  699|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  700|      0|			}
  701|       |
  702|      0|			ret = gnutls_crypto_single_mac_register(
  703|      0|				GNUTLS_MAC_SHA512, 80,
  704|      0|				&_gnutls_hmac_sha_padlock, 0);
  705|      0|			if (ret < 0) {
  ------------------
  |  Branch (705:8): [True: 0, False: 0]
  ------------------
  706|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  707|      0|			}
  708|      0|		}
  709|       |
  710|      0|		ret = gnutls_crypto_single_digest_register(
  711|      0|			GNUTLS_DIG_SHA1, 90, &_gnutls_sha_padlock, 0);
  712|      0|		if (ret < 0) {
  ------------------
  |  Branch (712:7): [True: 0, False: 0]
  ------------------
  713|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  714|      0|		}
  715|       |
  716|      0|		ret = gnutls_crypto_single_digest_register(
  717|      0|			GNUTLS_DIG_SHA224, 90, &_gnutls_sha_padlock, 0);
  718|      0|		if (ret < 0) {
  ------------------
  |  Branch (718:7): [True: 0, False: 0]
  ------------------
  719|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  720|      0|		}
  721|       |
  722|      0|		ret = gnutls_crypto_single_digest_register(
  723|      0|			GNUTLS_DIG_SHA256, 90, &_gnutls_sha_padlock, 0);
  724|      0|		if (ret < 0) {
  ------------------
  |  Branch (724:7): [True: 0, False: 0]
  ------------------
  725|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  726|      0|		}
  727|       |
  728|      0|		ret = gnutls_crypto_single_mac_register(
  729|      0|			GNUTLS_MAC_SHA1, 90, &_gnutls_hmac_sha_padlock, 0);
  730|      0|		if (ret < 0) {
  ------------------
  |  Branch (730:7): [True: 0, False: 0]
  ------------------
  731|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|      0|		}
  733|       |
  734|       |		/* we don't register MAC_SHA224 because it is not used by TLS */
  735|       |
  736|      0|		ret = gnutls_crypto_single_mac_register(
  737|      0|			GNUTLS_MAC_SHA256, 90, &_gnutls_hmac_sha_padlock, 0);
  738|      0|		if (ret < 0) {
  ------------------
  |  Branch (738:7): [True: 0, False: 0]
  ------------------
  739|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  740|      0|		}
  741|      0|	} else if (phe) {
  ------------------
  |  Branch (741:13): [True: 0, False: 0]
  ------------------
  742|       |		/* Original padlock PHE. Does not support incremental operations.
  743|       |		 */
  744|      0|		_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  745|      0|			"Padlock SHA1 and SHA256 accelerator was detected\n");
  746|      0|		ret = gnutls_crypto_single_digest_register(
  747|      0|			GNUTLS_DIG_SHA1, 90, &_gnutls_sha_padlock_oneshot, 0);
  748|      0|		if (ret < 0) {
  ------------------
  |  Branch (748:7): [True: 0, False: 0]
  ------------------
  749|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  750|      0|		}
  751|       |
  752|      0|		ret = gnutls_crypto_single_digest_register(
  753|      0|			GNUTLS_DIG_SHA256, 90, &_gnutls_sha_padlock_oneshot, 0);
  754|      0|		if (ret < 0) {
  ------------------
  |  Branch (754:7): [True: 0, False: 0]
  ------------------
  755|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  756|      0|		}
  757|       |
  758|      0|		ret = gnutls_crypto_single_mac_register(
  759|      0|			GNUTLS_MAC_SHA1, 90, &_gnutls_hmac_sha_padlock_oneshot,
  760|      0|			0);
  761|      0|		if (ret < 0) {
  ------------------
  |  Branch (761:7): [True: 0, False: 0]
  ------------------
  762|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  763|      0|		}
  764|       |
  765|      0|		ret = gnutls_crypto_single_mac_register(
  766|      0|			GNUTLS_MAC_SHA256, 90,
  767|      0|			&_gnutls_hmac_sha_padlock_oneshot, 0);
  768|      0|		if (ret < 0) {
  ------------------
  |  Branch (768:7): [True: 0, False: 0]
  ------------------
  769|      0|			gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|      0|		}
  771|      0|	}
  772|      0|#endif
  773|       |
  774|      0|	return;
  775|      0|}
x86-common.c:check_zhaoxin:
  361|      2|{
  362|      2|	unsigned int a, b, c, d;
  363|       |
  364|      2|	if (!__get_cpuid(0, &a, &b, &c, &d))
  ------------------
  |  Branch (364:6): [True: 0, False: 2]
  ------------------
  365|      0|		return 0;
  366|       |
  367|       |	/* Zhaoxin and VIA CPU was detected */
  368|      2|	if ((memcmp(&b, "Cent", 4) == 0 && memcmp(&d, "aurH", 4) == 0 &&
  ------------------
  |  Branch (368:7): [True: 0, False: 2]
  |  Branch (368:37): [True: 0, False: 0]
  ------------------
  369|      2|	     memcmp(&c, "auls", 4) == 0) ||
  ------------------
  |  Branch (369:7): [True: 0, False: 0]
  ------------------
  370|      2|	    (memcmp(&b, "  Sh", 4) == 0 && memcmp(&d, "angh", 4) == 0 &&
  ------------------
  |  Branch (370:7): [True: 0, False: 2]
  |  Branch (370:37): [True: 0, False: 0]
  ------------------
  371|      2|	     memcmp(&c, "ai  ", 4) == 0)) {
  ------------------
  |  Branch (371:7): [True: 0, False: 0]
  ------------------
  372|      0|		return 1;
  373|      0|	}
  374|       |
  375|      2|	return 0;
  376|      2|}

_gnutls_register_fork_handler:
   51|      2|{
   52|      2|	if (__register_atfork(NULL, NULL, fork_handler, __dso_handle) != 0)
  ------------------
  |  Branch (52:6): [True: 0, False: 2]
  ------------------
   53|      0|		return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
   54|      2|	return 0;
   55|      2|}

gnutls_crypto_single_cipher_register:
  179|     36|{
  180|       |	/* we override const in case free_s is set */
  181|     36|	return _algo_register(&glob_cl, algorithm, priority, (void *)s, free_s);
  182|     36|}
gnutls_crypto_single_mac_register:
  351|     10|{
  352|     10|	return _algo_register(&glob_ml, algorithm, priority, (void *)s, free_s);
  353|     10|}
gnutls_crypto_single_digest_register:
  385|     10|{
  386|     10|	return _algo_register(&glob_dl, algorithm, priority, (void *)s, free_s);
  387|     10|}
crypto-backend.c:_algo_register:
   52|     56|{
   53|     56|	algo_list *cl;
   54|     56|	algo_list *last_cl = al;
   55|     56|	int ret;
   56|       |
   57|     56|	if (al == NULL) {
  ------------------
  |  Branch (57:6): [True: 0, False: 56]
  ------------------
   58|      0|		ret = gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
   59|      0|		goto cleanup;
   60|      0|	}
   61|       |
   62|       |	/* look if there is any cipher with lowest priority. In that case do not add.
   63|       |	 */
   64|     56|	cl = al;
   65|    258|	while (cl && cl->alg_data) {
  ------------------
  |  Branch (65:9): [True: 258, False: 0]
  |  Branch (65:15): [True: 214, False: 44]
  ------------------
   66|    214|		if (cl->algorithm == algorithm) {
  ------------------
  |  Branch (66:7): [True: 12, False: 202]
  ------------------
   67|     12|			if (cl->priority < priority) {
  ------------------
  |  Branch (67:8): [True: 0, False: 12]
  ------------------
   68|      0|				gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   69|      0|				ret = GNUTLS_E_CRYPTO_ALREADY_REGISTERED;
  ------------------
  |  | 3453|      0|#define GNUTLS_E_CRYPTO_ALREADY_REGISTERED GNUTLS_E_ALREADY_REGISTERED
  |  |  ------------------
  |  |  |  | 3454|      0|#define GNUTLS_E_ALREADY_REGISTERED -209
  |  |  ------------------
  ------------------
   70|      0|				goto cleanup;
   71|     12|			} else {
   72|       |				/* the current has higher priority -> overwrite */
   73|     12|				cl->algorithm = algorithm;
   74|     12|				cl->priority = priority;
   75|     12|				cl->alg_data = s;
   76|     12|				cl->free_alg_data = free_s;
   77|     12|				return 0;
   78|     12|			}
   79|     12|		}
   80|    202|		cl = cl->next;
   81|    202|		if (cl)
  ------------------
  |  Branch (81:7): [True: 202, False: 0]
  ------------------
   82|    202|			last_cl = cl;
   83|    202|	}
   84|       |
   85|     44|	cl = gnutls_calloc(1, sizeof(cipher_list));
   86|       |
   87|     44|	if (cl == NULL) {
  ------------------
  |  Branch (87:6): [True: 0, False: 44]
  ------------------
   88|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   89|      0|		ret = GNUTLS_E_MEMORY_ERROR;
  ------------------
  |  | 3334|      0|#define GNUTLS_E_MEMORY_ERROR -25
  ------------------
   90|      0|		goto cleanup;
   91|      0|	}
   92|       |
   93|     44|	last_cl->algorithm = algorithm;
   94|     44|	last_cl->priority = priority;
   95|     44|	last_cl->alg_data = s;
   96|     44|	last_cl->free_alg_data = free_s;
   97|     44|	last_cl->next = cl;
   98|       |
   99|     44|	return 0;
  100|      0|cleanup:
  101|      0|	if (free_s)
  ------------------
  |  Branch (101:6): [True: 0, False: 0]
  ------------------
  102|      0|		gnutls_free(s);
  ------------------
  |  | 2265|      0|#define gnutls_free(a) gnutls_free((void *)(a)), a = NULL
  ------------------
  103|      0|	return ret;
  104|     44|}

global.c:_gnutls_switch_lib_state:
   47|      4|{
   48|       |	/* Once into zombie state no errors can change us */
   49|      4|	_gnutls_lib_state = state;
   50|      4|}

_gnutls_global_init_skip:
   61|      2|{
   62|      2|	return 0;
   63|      2|}
global.c:lib_init:
  501|      2|{
  502|      2|	int ret;
  503|      2|	const char *e;
  504|       |
  505|      2|	if (_gnutls_global_init_skip() != 0)
  ------------------
  |  Branch (505:6): [True: 0, False: 2]
  ------------------
  506|      0|		return;
  507|       |
  508|      2|	e = secure_getenv("GNUTLS_NO_IMPLICIT_INIT");
  509|      2|	if (e != NULL) {
  ------------------
  |  Branch (509:6): [True: 0, False: 2]
  ------------------
  510|      0|		ret = atoi(e);
  511|      0|		if (ret == 1)
  ------------------
  |  Branch (511:7): [True: 0, False: 0]
  ------------------
  512|      0|			return;
  513|      0|	}
  514|       |
  515|      2|	e = secure_getenv("GNUTLS_NO_EXPLICIT_INIT");
  516|      2|	if (e != NULL) {
  ------------------
  |  Branch (516:6): [True: 0, False: 2]
  ------------------
  517|      0|		_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  518|      0|			"GNUTLS_NO_EXPLICIT_INIT is deprecated; use GNUTLS_NO_IMPLICIT_INIT\n");
  519|      0|		ret = atoi(e);
  520|      0|		if (ret == 1)
  ------------------
  |  Branch (520:7): [True: 0, False: 0]
  ------------------
  521|      0|			return;
  522|      0|	}
  523|       |
  524|      2|	ret = _gnutls_global_init(1);
  525|      2|	if (ret < 0) {
  ------------------
  |  Branch (525:6): [True: 0, False: 2]
  ------------------
  526|      0|		fprintf(stderr, "Error in GnuTLS initialization: %s\n",
  527|      0|			gnutls_strerror(ret));
  528|      0|		_gnutls_switch_lib_state(LIB_STATE_ERROR);
  529|      0|	}
  530|      2|}
global.c:_gnutls_global_init:
  240|      2|{
  241|      2|	int ret = 0, res;
  242|      2|	int level;
  243|      2|	const char *e;
  244|       |
  245|      2|	if (!constructor) {
  ------------------
  |  Branch (245:6): [True: 0, False: 2]
  ------------------
  246|      0|		ret = gnutls_static_mutex_lock(&global_init_mutex);
  ------------------
  |  |   45|      0|	(unlikely(glthread_lock_lock(LOCK)) ?                \
  |  |  ------------------
  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      0|		 gnutls_assert_val(GNUTLS_E_LOCKING_ERROR) : \
  |  |  ------------------
  |  |  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |   47|      0|		 0)
  ------------------
  247|      0|		if (ret < 0) {
  ------------------
  |  Branch (247:7): [True: 0, False: 0]
  ------------------
  248|      0|			return gnutls_assert_val(ret);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
  249|      0|		}
  250|      0|	}
  251|       |
  252|      2|	_gnutls_init++;
  253|      2|	if (_gnutls_init > 1) {
  ------------------
  |  Branch (253:6): [True: 0, False: 2]
  ------------------
  254|      0|		ret = _gnutls_init_ret;
  255|      0|		goto out;
  256|      0|	}
  257|       |
  258|      2|	_gnutls_switch_lib_state(LIB_STATE_INIT);
  259|       |
  260|      2|	e = secure_getenv("GNUTLS_DEBUG_LEVEL");
  261|      2|	if (e != NULL) {
  ------------------
  |  Branch (261:6): [True: 0, False: 2]
  ------------------
  262|      0|		level = atoi(e);
  263|      0|		gnutls_global_set_log_level(level);
  264|      0|		if (_gnutls_log_func == NULL)
  ------------------
  |  Branch (264:7): [True: 0, False: 0]
  ------------------
  265|      0|			gnutls_global_set_log_function(default_log_func);
  266|      0|		_gnutls_debug_log("Enabled GnuTLS " VERSION " logging...\n");
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  267|      0|	}
  268|       |
  269|      2|#ifdef HAVE_DCGETTEXT
  270|      2|	bindtextdomain(PACKAGE, LOCALEDIR);
  ------------------
  |  | 1841|      2|#define PACKAGE "gnutls"
  ------------------
  271|      2|#endif
  272|       |
  273|      2|	res = gnutls_crypto_init();
  274|      2|	if (res != 0) {
  ------------------
  |  Branch (274:6): [True: 0, False: 2]
  ------------------
  275|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  276|      0|		ret = GNUTLS_E_CRYPTO_INIT_FAILED;
  ------------------
  |  | 3492|      0|#define GNUTLS_E_CRYPTO_INIT_FAILED -318
  ------------------
  277|      0|		goto out;
  278|      0|	}
  279|       |
  280|      2|	ret = _gnutls_system_key_init();
  281|      2|	if (ret != 0) {
  ------------------
  |  Branch (281:6): [True: 0, False: 2]
  ------------------
  282|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  283|      0|	}
  284|       |
  285|       |	/* initialize ASN.1 parser
  286|       |	 */
  287|      2|	if (asn1_check_version(GNUTLS_MIN_LIBTASN1_VERSION) == NULL) {
  ------------------
  |  |   46|      2|#define GNUTLS_MIN_LIBTASN1_VERSION "0.3.4"
  ------------------
  |  Branch (287:6): [True: 0, False: 2]
  ------------------
  288|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|      0|		_gnutls_debug_log("Checking for libtasn1 failed: %s < %s\n",
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  290|      0|				  asn1_check_version(NULL),
  291|      0|				  GNUTLS_MIN_LIBTASN1_VERSION);
  292|      0|		ret = GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY;
  ------------------
  |  | 3443|      0|#define GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY -203
  ------------------
  293|      0|		goto out;
  294|      0|	}
  295|       |
  296|      2|	_gnutls_pkix1_asn = NULL;
  297|      2|	res = asn1_array2tree(pkix_asn1_tab, &_gnutls_pkix1_asn, NULL);
  298|      2|	if (res != ASN1_SUCCESS) {
  ------------------
  |  |  116|      2|# define ASN1_SUCCESS			0
  ------------------
  |  Branch (298:6): [True: 0, False: 2]
  ------------------
  299|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|      0|		ret = _gnutls_asn2err(res);
  301|      0|		goto out;
  302|      0|	}
  303|       |
  304|      2|	res = asn1_array2tree(gnutls_asn1_tab, &_gnutls_gnutls_asn, NULL);
  305|      2|	if (res != ASN1_SUCCESS) {
  ------------------
  |  |  116|      2|# define ASN1_SUCCESS			0
  ------------------
  |  Branch (305:6): [True: 0, False: 2]
  ------------------
  306|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  307|      0|		ret = _gnutls_asn2err(res);
  308|      0|		goto out;
  309|      0|	}
  310|       |
  311|       |	/* Initialize the random generator */
  312|      2|	ret = _gnutls_rnd_preinit();
  313|      2|	if (ret < 0) {
  ------------------
  |  Branch (313:6): [True: 0, False: 2]
  ------------------
  314|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  315|      0|		goto out;
  316|      0|	}
  317|       |
  318|       |	/* Initialize the default TLS extensions */
  319|      2|	ret = _gnutls_hello_ext_init();
  320|      2|	if (ret < 0) {
  ------------------
  |  Branch (320:6): [True: 0, False: 2]
  ------------------
  321|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  322|      0|		goto out;
  323|      0|	}
  324|       |
  325|      2|	ret = gnutls_system_global_init();
  326|      2|	if (ret < 0) {
  ------------------
  |  Branch (326:6): [True: 0, False: 2]
  ------------------
  327|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  328|      0|		goto out;
  329|      0|	}
  330|       |
  331|      2|#ifndef _WIN32
  332|      2|	ret = _gnutls_register_fork_handler();
  333|      2|	if (ret < 0) {
  ------------------
  |  Branch (333:6): [True: 0, False: 2]
  ------------------
  334|      0|		gnutls_assert();
  ------------------
  |  |   34|      0|	_gnutls_assert_log("ASSERT: %s[%s]:%d\n", __FILE__, __func__, __LINE__);
  |  |  ------------------
  |  |  |  |  150|      0|#define _gnutls_assert_log(...) LEVEL(3, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  335|      0|		goto out;
  336|      0|	}
  337|      2|#endif
  338|       |
  339|       |#ifdef ENABLE_FIPS140
  340|       |	res = _gnutls_fips_mode_enabled();
  341|       |	/* res == 1 -> fips140-2 mode enabled
  342|       |	 * res == 2 -> only self checks performed - but no failure
  343|       |	 * res == not in fips140 mode
  344|       |	 */
  345|       |	if (res != 0) {
  346|       |		_gnutls_debug_log("FIPS140-2 mode: %d\n", res);
  347|       |		_gnutls_priority_update_fips();
  348|       |
  349|       |		/* first round of self checks, these are done on the
  350|       |		 * nettle algorithms which are used internally */
  351|       |		_gnutls_switch_lib_state(LIB_STATE_SELFTEST);
  352|       |		ret = _gnutls_fips_perform_self_checks1();
  353|       |		if (ret < 0) {
  354|       |			_gnutls_switch_lib_state(LIB_STATE_ERROR);
  355|       |			_gnutls_audit_log(
  356|       |				NULL, "FIPS140-2 self testing part1 failed\n");
  357|       |			if (res != 2) {
  358|       |				gnutls_assert();
  359|       |				goto out;
  360|       |			}
  361|       |		}
  362|       |	}
  363|       |#endif
  364|       |
  365|      2|	_gnutls_register_accel_crypto();
  366|      2|	_gnutls_cryptodev_init();
  367|      2|	_gnutls_afalg_init();
  368|       |
  369|       |#ifdef ENABLE_FIPS140
  370|       |	/* These self tests are performed on the overridden algorithms
  371|       |	 * (e.g., AESNI overridden AES). They are after _gnutls_register_accel_crypto()
  372|       |	 * intentionally */
  373|       |	if (res != 0) {
  374|       |		_gnutls_switch_lib_state(LIB_STATE_SELFTEST);
  375|       |		ret = _gnutls_fips_perform_self_checks2();
  376|       |		if (ret < 0) {
  377|       |			_gnutls_switch_lib_state(LIB_STATE_ERROR);
  378|       |			_gnutls_audit_log(
  379|       |				NULL, "FIPS140-2 self testing part 2 failed\n");
  380|       |			if (res != 2) {
  381|       |				gnutls_assert();
  382|       |				goto out;
  383|       |			}
  384|       |		}
  385|       |		_gnutls_fips_mode_reset_zombie();
  386|       |	}
  387|       |#endif
  388|      2|	_gnutls_prepare_to_load_system_priorities();
  389|      2|	_gnutls_switch_lib_state(LIB_STATE_OPERATIONAL);
  390|      2|	ret = 0;
  391|       |
  392|      2|out:
  393|      2|	_gnutls_init_ret = ret;
  394|      2|	if (!constructor) {
  ------------------
  |  Branch (394:6): [True: 0, False: 2]
  ------------------
  395|      0|		(void)gnutls_static_mutex_unlock(&global_init_mutex);
  ------------------
  |  |   50|      0|	(unlikely(glthread_lock_unlock(LOCK)) ?              \
  |  |  ------------------
  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   51|      0|		 gnutls_assert_val(GNUTLS_E_LOCKING_ERROR) : \
  |  |  ------------------
  |  |  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |   52|      0|		 0)
  ------------------
  396|      0|	}
  397|      2|	return ret;
  398|      2|}

_gnutls_hello_ext_init:
  514|      2|{
  515|      2|	return GNUTLS_E_SUCCESS;
  ------------------
  |  | 3315|      2|#define GNUTLS_E_SUCCESS 0
  ------------------
  516|      2|}

_asn1_str_cat:
   33|    532|{
   34|    532|  size_t str_size = strlen (src);
   35|    532|  size_t dest_size = strlen (dest);
   36|       |
   37|    532|  if (dest_tot_size - dest_size > str_size)
  ------------------
  |  Branch (37:7): [True: 532, False: 0]
  ------------------
   38|    532|    {
   39|    532|      strcat (dest, src);
   40|    532|    }
   41|      0|  else
   42|      0|    {
   43|      0|      if (dest_tot_size > dest_size)
  ------------------
  |  Branch (43:11): [True: 0, False: 0]
  ------------------
   44|      0|	{
   45|      0|	  strncat (dest, src, (dest_tot_size - dest_size) - 1);
   46|      0|	  dest[dest_tot_size - 1] = 0;
   47|      0|	}
   48|      0|    }
   49|    532|}
_asn1_str_cpy:
   54|  1.43k|{
   55|  1.43k|  size_t str_size = strlen (src);
   56|       |
   57|  1.43k|  if (dest_tot_size > str_size)
  ------------------
  |  Branch (57:7): [True: 1.43k, False: 0]
  ------------------
   58|  1.43k|    {
   59|  1.43k|      strcpy (dest, src);
   60|  1.43k|      return str_size;
   61|  1.43k|    }
   62|      0|  else
   63|      0|    {
   64|      0|      if (dest_tot_size > 0)
  ------------------
  |  Branch (64:11): [True: 0, False: 0]
  ------------------
   65|      0|	{
   66|      0|	  str_size = dest_tot_size - 1;
   67|      0|	  memcpy (dest, src, str_size);
   68|      0|	  dest[str_size] = 0;
   69|      0|	  return str_size;
   70|      0|	}
   71|      0|      else
   72|      0|	return 0;
   73|      0|    }
   74|  1.43k|}

parser_aux.c:type_field:
  179|  5.64k|{
  180|  5.64k|  return (ntype & 0xff);
  181|  5.64k|}
structure.c:convert_old_type:
  186|  1.14k|{
  187|  1.14k|  unsigned int type = ntype & 0xff;
  188|  1.14k|  if (type == ASN1_ETYPE_TIME)
  ------------------
  |  |  172|  1.14k|# define ASN1_ETYPE_TIME 17
  ------------------
  |  Branch (188:7): [True: 0, False: 1.14k]
  ------------------
  189|      0|    {
  190|      0|      if (ntype & CONST_UTC)
  ------------------
  |  |  160|      0|# define CONST_UTC         (1U<<24)
  ------------------
  |  Branch (190:11): [True: 0, False: 0]
  ------------------
  191|      0|	type = ASN1_ETYPE_UTC_TIME;
  ------------------
  |  |  244|      0|# define ASN1_ETYPE_UTC_TIME       36
  ------------------
  192|      0|      else
  193|      0|	type = ASN1_ETYPE_GENERALIZED_TIME;
  ------------------
  |  |  245|      0|# define ASN1_ETYPE_GENERALIZED_TIME 37
  ------------------
  194|       |
  195|      0|      ntype &= ~(CONST_UTC | CONST_GENERALIZED);
  ------------------
  |  |  160|      0|# define CONST_UTC         (1U<<24)
  ------------------
                    ntype &= ~(CONST_UTC | CONST_GENERALIZED);
  ------------------
  |  |  159|      0|# define CONST_GENERALIZED (1U<<23)
  ------------------
  196|      0|      ntype &= 0xffffff00;
  197|      0|      ntype |= type;
  198|       |
  199|      0|      return ntype;
  200|      0|    }
  201|  1.14k|  else
  202|  1.14k|    return ntype;
  203|  1.14k|}

_asn1_add_static_node:
   66|  1.14k|{
   67|  1.14k|  list_type *p;
   68|  1.14k|  asn1_node punt;
   69|       |
   70|  1.14k|  punt = calloc (1, sizeof (struct asn1_node_st));
   71|  1.14k|  if (punt == NULL)
  ------------------
  |  Branch (71:7): [True: 0, False: 1.14k]
  ------------------
   72|      0|    return NULL;
   73|       |
   74|  1.14k|  p = malloc (sizeof (list_type));
   75|  1.14k|  if (p == NULL)
  ------------------
  |  Branch (75:7): [True: 0, False: 1.14k]
  ------------------
   76|      0|    {
   77|      0|      free (punt);
   78|      0|      return NULL;
   79|      0|    }
   80|       |
   81|  1.14k|  p->node = punt;
   82|  1.14k|  p->next = *e_list;
   83|  1.14k|  *e_list = p;
   84|       |
   85|  1.14k|  punt->type = type;
   86|       |
   87|  1.14k|  return punt;
   88|  1.14k|}
asn1_find_node:
  122|    266|{
  123|    266|  asn1_node_const p;
  124|    266|  char *n_end, n[ASN1_MAX_NAME_SIZE + 1];
  125|    266|  const char *n_start;
  126|    266|  unsigned int nsize;
  127|    266|  unsigned int nhash;
  128|       |
  129|    266|  if (pointer == NULL)
  ------------------
  |  Branch (129:7): [True: 0, False: 266]
  ------------------
  130|      0|    return NULL;
  131|       |
  132|    266|  if (name == NULL)
  ------------------
  |  Branch (132:7): [True: 0, False: 266]
  ------------------
  133|      0|    return NULL;
  134|       |
  135|    266|  p = pointer;
  136|    266|  n_start = name;
  137|       |
  138|    266|  if (name[0] == '?' && name[1] == 'C' && p->name[0] == '?')
  ------------------
  |  Branch (138:7): [True: 0, False: 266]
  |  Branch (138:25): [True: 0, False: 0]
  |  Branch (138:43): [True: 0, False: 0]
  ------------------
  139|      0|    {				/* ?CURRENT */
  140|      0|      n_start = strchr (n_start, '.');
  141|      0|      if (n_start)
  ------------------
  |  Branch (141:11): [True: 0, False: 0]
  ------------------
  142|      0|	n_start++;
  143|      0|    }
  144|    266|  else if (p->name[0] != 0)
  ------------------
  |  Branch (144:12): [True: 266, False: 0]
  ------------------
  145|    266|    {				/* has *pointer got a name ? */
  146|    266|      n_end = strchr (n_start, '.');	/* search the first dot */
  147|    266|      if (n_end)
  ------------------
  |  Branch (147:11): [True: 266, False: 0]
  ------------------
  148|    266|	{
  149|    266|	  nsize = n_end - n_start;
  150|    266|	  if (nsize >= sizeof (n))
  ------------------
  |  Branch (150:8): [True: 0, False: 266]
  ------------------
  151|      0|	    return NULL;
  152|       |
  153|    266|	  memcpy (n, n_start, nsize);
  154|    266|	  n[nsize] = 0;
  155|    266|	  n_start = n_end;
  156|    266|	  n_start++;
  157|       |
  158|    266|	  nhash = _asn1_hash_name (n);
  159|    266|	}
  160|      0|      else
  161|      0|	{
  162|      0|	  _asn1_str_cpy (n, sizeof (n), n_start);
  163|      0|	  nhash = _asn1_hash_name (n);
  164|       |
  165|      0|	  n_start = NULL;
  166|      0|	}
  167|       |
  168|    266|      while (p)
  ------------------
  |  Branch (168:14): [True: 266, False: 0]
  ------------------
  169|    266|	{
  170|    266|	  if (nhash == p->name_hash && (!strcmp (p->name, n)))
  ------------------
  |  Branch (170:8): [True: 266, False: 0]
  |  Branch (170:33): [True: 266, False: 0]
  ------------------
  171|    266|	    break;
  172|      0|	  else
  173|      0|	    p = p->right;
  174|    266|	}			/* while */
  175|       |
  176|    266|      if (p == NULL)
  ------------------
  |  Branch (176:11): [True: 0, False: 266]
  ------------------
  177|      0|	return NULL;
  178|    266|    }
  179|      0|  else
  180|      0|    {				/* *pointer doesn't have a name */
  181|      0|      if (n_start[0] == 0)
  ------------------
  |  Branch (181:11): [True: 0, False: 0]
  ------------------
  182|      0|	return (asn1_node) p;
  183|      0|    }
  184|       |
  185|    532|  while (n_start)
  ------------------
  |  Branch (185:10): [True: 266, False: 266]
  ------------------
  186|    266|    {				/* Has the end of NAME been reached? */
  187|    266|      n_end = strchr (n_start, '.');	/* search the next dot */
  188|    266|      if (n_end)
  ------------------
  |  Branch (188:11): [True: 0, False: 266]
  ------------------
  189|      0|	{
  190|      0|	  nsize = n_end - n_start;
  191|      0|	  if (nsize >= sizeof (n))
  ------------------
  |  Branch (191:8): [True: 0, False: 0]
  ------------------
  192|      0|	    return NULL;
  193|       |
  194|      0|	  memcpy (n, n_start, nsize);
  195|      0|	  n[nsize] = 0;
  196|      0|	  n_start = n_end;
  197|      0|	  n_start++;
  198|       |
  199|      0|	  nhash = _asn1_hash_name (n);
  200|      0|	}
  201|    266|      else
  202|    266|	{
  203|    266|	  _asn1_str_cpy (n, sizeof (n), n_start);
  204|    266|	  nhash = _asn1_hash_name (n);
  205|    266|	  n_start = NULL;
  206|    266|	}
  207|       |
  208|    266|      if (p->down == NULL)
  ------------------
  |  Branch (208:11): [True: 0, False: 266]
  ------------------
  209|      0|	return NULL;
  210|       |
  211|    266|      p = p->down;
  212|    266|      if (p == NULL)
  ------------------
  |  Branch (212:11): [True: 0, False: 266]
  ------------------
  213|      0|	return NULL;
  214|       |
  215|       |      /* The identifier "?LAST" indicates the last element
  216|       |         in the right chain. */
  217|    266|      if (n[0] == '?' && n[1] == 'L')	/* ?LAST */
  ------------------
  |  Branch (217:11): [True: 0, False: 266]
  |  Branch (217:26): [True: 0, False: 0]
  ------------------
  218|      0|	{
  219|      0|	  while (p->right)
  ------------------
  |  Branch (219:11): [True: 0, False: 0]
  ------------------
  220|      0|	    p = p->right;
  221|      0|	}
  222|    266|      else
  223|    266|	{			/* no "?LAST" */
  224|  11.1k|	  while (p)
  ------------------
  |  Branch (224:11): [True: 11.1k, False: 0]
  ------------------
  225|  11.1k|	    {
  226|  11.1k|	      if (p->name_hash == nhash && !strcmp (p->name, n))
  ------------------
  |  Branch (226:12): [True: 266, False: 10.8k]
  |  Branch (226:37): [True: 266, False: 0]
  ------------------
  227|    266|		break;
  228|  10.8k|	      else
  229|  10.8k|		p = p->right;
  230|  11.1k|	    }
  231|    266|	}
  232|    266|      if (p == NULL)
  ------------------
  |  Branch (232:11): [True: 0, False: 266]
  ------------------
  233|      0|	return NULL;
  234|    266|    }				/* while */
  235|       |
  236|    266|  return (asn1_node) p;
  237|    266|}
_asn1_set_value:
  252|    462|{
  253|    462|  if (node == NULL)
  ------------------
  |  Branch (253:7): [True: 0, False: 462]
  ------------------
  254|      0|    return node;
  255|    462|  if (node->value)
  ------------------
  |  Branch (255:7): [True: 0, False: 462]
  ------------------
  256|      0|    {
  257|      0|      if (node->value != node->small_value)
  ------------------
  |  Branch (257:11): [True: 0, False: 0]
  ------------------
  258|      0|	free (node->value);
  259|      0|      node->value = NULL;
  260|      0|      node->value_len = 0;
  261|      0|    }
  262|       |
  263|    462|  if (!len)
  ------------------
  |  Branch (263:7): [True: 0, False: 462]
  ------------------
  264|      0|    return node;
  265|       |
  266|    462|  if (len < sizeof (node->small_value))
  ------------------
  |  Branch (266:7): [True: 314, False: 148]
  ------------------
  267|    314|    {
  268|    314|      node->value = node->small_value;
  269|    314|    }
  270|    148|  else
  271|    148|    {
  272|    148|      node->value = malloc (len);
  273|    148|      if (node->value == NULL)
  ------------------
  |  Branch (273:11): [True: 0, False: 148]
  ------------------
  274|      0|	return NULL;
  275|    148|    }
  276|    462|  node->value_len = len;
  277|       |
  278|    462|  memcpy (node->value, value, len);
  279|    462|  return node;
  280|    462|}
_asn1_set_name:
  409|    898|{
  410|    898|  if (node == NULL)
  ------------------
  |  Branch (410:7): [True: 0, False: 898]
  ------------------
  411|      0|    return node;
  412|       |
  413|    898|  _asn1_str_cpy (node->name, sizeof (node->name), name ? name : "");
  ------------------
  |  Branch (413:51): [True: 898, False: 0]
  ------------------
  414|    898|  node->name_hash = _asn1_hash_name (node->name);
  415|       |
  416|    898|  return node;
  417|    898|}
_asn1_set_right:
  457|    714|{
  458|    714|  if (node == NULL)
  ------------------
  |  Branch (458:7): [True: 0, False: 714]
  ------------------
  459|      0|    return node;
  460|    714|  node->right = right;
  461|    714|  if (right)
  ------------------
  |  Branch (461:7): [True: 714, False: 0]
  ------------------
  462|    714|    right->left = node;
  463|    714|  return node;
  464|    714|}
_asn1_find_up:
  523|  2.12k|{
  524|  2.12k|  asn1_node_const p;
  525|       |
  526|  2.12k|  if (node == NULL)
  ------------------
  |  Branch (526:7): [True: 0, False: 2.12k]
  ------------------
  527|      0|    return NULL;
  528|       |
  529|  2.12k|  p = node;
  530|       |
  531|  5.69k|  while ((p->left != NULL) && (p->left->right == p))
  ------------------
  |  Branch (531:10): [True: 5.69k, False: 0]
  |  Branch (531:31): [True: 3.57k, False: 2.12k]
  ------------------
  532|  3.57k|    p = p->left;
  533|       |
  534|  2.12k|  return p->left;
  535|  2.12k|}
_asn1_delete_list:
  581|      4|{
  582|      4|  list_type *p;
  583|       |
  584|  1.14k|  while (e_list)
  ------------------
  |  Branch (584:10): [True: 1.14k, False: 4]
  ------------------
  585|  1.14k|    {
  586|  1.14k|      p = e_list;
  587|  1.14k|      e_list = e_list->next;
  588|  1.14k|      free (p);
  589|  1.14k|    }
  590|      4|}
_asn1_change_integer_value:
  662|      4|{
  663|      4|  asn1_node p;
  664|      4|  unsigned char val[SIZEOF_UNSIGNED_LONG_INT];
  665|      4|  unsigned char val2[SIZEOF_UNSIGNED_LONG_INT + 1];
  666|      4|  int len;
  667|       |
  668|      4|  if (node == NULL)
  ------------------
  |  Branch (668:7): [True: 0, False: 4]
  ------------------
  669|      0|    return ASN1_ELEMENT_NOT_FOUND;
  ------------------
  |  |  118|      0|# define ASN1_ELEMENT_NOT_FOUND		2
  ------------------
  670|       |
  671|      4|  p = node;
  672|  1.14k|  while (p)
  ------------------
  |  Branch (672:10): [True: 1.14k, False: 4]
  ------------------
  673|  1.14k|    {
  674|  1.14k|      if ((type_field (p->type) == ASN1_ETYPE_INTEGER)
  ------------------
  |  |  217|  1.14k|# define ASN1_ETYPE_INTEGER        3
  ------------------
  |  Branch (674:11): [True: 124, False: 1.01k]
  ------------------
  675|  1.14k|	  && (p->type & CONST_ASSIGN))
  ------------------
  |  |  166|    124|# define CONST_ASSIGN      (1U<<28)
  ------------------
  |  Branch (675:7): [True: 0, False: 124]
  ------------------
  676|      0|	{
  677|      0|	  if (p->value)
  ------------------
  |  Branch (677:8): [True: 0, False: 0]
  ------------------
  678|      0|	    {
  679|      0|	      _asn1_convert_integer (p->value, val, sizeof (val), &len);
  680|      0|	      asn1_octet_der (val, len, val2, &len);
  681|      0|	      _asn1_set_value (p, val2, len);
  682|      0|	    }
  683|      0|	}
  684|       |
  685|  1.14k|      if (p->down)
  ------------------
  |  Branch (685:11): [True: 424, False: 718]
  ------------------
  686|    424|	{
  687|    424|	  p = p->down;
  688|    424|	}
  689|    718|      else
  690|    718|	{
  691|    718|	  if (p == node)
  ------------------
  |  Branch (691:8): [True: 0, False: 718]
  ------------------
  692|      0|	    p = NULL;
  693|    718|	  else if (p->right)
  ------------------
  |  Branch (693:13): [True: 392, False: 326]
  ------------------
  694|    392|	    p = p->right;
  695|    326|	  else
  696|    326|	    {
  697|    424|	      while (1)
  ------------------
  |  Branch (697:15): [Folded - Ignored]
  ------------------
  698|    424|		{
  699|    424|		  p = _asn1_find_up (p);
  700|    424|		  if (p == node)
  ------------------
  |  Branch (700:9): [True: 4, False: 420]
  ------------------
  701|      4|		    {
  702|      4|		      p = NULL;
  703|      4|		      break;
  704|      4|		    }
  705|    420|		  if (p && p->right)
  ------------------
  |  Branch (705:9): [True: 420, False: 0]
  |  Branch (705:14): [True: 322, False: 98]
  ------------------
  706|    322|		    {
  707|    322|		      p = p->right;
  708|    322|		      break;
  709|    322|		    }
  710|    420|		}
  711|    326|	    }
  712|    718|	}
  713|  1.14k|    }
  714|       |
  715|      4|  return ASN1_SUCCESS;
  ------------------
  |  |  116|      4|# define ASN1_SUCCESS			0
  ------------------
  716|      4|}
_asn1_expand_object_id:
  731|      4|{
  732|      4|  asn1_node p, p2, p3, p4, p5;
  733|      4|  char name_root[ASN1_MAX_NAME_SIZE], name2[2 * ASN1_MAX_NAME_SIZE + 1];
  734|      4|  int move, tlen, tries;
  735|      4|  unsigned max_constants;
  736|       |
  737|      4|  if (node == NULL)
  ------------------
  |  Branch (737:7): [True: 0, False: 4]
  ------------------
  738|      0|    return ASN1_ELEMENT_NOT_FOUND;
  ------------------
  |  |  118|      0|# define ASN1_ELEMENT_NOT_FOUND		2
  ------------------
  739|       |
  740|      4|  _asn1_str_cpy (name_root, sizeof (name_root), node->name);
  741|       |
  742|      4|  p = node;
  743|      4|  move = DOWN;
  ------------------
  |  |  131|      4|# define DOWN   3
  ------------------
  744|      4|  tries = 0;
  745|       |
  746|  1.56k|  while (!((p == node) && (move == UP)))
  ------------------
  |  |  129|      8|# define UP     1
  ------------------
  |  Branch (746:12): [True: 8, False: 1.55k]
  |  Branch (746:27): [True: 4, False: 4]
  ------------------
  747|  1.56k|    {
  748|  1.56k|      if (move != UP)
  ------------------
  |  |  129|  1.56k|# define UP     1
  ------------------
  |  Branch (748:11): [True: 1.14k, False: 420]
  ------------------
  749|  1.14k|	{
  750|  1.14k|	  if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID)
  ------------------
  |  |  226|  1.14k|# define ASN1_ETYPE_OBJECT_ID     12
  ------------------
  |  Branch (750:8): [True: 68, False: 1.07k]
  ------------------
  751|  1.14k|	      && (p->type & CONST_ASSIGN))
  ------------------
  |  |  166|     68|# define CONST_ASSIGN      (1U<<28)
  ------------------
  |  Branch (751:11): [True: 2, False: 66]
  ------------------
  752|      2|	    {
  753|      2|	      p2 = p->down;
  754|      2|	      if (p2 && (type_field (p2->type) == ASN1_ETYPE_CONSTANT))
  ------------------
  |  |  215|      2|# define ASN1_ETYPE_CONSTANT       1
  ------------------
  |  Branch (754:12): [True: 2, False: 0]
  |  Branch (754:18): [True: 2, False: 0]
  ------------------
  755|      2|		{
  756|      2|		  if (p2->value && !c_isdigit (p2->value[0]))
  ------------------
  |  Branch (756:9): [True: 2, False: 0]
  |  Branch (756:22): [True: 0, False: 2]
  ------------------
  757|      0|		    {
  758|      0|		      _asn1_str_cpy (name2, sizeof (name2), name_root);
  759|      0|		      _asn1_str_cat (name2, sizeof (name2), ".");
  760|      0|		      _asn1_str_cat (name2, sizeof (name2),
  761|      0|				     (char *) p2->value);
  762|      0|		      p3 = asn1_find_node (node, name2);
  763|      0|		      if (!p3 || _asn1_is_up (p2, p3) ||
  ------------------
  |  Branch (763:13): [True: 0, False: 0]
  |  Branch (763:20): [True: 0, False: 0]
  ------------------
  764|      0|			  (type_field (p3->type) != ASN1_ETYPE_OBJECT_ID) ||
  ------------------
  |  |  226|      0|# define ASN1_ETYPE_OBJECT_ID     12
  ------------------
  |  Branch (764:6): [True: 0, False: 0]
  ------------------
  765|      0|			  !(p3->type & CONST_ASSIGN))
  ------------------
  |  |  166|      0|# define CONST_ASSIGN      (1U<<28)
  ------------------
  |  Branch (765:6): [True: 0, False: 0]
  ------------------
  766|      0|			return ASN1_ELEMENT_NOT_FOUND;
  ------------------
  |  |  118|      0|# define ASN1_ELEMENT_NOT_FOUND		2
  ------------------
  767|       |
  768|      0|		      _asn1_set_down (p, p2->right);
  769|      0|		      if (p2->down)
  ------------------
  |  Branch (769:13): [True: 0, False: 0]
  ------------------
  770|      0|			_asn1_delete_structure (*list, &p2->down, 0);
  771|      0|		      _asn1_delete_node_from_list (*list, p2);
  772|      0|		      _asn1_remove_node (p2, 0);
  773|      0|		      p2 = p;
  774|      0|		      p4 = p3->down;
  775|      0|		      max_constants = 0;
  776|      0|		      while (p4)
  ------------------
  |  Branch (776:16): [True: 0, False: 0]
  ------------------
  777|      0|			{
  778|      0|			  if (type_field (p4->type) == ASN1_ETYPE_CONSTANT)
  ------------------
  |  |  215|      0|# define ASN1_ETYPE_CONSTANT       1
  ------------------
  |  Branch (778:10): [True: 0, False: 0]
  ------------------
  779|      0|			    {
  780|      0|			      max_constants++;
  781|      0|			      if (max_constants == MAX_CONSTANTS)
  ------------------
  |  |  718|      0|#define MAX_CONSTANTS 1024
  ------------------
  |  Branch (781:14): [True: 0, False: 0]
  ------------------
  782|      0|				return ASN1_RECURSION;
  ------------------
  |  |  135|      0|# define ASN1_RECURSION			19
  ------------------
  783|       |
  784|      0|			      p5 =
  785|      0|				_asn1_add_single_node (ASN1_ETYPE_CONSTANT);
  ------------------
  |  |  215|      0|# define ASN1_ETYPE_CONSTANT       1
  ------------------
  786|      0|			      _asn1_set_name (p5, p4->name);
  787|      0|			      if (p4->value)
  ------------------
  |  Branch (787:14): [True: 0, False: 0]
  ------------------
  788|      0|				{
  789|      0|				  tlen = _asn1_strlen (p4->value);
  ------------------
  |  |  113|      0|# define _asn1_strlen(s) strlen((const char *) s)
  ------------------
  790|      0|				  if (tlen > 0)
  ------------------
  |  Branch (790:11): [True: 0, False: 0]
  ------------------
  791|      0|				    _asn1_set_value (p5, p4->value, tlen + 1);
  792|      0|				}
  793|      0|			      _asn1_add_static_node2 (list, p5);
  794|       |
  795|      0|			      if (p2 == p)
  ------------------
  |  Branch (795:14): [True: 0, False: 0]
  ------------------
  796|      0|				{
  797|      0|				  _asn1_set_right (p5, p->down);
  798|      0|				  _asn1_set_down (p, p5);
  799|      0|				}
  800|      0|			      else
  801|      0|				{
  802|      0|				  _asn1_set_right (p5, p2->right);
  803|      0|				  _asn1_set_right (p2, p5);
  804|      0|				}
  805|      0|			      p2 = p5;
  806|      0|			    }
  807|      0|			  p4 = p4->right;
  808|      0|			}
  809|      0|		      move = DOWN;
  ------------------
  |  |  131|      0|# define DOWN   3
  ------------------
  810|       |
  811|      0|		      tries++;
  812|      0|		      if (tries >= EXPAND_OBJECT_ID_MAX_RECURSION)
  ------------------
  |  |   76|      0|# define EXPAND_OBJECT_ID_MAX_RECURSION 16
  ------------------
  |  Branch (812:13): [True: 0, False: 0]
  ------------------
  813|      0|			return ASN1_RECURSION;
  ------------------
  |  |  135|      0|# define ASN1_RECURSION			19
  ------------------
  814|       |
  815|      0|		      continue;
  816|      0|		    }
  817|      2|		}
  818|      2|	    }
  819|  1.14k|	  move = DOWN;
  ------------------
  |  |  131|  1.14k|# define DOWN   3
  ------------------
  820|  1.14k|	}
  821|    420|      else
  822|    420|	move = RIGHT;
  ------------------
  |  |  130|    420|# define RIGHT  2
  ------------------
  823|       |
  824|  1.56k|      tries = 0;
  825|  1.56k|      if (move == DOWN)
  ------------------
  |  |  131|  1.56k|# define DOWN   3
  ------------------
  |  Branch (825:11): [True: 1.14k, False: 420]
  ------------------
  826|  1.14k|	{
  827|  1.14k|	  if (p->down)
  ------------------
  |  Branch (827:8): [True: 424, False: 718]
  ------------------
  828|    424|	    p = p->down;
  829|    718|	  else
  830|    718|	    move = RIGHT;
  ------------------
  |  |  130|    718|# define RIGHT  2
  ------------------
  831|  1.14k|	}
  832|       |
  833|  1.56k|      if (p == node)
  ------------------
  |  Branch (833:11): [True: 0, False: 1.56k]
  ------------------
  834|      0|	{
  835|      0|	  move = UP;
  ------------------
  |  |  129|      0|# define UP     1
  ------------------
  836|      0|	  continue;
  837|      0|	}
  838|       |
  839|  1.56k|      if (move == RIGHT)
  ------------------
  |  |  130|  1.56k|# define RIGHT  2
  ------------------
  |  Branch (839:11): [True: 1.13k, False: 424]
  ------------------
  840|  1.13k|	{
  841|  1.13k|	  if (p && p->right)
  ------------------
  |  Branch (841:8): [True: 1.13k, False: 0]
  |  Branch (841:13): [True: 714, False: 424]
  ------------------
  842|    714|	    p = p->right;
  843|    424|	  else
  844|    424|	    move = UP;
  ------------------
  |  |  129|    424|# define UP     1
  ------------------
  845|  1.13k|	}
  846|  1.56k|      if (move == UP)
  ------------------
  |  |  129|  1.56k|# define UP     1
  ------------------
  |  Branch (846:11): [True: 424, False: 1.13k]
  ------------------
  847|    424|	p = _asn1_find_up (p);
  848|  1.56k|    }
  849|       |
  850|       |  /*******************************/
  851|       |  /*       expand DEFAULT        */
  852|       |  /*******************************/
  853|      4|  p = node;
  854|      4|  move = DOWN;
  ------------------
  |  |  131|      4|# define DOWN   3
  ------------------
  855|       |
  856|  1.56k|  while (!((p == node) && (move == UP)))
  ------------------
  |  |  129|      8|# define UP     1
  ------------------
  |  Branch (856:12): [True: 8, False: 1.55k]
  |  Branch (856:27): [True: 4, False: 4]
  ------------------
  857|  1.56k|    {
  858|  1.56k|      if (move != UP)
  ------------------
  |  |  129|  1.56k|# define UP     1
  ------------------
  |  Branch (858:11): [True: 1.14k, False: 420]
  ------------------
  859|  1.14k|	{
  860|  1.14k|	  if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID) &&
  ------------------
  |  |  226|  1.14k|# define ASN1_ETYPE_OBJECT_ID     12
  ------------------
  |  Branch (860:8): [True: 68, False: 1.07k]
  ------------------
  861|  1.14k|	      (p->type & CONST_DEFAULT))
  ------------------
  |  |  145|     68|# define CONST_DEFAULT     (1U<<15)
  ------------------
  |  Branch (861:8): [True: 0, False: 68]
  ------------------
  862|      0|	    {
  863|      0|	      p2 = p->down;
  864|      0|	      if (p2 && (type_field (p2->type) == ASN1_ETYPE_DEFAULT))
  ------------------
  |  |  223|      0|# define ASN1_ETYPE_DEFAULT        9
  ------------------
  |  Branch (864:12): [True: 0, False: 0]
  |  Branch (864:18): [True: 0, False: 0]
  ------------------
  865|      0|		{
  866|      0|		  _asn1_str_cpy (name2, sizeof (name2), name_root);
  867|      0|		  _asn1_str_cat (name2, sizeof (name2), ".");
  868|      0|		  if (p2->value)
  ------------------
  |  Branch (868:9): [True: 0, False: 0]
  ------------------
  869|      0|		    _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
  870|      0|		  p3 = asn1_find_node (node, name2);
  871|      0|		  if (!p3 || (type_field (p3->type) != ASN1_ETYPE_OBJECT_ID)
  ------------------
  |  |  226|      0|# define ASN1_ETYPE_OBJECT_ID     12
  ------------------
  |  Branch (871:9): [True: 0, False: 0]
  |  Branch (871:16): [True: 0, False: 0]
  ------------------
  872|      0|		      || !(p3->type & CONST_ASSIGN))
  ------------------
  |  |  166|      0|# define CONST_ASSIGN      (1U<<28)
  ------------------
  |  Branch (872:12): [True: 0, False: 0]
  ------------------
  873|      0|		    return ASN1_ELEMENT_NOT_FOUND;
  ------------------
  |  |  118|      0|# define ASN1_ELEMENT_NOT_FOUND		2
  ------------------
  874|      0|		  p4 = p3->down;
  875|      0|		  name2[0] = 0;
  876|      0|		  while (p4)
  ------------------
  |  Branch (876:12): [True: 0, False: 0]
  ------------------
  877|      0|		    {
  878|      0|		      if (type_field (p4->type) == ASN1_ETYPE_CONSTANT)
  ------------------
  |  |  215|      0|# define ASN1_ETYPE_CONSTANT       1
  ------------------
  |  Branch (878:13): [True: 0, False: 0]
  ------------------
  879|      0|			{
  880|      0|			  if (p4->value == NULL)
  ------------------
  |  Branch (880:10): [True: 0, False: 0]
  ------------------
  881|      0|			    return ASN1_VALUE_NOT_FOUND;
  ------------------
  |  |  121|      0|# define ASN1_VALUE_NOT_FOUND		5
  ------------------
  882|       |
  883|      0|			  if (name2[0])
  ------------------
  |  Branch (883:10): [True: 0, False: 0]
  ------------------
  884|      0|			    _asn1_str_cat (name2, sizeof (name2), ".");
  885|      0|			  _asn1_str_cat (name2, sizeof (name2),
  886|      0|					 (char *) p4->value);
  887|      0|			}
  888|      0|		      p4 = p4->right;
  889|      0|		    }
  890|      0|		  tlen = strlen (name2);
  891|      0|		  if (tlen > 0)
  ------------------
  |  Branch (891:9): [True: 0, False: 0]
  ------------------
  892|      0|		    _asn1_set_value (p2, name2, tlen + 1);
  893|      0|		}
  894|      0|	    }
  895|  1.14k|	  move = DOWN;
  ------------------
  |  |  131|  1.14k|# define DOWN   3
  ------------------
  896|  1.14k|	}
  897|    420|      else
  898|    420|	move = RIGHT;
  ------------------
  |  |  130|    420|# define RIGHT  2
  ------------------
  899|       |
  900|  1.56k|      if (move == DOWN)
  ------------------
  |  |  131|  1.56k|# define DOWN   3
  ------------------
  |  Branch (900:11): [True: 1.14k, False: 420]
  ------------------
  901|  1.14k|	{
  902|  1.14k|	  if (p->down)
  ------------------
  |  Branch (902:8): [True: 424, False: 718]
  ------------------
  903|    424|	    p = p->down;
  904|    718|	  else
  905|    718|	    move = RIGHT;
  ------------------
  |  |  130|    718|# define RIGHT  2
  ------------------
  906|  1.14k|	}
  907|       |
  908|  1.56k|      if (p == node)
  ------------------
  |  Branch (908:11): [True: 0, False: 1.56k]
  ------------------
  909|      0|	{
  910|      0|	  move = UP;
  ------------------
  |  |  129|      0|# define UP     1
  ------------------
  911|      0|	  continue;
  912|      0|	}
  913|       |
  914|  1.56k|      if (move == RIGHT)
  ------------------
  |  |  130|  1.56k|# define RIGHT  2
  ------------------
  |  Branch (914:11): [True: 1.13k, False: 424]
  ------------------
  915|  1.13k|	{
  916|  1.13k|	  if (p && p->right)
  ------------------
  |  Branch (916:8): [True: 1.13k, False: 0]
  |  Branch (916:13): [True: 714, False: 424]
  ------------------
  917|    714|	    p = p->right;
  918|    424|	  else
  919|    424|	    move = UP;
  ------------------
  |  |  129|    424|# define UP     1
  ------------------
  920|  1.13k|	}
  921|  1.56k|      if (move == UP)
  ------------------
  |  |  129|  1.56k|# define UP     1
  ------------------
  |  Branch (921:11): [True: 424, False: 1.13k]
  ------------------
  922|    424|	p = _asn1_find_up (p);
  923|  1.56k|    }
  924|       |
  925|      4|  return ASN1_SUCCESS;
  ------------------
  |  |  116|      4|# define ASN1_SUCCESS			0
  ------------------
  926|      4|}
_asn1_check_identifier:
 1014|      4|{
 1015|      4|  asn1_node_const p, p2;
 1016|      4|  char name2[ASN1_MAX_NAME_SIZE * 2 + 2];
 1017|       |
 1018|      4|  if (node == NULL)
  ------------------
  |  Branch (1018:7): [True: 0, False: 4]
  ------------------
 1019|      0|    return ASN1_ELEMENT_NOT_FOUND;
  ------------------
  |  |  118|      0|# define ASN1_ELEMENT_NOT_FOUND		2
  ------------------
 1020|       |
 1021|      4|  p = node;
 1022|  1.14k|  while (p)
  ------------------
  |  Branch (1022:10): [True: 1.14k, False: 4]
  ------------------
 1023|  1.14k|    {
 1024|  1.14k|      if (p->value && type_field (p->type) == ASN1_ETYPE_IDENTIFIER)
  ------------------
  |  |  216|    462|# define ASN1_ETYPE_IDENTIFIER     2
  ------------------
  |  Branch (1024:11): [True: 462, False: 680]
  |  Branch (1024:23): [True: 266, False: 196]
  ------------------
 1025|    266|	{
 1026|    266|	  _asn1_str_cpy (name2, sizeof (name2), node->name);
 1027|    266|	  _asn1_str_cat (name2, sizeof (name2), ".");
 1028|    266|	  _asn1_str_cat (name2, sizeof (name2), (char *) p->value);
 1029|    266|	  p2 = asn1_find_node (node, name2);
 1030|    266|	  if (p2 == NULL)
  ------------------
  |  Branch (1030:8): [True: 0, False: 266]
  ------------------
 1031|      0|	    {
 1032|      0|	      if (p->value)
  ------------------
  |  Branch (1032:12): [True: 0, False: 0]
  ------------------
 1033|      0|		_asn1_str_cpy (_asn1_identifierMissing,
 1034|      0|			       sizeof (_asn1_identifierMissing),
 1035|      0|			       (char *) p->value);
 1036|      0|	      else
 1037|      0|		_asn1_strcpy (_asn1_identifierMissing, "(null)");
  ------------------
  |  |  117|      0|# define _asn1_strcpy(a,b) strcpy((char *)a, (const char *)b)
  ------------------
 1038|      0|	      return ASN1_IDENTIFIER_NOT_FOUND;
  ------------------
  |  |  119|      0|# define ASN1_IDENTIFIER_NOT_FOUND	3
  ------------------
 1039|      0|	    }
 1040|    266|	}
 1041|    876|      else if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID) &&
  ------------------
  |  |  226|    876|# define ASN1_ETYPE_OBJECT_ID     12
  ------------------
  |  Branch (1041:16): [True: 68, False: 808]
  ------------------
 1042|    876|	       (p->type & CONST_DEFAULT))
  ------------------
  |  |  145|     68|# define CONST_DEFAULT     (1U<<15)
  ------------------
  |  Branch (1042:9): [True: 0, False: 68]
  ------------------
 1043|      0|	{
 1044|      0|	  p2 = p->down;
 1045|      0|	  if (p2 && (type_field (p2->type) == ASN1_ETYPE_DEFAULT))
  ------------------
  |  |  223|      0|# define ASN1_ETYPE_DEFAULT        9
  ------------------
  |  Branch (1045:8): [True: 0, False: 0]
  |  Branch (1045:14): [True: 0, False: 0]
  ------------------
 1046|      0|	    {
 1047|      0|	      _asn1_str_cpy (name2, sizeof (name2), node->name);
 1048|      0|	      if (p2->value)
  ------------------
  |  Branch (1048:12): [True: 0, False: 0]
  ------------------
 1049|      0|		{
 1050|      0|		  _asn1_str_cat (name2, sizeof (name2), ".");
 1051|      0|		  _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
 1052|      0|		  _asn1_str_cpy (_asn1_identifierMissing,
 1053|      0|				 sizeof (_asn1_identifierMissing),
 1054|      0|				 (char *) p2->value);
 1055|      0|		}
 1056|      0|	      else
 1057|      0|		_asn1_strcpy (_asn1_identifierMissing, "(null)");
  ------------------
  |  |  117|      0|# define _asn1_strcpy(a,b) strcpy((char *)a, (const char *)b)
  ------------------
 1058|       |
 1059|      0|	      p2 = asn1_find_node (node, name2);
 1060|      0|	      if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID) ||
  ------------------
  |  |  226|      0|# define ASN1_ETYPE_OBJECT_ID     12
  ------------------
  |  Branch (1060:12): [True: 0, False: 0]
  |  Branch (1060:19): [True: 0, False: 0]
  ------------------
 1061|      0|		  !(p2->type & CONST_ASSIGN))
  ------------------
  |  |  166|      0|# define CONST_ASSIGN      (1U<<28)
  ------------------
  |  Branch (1061:5): [True: 0, False: 0]
  ------------------
 1062|      0|		return ASN1_IDENTIFIER_NOT_FOUND;
  ------------------
  |  |  119|      0|# define ASN1_IDENTIFIER_NOT_FOUND	3
  ------------------
 1063|      0|	      else
 1064|      0|		_asn1_identifierMissing[0] = 0;
 1065|      0|	    }
 1066|      0|	}
 1067|    876|      else if ((type_field (p->type) == ASN1_ETYPE_OBJECT_ID) &&
  ------------------
  |  |  226|    876|# define ASN1_ETYPE_OBJECT_ID     12
  ------------------
  |  Branch (1067:16): [True: 68, False: 808]
  ------------------
 1068|    876|	       (p->type & CONST_ASSIGN))
  ------------------
  |  |  166|     68|# define CONST_ASSIGN      (1U<<28)
  ------------------
  |  Branch (1068:9): [True: 2, False: 66]
  ------------------
 1069|      2|	{
 1070|      2|	  p2 = p->down;
 1071|      2|	  if (p2 && (type_field (p2->type) == ASN1_ETYPE_CONSTANT))
  ------------------
  |  |  215|      2|# define ASN1_ETYPE_CONSTANT       1
  ------------------
  |  Branch (1071:8): [True: 2, False: 0]
  |  Branch (1071:14): [True: 2, False: 0]
  ------------------
 1072|      2|	    {
 1073|      2|	      if (p2->value && !c_isdigit (p2->value[0]))
  ------------------
  |  Branch (1073:12): [True: 2, False: 0]
  |  Branch (1073:25): [True: 0, False: 2]
  ------------------
 1074|      0|		{
 1075|      0|		  _asn1_str_cpy (name2, sizeof (name2), node->name);
 1076|      0|		  _asn1_str_cat (name2, sizeof (name2), ".");
 1077|      0|		  _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
 1078|      0|		  _asn1_str_cpy (_asn1_identifierMissing,
 1079|      0|				 sizeof (_asn1_identifierMissing),
 1080|      0|				 (char *) p2->value);
 1081|       |
 1082|      0|		  p2 = asn1_find_node (node, name2);
 1083|      0|		  if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID)
  ------------------
  |  |  226|      0|# define ASN1_ETYPE_OBJECT_ID     12
  ------------------
  |  Branch (1083:9): [True: 0, False: 0]
  |  Branch (1083:16): [True: 0, False: 0]
  ------------------
 1084|      0|		      || !(p2->type & CONST_ASSIGN))
  ------------------
  |  |  166|      0|# define CONST_ASSIGN      (1U<<28)
  ------------------
  |  Branch (1084:12): [True: 0, False: 0]
  ------------------
 1085|      0|		    return ASN1_IDENTIFIER_NOT_FOUND;
  ------------------
  |  |  119|      0|# define ASN1_IDENTIFIER_NOT_FOUND	3
  ------------------
 1086|      0|		  else
 1087|      0|		    _asn1_identifierMissing[0] = 0;
 1088|      0|		}
 1089|      2|	    }
 1090|      2|	}
 1091|       |
 1092|  1.14k|      if (p->down)
  ------------------
  |  Branch (1092:11): [True: 424, False: 718]
  ------------------
 1093|    424|	{
 1094|    424|	  p = p->down;
 1095|    424|	}
 1096|    718|      else if (p->right)
  ------------------
  |  Branch (1096:16): [True: 392, False: 326]
  ------------------
 1097|    392|	p = p->right;
 1098|    326|      else
 1099|    326|	{
 1100|    424|	  while (p)
  ------------------
  |  Branch (1100:11): [True: 424, False: 0]
  ------------------
 1101|    424|	    {
 1102|    424|	      p = _asn1_find_up (p);
 1103|    424|	      if (p == node)
  ------------------
  |  Branch (1103:12): [True: 4, False: 420]
  ------------------
 1104|      4|		{
 1105|      4|		  p = NULL;
 1106|      4|		  break;
 1107|      4|		}
 1108|    420|	      if (p && p->right)
  ------------------
  |  Branch (1108:12): [True: 420, False: 0]
  |  Branch (1108:17): [True: 322, False: 98]
  ------------------
 1109|    322|		{
 1110|    322|		  p = p->right;
 1111|    322|		  break;
 1112|    322|		}
 1113|    420|	    }
 1114|    326|	}
 1115|  1.14k|    }
 1116|       |
 1117|      4|  return ASN1_SUCCESS;
  ------------------
  |  |  116|      4|# define ASN1_SUCCESS			0
  ------------------
 1118|      4|}
parser_aux.c:_asn1_hash_name:
   44|  1.43k|{
   45|  1.43k|  const unsigned char *s = (unsigned char *) x;
   46|  1.43k|  unsigned h = 0;
   47|       |
   48|  17.9k|  while (*s)
  ------------------
  |  Branch (48:10): [True: 16.5k, False: 1.43k]
  ------------------
   49|  16.5k|    h = (*s++) + ((h << 9) | (h >> (WORD_BIT - 9)));
   50|       |
   51|  1.43k|  return h;
   52|  1.43k|}

structure.c:_asn1_set_down:
  112|    424|{
  113|    424|  if (node == NULL)
  ------------------
  |  Branch (113:7): [True: 0, False: 424]
  ------------------
  114|      0|    return node;
  115|    424|  node->down = down;
  116|    424|  if (down)
  ------------------
  |  Branch (116:7): [True: 424, False: 0]
  ------------------
  117|    424|    down->left = node;
  118|    424|  return node;
  119|    424|}

asn1_array2tree:
  179|      4|{
  180|      4|  asn1_node p, p_last = NULL;
  181|      4|  unsigned long k;
  182|      4|  int move;
  183|      4|  int result;
  184|      4|  unsigned int type;
  185|      4|  list_type *e_list = NULL;
  186|       |
  187|      4|  if (errorDescription)
  ------------------
  |  Branch (187:7): [True: 0, False: 4]
  ------------------
  188|      0|    errorDescription[0] = 0;
  189|       |
  190|      4|  if (*definitions != NULL)
  ------------------
  |  Branch (190:7): [True: 0, False: 4]
  ------------------
  191|      0|    return ASN1_ELEMENT_NOT_EMPTY;
  ------------------
  |  |  133|      0|# define ASN1_ELEMENT_NOT_EMPTY		17
  ------------------
  192|       |
  193|      4|  move = UP;
  ------------------
  |  |  129|      4|# define UP     1
  ------------------
  194|       |
  195|  1.14k|  for (k = 0; array[k].value || array[k].type || array[k].name; k++)
  ------------------
  |  Branch (195:15): [True: 462, False: 684]
  |  Branch (195:33): [True: 680, False: 4]
  |  Branch (195:50): [True: 0, False: 4]
  ------------------
  196|  1.14k|    {
  197|  1.14k|      type = convert_old_type (array[k].type);
  198|       |
  199|  1.14k|      p = _asn1_add_static_node (&e_list, type & (~CONST_DOWN));
  ------------------
  |  |  168|  1.14k|# define CONST_DOWN        (1U<<29)
  ------------------
  200|  1.14k|      if (array[k].name)
  ------------------
  |  Branch (200:11): [True: 898, False: 244]
  ------------------
  201|    898|	_asn1_set_name (p, array[k].name);
  202|  1.14k|      if (array[k].value)
  ------------------
  |  Branch (202:11): [True: 462, False: 680]
  ------------------
  203|    462|	_asn1_set_value (p, array[k].value, strlen (array[k].value) + 1);
  204|       |
  205|  1.14k|      if (*definitions == NULL)
  ------------------
  |  Branch (205:11): [True: 4, False: 1.13k]
  ------------------
  206|      4|	*definitions = p;
  207|       |
  208|  1.14k|      if (move == DOWN)
  ------------------
  |  |  131|  1.14k|# define DOWN   3
  ------------------
  |  Branch (208:11): [True: 424, False: 718]
  ------------------
  209|    424|	{
  210|    424|	  if (p_last && p_last->down)
  ------------------
  |  Branch (210:8): [True: 424, False: 0]
  |  Branch (210:18): [True: 0, False: 424]
  ------------------
  211|      0|	    _asn1_delete_structure (e_list, &p_last->down, 0);
  212|    424|	  _asn1_set_down (p_last, p);
  213|    424|	}
  214|    718|      else if (move == RIGHT)
  ------------------
  |  |  130|    718|# define RIGHT  2
  ------------------
  |  Branch (214:16): [True: 714, False: 4]
  ------------------
  215|    714|	{
  216|    714|	  if (p_last && p_last->right)
  ------------------
  |  Branch (216:8): [True: 714, False: 0]
  |  Branch (216:18): [True: 0, False: 714]
  ------------------
  217|      0|	    _asn1_delete_structure (e_list, &p_last->right, 0);
  218|    714|	  _asn1_set_right (p_last, p);
  219|    714|	}
  220|       |
  221|  1.14k|      p_last = p;
  222|       |
  223|  1.14k|      if (type & CONST_DOWN)
  ------------------
  |  |  168|  1.14k|# define CONST_DOWN        (1U<<29)
  ------------------
  |  Branch (223:11): [True: 424, False: 718]
  ------------------
  224|    424|	move = DOWN;
  ------------------
  |  |  131|    424|# define DOWN   3
  ------------------
  225|    718|      else if (type & CONST_RIGHT)
  ------------------
  |  |  169|    718|# define CONST_RIGHT       (1U<<30)
  ------------------
  |  Branch (225:16): [True: 392, False: 326]
  ------------------
  226|    392|	move = RIGHT;
  ------------------
  |  |  130|    392|# define RIGHT  2
  ------------------
  227|    326|      else
  228|    326|	{
  229|    428|	  while (p_last != *definitions)
  ------------------
  |  Branch (229:11): [True: 424, False: 4]
  ------------------
  230|    424|	    {
  231|    424|	      p_last = _asn1_find_up (p_last);
  232|       |
  233|    424|	      if (p_last == NULL)
  ------------------
  |  Branch (233:12): [True: 0, False: 424]
  ------------------
  234|      0|		break;
  235|       |
  236|    424|	      if (p_last->type & CONST_RIGHT)
  ------------------
  |  |  169|    424|# define CONST_RIGHT       (1U<<30)
  ------------------
  |  Branch (236:12): [True: 322, False: 102]
  ------------------
  237|    322|		{
  238|    322|		  p_last->type &= ~CONST_RIGHT;
  ------------------
  |  |  169|    322|# define CONST_RIGHT       (1U<<30)
  ------------------
  239|    322|		  move = RIGHT;
  ------------------
  |  |  130|    322|# define RIGHT  2
  ------------------
  240|    322|		  break;
  241|    322|		}
  242|    424|	    }			/* while */
  243|    326|	}
  244|  1.14k|    }				/* while */
  245|       |
  246|      4|  if (p_last == *definitions)
  ------------------
  |  Branch (246:7): [True: 4, False: 0]
  ------------------
  247|      4|    {
  248|      4|      result = _asn1_check_identifier (*definitions);
  249|      4|      if (result == ASN1_SUCCESS)
  ------------------
  |  |  116|      4|# define ASN1_SUCCESS			0
  ------------------
  |  Branch (249:11): [True: 4, False: 0]
  ------------------
  250|      4|	{
  251|      4|	  _asn1_change_integer_value (*definitions);
  252|      4|	  result = _asn1_expand_object_id (&e_list, *definitions);
  253|      4|	}
  254|      4|    }
  255|      0|  else
  256|      0|    {
  257|      0|      result = ASN1_ARRAY_ERROR;
  ------------------
  |  |  132|      0|# define ASN1_ARRAY_ERROR		16
  ------------------
  258|      0|    }
  259|       |
  260|      4|  if (errorDescription != NULL)
  ------------------
  |  Branch (260:7): [True: 0, False: 4]
  ------------------
  261|      0|    {
  262|      0|      if (result == ASN1_IDENTIFIER_NOT_FOUND)
  ------------------
  |  |  119|      0|# define ASN1_IDENTIFIER_NOT_FOUND	3
  ------------------
  |  Branch (262:11): [True: 0, False: 0]
  ------------------
  263|      0|	{
  264|      0|	  Estrcpy (errorDescription, ":: identifier '");
  ------------------
  |  |   29|      0|# define Estrcpy(x,y) _asn1_str_cpy(x,ASN1_MAX_ERROR_DESCRIPTION_SIZE,y)
  |  |  ------------------
  |  |  |  |  315|      0|# define ASN1_MAX_ERROR_DESCRIPTION_SIZE 128
  |  |  ------------------
  ------------------
  265|      0|	  Estrcat (errorDescription, _asn1_identifierMissing);
  ------------------
  |  |   30|      0|# define Estrcat(x,y) _asn1_str_cat(x,ASN1_MAX_ERROR_DESCRIPTION_SIZE,y)
  |  |  ------------------
  |  |  |  |  315|      0|# define ASN1_MAX_ERROR_DESCRIPTION_SIZE 128
  |  |  ------------------
  ------------------
  266|      0|	  Estrcat (errorDescription, "' not found");
  ------------------
  |  |   30|      0|# define Estrcat(x,y) _asn1_str_cat(x,ASN1_MAX_ERROR_DESCRIPTION_SIZE,y)
  |  |  ------------------
  |  |  |  |  315|      0|# define ASN1_MAX_ERROR_DESCRIPTION_SIZE 128
  |  |  ------------------
  ------------------
  267|      0|	}
  268|      0|      else
  269|      0|	errorDescription[0] = 0;
  270|      0|    }
  271|       |
  272|      4|  if (result != ASN1_SUCCESS)
  ------------------
  |  |  116|      4|# define ASN1_SUCCESS			0
  ------------------
  |  Branch (272:7): [True: 0, False: 4]
  ------------------
  273|      0|    {
  274|      0|      _asn1_delete_list_and_nodes (e_list);
  275|      0|      *definitions = NULL;
  276|      0|    }
  277|      4|  else
  278|      4|    _asn1_delete_list (e_list);
  279|       |
  280|      4|  return result;
  281|      4|}

asn1_check_version:
   46|      2|{
   47|      2|  if (!req_version || strverscmp (req_version, ASN1_VERSION) <= 0)
  ------------------
  |  |   71|      2|# define ASN1_VERSION "4.19.0"
  ------------------
  |  Branch (47:7): [True: 0, False: 2]
  |  Branch (47:23): [True: 2, False: 0]
  ------------------
   48|      2|    return ASN1_VERSION;
  ------------------
  |  |   71|      2|# define ASN1_VERSION "4.19.0"
  ------------------
   49|       |
   50|      0|  return NULL;
   51|      2|}

gnutls_crypto_init:
   41|      2|{
   42|      2|	void *(*defallocfunc)(size_t);
   43|      2|	void *(*defreallocfunc)(void *, size_t, size_t);
   44|      2|	void (*deffreefunc)(void *, size_t);
   45|       |
   46|       |	/* Check if non-default allocators are being used.
   47|       |	 * Some applications like guile override GMP allocators
   48|       |	 * with GC capable alternatives. Do nothing if this is
   49|       |	 * the case.
   50|       |	 */
   51|      2|	mp_get_memory_functions(&allocfunc, &reallocfunc, &freefunc);
   52|      2|	mp_set_memory_functions(NULL, NULL, NULL);
   53|      2|	mp_get_memory_functions(&defallocfunc, &defreallocfunc, &deffreefunc);
   54|      2|	if (reallocfunc != defreallocfunc || freefunc != deffreefunc) {
  ------------------
  |  Branch (54:6): [True: 0, False: 2]
  |  Branch (54:39): [True: 0, False: 2]
  ------------------
   55|      0|		mp_set_memory_functions(allocfunc, reallocfunc, freefunc);
   56|      0|		return (0);
   57|      0|	}
   58|       |
   59|       |	/* Overload GMP allocators with safe alternatives */
   60|      2|	mp_set_memory_functions(NULL, gnutls_realloc_zero, gnutls_free_zero);
   61|      2|	return 0;
   62|      2|}

_rnd_system_entropy_init:
  162|      2|{
  163|      2|	int urandom_fd;
  164|       |
  165|      2|#if defined(__linux__)
  166|       |	/* Enable getrandom() usage if available */
  167|      2|	if (have_getrandom()) {
  ------------------
  |  Branch (167:6): [True: 2, False: 0]
  ------------------
  168|      2|		_rnd_get_system_entropy = _rnd_get_system_entropy_getrandom;
  169|      2|		_gnutls_debug_log("getrandom random generator was selected\n");
  ------------------
  |  |  149|      2|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      2|	do {                                          \
  |  |  |  |  145|      2|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      2|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      2|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      2|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|      2|		return 0;
  171|      2|	} else {
  172|      0|		_gnutls_debug_log("getrandom is not available\n");
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  173|      0|	}
  174|      0|#endif
  175|       |
  176|       |	/* Fallback: /dev/urandom */
  177|       |
  178|       |	/* Check that we can open it */
  179|      0|	urandom_fd = open("/dev/urandom", O_RDONLY);
  180|      0|	if (urandom_fd < 0) {
  ------------------
  |  Branch (180:6): [True: 0, False: 0]
  ------------------
  181|      0|		_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|      0|			"Cannot open /dev/urandom during initialization!\n");
  183|      0|		return gnutls_assert_val(GNUTLS_E_RANDOM_DEVICE_ERROR);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
  184|      0|	}
  185|      0|	close(urandom_fd);
  186|       |
  187|      0|	_rnd_get_system_entropy = _rnd_get_system_entropy_urandom;
  188|      0|	_gnutls_debug_log("/dev/urandom random generator was selected\n");
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|       |
  190|      0|	return 0;
  191|      0|}
sysrng-linux.c:have_getrandom:
   72|      2|{
   73|      2|	char c;
   74|      2|	int ret;
   75|      2|	ret = getrandom(&c, 1, 1 /*GRND_NONBLOCK */);
   76|      2|	if (ret == 1 || (ret == -1 && errno == EAGAIN))
  ------------------
  |  Branch (76:6): [True: 2, False: 0]
  |  Branch (76:19): [True: 0, False: 0]
  |  Branch (76:32): [True: 0, False: 0]
  ------------------
   77|      2|		return 1;
   78|      0|	return 0;
   79|      2|}

_gnutls_prepare_to_load_system_priorities:
 2324|      2|{
 2325|      2|	const char *p;
 2326|      2|	int ret;
 2327|       |
 2328|      2|	p = secure_getenv("GNUTLS_SYSTEM_PRIORITY_FILE");
 2329|      2|	if (p != NULL)
  ------------------
  |  Branch (2329:6): [True: 0, False: 2]
  ------------------
 2330|      0|		system_priority_file = p;
 2331|       |
 2332|      2|	p = secure_getenv("GNUTLS_SYSTEM_PRIORITY_FAIL_ON_INVALID");
 2333|      2|	if (p != NULL && p[0] == '1' && p[1] == 0)
  ------------------
  |  Branch (2333:6): [True: 0, False: 2]
  |  Branch (2333:19): [True: 0, False: 0]
  |  Branch (2333:34): [True: 0, False: 0]
  ------------------
 2334|      0|		fail_on_invalid_config = 1;
 2335|       |
 2336|      2|	ret = _gnutls_update_system_priorities(true /* defer_system_wide */);
 2337|      2|	if (ret < 0) {
  ------------------
  |  Branch (2337:6): [True: 0, False: 2]
  ------------------
 2338|      0|		_gnutls_debug_log("failed to update system priorities: %s\n",
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2339|      0|				  gnutls_strerror(ret));
 2340|      0|	}
 2341|      2|}
priority.c:_gnutls_update_system_priorities:
 2202|      2|{
 2203|      2|	int ret, err = 0;
 2204|      2|	struct stat sb;
 2205|      2|	FILE *fp;
 2206|      2|	gnutls_buffer_st buf;
 2207|      2|	struct ini_ctx ctx;
 2208|       |
 2209|      2|	ret = gnutls_rwlock_rdlock(&system_wide_config_rwlock);
  ------------------
  |  |   62|      2|	(unlikely(glthread_rwlock_rdlock(RWLOCK)) ?          \
  |  |  ------------------
  |  |  |  |   75|      6|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (75:39): [True: 2, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      2|		 gnutls_assert_val(GNUTLS_E_LOCKING_ERROR) : \
  |  |  ------------------
  |  |  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |   64|      2|		 0)
  ------------------
 2210|      2|	if (ret < 0) {
  ------------------
  |  Branch (2210:6): [True: 0, False: 2]
  ------------------
 2211|      0|		return gnutls_assert_val(ret);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
 2212|      0|	}
 2213|       |
 2214|      2|	if (stat(system_priority_file, &sb) < 0) {
  ------------------
  |  Branch (2214:6): [True: 2, False: 0]
  ------------------
 2215|      2|		_gnutls_debug_log("cfg: unable to access: %s: %d\n",
  ------------------
  |  |  149|      2|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      2|	do {                                          \
  |  |  |  |  145|      2|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      2|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      2|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      2|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2216|      2|				  system_priority_file, errno);
 2217|      2|		goto out;
 2218|      2|	}
 2219|       |
 2220|      0|	if (system_priority_file_loaded &&
  ------------------
  |  Branch (2220:6): [True: 0, False: 0]
  ------------------
 2221|      0|	    system_priority_last_mod == sb.st_mtime) {
  ------------------
  |  Branch (2221:6): [True: 0, False: 0]
  ------------------
 2222|      0|		_gnutls_debug_log("cfg: system priority %s has not changed\n",
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2223|      0|				  system_priority_file);
 2224|      0|		if (system_wide_config.priority_string) {
  ------------------
  |  Branch (2224:7): [True: 0, False: 0]
  ------------------
 2225|      0|			goto out; /* nothing to do */
 2226|      0|		}
 2227|      0|	}
 2228|       |
 2229|      0|	(void)gnutls_rwlock_unlock(&system_wide_config_rwlock);
  ------------------
  |  |   72|      0|	(unlikely(glthread_rwlock_unlock(RWLOCK)) ?          \
  |  |  ------------------
  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|      0|		 gnutls_assert_val(GNUTLS_E_LOCKING_ERROR) : \
  |  |  ------------------
  |  |  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |   74|      0|		 0)
  ------------------
 2230|       |
 2231|      0|	ret = gnutls_rwlock_wrlock(&system_wide_config_rwlock);
  ------------------
  |  |   67|      0|	(unlikely(glthread_rwlock_wrlock(RWLOCK)) ?          \
  |  |  ------------------
  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   68|      0|		 gnutls_assert_val(GNUTLS_E_LOCKING_ERROR) : \
  |  |  ------------------
  |  |  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |   69|      0|		 0)
  ------------------
 2232|      0|	if (ret < 0) {
  ------------------
  |  Branch (2232:6): [True: 0, False: 0]
  ------------------
 2233|      0|		return gnutls_assert_val(ret);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
 2234|      0|	}
 2235|       |
 2236|       |	/* Another thread could have successfully re-read system-wide config,
 2237|       |	 * skip re-reading if the mtime it has used is exactly the same.
 2238|       |	 */
 2239|      0|	if (system_priority_file_loaded) {
  ------------------
  |  Branch (2239:6): [True: 0, False: 0]
  ------------------
 2240|      0|		system_priority_file_loaded =
 2241|      0|			(system_priority_last_mod == sb.st_mtime);
 2242|      0|	}
 2243|       |
 2244|      0|	if (!system_priority_file_loaded) {
  ------------------
  |  Branch (2244:6): [True: 0, False: 0]
  ------------------
 2245|      0|		_name_val_array_clear(&system_wide_config.priority_strings);
 2246|       |
 2247|      0|		gnutls_free(system_wide_config.priority_string);
  ------------------
  |  | 2265|      0|#define gnutls_free(a) gnutls_free((void *)(a)), a = NULL
  ------------------
 2248|      0|		system_wide_config.priority_string = NULL;
 2249|       |
 2250|      0|		fp = fopen(system_priority_file, "re");
 2251|      0|		if (fp == NULL) {
  ------------------
  |  Branch (2251:7): [True: 0, False: 0]
  ------------------
 2252|      0|			_gnutls_debug_log("cfg: unable to open: %s: %d\n",
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2253|      0|					  system_priority_file, errno);
 2254|      0|			goto out;
 2255|      0|		}
 2256|       |		/* Parsing the configuration file needs to be done in 2 phases:
 2257|       |		 * first parsing the [global] section
 2258|       |		 * and then the other sections,
 2259|       |		 * because the [global] section modifies the parsing behavior.
 2260|       |		 */
 2261|      0|		memset(&ctx, 0, sizeof(ctx));
 2262|      0|		err = ini_parse_file(fp, global_ini_handler, &ctx);
 2263|      0|		if (!err) {
  ------------------
  |  Branch (2263:7): [True: 0, False: 0]
  ------------------
 2264|      0|			if (fseek(fp, 0L, SEEK_SET) < 0) {
  ------------------
  |  Branch (2264:8): [True: 0, False: 0]
  ------------------
 2265|      0|				_gnutls_debug_log("cfg: unable to rewind: %s\n",
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2266|      0|						  system_priority_file);
 2267|      0|				if (fail_on_invalid_config)
  ------------------
  |  Branch (2267:9): [True: 0, False: 0]
  ------------------
 2268|      0|					exit(1);
 2269|      0|			}
 2270|      0|			err = ini_parse_file(fp, cfg_ini_handler, &ctx);
 2271|      0|		}
 2272|      0|		fclose(fp);
 2273|      0|		if (err) {
  ------------------
  |  Branch (2273:7): [True: 0, False: 0]
  ------------------
 2274|      0|			ini_ctx_deinit(&ctx);
 2275|      0|			_gnutls_debug_log("cfg: unable to parse: %s: %d\n",
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2276|      0|					  system_priority_file, err);
 2277|      0|			goto out;
 2278|      0|		}
 2279|      0|		cfg_apply(&system_wide_config, &ctx);
 2280|      0|		ini_ctx_deinit(&ctx);
 2281|      0|		_gnutls_debug_log("cfg: loaded system config %s mtime %lld\n",
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2282|      0|				  system_priority_file,
 2283|      0|				  (unsigned long long)sb.st_mtime);
 2284|      0|	}
 2285|       |
 2286|      0|	if (system_wide_config.allowlisting) {
  ------------------
  |  Branch (2286:6): [True: 0, False: 0]
  ------------------
 2287|      0|		if (defer_system_wide) {
  ------------------
  |  Branch (2287:7): [True: 0, False: 0]
  ------------------
 2288|       |			/* try constructing a priority string,
 2289|       |			 * but don't apply it yet, at this point
 2290|       |			 * we're only interested in whether we can */
 2291|      0|			ret = construct_system_wide_priority_string(&buf);
 2292|      0|			_gnutls_buffer_clear(&buf);
 2293|      0|			_gnutls_debug_log("cfg: deferred setting "
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2294|      0|					  "system-wide priority string\n");
 2295|      0|		} else {
 2296|      0|			ret = update_system_wide_priority_string();
 2297|      0|			_gnutls_debug_log("cfg: finalized "
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2298|      0|					  "system-wide priority string\n");
 2299|      0|		}
 2300|      0|		if (ret < 0) {
  ------------------
  |  Branch (2300:7): [True: 0, False: 0]
  ------------------
 2301|      0|			_gnutls_debug_log(
  ------------------
  |  |  149|      0|#define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  144|      0|	do {                                          \
  |  |  |  |  145|      0|		if (unlikely(_gnutls_log_level >= l)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:21): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|			_gnutls_log(l, __VA_ARGS__);  \
  |  |  |  |  147|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (147:11): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2302|      0|				"cfg: unable to build priority string: %s\n",
 2303|      0|				gnutls_strerror(ret));
 2304|      0|			if (fail_on_invalid_config)
  ------------------
  |  Branch (2304:8): [True: 0, False: 0]
  ------------------
 2305|      0|				exit(1);
 2306|      0|			goto out;
 2307|      0|		}
 2308|      0|	}
 2309|       |
 2310|      0|	system_priority_file_loaded = 1;
 2311|      0|	system_priority_last_mod = sb.st_mtime;
 2312|       |
 2313|      2|out:
 2314|      2|	(void)gnutls_rwlock_unlock(&system_wide_config_rwlock);
  ------------------
  |  |   72|      2|	(unlikely(glthread_rwlock_unlock(RWLOCK)) ?          \
  |  |  ------------------
  |  |  |  |   75|      6|#define unlikely(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:21): [True: 0, False: 2]
  |  |  |  |  |  Branch (75:39): [True: 2, False: 0]
  |  |  |  |  |  Branch (75:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|      2|		 gnutls_assert_val(GNUTLS_E_LOCKING_ERROR) : \
  |  |  ------------------
  |  |  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |   74|      2|		 0)
  ------------------
 2315|       |
 2316|      2|	if (err && fail_on_invalid_config) {
  ------------------
  |  Branch (2316:6): [True: 0, False: 2]
  |  Branch (2316:13): [True: 0, False: 0]
  ------------------
 2317|      0|		exit(1);
 2318|      0|	}
 2319|       |
 2320|      2|	return ret;
 2321|      2|}

_gnutls_rnd_preinit:
  106|      2|{
  107|      2|	int ret;
  108|       |
  109|       |#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
  110|       |#warning Insecure PRNG is enabled
  111|       |	ret = gnutls_crypto_rnd_register(100, &_gnutls_fuzz_rnd_ops);
  112|       |	if (ret < 0)
  113|       |		return ret;
  114|       |
  115|       |#elif defined(ENABLE_FIPS140)
  116|       |	/* The FIPS140 random generator is only enabled when we are compiled
  117|       |	 * with FIPS support, _and_ the system is in FIPS installed state.
  118|       |	 */
  119|       |	if (_gnutls_fips_mode_enabled()) {
  120|       |		ret = gnutls_crypto_rnd_register(100, &_gnutls_fips_rnd_ops);
  121|       |		if (ret < 0)
  122|       |			return ret;
  123|       |	}
  124|       |#endif
  125|       |
  126|      2|	ret = _rnd_system_entropy_init();
  127|      2|	if (ret < 0)
  ------------------
  |  Branch (127:6): [True: 0, False: 2]
  ------------------
  128|      0|		return gnutls_assert_val(GNUTLS_E_RANDOM_FAILED);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
  129|       |
  130|      2|	ret = glthread_tls_key_init(&ctx_key, delete_ctx);
  ------------------
  |  |  135|      2|    (pthread_in_use ()                              \
  |  |  ------------------
  |  |  |  |  115|      2|      (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      0|#  define c11_threads_in_use() (thrd_exit != NULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (89:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (115:8): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  136|      2|     ? pthread_key_create (&(KEY)->key, DESTRUCTOR) \
  |  |  137|      2|     : ((KEY)->singlethread_value = NULL, 0))
  ------------------
  131|      2|	if (ret)
  ------------------
  |  Branch (131:6): [True: 0, False: 2]
  ------------------
  132|      0|		return gnutls_assert_val(GNUTLS_E_RANDOM_FAILED);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
  133|       |
  134|      2|	list = gl_list_nx_create_empty(GL_LINKEDHASH_LIST, NULL, NULL, free_ctx,
  ------------------
  |  |   28|      2|#define GL_LINKEDHASH_LIST &gl_linkedhash_list_implementation
  ------------------
  135|      2|				       false);
  136|      2|	if (list == NULL)
  ------------------
  |  Branch (136:6): [True: 0, False: 2]
  ------------------
  137|      0|		return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
  ------------------
  |  |  196|      0|	gnutls_assert_val_int(x, __FILE__, __func__, __LINE__)
  ------------------
  138|       |
  139|      2|	return 0;
  140|      2|}

gnutls_system_global_init:
   69|      2|{
   70|       |#if defined(_WIN32) && defined(NEED_CERT_ENUM_CRLS)
   71|       |	/* used in system/certs.c */
   72|       |	HMODULE crypto;
   73|       |	crypto = LoadLibrary(TEXT("Crypt32.dll"));
   74|       |
   75|       |	if (crypto == NULL)
   76|       |		return GNUTLS_E_CRYPTO_INIT_FAILED;
   77|       |
   78|       |	pCertEnumCRLsInStore = (CertEnumCRLsInStoreFunc)GetProcAddress(
   79|       |		crypto, "CertEnumCRLsInStore");
   80|       |	if (pCertEnumCRLsInStore == NULL) {
   81|       |		FreeLibrary(crypto);
   82|       |		return GNUTLS_E_CRYPTO_INIT_FAILED;
   83|       |	}
   84|       |
   85|       |	Crypt32_dll = crypto;
   86|       |#endif
   87|      2|	gnutls_time = time;
   88|      2|	gnutls_gettime = _gnutls_gettime;
   89|      2|	return 0;
   90|      2|}

_gnutls_system_key_init:
   67|      2|{
   68|      2|	return 0;
   69|      2|}

fat-x86_64.c:fat_init:
  177|      2|{
  178|      2|  struct x86_features features;
  179|      2|  int verbose;
  180|       |
  181|       |  /* FIXME: Replace all getenv calls by getenv_secure? */
  182|      2|  verbose = getenv (ENV_VERBOSE) != NULL;
  ------------------
  |  |   93|      2|#define ENV_VERBOSE "NETTLE_FAT_VERBOSE"
  ------------------
  183|      2|  if (verbose)
  ------------------
  |  Branch (183:7): [True: 0, False: 2]
  ------------------
  184|      0|    fprintf (stderr, "libnettle: fat library initialization.\n");
  185|       |
  186|      2|  get_x86_features (&features);
  187|      2|  if (verbose)
  ------------------
  |  Branch (187:7): [True: 0, False: 2]
  ------------------
  188|      0|    {
  189|      0|      const char * const vendor_names[3] =
  190|      0|	{ "other", "intel", "amd" };
  191|      0|      fprintf (stderr, "libnettle: cpu features: vendor:%s%s%s%s\n",
  192|      0|	       vendor_names[features.vendor],
  193|      0|	       features.have_aesni ? ",aesni" : "",
  ------------------
  |  Branch (193:9): [True: 0, False: 0]
  ------------------
  194|      0|	       features.have_sha_ni ? ",sha_ni" : "",
  ------------------
  |  Branch (194:9): [True: 0, False: 0]
  ------------------
  195|      0|	       features.have_pclmul ? ",pclmul" : "");
  ------------------
  |  Branch (195:9): [True: 0, False: 0]
  ------------------
  196|      0|    }
  197|      2|  if (features.have_aesni)
  ------------------
  |  Branch (197:7): [True: 2, False: 0]
  ------------------
  198|      2|    {
  199|      2|      if (verbose)
  ------------------
  |  Branch (199:11): [True: 0, False: 2]
  ------------------
  200|      0|	fprintf (stderr, "libnettle: using aes instructions.\n");
  201|      2|      nettle_aes128_encrypt_vec = _nettle_aes128_encrypt_aesni;
  202|      2|      nettle_aes128_decrypt_vec = _nettle_aes128_decrypt_aesni;
  203|      2|      nettle_aes192_encrypt_vec = _nettle_aes192_encrypt_aesni;
  204|      2|      nettle_aes192_decrypt_vec = _nettle_aes192_decrypt_aesni;
  205|      2|      nettle_aes256_encrypt_vec = _nettle_aes256_encrypt_aesni;
  206|      2|      nettle_aes256_decrypt_vec = _nettle_aes256_decrypt_aesni;
  207|      2|      nettle_cbc_aes128_encrypt_vec = _nettle_cbc_aes128_encrypt_aesni;
  208|      2|      nettle_cbc_aes192_encrypt_vec = _nettle_cbc_aes192_encrypt_aesni;
  209|      2|      nettle_cbc_aes256_encrypt_vec = _nettle_cbc_aes256_encrypt_aesni;
  210|      2|    }
  211|      0|  else
  212|      0|    {
  213|      0|      if (verbose)
  ------------------
  |  Branch (213:11): [True: 0, False: 0]
  ------------------
  214|      0|	fprintf (stderr, "libnettle: not using aes instructions.\n");
  215|      0|      nettle_aes128_encrypt_vec = _nettle_aes128_encrypt_c;
  216|      0|      nettle_aes128_decrypt_vec = _nettle_aes128_decrypt_c;
  217|      0|      nettle_aes192_encrypt_vec = _nettle_aes192_encrypt_c;
  218|      0|      nettle_aes192_decrypt_vec = _nettle_aes192_decrypt_c;
  219|      0|      nettle_aes256_encrypt_vec = _nettle_aes256_encrypt_c;
  220|      0|      nettle_aes256_decrypt_vec = _nettle_aes256_decrypt_c;
  221|      0|      nettle_cbc_aes128_encrypt_vec = _nettle_cbc_aes128_encrypt_c;
  222|      0|      nettle_cbc_aes192_encrypt_vec = _nettle_cbc_aes192_encrypt_c;
  223|      0|      nettle_cbc_aes256_encrypt_vec = _nettle_cbc_aes256_encrypt_c;
  224|      0|    }
  225|       |
  226|      2|  if (features.have_sha_ni)
  ------------------
  |  Branch (226:7): [True: 0, False: 2]
  ------------------
  227|      0|    {
  228|      0|      if (verbose)
  ------------------
  |  Branch (228:11): [True: 0, False: 0]
  ------------------
  229|      0|	fprintf (stderr, "libnettle: using sha_ni instructions.\n");
  230|      0|      nettle_sha1_compress_vec = _nettle_sha1_compress_sha_ni;
  231|      0|      _nettle_sha256_compress_n_vec = _nettle_sha256_compress_n_sha_ni;
  232|      0|    }
  233|      2|  else
  234|      2|    {
  235|      2|      if (verbose)
  ------------------
  |  Branch (235:11): [True: 0, False: 2]
  ------------------
  236|      0|	fprintf (stderr, "libnettle: not using sha_ni instructions.\n");
  237|      2|      nettle_sha1_compress_vec = _nettle_sha1_compress_x86_64;
  238|      2|      _nettle_sha256_compress_n_vec = _nettle_sha256_compress_n_x86_64;
  239|      2|    }
  240|       |
  241|      2|  if (features.have_pclmul)
  ------------------
  |  Branch (241:7): [True: 2, False: 0]
  ------------------
  242|      2|    {
  243|      2|      if (verbose)
  ------------------
  |  Branch (243:11): [True: 0, False: 2]
  ------------------
  244|      0|	fprintf (stderr, "libnettle: using pclmulqdq instructions.\n");
  245|      2|      _nettle_ghash_set_key_vec = _nettle_ghash_set_key_pclmul;
  246|      2|      _nettle_ghash_update_vec = _nettle_ghash_update_pclmul;
  247|      2|    }
  248|      0|  else
  249|      0|    {
  250|      0|      if (verbose)
  ------------------
  |  Branch (250:11): [True: 0, False: 0]
  ------------------
  251|      0|	fprintf (stderr, "libnettle: not using pclmulqdq instructions.\n");
  252|      0|      _nettle_ghash_set_key_vec = _nettle_ghash_set_key_c;
  253|      0|      _nettle_ghash_update_vec = _nettle_ghash_update_table;
  254|      0|    }
  255|       |
  256|      2|  if (features.vendor == X86_INTEL)
  ------------------
  |  Branch (256:7): [True: 2, False: 0]
  ------------------
  257|      2|    {
  258|      2|      if (verbose)
  ------------------
  |  Branch (258:11): [True: 0, False: 2]
  ------------------
  259|      0|	fprintf (stderr, "libnettle: intel SSE2 will be used for memxor.\n");
  260|      2|      nettle_memxor_vec = _nettle_memxor_sse2;
  261|      2|    }
  262|      0|  else
  263|      0|    {
  264|      0|      if (verbose)
  ------------------
  |  Branch (264:11): [True: 0, False: 0]
  ------------------
  265|      0|	fprintf (stderr, "libnettle: intel SSE2 will not be used for memxor.\n");
  266|      0|      nettle_memxor_vec = _nettle_memxor_x86_64;
  267|      0|    }
  268|      2|}
fat-x86_64.c:get_x86_features:
   68|      2|{
   69|      2|  const char *s;
   70|      2|  features->vendor = X86_OTHER;
   71|      2|  features->have_aesni = 0;
   72|      2|  features->have_sha_ni = 0;
   73|      2|  features->have_pclmul = 0;
   74|       |
   75|      2|  s = secure_getenv (ENV_OVERRIDE);
  ------------------
  |  |   94|      2|#define ENV_OVERRIDE "NETTLE_FAT_OVERRIDE"
  ------------------
   76|      2|  if (s)
  ------------------
  |  Branch (76:7): [True: 0, False: 2]
  ------------------
   77|      0|    for (;;)
   78|      0|      {
   79|      0|	const char *sep = strchr (s, ',');
   80|      0|	size_t length = sep ? (size_t) (sep - s) : strlen(s);
  ------------------
  |  Branch (80:18): [True: 0, False: 0]
  ------------------
   81|       |
   82|      0|	if (SKIP (s, length, "vendor:", 7))
  ------------------
  |  |   61|      0|  (((slen) >= (llen) && memcmp ((s), (literal), llen) == 0)	\
  |  |  ------------------
  |  |  |  Branch (61:3): [True: 0, False: 0]
  |  |  |  Branch (61:5): [True: 0, False: 0]
  |  |  |  Branch (61:25): [True: 0, False: 0]
  |  |  ------------------
  |  |   62|      0|   ? ((slen) -= (llen), (s) += (llen), 1) : 0)
  ------------------
   83|      0|	  {
   84|      0|	    if (MATCH(s, length, "intel", 5))
  ------------------
  |  |   64|      0|  ((slen) == (llen) && memcmp ((s), (literal), llen) == 0)
  |  |  ------------------
  |  |  |  Branch (64:4): [True: 0, False: 0]
  |  |  |  Branch (64:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   85|      0|	      features->vendor = X86_INTEL;
   86|      0|	    else if (MATCH(s, length, "amd", 3))
  ------------------
  |  |   64|      0|  ((slen) == (llen) && memcmp ((s), (literal), llen) == 0)
  |  |  ------------------
  |  |  |  Branch (64:4): [True: 0, False: 0]
  |  |  |  Branch (64:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   87|      0|	      features->vendor = X86_AMD;
   88|       |	    
   89|      0|	  }
   90|      0|	else if (MATCH (s, length, "aesni", 5))
  ------------------
  |  |   64|      0|  ((slen) == (llen) && memcmp ((s), (literal), llen) == 0)
  |  |  ------------------
  |  |  |  Branch (64:4): [True: 0, False: 0]
  |  |  |  Branch (64:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   91|      0|	  features->have_aesni = 1;
   92|      0|	else if (MATCH (s, length, "sha_ni", 6))
  ------------------
  |  |   64|      0|  ((slen) == (llen) && memcmp ((s), (literal), llen) == 0)
  |  |  ------------------
  |  |  |  Branch (64:4): [True: 0, False: 0]
  |  |  |  Branch (64:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   93|      0|	  features->have_sha_ni = 1;
   94|      0|	else if (MATCH (s, length, "pclmul", 6))
  ------------------
  |  |   64|      0|  ((slen) == (llen) && memcmp ((s), (literal), llen) == 0)
  |  |  ------------------
  |  |  |  Branch (64:4): [True: 0, False: 0]
  |  |  |  Branch (64:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   95|      0|	  features->have_pclmul = 1;
   96|      0|	if (!sep)
  ------------------
  |  Branch (96:6): [True: 0, False: 0]
  ------------------
   97|      0|	  break;
   98|      0|	s = sep + 1;
   99|      0|      }
  100|      2|  else
  101|      2|    {
  102|      2|      uint32_t cpuid_data[4];
  103|      2|      _nettle_cpuid (0, cpuid_data);
  104|      2|      if (memcmp (cpuid_data + 1, "Genu" "ntel" "ineI", 12) == 0)
  ------------------
  |  Branch (104:11): [True: 2, False: 0]
  ------------------
  105|      2|	features->vendor = X86_INTEL;
  106|      0|      else if (memcmp (cpuid_data + 1, "Auth" "cAMD" "enti", 12) == 0)
  ------------------
  |  Branch (106:16): [True: 0, False: 0]
  ------------------
  107|      0|	features->vendor = X86_AMD;
  108|       |
  109|      2|      _nettle_cpuid (1, cpuid_data);
  110|      2|      if (cpuid_data[2] & 0x2)
  ------------------
  |  Branch (110:11): [True: 2, False: 0]
  ------------------
  111|      2|	features->have_pclmul = 1;
  112|      2|      if (cpuid_data[2] & 0x02000000)
  ------------------
  |  Branch (112:11): [True: 2, False: 0]
  ------------------
  113|      2|	features->have_aesni = 1;
  114|       |
  115|      2|      _nettle_cpuid (7, cpuid_data);
  116|      2|      if (cpuid_data[1] & 0x20000000)
  ------------------
  |  Branch (116:11): [True: 0, False: 2]
  ------------------
  117|      0|	features->have_sha_ni = 1;
  118|      2|    }
  119|      2|}

mp_get_memory_functions:
  326|      4|{
  327|      4|  if (alloc_func)
  ------------------
  |  Branch (327:7): [True: 4, False: 0]
  ------------------
  328|      4|    *alloc_func = gmp_allocate_func;
  329|       |
  330|      4|  if (realloc_func)
  ------------------
  |  Branch (330:7): [True: 4, False: 0]
  ------------------
  331|      4|    *realloc_func = gmp_reallocate_func;
  332|       |
  333|      4|  if (free_func)
  ------------------
  |  Branch (333:7): [True: 4, False: 0]
  ------------------
  334|      4|    *free_func = gmp_free_func;
  335|      4|}
mp_set_memory_functions:
  341|      4|{
  342|      4|  if (!alloc_func)
  ------------------
  |  Branch (342:7): [True: 4, False: 0]
  ------------------
  343|      4|    alloc_func = gmp_default_alloc;
  344|      4|  if (!realloc_func)
  ------------------
  |  Branch (344:7): [True: 2, False: 2]
  ------------------
  345|      2|    realloc_func = gmp_default_realloc;
  346|      4|  if (!free_func)
  ------------------
  |  Branch (346:7): [True: 2, False: 2]
  ------------------
  347|      2|    free_func = gmp_default_free;
  348|       |
  349|      4|  gmp_allocate_func = alloc_func;
  350|      4|  gmp_reallocate_func = realloc_func;
  351|      4|  gmp_free_func = free_func;
  352|      4|}

getaddrinfo:
   50|  7.60k|{
   51|  7.60k|	if (fuzzing) {
  ------------------
  |  Branch (51:6): [True: 7.60k, False: 0]
  ------------------
   52|       |		// glibc 2.24 does no extra free() for in_addr
   53|  7.60k|		struct combined aic = {
   54|  7.60k|			.in_addr.sin_family = AF_INET,
   55|  7.60k|			.in_addr.sin_port = 80,
   56|  7.60k|			.ai.ai_flags = 0,
   57|  7.60k|			.ai.ai_family = AF_INET,
   58|  7.60k|			.ai.ai_socktype = SOCK_STREAM,
   59|  7.60k|			.ai.ai_protocol = 0,
   60|  7.60k|			.ai.ai_canonname = NULL,
   61|  7.60k|			.ai.ai_next = NULL,
   62|  7.60k|			.ai.ai_addrlen = sizeof(struct sockaddr_in),
   63|  7.60k|		};
   64|       |
   65|  7.60k|		aic.ai.ai_addr = (struct sockaddr *) &aic.in_addr;
   66|  7.60k|		*res = (struct addrinfo *) wget_memdup(&aic, sizeof(aic));
   67|  7.60k|		return 0;
   68|  7.60k|	}
   69|       |
   70|      0|	int(*libc_getaddrinfo)(const char *, const char *, const struct addrinfo *, struct addrinfo **) =
   71|      0|		(int(*)(const char *, const char *, const struct addrinfo *, struct addrinfo **)) dlsym (RTLD_NEXT, "getaddrinfo");
   72|       |
   73|      0|	return libc_getaddrinfo(node, service, hints, res);
   74|  7.60k|}
freeaddrinfo:
   76|  3.80k|{
   77|  3.80k|	struct addrinfo *ai, *cur;
   78|  3.80k|	if (fuzzing) {
  ------------------
  |  Branch (78:6): [True: 3.80k, False: 0]
  ------------------
   79|  3.80k|		ai = res;
   80|  11.4k|		while (ai) {
  ------------------
  |  Branch (80:10): [True: 7.60k, False: 3.80k]
  ------------------
   81|  7.60k|			cur = ai;
   82|  7.60k|			ai = ai->ai_next;
   83|  7.60k|			wget_free(cur);
   84|  7.60k|		}
   85|  3.80k|		return;
   86|  3.80k|	}
   87|       |
   88|      0|	void (*libc_freeaddrinfo)(struct addrinfo *res) =
   89|      0|		(void(*)(struct addrinfo *res)) dlsym (RTLD_NEXT, "getaddrinfo");
   90|       |
   91|      0|	libc_freeaddrinfo(res);
   92|      0|}
getnameinfo:
   99|  3.80k|{
  100|  3.80k|	if (fuzzing)
  ------------------
  |  Branch (100:6): [True: 3.80k, False: 0]
  ------------------
  101|  3.80k|		return -1;
  102|       |
  103|      0|	int(*libc_getnameinfo)(const struct sockaddr *, socklen_t, char *, socklen_t, char *, socklen_t, int) =
  104|      0|		(int(*)(const struct sockaddr *, socklen_t, char *, socklen_t, char *, socklen_t, int)) dlsym (RTLD_NEXT, "getnameinfo");
  105|       |
  106|      0|	return libc_getnameinfo(addr, addrlen, host, hostlen, serv, servlen, flags);
  107|  3.80k|}
connect:
  110|  3.80k|{
  111|  3.80k|	if (connect_fd == -1) {
  ------------------
  |  Branch (111:6): [True: 3.80k, False: 0]
  ------------------
  112|  3.80k|		connect_fd = sockfd;
  113|  3.80k|		return 0;
  114|  3.80k|	}
  115|       |
  116|      0|	int(*libc_connect)(int, const struct sockaddr *, socklen_t) =
  117|      0|		(int(*)(int, const struct sockaddr *, socklen_t)) dlsym (RTLD_NEXT, "connect");
  118|       |
  119|      0|	return libc_connect(sockfd, addr, addrlen);
  120|  3.80k|}
recvfrom:
  123|   167k|{
  124|   167k|	if (sockfd == connect_fd) {
  ------------------
  |  Branch (124:6): [True: 167k, False: 0]
  ------------------
  125|   167k|		if (mode == 1 && len > 1) {
  ------------------
  |  Branch (125:7): [True: 163k, False: 3.11k]
  |  Branch (125:20): [True: 163k, False: 0]
  ------------------
  126|   163k|			len = 1;
  127|   163k|		}
  128|       |
  129|   167k|		if (len > g_size)
  ------------------
  |  Branch (129:7): [True: 5.01k, False: 162k]
  ------------------
  130|  5.01k|			len = g_size;
  131|   167k|		memcpy(buf, g_data, len);
  132|   167k|		g_size -= len;
  133|   167k|		return len;
  134|   167k|	}
  135|       |
  136|      0|	int(*libc_recvfrom)(int, void *, size_t, int, struct sockaddr *, socklen_t *) =
  137|      0|		(int(*)(int, void *, size_t, int, struct sockaddr *, socklen_t *)) dlsym (RTLD_NEXT, "recvfrom");
  138|       |
  139|      0|	return libc_recvfrom(sockfd, buf, len, flags, src_addr, addrlen);
  140|   167k|}
send:
  156|  3.80k|{
  157|  3.80k|	if (sockfd == connect_fd)
  ------------------
  |  Branch (157:6): [True: 3.80k, False: 0]
  ------------------
  158|  3.80k|		return (ssize_t) len;
  159|       |
  160|      0|	int(*libc_send)(int, const void *, size_t, int) =
  161|      0|		(int(*)(int, const void *, size_t, int)) dlsym (RTLD_NEXT, "sendto");
  162|       |
  163|      0|	return libc_send(sockfd, buf, len, flags);
  164|  3.80k|}
LLVMFuzzerTestOneInput:
  169|    648|{
  170|    648|	static const char *header[3] = {
  171|    648|		"HTTP/1.1 200 OK\r\n"
  172|    648|		"Host: a\r\n"
  173|    648|		"Transfer-Encoding: chunked\r\n"
  174|    648|		"Connection: keep-alive\r\n\r\n"
  175|    648|		,
  176|    648|		"HTTP/1.1 200 OK\r\n"
  177|    648|		"Host: a\r\n"
  178|    648|		"Content-Length: 10\r\n"
  179|    648|		"Connection: keep-alive\r\n\r\n"
  180|    648|		,
  181|    648|		("HTTP/1.1 200 OK\r\n"
  182|    648|		"Host: a\r\n\r\n")
  183|    648|	};
  184|       |
  185|    648|	if (size > 256) // same as max_len = 4096 in .options file
  ------------------
  |  Branch (185:6): [True: 14, False: 634]
  ------------------
  186|     14|		return 0;
  187|       |
  188|    634|	fuzzing = 1;
  189|    634|	wget_iri *uri = wget_iri_parse("http://example.com", NULL);
  190|    634|	wget_tcp_set_timeout(NULL, 0); // avoid to call select or poll
  191|    634|	wget_tcp_set_connect_timeout(NULL, 0); // avoid to call select or poll
  192|       |
  193|  1.90k|	for (mode = 0; mode < 2; mode++) {
  ------------------
  |  Branch (193:17): [True: 1.26k, False: 634]
  ------------------
  194|  5.07k|		for (int type = 0; type < 3; type++) {
  ------------------
  |  Branch (194:22): [True: 3.80k, False: 1.26k]
  ------------------
  195|  3.80k|			size_t hlen = strlen(header[type]);
  196|       |
  197|  3.80k|			g_size = hlen + size;
  198|  3.80k|			g_data = (uint8_t *) malloc(g_size);
  199|  3.80k|			memcpy(g_data, header[type], hlen);
  200|  3.80k|			memcpy(g_data + hlen, data, size);
  201|       |
  202|  3.80k|			connect_fd = -1;
  203|       |
  204|  3.80k|			wget_http_request *req = wget_http_create_request(uri, "GET");
  205|  3.80k|			wget_http_connection *conn = NULL;
  206|       |
  207|       |			// wget_http_add_header(req, "User-Agent", "TheUserAgent/0.5");
  208|       |
  209|  3.80k|			if (wget_http_open(&conn, uri) == WGET_E_SUCCESS) {
  ------------------
  |  Branch (209:8): [True: 3.80k, False: 0]
  ------------------
  210|  3.80k|				if (wget_http_send_request(conn, req) == WGET_E_SUCCESS) {
  ------------------
  |  Branch (210:9): [True: 3.80k, False: 0]
  ------------------
  211|  3.80k|					wget_http_response *resp = wget_http_get_response(conn);
  212|  3.80k|					wget_http_free_response(&resp);
  213|  3.80k|				}
  214|  3.80k|				wget_http_close(&conn);
  215|  3.80k|			}
  216|       |
  217|  3.80k|			wget_http_free_request(&req);
  218|  3.80k|			free(g_data);
  219|  3.80k|		}
  220|  1.26k|	}
  221|       |
  222|    634|	wget_iri_free(&uri);
  223|    634|	fuzzing = 0;
  224|       |
  225|    634|	return 0;
  226|    648|}

c_strcasecmp:
   28|  4.43k|{
   29|  4.43k|  register const unsigned char *p1 = (const unsigned char *) s1;
   30|  4.43k|  register const unsigned char *p2 = (const unsigned char *) s2;
   31|  4.43k|  unsigned char c1, c2;
   32|       |
   33|  4.43k|  if (p1 == p2)
  ------------------
  |  Branch (33:7): [True: 0, False: 4.43k]
  ------------------
   34|      0|    return 0;
   35|       |
   36|  4.43k|  do
   37|  10.1k|    {
   38|  10.1k|      c1 = c_tolower (*p1);
   39|  10.1k|      c2 = c_tolower (*p2);
   40|       |
   41|  10.1k|      if (c1 == '\0')
  ------------------
  |  Branch (41:11): [True: 1.90k, False: 8.24k]
  ------------------
   42|  1.90k|        break;
   43|       |
   44|  8.24k|      ++p1;
   45|  8.24k|      ++p2;
   46|  8.24k|    }
   47|  8.24k|  while (c1 == c2);
  ------------------
  |  Branch (47:10): [True: 5.70k, False: 2.53k]
  ------------------
   48|       |
   49|  4.43k|  if (UCHAR_MAX <= INT_MAX)
  ------------------
  |  Branch (49:7): [Folded - Ignored]
  ------------------
   50|  4.43k|    return c1 - c2;
   51|      0|  else
   52|       |    /* On machines where 'char' and 'int' are types of the same size, the
   53|       |       difference of two 'unsigned char' values - including the sign bit -
   54|       |       doesn't fit in an 'int'.  */
   55|      0|    return _GL_CMP (c1, c2);
  ------------------
  |  | 3239|      0|#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
  ------------------
   56|  4.43k|}

c_strncasecmp:
   28|  10.1k|{
   29|  10.1k|  register const unsigned char *p1 = (const unsigned char *) s1;
   30|  10.1k|  register const unsigned char *p2 = (const unsigned char *) s2;
   31|  10.1k|  unsigned char c1, c2;
   32|       |
   33|  10.1k|  if (p1 == p2 || n == 0)
  ------------------
  |  Branch (33:7): [True: 0, False: 10.1k]
  |  Branch (33:19): [True: 0, False: 10.1k]
  ------------------
   34|      0|    return 0;
   35|       |
   36|  10.1k|  do
   37|  76.7k|    {
   38|  76.7k|      c1 = c_tolower (*p1);
   39|  76.7k|      c2 = c_tolower (*p2);
   40|       |
   41|  76.7k|      if (--n == 0 || c1 == '\0')
  ------------------
  |  Branch (41:11): [True: 3.80k, False: 72.9k]
  |  Branch (41:23): [True: 0, False: 72.9k]
  ------------------
   42|  3.80k|        break;
   43|       |
   44|  72.9k|      ++p1;
   45|  72.9k|      ++p2;
   46|  72.9k|    }
   47|  72.9k|  while (c1 == c2);
  ------------------
  |  Branch (47:10): [True: 66.5k, False: 6.34k]
  ------------------
   48|       |
   49|  10.1k|  if (UCHAR_MAX <= INT_MAX)
  ------------------
  |  Branch (49:7): [Folded - Ignored]
  ------------------
   50|  10.1k|    return c1 - c2;
   51|      0|  else
   52|       |    /* On machines where 'char' and 'int' are types of the same size, the
   53|       |       difference of two 'unsigned char' values - including the sign bit -
   54|       |       doesn't fit in an 'int'.  */
   55|      0|    return _GL_CMP (c1, c2);
  ------------------
  |  | 3239|      0|#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
  ------------------
   56|  10.1k|}

rpl_fcntl:
  207|  7.60k|{
  208|  7.60k|  va_list arg;
  209|  7.60k|  int result = -1;
  210|  7.60k|  va_start (arg, action);
  211|  7.60k|  switch (action)
  212|  7.60k|    {
  213|      0|    case F_DUPFD:
  ------------------
  |  Branch (213:5): [True: 0, False: 7.60k]
  ------------------
  214|      0|      {
  215|      0|        int target = va_arg (arg, int);
  216|      0|        result = rpl_fcntl_DUPFD (fd, target);
  217|      0|        break;
  218|      0|      }
  219|       |
  220|      0|    case F_DUPFD_CLOEXEC:
  ------------------
  |  Branch (220:5): [True: 0, False: 7.60k]
  ------------------
  221|      0|      {
  222|      0|        int target = va_arg (arg, int);
  223|      0|        result = rpl_fcntl_DUPFD_CLOEXEC (fd, target);
  224|      0|        break;
  225|      0|      }
  226|       |
  227|       |#if !HAVE_FCNTL
  228|       |    case F_GETFD:
  229|       |      {
  230|       |# if defined _WIN32 && ! defined __CYGWIN__
  231|       |        HANDLE handle = (HANDLE) _get_osfhandle (fd);
  232|       |        DWORD flags;
  233|       |        if (handle == INVALID_HANDLE_VALUE
  234|       |            || GetHandleInformation (handle, &flags) == 0)
  235|       |          errno = EBADF;
  236|       |        else
  237|       |          result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
  238|       |# else /* !W32 */
  239|       |        /* Use dup2 to reject invalid file descriptors.  No way to
  240|       |           access this information, so punt.  */
  241|       |        if (0 <= dup2 (fd, fd))
  242|       |          result = 0;
  243|       |# endif /* !W32 */
  244|       |        break;
  245|       |      } /* F_GETFD */
  246|       |#endif /* !HAVE_FCNTL */
  247|       |
  248|       |      /* Implementing F_SETFD on mingw is not trivial - there is no
  249|       |         API for changing the O_NOINHERIT bit on an fd, and merely
  250|       |         changing the HANDLE_FLAG_INHERIT bit on the underlying handle
  251|       |         can lead to odd state.  It may be possible by duplicating the
  252|       |         handle, using _open_osfhandle with the right flags, then
  253|       |         using dup2 to move the duplicate onto the original, but that
  254|       |         is not supported for now.  */
  255|       |
  256|  7.60k|    default:
  ------------------
  |  Branch (256:5): [True: 7.60k, False: 0]
  ------------------
  257|  7.60k|      {
  258|  7.60k|#if HAVE_FCNTL
  259|  7.60k|        switch (action)
  260|  7.60k|          {
  261|       |          #ifdef F_BARRIERFSYNC                  /* macOS */
  262|       |          case F_BARRIERFSYNC:
  263|       |          #endif
  264|       |          #ifdef F_CHKCLEAN                      /* macOS */
  265|       |          case F_CHKCLEAN:
  266|       |          #endif
  267|       |          #ifdef F_CLOSEM                        /* NetBSD, HP-UX */
  268|       |          case F_CLOSEM:
  269|       |          #endif
  270|       |          #ifdef F_FLUSH_DATA                    /* macOS */
  271|       |          case F_FLUSH_DATA:
  272|       |          #endif
  273|       |          #ifdef F_FREEZE_FS                     /* macOS */
  274|       |          case F_FREEZE_FS:
  275|       |          #endif
  276|       |          #ifdef F_FULLFSYNC                     /* macOS */
  277|       |          case F_FULLFSYNC:
  278|       |          #endif
  279|       |          #ifdef F_GETCONFINED                   /* macOS */
  280|       |          case F_GETCONFINED:
  281|       |          #endif
  282|       |          #ifdef F_GETDEFAULTPROTLEVEL           /* macOS */
  283|       |          case F_GETDEFAULTPROTLEVEL:
  284|       |          #endif
  285|      0|          #ifdef F_GETFD                         /* POSIX */
  286|      0|          case F_GETFD:
  ------------------
  |  Branch (286:11): [True: 0, False: 7.60k]
  ------------------
  287|      0|          #endif
  288|      0|          #ifdef F_GETFL                         /* POSIX */
  289|  3.80k|          case F_GETFL:
  ------------------
  |  Branch (289:11): [True: 3.80k, False: 3.80k]
  ------------------
  290|  3.80k|          #endif
  291|  3.80k|          #ifdef F_GETLEASE                      /* Linux */
  292|  3.80k|          case F_GETLEASE:
  ------------------
  |  Branch (292:11): [True: 0, False: 7.60k]
  ------------------
  293|  3.80k|          #endif
  294|       |          #ifdef F_GETNOSIGPIPE                  /* macOS */
  295|       |          case F_GETNOSIGPIPE:
  296|       |          #endif
  297|  3.80k|          #ifdef F_GETOWN                        /* POSIX */
  298|  3.80k|          case F_GETOWN:
  ------------------
  |  Branch (298:11): [True: 0, False: 7.60k]
  ------------------
  299|  3.80k|          #endif
  300|  3.80k|          #ifdef F_GETPIPE_SZ                    /* Linux */
  301|  3.80k|          case F_GETPIPE_SZ:
  ------------------
  |  Branch (301:11): [True: 0, False: 7.60k]
  ------------------
  302|  3.80k|          #endif
  303|       |          #ifdef F_GETPROTECTIONCLASS            /* macOS */
  304|       |          case F_GETPROTECTIONCLASS:
  305|       |          #endif
  306|       |          #ifdef F_GETPROTECTIONLEVEL            /* macOS */
  307|       |          case F_GETPROTECTIONLEVEL:
  308|       |          #endif
  309|  3.80k|          #ifdef F_GET_SEALS                     /* Linux */
  310|  3.80k|          case F_GET_SEALS:
  ------------------
  |  Branch (310:11): [True: 0, False: 7.60k]
  ------------------
  311|  3.80k|          #endif
  312|  3.80k|          #ifdef F_GETSIG                        /* Linux */
  313|  3.80k|          case F_GETSIG:
  ------------------
  |  Branch (313:11): [True: 0, False: 7.60k]
  ------------------
  314|  3.80k|          #endif
  315|       |          #ifdef F_MAXFD                         /* NetBSD */
  316|       |          case F_MAXFD:
  317|       |          #endif
  318|       |          #ifdef F_RECYCLE                       /* macOS */
  319|       |          case F_RECYCLE:
  320|       |          #endif
  321|       |          #ifdef F_SETFIFOENH                    /* HP-UX */
  322|       |          case F_SETFIFOENH:
  323|       |          #endif
  324|       |          #ifdef F_THAW_FS                       /* macOS */
  325|       |          case F_THAW_FS:
  326|       |          #endif
  327|       |            /* These actions take no argument.  */
  328|  3.80k|            result = fcntl (fd, action);
  329|  3.80k|            break;
  330|       |
  331|      0|          #ifdef F_ADD_SEALS                     /* Linux */
  332|      0|          case F_ADD_SEALS:
  ------------------
  |  Branch (332:11): [True: 0, False: 7.60k]
  ------------------
  333|      0|          #endif
  334|       |          #ifdef F_BADFD                         /* Solaris */
  335|       |          case F_BADFD:
  336|       |          #endif
  337|       |          #ifdef F_CHECK_OPENEVT                 /* macOS */
  338|       |          case F_CHECK_OPENEVT:
  339|       |          #endif
  340|       |          #ifdef F_DUP2FD                        /* FreeBSD, AIX, Solaris */
  341|       |          case F_DUP2FD:
  342|       |          #endif
  343|       |          #ifdef F_DUP2FD_CLOEXEC                /* FreeBSD, Solaris */
  344|       |          case F_DUP2FD_CLOEXEC:
  345|       |          #endif
  346|       |          #ifdef F_DUP2FD_CLOFORK                /* Solaris */
  347|       |          case F_DUP2FD_CLOFORK:
  348|       |          #endif
  349|      0|          #ifdef F_DUPFD                         /* POSIX */
  350|      0|          case F_DUPFD:
  ------------------
  |  Branch (350:11): [True: 0, False: 7.60k]
  ------------------
  351|      0|          #endif
  352|      0|          #ifdef F_DUPFD_CLOEXEC                 /* POSIX */
  353|      0|          case F_DUPFD_CLOEXEC:
  ------------------
  |  Branch (353:11): [True: 0, False: 7.60k]
  ------------------
  354|      0|          #endif
  355|       |          #ifdef F_DUPFD_CLOFORK                 /* Solaris */
  356|       |          case F_DUPFD_CLOFORK:
  357|       |          #endif
  358|       |          #ifdef F_GETXFL                        /* Solaris */
  359|       |          case F_GETXFL:
  360|       |          #endif
  361|       |          #ifdef F_GLOBAL_NOCACHE                /* macOS */
  362|       |          case F_GLOBAL_NOCACHE:
  363|       |          #endif
  364|       |          #ifdef F_MAKECOMPRESSED                /* macOS */
  365|       |          case F_MAKECOMPRESSED:
  366|       |          #endif
  367|       |          #ifdef F_MOVEDATAEXTENTS               /* macOS */
  368|       |          case F_MOVEDATAEXTENTS:
  369|       |          #endif
  370|       |          #ifdef F_NOCACHE                       /* macOS */
  371|       |          case F_NOCACHE:
  372|       |          #endif
  373|       |          #ifdef F_NODIRECT                      /* macOS */
  374|       |          case F_NODIRECT:
  375|       |          #endif
  376|      0|          #ifdef F_NOTIFY                        /* Linux */
  377|      0|          case F_NOTIFY:
  ------------------
  |  Branch (377:11): [True: 0, False: 7.60k]
  ------------------
  378|      0|          #endif
  379|       |          #ifdef F_OPLKACK                       /* IRIX */
  380|       |          case F_OPLKACK:
  381|       |          #endif
  382|       |          #ifdef F_OPLKREG                       /* IRIX */
  383|       |          case F_OPLKREG:
  384|       |          #endif
  385|       |          #ifdef F_RDAHEAD                       /* macOS */
  386|       |          case F_RDAHEAD:
  387|       |          #endif
  388|       |          #ifdef F_SETBACKINGSTORE               /* macOS */
  389|       |          case F_SETBACKINGSTORE:
  390|       |          #endif
  391|       |          #ifdef F_SETCONFINED                   /* macOS */
  392|       |          case F_SETCONFINED:
  393|       |          #endif
  394|      0|          #ifdef F_SETFD                         /* POSIX */
  395|      0|          case F_SETFD:
  ------------------
  |  Branch (395:11): [True: 0, False: 7.60k]
  ------------------
  396|      0|          #endif
  397|      0|          #ifdef F_SETFL                         /* POSIX */
  398|  3.80k|          case F_SETFL:
  ------------------
  |  Branch (398:11): [True: 3.80k, False: 3.80k]
  ------------------
  399|  3.80k|          #endif
  400|  3.80k|          #ifdef F_SETLEASE                      /* Linux */
  401|  3.80k|          case F_SETLEASE:
  ------------------
  |  Branch (401:11): [True: 0, False: 7.60k]
  ------------------
  402|  3.80k|          #endif
  403|       |          #ifdef F_SETNOSIGPIPE                  /* macOS */
  404|       |          case F_SETNOSIGPIPE:
  405|       |          #endif
  406|  3.80k|          #ifdef F_SETOWN                        /* POSIX */
  407|  3.80k|          case F_SETOWN:
  ------------------
  |  Branch (407:11): [True: 0, False: 7.60k]
  ------------------
  408|  3.80k|          #endif
  409|  3.80k|          #ifdef F_SETPIPE_SZ                    /* Linux */
  410|  3.80k|          case F_SETPIPE_SZ:
  ------------------
  |  Branch (410:11): [True: 0, False: 7.60k]
  ------------------
  411|  3.80k|          #endif
  412|       |          #ifdef F_SETPROTECTIONCLASS            /* macOS */
  413|       |          case F_SETPROTECTIONCLASS:
  414|       |          #endif
  415|  3.80k|          #ifdef F_SETSIG                        /* Linux */
  416|  3.80k|          case F_SETSIG:
  ------------------
  |  Branch (416:11): [True: 0, False: 7.60k]
  ------------------
  417|  3.80k|          #endif
  418|       |          #ifdef F_SINGLE_WRITER                 /* macOS */
  419|       |          case F_SINGLE_WRITER:
  420|       |          #endif
  421|       |            /* These actions take an 'int' argument.  */
  422|  3.80k|            {
  423|  3.80k|              int x = va_arg (arg, int);
  424|  3.80k|              result = fcntl (fd, action, x);
  425|  3.80k|            }
  426|  3.80k|            break;
  427|       |
  428|      0|          default:
  ------------------
  |  Branch (428:11): [True: 0, False: 7.60k]
  ------------------
  429|       |            /* Other actions take a pointer argument.  */
  430|      0|            {
  431|      0|              void *p = va_arg (arg, void *);
  432|      0|              result = fcntl (fd, action, p);
  433|      0|            }
  434|      0|            break;
  435|  7.60k|          }
  436|       |#else
  437|       |        errno = EINVAL;
  438|       |#endif
  439|  7.60k|        break;
  440|  7.60k|      }
  441|  7.60k|    }
  442|  7.60k|  va_end (arg);
  443|  7.60k|  return result;
  444|  7.60k|}

rpl_free:
   33|  70.4k|{
   34|       |# if defined __GNUC__ && !defined __clang__
   35|       |  /* An invalid GCC optimization
   36|       |     <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396>
   37|       |     would optimize away the assignments in the code below, when link-time
   38|       |     optimization (LTO) is enabled.  Make the code more complicated, so that
   39|       |     GCC does not grok how to optimize it.  */
   40|       |  int err[2];
   41|       |  err[0] = errno;
   42|       |  err[1] = errno;
   43|       |  errno = 0;
   44|       |  free (p);
   45|       |  errno = err[errno == 0];
   46|       |# else
   47|  70.4k|  int err = errno;
   48|  70.4k|  free (p);
   49|  70.4k|  errno = err;
   50|  70.4k|# endif
   51|  70.4k|}

gettime:
   30|   169k|{
   31|   169k|#if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
   32|   169k|  clock_gettime (CLOCK_REALTIME, ts);
   33|       |#elif defined HAVE_TIMESPEC_GET
   34|       |  timespec_get (ts, TIME_UTC);
   35|       |#else
   36|       |  struct timeval tv;
   37|       |  gettimeofday (&tv, NULL);
   38|       |  *ts = (struct timespec) { .tv_sec  = tv.tv_sec,
   39|       |                            .tv_nsec = tv.tv_usec * 1000 };
   40|       |#endif
   41|   169k|}

rpl_strtoll:
  214|  1.41k|{
  215|  1.41k|  int negative;
  216|  1.41k|  register unsigned LONG int cutoff;
  217|  1.41k|  register unsigned int cutlim;
  218|  1.41k|  register unsigned LONG int i;
  219|  1.41k|  register const STRING_TYPE *s;
  220|  1.41k|  register UCHAR_TYPE c;
  221|  1.41k|  const STRING_TYPE *save, *end;
  222|  1.41k|  int overflow;
  223|       |
  224|       |#ifdef USE_NUMBER_GROUPING
  225|       |# ifdef USE_IN_EXTENDED_LOCALE_MODEL
  226|       |  struct locale_data *current = loc->__locales[LC_NUMERIC];
  227|       |# endif
  228|       |  /* The thousands character of the current locale.  */
  229|       |  wchar_t thousands = L'\0';
  230|       |  /* The numeric grouping specification of the current locale,
  231|       |     in the format described in <locale.h>.  */
  232|       |  const char *grouping;
  233|       |
  234|       |  if (group)
  235|       |    {
  236|       |      grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
  237|       |      if (*grouping <= 0 || *grouping == CHAR_MAX)
  238|       |        grouping = NULL;
  239|       |      else
  240|       |        {
  241|       |          /* Figure out the thousands separator character.  */
  242|       |# if defined _LIBC || defined _HAVE_BTOWC
  243|       |          thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP));
  244|       |          if (thousands == WEOF)
  245|       |            thousands = L'\0';
  246|       |# endif
  247|       |          if (thousands == L'\0')
  248|       |            grouping = NULL;
  249|       |        }
  250|       |    }
  251|       |  else
  252|       |    grouping = NULL;
  253|       |#endif
  254|       |
  255|  1.41k|  if (base < 0 || base == 1 || base > 36)
  ------------------
  |  Branch (255:7): [True: 0, False: 1.41k]
  |  Branch (255:19): [True: 0, False: 1.41k]
  |  Branch (255:32): [True: 0, False: 1.41k]
  ------------------
  256|      0|    {
  257|      0|      __set_errno (EINVAL);
  ------------------
  |  |   31|      0|# define __set_errno(Val) errno = (Val)
  ------------------
  258|      0|      return 0;
  259|      0|    }
  260|       |
  261|  1.41k|  save = s = nptr;
  262|       |
  263|       |  /* Skip white space.  */
  264|  1.41k|  while (ISSPACE (*s))
  265|  37.5k|    ++s;
  266|  1.41k|  if (*s == L_('\0'))
  ------------------
  |  |  175|  1.41k|# define L_(Ch) Ch
  ------------------
  |  Branch (266:7): [True: 14, False: 1.39k]
  ------------------
  267|     14|    goto noconv;
  268|       |
  269|       |  /* Check for a sign.  */
  270|  1.39k|  if (*s == L_('-'))
  ------------------
  |  |  175|  1.39k|# define L_(Ch) Ch
  ------------------
  |  Branch (270:7): [True: 105, False: 1.29k]
  ------------------
  271|    105|    {
  272|    105|      negative = 1;
  273|    105|      ++s;
  274|    105|    }
  275|  1.29k|  else if (*s == L_('+'))
  ------------------
  |  |  175|  1.29k|# define L_(Ch) Ch
  ------------------
  |  Branch (275:12): [True: 89, False: 1.20k]
  ------------------
  276|     89|    {
  277|     89|      negative = 0;
  278|     89|      ++s;
  279|     89|    }
  280|  1.20k|  else
  281|  1.20k|    negative = 0;
  282|       |
  283|       |  /* Recognize number prefix and if BASE is zero, figure it out ourselves.  */
  284|  1.39k|  if (*s == L_('0'))
  ------------------
  |  |  175|  1.39k|# define L_(Ch) Ch
  ------------------
  |  Branch (284:7): [True: 278, False: 1.12k]
  ------------------
  285|    278|    {
  286|    278|      if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X'))
  ------------------
  |  |  185|    278|#  define TOUPPER(Ch) toupper ((unsigned char) (Ch))
  ------------------
                    if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X'))
  ------------------
  |  |  175|    278|# define L_(Ch) Ch
  ------------------
  |  Branch (286:12): [True: 0, False: 278]
  |  Branch (286:25): [True: 278, False: 0]
  |  Branch (286:40): [True: 143, False: 135]
  ------------------
  287|    143|        {
  288|    143|          s += 2;
  289|    143|          base = 16;
  290|    143|        }
  291|    135|      else if ((base == 0 || base == 2) && TOUPPER (s[1]) == L_('B'))
  ------------------
  |  |  185|      0|#  define TOUPPER(Ch) toupper ((unsigned char) (Ch))
  ------------------
                    else if ((base == 0 || base == 2) && TOUPPER (s[1]) == L_('B'))
  ------------------
  |  |  175|      0|# define L_(Ch) Ch
  ------------------
  |  Branch (291:17): [True: 0, False: 135]
  |  Branch (291:30): [True: 0, False: 135]
  |  Branch (291:44): [True: 0, False: 0]
  ------------------
  292|      0|        {
  293|      0|          s += 2;
  294|      0|          base = 2;
  295|      0|        }
  296|    135|      else if (base == 0)
  ------------------
  |  Branch (296:16): [True: 0, False: 135]
  ------------------
  297|      0|        base = 8;
  298|    278|    }
  299|  1.12k|  else if (base == 0)
  ------------------
  |  Branch (299:12): [True: 0, False: 1.12k]
  ------------------
  300|      0|    base = 10;
  301|       |
  302|       |  /* Save the pointer so we can check later if anything happened.  */
  303|  1.39k|  save = s;
  304|       |
  305|       |#ifdef USE_NUMBER_GROUPING
  306|       |  if (group)
  307|       |    {
  308|       |      /* Find the end of the digit string and check its grouping.  */
  309|       |      end = s;
  310|       |      for (c = *end; c != L_('\0'); c = *++end)
  311|       |        if ((wchar_t) c != thousands
  312|       |            && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
  313|       |            && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
  314|       |          break;
  315|       |      if (*s == thousands)
  316|       |        end = s;
  317|       |      else
  318|       |        end = correctly_grouped_prefix (s, end, thousands, grouping);
  319|       |    }
  320|       |  else
  321|       |#endif
  322|  1.39k|    end = NULL;
  323|       |
  324|  1.39k|  cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base;
  ------------------
  |  |  123|  1.39k|# define STRTOL_ULONG_MAX ULLONG_MAX
  ------------------
  325|  1.39k|  cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base;
  ------------------
  |  |  123|  1.39k|# define STRTOL_ULONG_MAX ULLONG_MAX
  ------------------
  326|       |
  327|  1.39k|  overflow = 0;
  328|  1.39k|  i = 0;
  329|  8.28k|  for (c = *s; c != L_('\0'); c = *++s)
  ------------------
  |  |  175|  8.28k|# define L_(Ch) Ch
  ------------------
  |  Branch (329:16): [True: 7.85k, False: 424]
  ------------------
  330|  7.85k|    {
  331|  7.85k|      if (s == end)
  ------------------
  |  Branch (331:11): [True: 0, False: 7.85k]
  ------------------
  332|      0|        break;
  333|  7.85k|      if (c >= L_('0') && c <= L_('9'))
  ------------------
  |  |  175|  15.7k|# define L_(Ch) Ch
  ------------------
                    if (c >= L_('0') && c <= L_('9'))
  ------------------
  |  |  175|  7.16k|# define L_(Ch) Ch
  ------------------
  |  Branch (333:11): [True: 7.16k, False: 687]
  |  Branch (333:27): [True: 3.99k, False: 3.17k]
  ------------------
  334|  3.99k|        c -= L_('0');
  ------------------
  |  |  175|  3.99k|# define L_(Ch) Ch
  ------------------
  335|  3.86k|      else if (ISALPHA (c))
  ------------------
  |  |  184|  3.86k|#  define ISALPHA(Ch) isalpha ((unsigned char) (Ch))
  ------------------
  336|  3.07k|        c = TOUPPER (c) - L_('A') + 10;
  ------------------
  |  |  185|  3.07k|#  define TOUPPER(Ch) toupper ((unsigned char) (Ch))
  ------------------
                      c = TOUPPER (c) - L_('A') + 10;
  ------------------
  |  |  175|  3.07k|# define L_(Ch) Ch
  ------------------
  337|    789|      else
  338|    789|        break;
  339|  7.06k|      if ((int) c >= base)
  ------------------
  |  Branch (339:11): [True: 186, False: 6.88k]
  ------------------
  340|    186|        break;
  341|       |      /* Check for overflow.  */
  342|  6.88k|      if (i > cutoff || (i == cutoff && c > cutlim))
  ------------------
  |  Branch (342:11): [True: 507, False: 6.37k]
  |  Branch (342:26): [True: 5, False: 6.36k]
  |  Branch (342:41): [True: 0, False: 5]
  ------------------
  343|    507|        overflow = 1;
  344|  6.37k|      else
  345|  6.37k|        {
  346|  6.37k|          i *= (unsigned LONG int) base;
  347|  6.37k|          i += c;
  348|  6.37k|        }
  349|  6.88k|    }
  350|       |
  351|       |  /* Check if anything actually happened.  */
  352|  1.39k|  if (s == save)
  ------------------
  |  Branch (352:7): [True: 77, False: 1.32k]
  ------------------
  353|     77|    goto noconv;
  354|       |
  355|       |  /* Store in ENDPTR the address of one character
  356|       |     past the last character we converted.  */
  357|  1.32k|  if (endptr != NULL)
  ------------------
  |  Branch (357:7): [True: 0, False: 1.32k]
  ------------------
  358|      0|    *endptr = (STRING_TYPE *) s;
  359|       |
  360|  1.32k|#if !UNSIGNED
  361|       |  /* Check for a value that is within the range of
  362|       |     'unsigned LONG int', but outside the range of 'LONG int'.  */
  363|  1.32k|  if (overflow == 0
  ------------------
  |  Branch (363:7): [True: 1.23k, False: 83]
  ------------------
  364|  1.32k|      && i > (negative
  ------------------
  |  Branch (364:10): [True: 68, False: 1.17k]
  |  Branch (364:15): [True: 100, False: 1.13k]
  ------------------
  365|  1.23k|              ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1
  ------------------
  |  |  121|    100|# define STRTOL_LONG_MIN LLONG_MIN
  ------------------
  366|  1.23k|              : (unsigned LONG int) STRTOL_LONG_MAX))
  ------------------
  |  |  122|  1.13k|# define STRTOL_LONG_MAX LLONG_MAX
  ------------------
  367|     68|    overflow = 1;
  368|  1.32k|#endif
  369|       |
  370|  1.32k|  if (overflow)
  ------------------
  |  Branch (370:7): [True: 151, False: 1.17k]
  ------------------
  371|    151|    {
  372|    151|      __set_errno (ERANGE);
  ------------------
  |  |   31|    151|# define __set_errno(Val) errno = (Val)
  ------------------
  373|       |#if UNSIGNED
  374|       |      return STRTOL_ULONG_MAX;
  375|       |#else
  376|    151|      return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX;
  ------------------
  |  |  121|    151|# define STRTOL_LONG_MIN LLONG_MIN
  ------------------
                    return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX;
  ------------------
  |  |  122|    151|# define STRTOL_LONG_MAX LLONG_MAX
  ------------------
  |  Branch (376:14): [True: 0, False: 151]
  ------------------
  377|    151|#endif
  378|    151|    }
  379|       |
  380|       |  /* Return the result of the appropriate sign.  */
  381|  1.17k|  return negative ? -i : i;
  ------------------
  |  Branch (381:10): [True: 100, False: 1.07k]
  ------------------
  382|       |
  383|     91|noconv:
  384|       |  /* We must handle a special case here: the base is 0 or 16 and the
  385|       |     first two characters are '0' and 'x', but the rest are no
  386|       |     hexadecimal digits.  Likewise when the base is 0 or 2 and the
  387|       |     first two characters are '0' and 'b', but the rest are no binary
  388|       |     digits.  This is no error case.  We return 0 and ENDPTR points to
  389|       |     the 'x' or 'b'.  */
  390|     91|  if (endptr != NULL)
  ------------------
  |  Branch (390:7): [True: 0, False: 91]
  ------------------
  391|      0|    {
  392|      0|      if (save - nptr >= 2
  ------------------
  |  Branch (392:11): [True: 0, False: 0]
  ------------------
  393|      0|          && (TOUPPER (save[-1]) == L_('X') || TOUPPER (save[-1]) == L_('B'))
  ------------------
  |  |  185|      0|#  define TOUPPER(Ch) toupper ((unsigned char) (Ch))
  ------------------
                        && (TOUPPER (save[-1]) == L_('X') || TOUPPER (save[-1]) == L_('B'))
  ------------------
  |  |  175|      0|# define L_(Ch) Ch
  ------------------
                        && (TOUPPER (save[-1]) == L_('X') || TOUPPER (save[-1]) == L_('B'))
  ------------------
  |  |  185|      0|#  define TOUPPER(Ch) toupper ((unsigned char) (Ch))
  ------------------
                        && (TOUPPER (save[-1]) == L_('X') || TOUPPER (save[-1]) == L_('B'))
  ------------------
  |  |  175|      0|# define L_(Ch) Ch
  ------------------
  |  Branch (393:15): [True: 0, False: 0]
  |  Branch (393:48): [True: 0, False: 0]
  ------------------
  394|      0|          && save[-2] == L_('0'))
  ------------------
  |  |  175|      0|# define L_(Ch) Ch
  ------------------
  |  Branch (394:14): [True: 0, False: 0]
  ------------------
  395|      0|        *endptr = (STRING_TYPE *) &save[-1];
  396|      0|      else
  397|       |        /*  There was no number to convert.  */
  398|      0|        *endptr = (STRING_TYPE *) nptr;
  399|      0|    }
  400|       |
  401|     91|  return 0L;
  402|  1.32k|}

http.c:wget_calloc:
  461|  7.60k|{
  462|  7.60k|	return wget_calloc_fn(nmemb, size);
  463|  7.60k|}
http.c:wget_malloc:
  455|  3.80k|{
  456|  3.80k|	return wget_malloc_fn(size);
  457|  3.80k|}
http_parse.c:wget_calloc:
  461|  1.90k|{
  462|  1.90k|	return wget_calloc_fn(nmemb, size);
  463|  1.90k|}
iri.c:wget_malloc:
  455|    634|{
  456|    634|	return wget_malloc_fn(size);
  457|    634|}
mem.c:wget_malloc:
  455|  22.8k|{
  456|  22.8k|	return wget_malloc_fn(size);
  457|  22.8k|}
net.c:wget_malloc:
  455|  3.80k|{
  456|  3.80k|	return wget_malloc_fn(size);
  457|  3.80k|}
printf.c:wget_realloc:
  467|    861|{
  468|    861|	return wget_realloc_fn(ptr, size);
  469|    861|}
thread.c:wget_malloc:
  455|     10|{
  456|     10|	return wget_malloc_fn(size);
  457|     10|}
vector.c:wget_calloc:
  461|  7.60k|{
  462|  7.60k|	return wget_calloc_fn(nmemb, size);
  463|  7.60k|}
vector.c:wget_malloc:
  455|  7.60k|{
  456|  7.60k|	return wget_malloc_fn(size);
  457|  7.60k|}
buffer.c:wget_malloc:
  455|  11.5k|{
  456|  11.5k|	return wget_malloc_fn(size);
  457|  11.5k|}
decompressor.c:wget_calloc:
  461|  1.90k|{
  462|  1.90k|	return wget_calloc_fn(nmemb, size);
  463|  1.90k|}

c_isspace:
  301|    634|{
  302|    634|  switch (c)
  303|    634|    {
  304|      0|    case ' ': case '\t': case '\n': case '\v': case '\f': case '\r':
  ------------------
  |  Branch (304:5): [True: 0, False: 634]
  |  Branch (304:15): [True: 0, False: 634]
  |  Branch (304:26): [True: 0, False: 634]
  |  Branch (304:37): [True: 0, False: 634]
  |  Branch (304:48): [True: 0, False: 634]
  |  Branch (304:59): [True: 0, False: 634]
  ------------------
  305|      0|      return true;
  306|    634|    default:
  ------------------
  |  Branch (306:5): [True: 634, False: 0]
  ------------------
  307|    634|      return false;
  308|    634|    }
  309|    634|}
c_isalnum:
  170|  3.17k|{
  171|  3.17k|  switch (c)
  172|  3.17k|    {
  173|      0|    _C_CTYPE_DIGIT:
  ------------------
  |  |  135|      0|   case '0': case '1': case '2': case '3': \
  |  |  ------------------
  |  |  |  Branch (135:4): [True: 0, False: 3.17k]
  |  |  |  Branch (135:14): [True: 0, False: 3.17k]
  |  |  |  Branch (135:24): [True: 0, False: 3.17k]
  |  |  |  Branch (135:34): [True: 0, False: 3.17k]
  |  |  ------------------
  |  |  136|      0|   case '4': case '5': case '6': case '7': \
  |  |  ------------------
  |  |  |  Branch (136:4): [True: 0, False: 3.17k]
  |  |  |  Branch (136:14): [True: 0, False: 3.17k]
  |  |  |  Branch (136:24): [True: 0, False: 3.17k]
  |  |  |  Branch (136:34): [True: 0, False: 3.17k]
  |  |  ------------------
  |  |  137|      0|   case '8': case '9'
  |  |  ------------------
  |  |  |  Branch (137:4): [True: 0, False: 3.17k]
  |  |  ------------------
  ------------------
  174|  27.8k|    _C_CTYPE_LOWER:
  ------------------
  |  |  138|      0|#define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0)
  |  |  ------------------
  |  |  |  |  122|      0|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 0, False: 3.17k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 3.17k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 3.17k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 3.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|      0|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 3.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  123|    634|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (123:20): [True: 634, False: 2.53k]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  124|    634|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  125|  1.26k|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (125:20): [True: 634, False: 2.53k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  126|  2.53k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (126:20): [True: 1.26k, False: 1.90k]
  |  |  |  |  |  Branch (126:36): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  127|  2.53k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  175|  27.8k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|  2.53k|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|  2.53k|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|  2.53k|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 0, False: 3.17k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 3.17k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 3.17k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 3.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  2.53k|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 3.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  123|  2.53k|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  124|  2.53k|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  125|  2.53k|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  126|  2.53k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (126:20): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (126:36): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  |  |  127|  2.53k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 3.17k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 3.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  176|  2.53k|      return true;
  177|    634|    default:
  ------------------
  |  Branch (177:5): [True: 634, False: 2.53k]
  ------------------
  178|    634|      return false;
  179|  3.17k|    }
  180|  3.17k|}
c_isalpha:
  184|    634|{
  185|    634|  switch (c)
  186|    634|    {
  187|  12.0k|    _C_CTYPE_LOWER:
  ------------------
  |  |  138|      0|#define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0)
  |  |  ------------------
  |  |  |  |  122|      0|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 0, False: 634]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 634]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 634]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 634]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|      0|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 634]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  123|    634|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (123:20): [True: 634, False: 0]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 634]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  124|    634|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 634]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  125|    634|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 634]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  126|    634|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (126:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (126:36): [True: 0, False: 634]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  127|    634|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|  12.0k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|    634|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|    634|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|    634|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 0, False: 634]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 634]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 634]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 634]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    634|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 634]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  123|    634|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 634]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  124|    634|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 634]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  125|    634|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 634]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  126|    634|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (126:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (126:36): [True: 0, False: 634]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  127|    634|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 634]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 634]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 634]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|    634|      return true;
  190|      0|    default:
  ------------------
  |  Branch (190:5): [True: 0, False: 634]
  ------------------
  191|      0|      return false;
  192|    634|    }
  193|    634|}
c_isblank:
  216|  10.7k|{
  217|  10.7k|  return c == ' ' || c == '\t';
  ------------------
  |  Branch (217:10): [True: 1.90k, False: 8.87k]
  |  Branch (217:22): [True: 0, False: 8.87k]
  ------------------
  218|  10.7k|}
c_isdigit:
  234|  4.44k|{
  235|  4.44k|  switch (c)
  236|  4.44k|    {
  237|      4|    _C_CTYPE_DIGIT:
  ------------------
  |  |  135|      4|   case '0': case '1': case '2': case '3': \
  |  |  ------------------
  |  |  |  Branch (135:4): [True: 0, False: 4.44k]
  |  |  |  Branch (135:14): [True: 4, False: 4.43k]
  |  |  |  Branch (135:24): [True: 0, False: 4.44k]
  |  |  |  Branch (135:34): [True: 0, False: 4.44k]
  |  |  ------------------
  |  |  136|      4|   case '4': case '5': case '6': case '7': \
  |  |  ------------------
  |  |  |  Branch (136:4): [True: 0, False: 4.44k]
  |  |  |  Branch (136:14): [True: 0, False: 4.44k]
  |  |  |  Branch (136:24): [True: 0, False: 4.44k]
  |  |  |  Branch (136:34): [True: 0, False: 4.44k]
  |  |  ------------------
  |  |  137|      4|   case '8': case '9'
  |  |  ------------------
  |  |  |  Branch (137:4): [True: 0, False: 4.44k]
  |  |  ------------------
  ------------------
  238|      4|      return true;
  239|  4.43k|    default:
  ------------------
  |  Branch (239:5): [True: 4.43k, False: 4]
  ------------------
  240|  4.43k|      return false;
  241|  4.44k|    }
  242|  4.44k|}
c_isupper:
  313|  9.51k|{
  314|  9.51k|  switch (c)
  315|  9.51k|    {
  316|      0|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|      0|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 0, False: 9.51k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 9.51k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 9.51k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 9.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|      0|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 9.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 0, False: 9.51k]
  |  |  |  |  ------------------
  |  |  |  |  123|      0|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 9.51k]
  |  |  |  |  ------------------
  |  |  |  |  124|      0|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 9.51k]
  |  |  |  |  ------------------
  |  |  |  |  125|      0|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 9.51k]
  |  |  |  |  ------------------
  |  |  |  |  126|      0|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (126:20): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (126:36): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 9.51k]
  |  |  |  |  ------------------
  |  |  |  |  127|      0|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 9.51k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 9.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  317|      0|      return true;
  318|  9.51k|    default:
  ------------------
  |  Branch (318:5): [True: 9.51k, False: 0]
  ------------------
  319|  9.51k|      return false;
  320|  9.51k|    }
  321|  9.51k|}
c_tolower:
  338|   173k|{
  339|   173k|  switch (c)
  340|   173k|    {
  341|  26.6k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|  12.6k|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|  8.24k|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 0, False: 173k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 173k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 8.24k, False: 165k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 173k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  12.6k|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 4.43k, False: 169k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 0, False: 173k]
  |  |  |  |  ------------------
  |  |  |  |  123|  20.2k|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 5.70k, False: 168k]
  |  |  |  |  |  Branch (123:20): [True: 1.90k, False: 171k]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 173k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 173k]
  |  |  |  |  ------------------
  |  |  |  |  124|  22.1k|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 173k]
  |  |  |  |  |  Branch (124:20): [True: 1.90k, False: 171k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 173k]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 173k]
  |  |  |  |  ------------------
  |  |  |  |  125|  22.1k|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 173k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 173k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 173k]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 173k]
  |  |  |  |  ------------------
  |  |  |  |  126|  26.6k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 173k]
  |  |  |  |  |  Branch (126:20): [True: 4.43k, False: 169k]
  |  |  |  |  |  Branch (126:36): [True: 0, False: 173k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 173k]
  |  |  |  |  ------------------
  |  |  |  |  127|  26.6k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 173k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 173k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 173k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  342|  26.6k|      return c - 'A' + 'a';
  343|   147k|    default:
  ------------------
  |  Branch (343:5): [True: 147k, False: 26.6k]
  ------------------
  344|   147k|      return c;
  345|   173k|    }
  346|   173k|}

wget_buffer_init:
  154|  17.6k|{
  155|  17.6k|	if (data && likely(size)) {
  ------------------
  |  |  117|  11.4k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 11.4k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (155:6): [True: 11.4k, False: 6.22k]
  ------------------
  156|  11.4k|		buf->size = size - 1;
  157|  11.4k|		buf->data = data;
  158|  11.4k|		*buf->data = 0; // always 0 terminate data to allow string functions
  159|  11.4k|		buf->release_data = 0;
  160|  11.4k|	} else {
  161|  6.22k|		if (!size)
  ------------------
  |  Branch (161:7): [True: 0, False: 6.22k]
  ------------------
  162|      0|			size = 127;
  163|  6.22k|		buf->size = size;
  164|  6.22k|		if (!(buf->data = wget_malloc(size + 1))) {
  ------------------
  |  Branch (164:7): [True: 0, False: 6.22k]
  ------------------
  165|      0|			buf->error = 1;
  166|      0|			return WGET_E_MEMORY;
  167|      0|		}
  168|  6.22k|		*buf->data = 0; // always 0 terminate data to allow string functions
  169|  6.22k|		buf->release_data = 1;
  170|  6.22k|	}
  171|       |
  172|  17.6k|	buf->error = 0;
  173|  17.6k|	buf->release_buf = 0;
  174|  17.6k|	buf->length = 0;
  175|       |
  176|  17.6k|	return WGET_E_SUCCESS;
  177|  17.6k|}
wget_buffer_alloc:
  190|  5.35k|{
  191|  5.35k|	wget_buffer *buf;
  192|       |
  193|  5.35k|	if (!(buf = wget_malloc(sizeof(wget_buffer))))
  ------------------
  |  Branch (193:6): [True: 0, False: 5.35k]
  ------------------
  194|      0|		return NULL;
  195|       |
  196|  5.35k|	if (wget_buffer_init(buf, NULL, size) < 0) {
  ------------------
  |  Branch (196:6): [True: 0, False: 5.35k]
  ------------------
  197|      0|		xfree(buf);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  198|      0|		return NULL;
  199|      0|	}
  200|       |
  201|  5.35k|	buf->release_buf = 1;
  202|       |
  203|  5.35k|	return buf;
  204|  5.35k|}
wget_buffer_deinit:
  269|  16.7k|{
  270|  16.7k|	if (buf->release_data) {
  ------------------
  |  Branch (270:6): [True: 5.35k, False: 11.4k]
  ------------------
  271|  5.35k|		xfree(buf->data);
  ------------------
  |  |   53|  5.35k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 5.35k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  272|  5.35k|		buf->release_data = 0;
  273|  5.35k|	}
  274|       |
  275|  16.7k|	if (buf->release_buf)
  ------------------
  |  Branch (275:6): [True: 5.35k, False: 11.4k]
  ------------------
  276|  5.35k|		wget_free(buf); // do not use xfree() since buf is NONNULL
  277|  16.7k|}
wget_buffer_free:
  292|  7.60k|{
  293|  7.60k|	if (likely(buf && *buf)) {
  ------------------
  |  |  117|  15.2k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 5.35k, False: 2.24k]
  |  |  |  Branch (117:43): [True: 7.60k, False: 0]
  |  |  |  Branch (117:43): [True: 5.35k, False: 2.24k]
  |  |  ------------------
  ------------------
  294|  5.35k|		wget_buffer_deinit(*buf);
  295|  5.35k|		*buf = NULL;
  296|  5.35k|	}
  297|  7.60k|}
wget_buffer_memcat:
  379|  52.2k|{
  380|  52.2k|	if (unlikely(!buf))
  ------------------
  |  |  116|  52.2k|#	define unlikely(expr) __builtin_expect(!!(expr), 0)
  |  |  ------------------
  |  |  |  Branch (116:25): [True: 0, False: 52.2k]
  |  |  ------------------
  ------------------
  381|      0|		return 0;
  382|       |
  383|  52.2k|	if (likely(length)) {
  ------------------
  |  |  117|  52.2k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 47.5k, False: 4.75k]
  |  |  ------------------
  ------------------
  384|  47.5k|		if (buf->size < buf->length + length)
  ------------------
  |  Branch (384:7): [True: 0, False: 47.5k]
  ------------------
  385|      0|			if (buffer_realloc(buf, buf->size * 2 + length) != WGET_E_SUCCESS)
  ------------------
  |  Branch (385:8): [True: 0, False: 0]
  ------------------
  386|      0|				return buf->length;
  387|       |
  388|  47.5k|		if (likely(data))
  ------------------
  |  |  117|  47.5k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 47.5k, False: 0]
  |  |  ------------------
  ------------------
  389|  47.5k|			memcpy(buf->data + buf->length, data, length);
  390|      0|		else
  391|      0|			memset(buf->data + buf->length, 0, length);
  392|  47.5k|		buf->length += length;
  393|  47.5k|	}
  394|  52.2k|	buf->data[buf->length] = 0; // always 0 terminate data to allow string functions
  395|       |
  396|  52.2k|	return buf->length;
  397|  52.2k|}
wget_buffer_strcpy:
  415|  3.80k|{
  416|  3.80k|	if (likely(buf))
  ------------------
  |  |  117|  3.80k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 3.80k, False: 0]
  |  |  ------------------
  ------------------
  417|  3.80k|		buf->length = 0;
  418|       |
  419|  3.80k|	return wget_buffer_memcat(buf, s, likely(s) ? strlen(s) : 0);
  ------------------
  |  |  117|  3.80k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 3.80k, False: 0]
  |  |  ------------------
  ------------------
  420|  3.80k|}
wget_buffer_strcat:
  437|  10.1k|{
  438|  10.1k|	return wget_buffer_memcat(buf, s, likely(s) ? strlen(s) : 0);
  ------------------
  |  |  117|  10.1k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 10.1k, False: 0]
  |  |  ------------------
  ------------------
  439|  10.1k|}
wget_buffer_bufcat:
  477|  3.80k|{
  478|  3.80k|	if (likely(src))
  ------------------
  |  |  117|  3.80k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 3.80k, False: 0]
  |  |  ------------------
  ------------------
  479|  3.80k|		return wget_buffer_memcat(buf, src->data, src->length);
  480|      0|	else
  481|      0|		return wget_buffer_memcat(buf, NULL, 0);
  482|  3.80k|}

wget_buffer_vprintf_append:
  339|  4.66k|{
  340|  4.66k|	const char *p = fmt, *begin;
  341|  4.66k|	int field_width, precision;
  342|  4.66k|	unsigned int flags;
  343|  4.66k|	long long arg;
  344|  4.66k|	unsigned long long argu;
  345|       |
  346|  4.66k|	if (!p)
  ------------------
  |  Branch (346:6): [True: 0, False: 4.66k]
  ------------------
  347|      0|		return 0;
  348|       |
  349|  11.0k|	for (;*p;) {
  ------------------
  |  Branch (349:8): [True: 6.38k, False: 4.66k]
  ------------------
  350|       |
  351|       |		/*
  352|       |		 * Collect plain char sequence.
  353|       |		 * Walk the string until we find a '%' character.
  354|       |		 */
  355|  9.83k|		for (begin = p; *p && *p != '%'; p++);
  ------------------
  |  Branch (355:19): [True: 9.83k, False: 0]
  |  Branch (355:25): [True: 3.44k, False: 6.38k]
  ------------------
  356|  6.38k|		if (p != begin)
  ------------------
  |  Branch (356:7): [True: 1.72k, False: 4.66k]
  ------------------
  357|  1.72k|			wget_buffer_memcat(buf, begin, p - begin);
  358|       |
  359|  6.38k|		if (!*p)
  ------------------
  |  Branch (359:7): [True: 0, False: 6.38k]
  ------------------
  360|      0|			break;
  361|       |
  362|       |		/* Shortcut to %s and %p, handle %% */
  363|  6.38k|		if (*++p == 's') {
  ------------------
  |  Branch (363:7): [True: 2.58k, False: 3.80k]
  ------------------
  364|  2.58k|			const char *s = va_arg(args, const char *);
  365|  2.58k|			wget_buffer_strcat(buf, s ? s : "(null)");
  ------------------
  |  Branch (365:28): [True: 2.58k, False: 0]
  ------------------
  366|  2.58k|			p++;
  367|  2.58k|			continue;
  368|  3.80k|		} else if (*p == 'd') {
  ------------------
  |  Branch (368:14): [True: 0, False: 3.80k]
  ------------------
  369|      0|			convert_dec_fast(buf, va_arg(args, int));
  370|      0|			p++;
  371|      0|			continue;
  372|  3.80k|		} else if (*p == 'c') {
  ------------------
  |  Branch (372:14): [True: 0, False: 3.80k]
  ------------------
  373|      0|			char c = (char ) va_arg(args, int);
  374|      0|			wget_buffer_memcat(buf, &c, 1);
  375|      0|			p++;
  376|      0|			continue;
  377|  3.80k|		} else if (*p == 'p') {
  ------------------
  |  Branch (377:14): [True: 0, False: 3.80k]
  ------------------
  378|      0|			convert_pointer(buf, va_arg(args, void *));
  379|      0|			p++;
  380|      0|			continue;
  381|  3.80k|		} else if (*p == '%') {
  ------------------
  |  Branch (381:14): [True: 0, False: 3.80k]
  ------------------
  382|      0|			wget_buffer_memset_append(buf, '%', 1);
  383|      0|			p++;
  384|      0|			continue;
  385|      0|		}
  386|       |
  387|       |		/* Read the flag chars (optional, simplified) */
  388|  3.80k|		p = read_flag_chars(p, &flags);
  389|       |
  390|       |		/*
  391|       |		 * Read field width (optional).
  392|       |		 * If '*', then the field width is given as an additional argument,
  393|       |		 * which precedes the argument to be formatted.
  394|       |		 */
  395|  3.80k|		if (*p == '*') {
  ------------------
  |  Branch (395:7): [True: 0, False: 3.80k]
  ------------------
  396|      0|			field_width = va_arg(args, int);
  397|      0|			p = read_field_width(p, &field_width, &flags, 1);
  398|  3.80k|		} else {
  399|  3.80k|			p = read_field_width(p, &field_width, &flags, 0);
  400|  3.80k|		}
  401|       |
  402|       |		/*
  403|       |		 * Read precision (optional).
  404|       |		 * If '*', the precision is given as an additional argument,
  405|       |		 * just as the case for the field width.
  406|       |		 */
  407|  3.80k|		if (*p == '.') {
  ------------------
  |  Branch (407:7): [True: 0, False: 3.80k]
  ------------------
  408|      0|			if (*++p == '*') {
  ------------------
  |  Branch (408:8): [True: 0, False: 0]
  ------------------
  409|      0|				precision = va_arg(args, int);
  410|      0|				p = read_precision(p, &precision, 1);
  411|      0|			} else {
  412|      0|				p = read_precision(p, &precision, 0);
  413|      0|			}
  414|      0|		} else
  415|  3.80k|			precision = -1;
  416|       |
  417|       |		/* Read length modifier (optional) */
  418|  3.80k|		switch (*p) {
  419|      0|		case 'z':
  ------------------
  |  Branch (419:3): [True: 0, False: 3.80k]
  ------------------
  420|      0|			arg = va_arg(args, ssize_t);
  421|      0|			argu = (size_t)arg;
  422|      0|			p++;
  423|      0|			break;
  424|       |
  425|      0|		case 'l':
  ------------------
  |  Branch (425:3): [True: 0, False: 3.80k]
  ------------------
  426|      0|			if (p[1] == 'l') {
  ------------------
  |  Branch (426:8): [True: 0, False: 0]
  ------------------
  427|      0|				p += 2;
  428|      0|				arg = va_arg(args, long long);
  429|      0|				argu = (unsigned long long)arg;
  430|      0|			} else {
  431|      0|				p++;
  432|      0|				arg = (long)va_arg(args, long);
  433|      0|				argu = (unsigned long)arg;
  434|      0|			}
  435|      0|			break;
  436|       |
  437|      0|		case 'L':
  ------------------
  |  Branch (437:3): [True: 0, False: 3.80k]
  ------------------
  438|      0|			p++;
  439|      0|			arg = va_arg(args, long long);
  440|      0|			argu = (unsigned long long)arg;
  441|      0|			break;
  442|       |
  443|  3.80k|		case 'h':
  ------------------
  |  Branch (443:3): [True: 3.80k, False: 0]
  ------------------
  444|  3.80k|			if (p[1] == 'h') {
  ------------------
  |  Branch (444:8): [True: 0, False: 3.80k]
  ------------------
  445|      0|				p += 2;
  446|      0|				arg = (signed char) va_arg(args, int);
  447|      0|				argu = (unsigned char) arg;
  448|  3.80k|			} else {
  449|  3.80k|				p++;
  450|  3.80k|				arg = (short) va_arg(args, int);
  451|  3.80k|				argu = (unsigned short) arg;
  452|  3.80k|			}
  453|  3.80k|			break;
  454|       |
  455|      0|		case 's':
  ------------------
  |  Branch (455:3): [True: 0, False: 3.80k]
  ------------------
  456|      0|			p++;
  457|      0|			copy_string(buf, flags, field_width, precision, va_arg(args, const char *));
  458|      0|			continue;
  459|       |
  460|      0|		case 'c':
  ------------------
  |  Branch (460:3): [True: 0, False: 3.80k]
  ------------------
  461|      0|		{
  462|      0|			char c[2] = { (char) va_arg(args, int), 0 };
  463|      0|			p++;
  464|      0|			copy_string(buf, flags, field_width, precision, c);
  465|      0|			continue;
  466|      0|		}
  467|       |
  468|      0|		case 'p': // %p shortcut
  ------------------
  |  Branch (468:3): [True: 0, False: 3.80k]
  ------------------
  469|      0|			p++;
  470|      0|			convert_dec(buf, flags | FLAG_HEXLO | FLAG_ALTERNATE, field_width, precision, (long long)(ptrdiff_t)va_arg(args, void *));
  ------------------
  |  |   53|      0|#define FLAG_HEXLO        64U
  ------------------
              			convert_dec(buf, flags | FLAG_HEXLO | FLAG_ALTERNATE, field_width, precision, (long long)(ptrdiff_t)va_arg(args, void *));
  ------------------
  |  |   49|      0|#define FLAG_ALTERNATE     4U
  ------------------
  471|      0|			continue;
  472|       |
  473|      0|		default:
  ------------------
  |  Branch (473:3): [True: 0, False: 3.80k]
  ------------------
  474|      0|			arg = va_arg(args, int);
  475|      0|			argu = (unsigned int)arg;
  476|  3.80k|		}
  477|       |
  478|  3.80k|		if (*p == 'd' || *p == 'i') {
  ------------------
  |  Branch (478:7): [True: 0, False: 3.80k]
  |  Branch (478:20): [True: 0, False: 3.80k]
  ------------------
  479|      0|			convert_dec(buf, flags | FLAG_SIGNED | FLAG_DECIMAL, field_width, precision, arg);
  ------------------
  |  |   50|      0|#define FLAG_SIGNED        8U
  ------------------
              			convert_dec(buf, flags | FLAG_SIGNED | FLAG_DECIMAL, field_width, precision, arg);
  ------------------
  |  |   51|      0|#define FLAG_DECIMAL      16U
  ------------------
  480|  3.80k|		} else if (*p == 'u') {
  ------------------
  |  Branch (480:14): [True: 3.80k, False: 0]
  ------------------
  481|  3.80k|			convert_dec(buf, flags | FLAG_DECIMAL, field_width, precision, (long long) argu);
  ------------------
  |  |   51|  3.80k|#define FLAG_DECIMAL      16U
  ------------------
  482|  3.80k|		} else if (*p == 'x') {
  ------------------
  |  Branch (482:14): [True: 0, False: 0]
  ------------------
  483|      0|			convert_dec(buf, flags | FLAG_HEXLO, field_width, precision, (long long) argu);
  ------------------
  |  |   53|      0|#define FLAG_HEXLO        64U
  ------------------
  484|      0|		} else if (*p == 'X') {
  ------------------
  |  Branch (484:14): [True: 0, False: 0]
  ------------------
  485|      0|			convert_dec(buf, flags | FLAG_HEXUP, field_width, precision, (long long) argu);
  ------------------
  |  |   54|      0|#define FLAG_HEXUP       128U
  ------------------
  486|      0|		} else if (*p == 'o') {
  ------------------
  |  Branch (486:14): [True: 0, False: 0]
  ------------------
  487|      0|			convert_dec(buf, flags | FLAG_OCTAL, field_width, precision, (long long) argu);
  ------------------
  |  |   52|      0|#define FLAG_OCTAL        32U
  ------------------
  488|      0|		} else {
  489|       |			/*
  490|       |			 * This is an unknown conversion specifier,
  491|       |			 * so just put '%' and move on.
  492|       |			 */
  493|      0|			wget_buffer_memset_append(buf, '%', 1);
  494|      0|			p = begin + 1;
  495|      0|			continue;
  496|      0|		}
  497|       |
  498|  3.80k|		p++;
  499|  3.80k|	}
  500|       |
  501|  4.66k|	return buf->length;
  502|  4.66k|}
wget_buffer_vprintf:
  521|  4.66k|{
  522|  4.66k|	buf->length = 0;
  523|       |
  524|  4.66k|	return wget_buffer_vprintf_append(buf, fmt, args);
  525|  4.66k|}
buffer_printf.c:read_flag_chars:
  287|  3.80k|{
  288|  3.80k|	unsigned int flags;
  289|       |
  290|  3.80k|	for (flags = 0; *p; p++) {
  ------------------
  |  Branch (290:18): [True: 3.80k, False: 0]
  ------------------
  291|  3.80k|		if (*p == '0')
  ------------------
  |  Branch (291:7): [True: 0, False: 3.80k]
  ------------------
  292|      0|			flags |= FLAG_ZERO_PADDED;
  ------------------
  |  |   47|      0|#define FLAG_ZERO_PADDED   1U
  ------------------
  293|  3.80k|		else if (*p == '-')
  ------------------
  |  Branch (293:12): [True: 0, False: 3.80k]
  ------------------
  294|      0|			flags |= FLAG_LEFT_ADJUST;
  ------------------
  |  |   48|      0|#define FLAG_LEFT_ADJUST   2U
  ------------------
  295|  3.80k|		else if (*p == '#')
  ------------------
  |  Branch (295:12): [True: 0, False: 3.80k]
  ------------------
  296|      0|			flags |= FLAG_ALTERNATE;
  ------------------
  |  |   49|      0|#define FLAG_ALTERNATE     4U
  ------------------
  297|  3.80k|		else
  298|  3.80k|			break;
  299|  3.80k|	}
  300|       |
  301|  3.80k|	*out = flags;
  302|  3.80k|	return p;
  303|  3.80k|}
buffer_printf.c:read_field_width:
  306|  3.80k|{
  307|  3.80k|	int field_width;
  308|       |
  309|  3.80k|	if (width_is_external) {
  ------------------
  |  Branch (309:6): [True: 0, False: 3.80k]
  ------------------
  310|      0|		field_width = *out;
  311|       |
  312|      0|		if (field_width < 0) {
  ------------------
  |  Branch (312:7): [True: 0, False: 0]
  ------------------
  313|      0|			*flags |= FLAG_LEFT_ADJUST;
  ------------------
  |  |   48|      0|#define FLAG_LEFT_ADJUST   2U
  ------------------
  314|      0|			field_width = -field_width;
  315|      0|		}
  316|       |
  317|      0|		p++;
  318|  3.80k|	} else {
  319|  3.80k|		for (field_width = 0; c_isdigit(*p); p++)
  ------------------
  |  Branch (319:25): [True: 0, False: 3.80k]
  ------------------
  320|      0|			field_width = field_width * 10 + (*p - '0');
  321|  3.80k|	}
  322|       |
  323|  3.80k|	*out = field_width;
  324|  3.80k|	return p;
  325|  3.80k|}
buffer_printf.c:convert_dec:
  117|  3.80k|{
  118|  3.80k|	unsigned long long argu = (unsigned long long) arg;
  119|  3.80k|	char str[32], minus = 0; // long enough to hold decimal long long
  120|  3.80k|	char *dst = str + sizeof(str) - 1;
  121|  3.80k|	unsigned char c;
  122|  3.80k|	size_t length;
  123|       |
  124|       |	// info_printf("arg1 = %lld %lld\n",arg,-arg);
  125|       |
  126|  3.80k|	if (flags & FLAG_DECIMAL) {
  ------------------
  |  |   51|  3.80k|#define FLAG_DECIMAL      16U
  ------------------
  |  Branch (126:6): [True: 3.80k, False: 0]
  ------------------
  127|  3.80k|		if (flags & FLAG_SIGNED && arg < 0) {
  ------------------
  |  |   50|  7.60k|#define FLAG_SIGNED        8U
  ------------------
  |  Branch (127:7): [True: 0, False: 3.80k]
  |  Branch (127:30): [True: 0, False: 0]
  ------------------
  128|      0|			minus = 1;
  129|      0|			argu = -arg;
  130|      0|		}
  131|       |
  132|  11.4k|		while (argu) {
  ------------------
  |  Branch (132:10): [True: 7.60k, False: 3.80k]
  ------------------
  133|  7.60k|			*dst-- = argu % 10 + '0';
  134|  7.60k|			argu /= 10;
  135|  7.60k|		}
  136|  3.80k|	} else if (flags & FLAG_HEXLO) {
  ------------------
  |  |   53|      0|#define FLAG_HEXLO        64U
  ------------------
  |  Branch (136:13): [True: 0, False: 0]
  ------------------
  137|      0|		while (argu) {
  ------------------
  |  Branch (137:10): [True: 0, False: 0]
  ------------------
  138|       |			// slightly faster than having a HEX[] lookup table
  139|      0|			*dst-- = (c = (argu & 0xf)) >= 10 ? c + 'a' - 10 : c + '0';
  ------------------
  |  Branch (139:13): [True: 0, False: 0]
  ------------------
  140|      0|			argu >>= 4;
  141|      0|		}
  142|      0|	} else if (flags & FLAG_HEXUP) {
  ------------------
  |  |   54|      0|#define FLAG_HEXUP       128U
  ------------------
  |  Branch (142:13): [True: 0, False: 0]
  ------------------
  143|      0|		while (argu) {
  ------------------
  |  Branch (143:10): [True: 0, False: 0]
  ------------------
  144|       |			// slightly faster than having a HEX[] lookup table
  145|      0|			*dst-- = (c = (argu & 0xf)) >= 10 ? c + 'A' - 10 : c + '0';
  ------------------
  |  Branch (145:13): [True: 0, False: 0]
  ------------------
  146|      0|			argu >>= 4;
  147|      0|		}
  148|      0|	} else if (flags & FLAG_OCTAL) {
  ------------------
  |  |   52|      0|#define FLAG_OCTAL        32U
  ------------------
  |  Branch (148:13): [True: 0, False: 0]
  ------------------
  149|      0|		while (argu) {
  ------------------
  |  Branch (149:10): [True: 0, False: 0]
  ------------------
  150|      0|			*dst-- = (argu & 0x07) + '0';
  151|      0|			argu >>= 3;
  152|      0|		}
  153|      0|	}
  154|       |
  155|       |	// info_printf("arg2 = %lld\n",arg);
  156|       |
  157|       |
  158|  3.80k|	dst++;
  159|       |
  160|  3.80k|	length =  sizeof(str) - (dst - str);
  161|       |
  162|  3.80k|	if (precision < 0) {
  ------------------
  |  Branch (162:6): [True: 3.80k, False: 0]
  ------------------
  163|  3.80k|		precision = 1;
  164|  3.80k|	} else {
  165|      0|		flags &= ~FLAG_ZERO_PADDED;
  ------------------
  |  |   47|      0|#define FLAG_ZERO_PADDED   1U
  ------------------
  166|      0|	}
  167|       |
  168|       |	// info_printf("flags=0x%02x field_width=%d precision=%d length=%zd dst='%.*s'\n",
  169|       |	//	flags,field_width,precision,length,length,dst);
  170|       |
  171|  3.80k|	if (field_width) {
  ------------------
  |  Branch (171:6): [True: 0, False: 3.80k]
  ------------------
  172|      0|		if ((unsigned)field_width > length + minus) {
  ------------------
  |  Branch (172:7): [True: 0, False: 0]
  ------------------
  173|      0|			if (flags & FLAG_LEFT_ADJUST) {
  ------------------
  |  |   48|      0|#define FLAG_LEFT_ADJUST   2U
  ------------------
  |  Branch (173:8): [True: 0, False: 0]
  ------------------
  174|      0|				if (minus)
  ------------------
  |  Branch (174:9): [True: 0, False: 0]
  ------------------
  175|      0|					wget_buffer_memset_append(buf, '-', 1);
  176|       |
  177|      0|				if (length < (unsigned)precision) {
  ------------------
  |  Branch (177:9): [True: 0, False: 0]
  ------------------
  178|      0|					wget_buffer_memset_append(buf, '0', precision - length);
  179|      0|					wget_buffer_memcat(buf, dst, length);
  180|      0|					if (field_width > precision + minus)
  ------------------
  |  Branch (180:10): [True: 0, False: 0]
  ------------------
  181|      0|						wget_buffer_memset_append(buf, ' ', field_width - precision - minus);
  182|      0|				} else {
  183|      0|						wget_buffer_memcat(buf, dst, length);
  184|      0|						wget_buffer_memset_append(buf, ' ', field_width - length - minus);
  185|      0|				}
  186|      0|			} else {
  187|      0|				if (length < (unsigned)precision) {
  ------------------
  |  Branch (187:9): [True: 0, False: 0]
  ------------------
  188|      0|					if (field_width > precision + minus) {
  ------------------
  |  Branch (188:10): [True: 0, False: 0]
  ------------------
  189|      0|						if (flags & FLAG_ZERO_PADDED) {
  ------------------
  |  |   47|      0|#define FLAG_ZERO_PADDED   1U
  ------------------
  |  Branch (189:11): [True: 0, False: 0]
  ------------------
  190|      0|							if (minus)
  ------------------
  |  Branch (190:12): [True: 0, False: 0]
  ------------------
  191|      0|								wget_buffer_memset_append(buf, '-', 1);
  192|      0|							wget_buffer_memset_append(buf, '0', field_width - precision - minus);
  193|      0|						} else {
  194|      0|							wget_buffer_memset_append(buf, ' ', field_width - precision - minus);
  195|      0|							if (minus)
  ------------------
  |  Branch (195:12): [True: 0, False: 0]
  ------------------
  196|      0|								wget_buffer_memset_append(buf, '-', 1);
  197|      0|						}
  198|      0|					} else {
  199|      0|						if (minus)
  ------------------
  |  Branch (199:11): [True: 0, False: 0]
  ------------------
  200|      0|							wget_buffer_memset_append(buf, '-', 1);
  201|      0|					}
  202|      0|					wget_buffer_memset_append(buf, '0', precision - length);
  203|      0|				} else {
  204|      0|					if (flags & FLAG_ZERO_PADDED) {
  ------------------
  |  |   47|      0|#define FLAG_ZERO_PADDED   1U
  ------------------
  |  Branch (204:10): [True: 0, False: 0]
  ------------------
  205|      0|						if (minus)
  ------------------
  |  Branch (205:11): [True: 0, False: 0]
  ------------------
  206|      0|							wget_buffer_memset_append(buf, '-', 1);
  207|      0|						wget_buffer_memset_append(buf, '0', field_width - length - minus);
  208|      0|					} else {
  209|      0|						wget_buffer_memset_append(buf, ' ', field_width - length - minus);
  210|      0|						if (minus)
  ------------------
  |  Branch (210:11): [True: 0, False: 0]
  ------------------
  211|      0|							wget_buffer_memset_append(buf, '-', 1);
  212|      0|					}
  213|      0|				}
  214|      0|				wget_buffer_memcat(buf, dst, length);
  215|      0|			}
  216|      0|		} else {
  217|      0|			if (minus)
  ------------------
  |  Branch (217:8): [True: 0, False: 0]
  ------------------
  218|      0|				wget_buffer_memset_append(buf, '-', 1);
  219|      0|			if (length < (unsigned)precision)
  ------------------
  |  Branch (219:8): [True: 0, False: 0]
  ------------------
  220|      0|				wget_buffer_memset_append(buf, '0', precision - length);
  221|      0|			wget_buffer_memcat(buf, dst, length);
  222|      0|		}
  223|  3.80k|	} else {
  224|  3.80k|		if (minus)
  ------------------
  |  Branch (224:7): [True: 0, False: 3.80k]
  ------------------
  225|      0|			wget_buffer_memset_append(buf, '-', 1);
  226|       |
  227|  3.80k|		if (length < (unsigned)precision)
  ------------------
  |  Branch (227:7): [True: 0, False: 3.80k]
  ------------------
  228|      0|			wget_buffer_memset_append(buf, '0', precision - length);
  229|       |
  230|  3.80k|		wget_buffer_memcat(buf, dst, length);
  231|  3.80k|	}
  232|  3.80k|}

wget_decompress_open:
  521|  1.90k|{
  522|  1.90k|	int rc = 0;
  523|  1.90k|	wget_decompressor *dc = wget_calloc(1, sizeof(wget_decompressor));
  524|       |
  525|  1.90k|	if (!dc)
  ------------------
  |  Branch (525:6): [True: 0, False: 1.90k]
  ------------------
  526|      0|		return NULL;
  527|       |
  528|  1.90k|	if (encoding == wget_content_encoding_gzip) {
  ------------------
  |  Branch (528:6): [True: 0, False: 1.90k]
  ------------------
  529|      0|#ifdef WITH_ZLIB
  530|      0|		if ((rc = gzip_init(&dc->z_strm)) == 0) {
  ------------------
  |  Branch (530:7): [True: 0, False: 0]
  ------------------
  531|      0|			dc->decompress = gzip_decompress;
  532|      0|			dc->exit = gzip_exit;
  533|      0|		}
  534|      0|#endif
  535|  1.90k|	} else if (encoding == wget_content_encoding_deflate) {
  ------------------
  |  Branch (535:13): [True: 0, False: 1.90k]
  ------------------
  536|      0|#ifdef WITH_ZLIB
  537|      0|		if ((rc = deflate_init(&dc->z_strm)) == 0) {
  ------------------
  |  Branch (537:7): [True: 0, False: 0]
  ------------------
  538|      0|			dc->decompress = gzip_decompress;
  539|      0|			dc->exit = gzip_exit;
  540|      0|		}
  541|      0|#endif
  542|  1.90k|	} else if (encoding == wget_content_encoding_bzip2) {
  ------------------
  |  Branch (542:13): [True: 0, False: 1.90k]
  ------------------
  543|       |#ifdef WITH_BZIP2
  544|       |		if ((rc = bzip2_init(&dc->bz_strm)) == 0) {
  545|       |			dc->decompress = bzip2_decompress;
  546|       |			dc->exit = bzip2_exit;
  547|       |		}
  548|       |#endif
  549|  1.90k|	} else if (encoding == wget_content_encoding_lzma || encoding == wget_content_encoding_xz) {
  ------------------
  |  Branch (549:13): [True: 0, False: 1.90k]
  |  Branch (549:55): [True: 0, False: 1.90k]
  ------------------
  550|       |#ifdef WITH_LZMA
  551|       |		if ((rc = lzma_init(&dc->lzma_strm)) == 0) {
  552|       |			dc->decompress = lzma_decompress;
  553|       |			dc->exit = lzma_exit;
  554|       |		}
  555|       |#endif
  556|  1.90k|	} else if (encoding == wget_content_encoding_brotli) {
  ------------------
  |  Branch (556:13): [True: 0, False: 1.90k]
  ------------------
  557|       |#ifdef WITH_BROTLIDEC
  558|       |		if ((rc = brotli_init(&dc->brotli_strm)) == 0) {
  559|       |			dc->decompress = brotli_decompress;
  560|       |			dc->exit = brotli_exit;
  561|       |		}
  562|       |#endif
  563|  1.90k|	} else if (encoding == wget_content_encoding_zstd) {
  ------------------
  |  Branch (563:13): [True: 0, False: 1.90k]
  ------------------
  564|       |#ifdef WITH_ZSTD
  565|       |		if ((rc = zstd_init(&dc->zstd_strm)) == 0) {
  566|       |			dc->decompress = zstd_decompress;
  567|       |			dc->exit = zstd_exit;
  568|       |		}
  569|       |#endif
  570|  1.90k|	} else if (encoding == wget_content_encoding_lzip) {
  ------------------
  |  Branch (570:13): [True: 0, False: 1.90k]
  ------------------
  571|       |#ifdef WITH_LZIP
  572|       |		if ((rc = lzip_init(&dc->lzip_strm)) == 0) {
  573|       |			dc->decompress = lzip_decompress;
  574|       |			dc->exit = lzip_exit;
  575|       |		}
  576|       |#endif
  577|      0|	}
  578|       |
  579|  1.90k|	if (!dc->decompress) {
  ------------------
  |  Branch (579:6): [True: 1.90k, False: 0]
  ------------------
  580|       |		// identity
  581|  1.90k|		if (encoding != wget_content_encoding_identity)
  ------------------
  |  Branch (581:7): [True: 0, False: 1.90k]
  ------------------
  582|      0|			debug_printf("Falling back to Content-Encoding 'identity'\n");
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  583|  1.90k|		dc->decompress = identity;
  584|  1.90k|	}
  585|       |
  586|  1.90k|	if (rc) {
  ------------------
  |  Branch (586:6): [True: 0, False: 1.90k]
  ------------------
  587|      0|		xfree(dc);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  588|      0|		return NULL;
  589|      0|	}
  590|       |
  591|  1.90k|	dc->encoding = encoding;
  592|  1.90k|	dc->sink = sink;
  593|  1.90k|	dc->context = context;
  594|  1.90k|	return dc;
  595|  1.90k|}
wget_decompress_close:
  598|  3.80k|{
  599|  3.80k|	if (dc) {
  ------------------
  |  Branch (599:6): [True: 1.90k, False: 1.90k]
  ------------------
  600|  1.90k|		if (dc->exit)
  ------------------
  |  Branch (600:7): [True: 0, False: 1.90k]
  ------------------
  601|      0|			dc->exit(dc);
  602|  1.90k|		xfree(dc);
  ------------------
  |  |   53|  1.90k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 1.90k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  603|  1.90k|	}
  604|  3.80k|}
wget_decompress:
  607|  2.31k|{
  608|  2.31k|	if (dc) {
  ------------------
  |  Branch (608:6): [True: 2.31k, False: 0]
  ------------------
  609|  2.31k|		int rc = dc->decompress(dc, src, srclen);
  610|       |
  611|  2.31k|		if (rc && dc->error_handler)
  ------------------
  |  Branch (611:7): [True: 0, False: 2.31k]
  |  Branch (611:13): [True: 0, False: 0]
  ------------------
  612|      0|			dc->error_handler(dc, rc);
  613|  2.31k|	}
  614|       |
  615|  2.31k|	return 0;
  616|  2.31k|}
wget_decompress_set_error_handler:
  619|  1.90k|{
  620|  1.90k|	if (dc)
  ------------------
  |  Branch (620:6): [True: 1.90k, False: 0]
  ------------------
  621|  1.90k|		dc->error_handler = error_handler;
  622|  1.90k|}
decompressor.c:identity:
  510|  2.31k|{
  511|  2.31k|	if (dc->sink)
  ------------------
  |  Branch (511:6): [True: 2.31k, False: 0]
  ------------------
  512|  2.31k|		dc->sink(dc->context, src, srclen);
  513|       |
  514|  2.31k|	return 0;
  515|  2.31k|}

dns.c:dns_init:
   81|      2|{
   82|      2|	if (!initialized) {
  ------------------
  |  Branch (82:6): [True: 2, False: 0]
  ------------------
   83|      2|		wget_thread_mutex_init(&default_dns.mutex);
   84|      2|		initialized = true;
   85|      2|		atexit(dns_exit);
   86|      2|	}
   87|      2|}
wget_dns_resolve:
  353|  3.80k|{
  354|  3.80k|	struct addrinfo *addrinfo = NULL;
  355|  3.80k|	int rc = 0;
  356|  3.80k|	char adr[NI_MAXHOST], sport[NI_MAXSERV];
  357|  3.80k|	long long before_millisecs = 0;
  358|  3.80k|	wget_dns_stats_data stats;
  359|       |
  360|  3.80k|	if (!dns)
  ------------------
  |  Branch (360:6): [True: 3.80k, False: 0]
  ------------------
  361|  3.80k|		dns = &default_dns;
  362|       |
  363|  3.80k|	if (dns->stats_callback)
  ------------------
  |  Branch (363:6): [True: 0, False: 3.80k]
  ------------------
  364|      0|		before_millisecs = wget_get_timemillis();
  365|       |
  366|       |	// get the IP address for the server
  367|  3.80k|	for (int tries = 0, max = 3; tries < max; tries++) {
  ------------------
  |  Branch (367:31): [True: 3.80k, False: 0]
  ------------------
  368|  3.80k|		if (dns->cache) {
  ------------------
  |  Branch (368:7): [True: 0, False: 3.80k]
  ------------------
  369|      0|			if ((addrinfo = wget_dns_cache_get(dns->cache, host, port)))
  ------------------
  |  Branch (369:8): [True: 0, False: 0]
  ------------------
  370|      0|				return addrinfo;
  371|       |
  372|       |			// prevent multiple address resolutions of the same host
  373|      0|			wget_thread_mutex_lock(dns->mutex);
  374|       |
  375|       |			// now try again
  376|      0|			if ((addrinfo = wget_dns_cache_get(dns->cache, host, port))) {
  ------------------
  |  Branch (376:8): [True: 0, False: 0]
  ------------------
  377|      0|				wget_thread_mutex_unlock(dns->mutex);
  378|      0|				return addrinfo;
  379|      0|			}
  380|      0|		}
  381|       |
  382|  3.80k|		addrinfo = NULL;
  383|       |
  384|  3.80k|		rc = resolve(family, 0, host, port, &addrinfo);
  385|  3.80k|		if (rc == 0 || rc != EAI_AGAIN)
  ------------------
  |  Branch (385:7): [True: 3.80k, False: 0]
  |  Branch (385:18): [True: 0, False: 0]
  ------------------
  386|  3.80k|			break;
  387|       |
  388|      0|		if (tries < max - 1) {
  ------------------
  |  Branch (388:7): [True: 0, False: 0]
  ------------------
  389|      0|			if (dns->cache)
  ------------------
  |  Branch (389:8): [True: 0, False: 0]
  ------------------
  390|      0|				wget_thread_mutex_unlock(dns->mutex);
  391|      0|			wget_millisleep(100);
  392|      0|		}
  393|      0|	}
  394|       |
  395|  3.80k|	if (dns->stats_callback) {
  ------------------
  |  Branch (395:6): [True: 0, False: 3.80k]
  ------------------
  396|      0|		long long after_millisecs = wget_get_timemillis();
  397|      0|		stats.dns_secs = after_millisecs - before_millisecs;
  398|      0|		stats.hostname = host;
  399|      0|		stats.port = port;
  400|      0|	}
  401|       |
  402|  3.80k|	if (rc) {
  ------------------
  |  Branch (402:6): [True: 0, False: 3.80k]
  ------------------
  403|      0|		error_printf(_("Failed to resolve '%s' (%s)\n"),
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              		error_printf(_("Failed to resolve '%s' (%s)\n"),
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  404|      0|				(host ? host : ""), gai_strerror(rc));
  ------------------
  |  Branch (404:6): [True: 0, False: 0]
  ------------------
  405|       |
  406|      0|		if (dns->cache)
  ------------------
  |  Branch (406:7): [True: 0, False: 0]
  ------------------
  407|      0|			wget_thread_mutex_unlock(dns->mutex);
  408|       |
  409|      0|		if (dns->stats_callback) {
  ------------------
  |  Branch (409:7): [True: 0, False: 0]
  ------------------
  410|      0|			stats.ip = NULL;
  411|      0|			dns->stats_callback(dns, &stats, dns->stats_ctx);
  412|      0|		}
  413|       |
  414|      0|		return NULL;
  415|      0|	}
  416|       |
  417|  3.80k|	if (family == AF_UNSPEC && preferred_family != AF_UNSPEC)
  ------------------
  |  Branch (417:6): [True: 3.80k, False: 0]
  |  Branch (417:29): [True: 0, False: 3.80k]
  ------------------
  418|      0|		addrinfo = sort_preferred(addrinfo, preferred_family);
  419|       |
  420|  3.80k|	if (dns->stats_callback) {
  ------------------
  |  Branch (420:6): [True: 0, False: 3.80k]
  ------------------
  421|      0|		if (getnameinfo(addrinfo->ai_addr, addrinfo->ai_addrlen, adr, sizeof(adr), sport, sizeof(sport), NI_NUMERICHOST | NI_NUMERICSERV) == 0)
  ------------------
  |  Branch (421:7): [True: 0, False: 0]
  ------------------
  422|      0|			stats.ip = adr;
  423|      0|		else
  424|      0|			stats.ip = "???";
  425|       |
  426|      0|		dns->stats_callback(dns, &stats, dns->stats_ctx);
  427|      0|	}
  428|       |
  429|       |	/* Finally, print the address list to the debug pipe if enabled */
  430|  3.80k|	if (wget_logger_is_active(wget_get_logger(WGET_LOGGER_DEBUG))) {
  ------------------
  |  |  647|  3.80k|#define WGET_LOGGER_DEBUG  3
  ------------------
  |  Branch (430:6): [True: 0, False: 3.80k]
  ------------------
  431|      0|		for (struct addrinfo *ai = addrinfo; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (431:40): [True: 0, False: 0]
  ------------------
  432|      0|			if ((rc = getnameinfo(ai->ai_addr, ai->ai_addrlen, adr, sizeof(adr), sport, sizeof(sport), NI_NUMERICHOST | NI_NUMERICSERV)) == 0) {
  ------------------
  |  Branch (432:8): [True: 0, False: 0]
  ------------------
  433|      0|				if (ai->ai_family == AF_INET6)
  ------------------
  |  Branch (433:9): [True: 0, False: 0]
  ------------------
  434|      0|					debug_printf("has [%s]:%s\n", adr, sport);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  435|      0|				else
  436|      0|					debug_printf("has %s:%s\n", adr, sport);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  437|      0|			} else
  438|      0|				debug_printf("has ??? (%s)\n", gai_strerror(rc));
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  439|      0|		}
  440|      0|	}
  441|       |
  442|  3.80k|	if (dns->cache) {
  ------------------
  |  Branch (442:6): [True: 0, False: 3.80k]
  ------------------
  443|       |		/*
  444|       |		 * In case of a race condition the already existing addrinfo is returned.
  445|       |		 * The addrinfo argument given to wget_dns_cache_add() will be freed in this case.
  446|       |		 */
  447|      0|		rc = wget_dns_cache_add(dns->cache, host, port, &addrinfo);
  448|      0|		wget_thread_mutex_unlock(dns->mutex);
  449|      0|		if ( rc < 0) {
  ------------------
  |  Branch (449:8): [True: 0, False: 0]
  ------------------
  450|      0|			freeaddrinfo(addrinfo);
  451|      0|			return NULL;
  452|      0|		}
  453|      0|	}
  454|       |
  455|  3.80k|	return addrinfo;
  456|  3.80k|}
wget_dns_freeaddrinfo:
  466|  11.4k|{
  467|  11.4k|	if (addrinfo && *addrinfo) {
  ------------------
  |  Branch (467:6): [True: 11.4k, False: 0]
  |  Branch (467:18): [True: 3.80k, False: 7.60k]
  ------------------
  468|  3.80k|		if (!dns)
  ------------------
  |  Branch (468:7): [True: 3.80k, False: 0]
  ------------------
  469|  3.80k|			dns = &default_dns;
  470|       |
  471|  3.80k|		if (!dns->cache) {
  ------------------
  |  Branch (471:7): [True: 3.80k, False: 0]
  ------------------
  472|  3.80k|			freeaddrinfo(*addrinfo);
  473|  3.80k|			*addrinfo = NULL;
  474|  3.80k|		} else {
  475|       |			// addrinfo is cached and gets freed later when the DNS cache is freed
  476|      0|			*addrinfo = NULL;
  477|      0|		}
  478|  3.80k|	}
  479|  11.4k|}
dns.c:resolve:
  242|  3.80k|{
  243|  3.80k|	struct addrinfo hints = {
  244|  3.80k|		.ai_family = family,
  245|  3.80k|		.ai_socktype = 0,
  246|  3.80k|		.ai_flags = AI_ADDRCONFIG | flags
  247|  3.80k|	};
  248|  3.80k|	int ret;
  249|  3.80k|	char s_port[NI_MAXSERV];
  250|       |
  251|       |
  252|  3.80k|	*out_addr = NULL;
  253|       |
  254|  3.80k|	if (port) {
  ------------------
  |  Branch (254:6): [True: 3.80k, False: 0]
  ------------------
  255|  3.80k|		hints.ai_flags |= AI_NUMERICSERV;
  256|       |
  257|  3.80k|		wget_snprintf(s_port, sizeof(s_port), "%hu", port);
  258|  3.80k|		if (host) {
  ------------------
  |  Branch (258:7): [True: 3.80k, False: 0]
  ------------------
  259|  3.80k|			if (family == AF_INET6)
  ------------------
  |  Branch (259:8): [True: 0, False: 3.80k]
  ------------------
  260|      0|				debug_printf("resolving [%s]:%s...\n", host, s_port);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  261|  3.80k|			else
  262|  3.80k|				debug_printf("resolving %s:%s...\n", host, s_port);
  ------------------
  |  |   68|  3.80k|#define debug_printf wget_debug_printf
  ------------------
  263|  3.80k|		} else
  264|      0|			debug_printf("resolving :%s...\n", s_port);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  265|  3.80k|	} else {
  266|      0|		debug_printf("resolving %s...\n", host);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  267|      0|	}
  268|       |
  269|       |	/*
  270|       |	 * .ai_socktype = 0, which would give us all the available socket types,
  271|       |	 * is not a valid option on Windows. Hence, we call getaddrinfo() twice with SOCK_STREAM
  272|       |	 * and SOCK_DGRAM, and merge the two lists.
  273|       |	 * See: https://learn.microsoft.com/en-us/windows/win32/api/ws2def/ns-ws2def-addrinfoa
  274|       |	 */
  275|  3.80k|	hints.ai_socktype = SOCK_STREAM;
  276|  3.80k|	if ((ret = getaddrinfo_merging(host, port ? s_port : NULL, &hints, out_addr)) != 0)
  ------------------
  |  Branch (276:6): [True: 0, False: 3.80k]
  |  Branch (276:39): [True: 3.80k, False: 0]
  ------------------
  277|      0|		goto end;
  278|       |
  279|  3.80k|	hints.ai_socktype = SOCK_DGRAM;
  280|  3.80k|	if ((ret = getaddrinfo_merging(host, port ? s_port : NULL, &hints, out_addr)) != 0)
  ------------------
  |  Branch (280:6): [True: 0, False: 3.80k]
  |  Branch (280:39): [True: 3.80k, False: 0]
  ------------------
  281|      0|		goto end;
  282|       |
  283|  3.80k|	return 0;
  284|       |
  285|      0|end:
  286|      0|	if (*out_addr)
  ------------------
  |  Branch (286:6): [True: 0, False: 0]
  ------------------
  287|      0|		freeaddrinfo(*out_addr);
  288|      0|	return ret;
  289|  3.80k|}
dns.c:getaddrinfo_merging:
  226|  7.60k|{
  227|  7.60k|	struct addrinfo *ai_tail;
  228|       |
  229|  7.60k|	if (!*out_addr)
  ------------------
  |  Branch (229:6): [True: 3.80k, False: 3.80k]
  ------------------
  230|  3.80k|		return getaddrinfo(host, s_port, hints, out_addr);
  231|       |
  232|       |	// Get to the tail of the list
  233|  3.80k|	ai_tail = *out_addr;
  234|  3.80k|	while (ai_tail->ai_next)
  ------------------
  |  Branch (234:9): [True: 0, False: 3.80k]
  ------------------
  235|      0|		ai_tail = ai_tail->ai_next;
  236|       |
  237|  3.80k|	return getaddrinfo(host, s_port, hints, &ai_tail->ai_next);
  238|  7.60k|}

wget_str_needs_encoding:
  153|  1.26k|{
  154|  1.26k|	if (!s)
  ------------------
  |  Branch (154:6): [True: 0, False: 1.26k]
  ------------------
  155|      0|		return false;
  156|       |
  157|  15.2k|	while (*s && (*s & ~0x7f) == 0) s++;
  ------------------
  |  Branch (157:9): [True: 13.9k, False: 1.26k]
  |  Branch (157:15): [True: 13.9k, False: 0]
  ------------------
  158|       |
  159|  1.26k|	return *s != 0;
  160|  1.26k|}
wget_str_to_ascii:
  244|    634|{
  245|    634|#ifdef WITH_LIBIDN2
  246|    634|	if (wget_str_needs_encoding(src)) {
  ------------------
  |  Branch (246:6): [True: 0, False: 634]
  ------------------
  247|      0|		char *asc = NULL;
  248|      0|		int rc;
  249|      0|		if ((rc = idn2_lookup_u8((uint8_t *)src, (uint8_t **)&asc, IDN2_NONTRANSITIONAL|IDN2_USE_STD3_ASCII_RULES)) != IDN2_OK)
  ------------------
  |  Branch (249:7): [True: 0, False: 0]
  ------------------
  250|      0|			rc = idn2_lookup_u8((uint8_t *)src, (uint8_t **)&asc, IDN2_TRANSITIONAL|IDN2_USE_STD3_ASCII_RULES);
  251|      0|		if (rc == IDN2_OK)
  ------------------
  |  Branch (251:7): [True: 0, False: 0]
  ------------------
  252|      0|		{
  253|      0|			debug_printf("idn2 '%s' -> '%s'\n", src, asc);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  254|       |#  ifdef _WIN32
  255|       |				src = wget_strdup(asc);
  256|       |				idn2_free(asc);
  257|       |#  else
  258|      0|				src = asc;
  259|      0|#  endif
  260|      0|		} else
  261|      0|			error_printf(_("toASCII(%s) failed (%d): %s\n"), src, rc, idn2_strerror(rc));
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              			error_printf(_("toASCII(%s) failed (%d): %s\n"), src, rc, idn2_strerror(rc));
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  262|      0|	}
  263|       |#elif defined WITH_LIBIDN
  264|       |	if (wget_str_needs_encoding(src)) {
  265|       |		char *asc = NULL;
  266|       |
  267|       |		if (_utf8_is_valid(src)) {
  268|       |			int rc;
  269|       |
  270|       |			// idna_to_ascii_8z() automatically converts UTF-8 to lowercase
  271|       |			if ((rc = idna_to_ascii_8z(src, &asc, IDNA_USE_STD3_ASCII_RULES)) == IDNA_SUCCESS) {
  272|       |				// debug_printf("toASCII '%s' -> '%s'\n", src, asc);
  273|       |# ifdef _WIN32
  274|       |				src = wget_strdup(asc);
  275|       |				idn_free(asc);
  276|       |# else
  277|       |				src = asc;
  278|       |# endif
  279|       |			} else
  280|       |				error_printf(_("toASCII failed (%d): %s\n"), rc, idna_strerror(rc));
  281|       |		}
  282|       |		else
  283|       |			error_printf(_("Invalid UTF-8 sequence not converted: '%s'\n"), src);
  284|       |	}
  285|       |#else
  286|       |	if (wget_str_needs_encoding(src)) {
  287|       |		error_printf(_("toASCII not available: '%s'\n"), src);
  288|       |	}
  289|       |#endif
  290|       |
  291|    634|	return src;
  292|    634|}

wget_hpkp_free:
  110|  1.90k|{
  111|  1.90k|	if (hpkp) {
  ------------------
  |  Branch (111:6): [True: 0, False: 1.90k]
  ------------------
  112|      0|		xfree(hpkp->host);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|      0|		wget_vector_free(&hpkp->pins);
  114|      0|		xfree(hpkp);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  115|      0|	}
  116|  1.90k|}

http.c:http_init:
   81|      2|{
   82|      2|	if (!initialized) {
  ------------------
  |  Branch (82:6): [True: 2, False: 0]
  ------------------
   83|      2|		wget_thread_mutex_init(&proxy_mutex);
   84|      2|		wget_thread_mutex_init(&hosts_mutex);
   85|      2|		initialized = true;
   86|      2|		atexit(http_exit);
   87|      2|	}
   88|      2|}
wget_http_create_request:
  143|  3.80k|{
  144|  3.80k|	wget_http_request *req = wget_calloc(1, sizeof(wget_http_request));
  145|  3.80k|	if (!req)
  ------------------
  |  Branch (145:6): [True: 0, False: 3.80k]
  ------------------
  146|      0|		return NULL;
  147|       |
  148|  3.80k|	wget_buffer_init(&req->esc_resource, req->esc_resource_buf, sizeof(req->esc_resource_buf));
  149|  3.80k|	wget_buffer_init(&req->esc_host, req->esc_host_buf, sizeof(req->esc_host_buf));
  150|       |
  151|  3.80k|	req->scheme = iri->scheme;
  152|  3.80k|	wget_strscpy(req->method, method, sizeof(req->method));
  153|  3.80k|	wget_iri_get_escaped_resource(iri, &req->esc_resource);
  154|  3.80k|	if (wget_ip_is_family(iri->host, WGET_NET_FAMILY_IPV6))
  ------------------
  |  | 1884|  3.80k|#define WGET_NET_FAMILY_IPV6 2
  ------------------
  |  Branch (154:6): [True: 0, False: 3.80k]
  ------------------
  155|      0|		wget_buffer_printf(&req->esc_host, "[%s]", iri->host);
  156|  3.80k|	else
  157|  3.80k|		wget_iri_get_escaped_host(iri, &req->esc_host);
  158|  3.80k|	req->headers = wget_vector_create(8, NULL);
  159|  3.80k|	wget_vector_set_destructor(req->headers, (wget_vector_destructor *) wget_http_free_param);
  160|       |
  161|  3.80k|	wget_http_add_header(req, "Host", req->esc_host.data);
  162|  3.80k|	wget_http_request_set_body_cb(req, body_callback, NULL);
  163|       |
  164|  3.80k|	return req;
  165|  3.80k|}
wget_http_request_set_body_cb:
  174|  3.80k|{
  175|  3.80k|	req->body_callback = callback;
  176|  3.80k|	req->body_user_data = user_data;
  177|  3.80k|}
wget_http_add_header:
  264|  3.80k|{
  265|  3.80k|	return http_add_header(req, wget_strdup(name), wget_strdup(value));
  266|  3.80k|}
http_get_body_cb:
  419|  2.31k|{
  420|  2.31k|	wget_http_response *resp = (wget_http_response *) userdata;
  421|       |
  422|  2.31k|	return resp->req->body_callback(resp, resp->req->body_user_data, data, length);
  423|  2.31k|}
http_fix_broken_server_encoding:
  426|  1.90k|{
  427|       |	// a workaround for broken server configurations
  428|       |	// see https://mail-archives.apache.org/mod_mbox/httpd-dev/200207.mbox/<3D2D4E76.4010502@talex.com.pl>
  429|  1.90k|	if (resp->content_encoding == wget_content_encoding_gzip) {
  ------------------
  |  Branch (429:6): [True: 0, False: 1.90k]
  ------------------
  430|      0|		const char *ext;
  431|      0|		if (!wget_strcasecmp_ascii(resp->content_type, "application/x-gzip")
  ------------------
  |  Branch (431:7): [True: 0, False: 0]
  ------------------
  432|      0|			|| !wget_strcasecmp_ascii(resp->content_type, "application/gzip")
  ------------------
  |  Branch (432:7): [True: 0, False: 0]
  ------------------
  433|      0|			|| !wget_strcasecmp_ascii(resp->content_type, "application/gunzip")
  ------------------
  |  Branch (433:7): [True: 0, False: 0]
  ------------------
  434|      0|			|| ((ext = strrchr(resp->req->esc_resource.data, '.'))
  ------------------
  |  Branch (434:8): [True: 0, False: 0]
  ------------------
  435|      0|			&& (!wget_strcasecmp_ascii(ext, ".gz") || !wget_strcasecmp_ascii(ext, ".tgz"))))
  ------------------
  |  Branch (435:8): [True: 0, False: 0]
  |  Branch (435:46): [True: 0, False: 0]
  ------------------
  436|      0|		{
  437|      0|			debug_printf("Broken server configuration gzip workaround triggered\n");
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  438|      0|			resp->content_encoding =  wget_content_encoding_identity;
  439|      0|		}
  440|      0|	}
  441|  1.90k|}
wget_http_open:
  491|  3.80k|{
  492|  3.80k|	static int next_http_proxy = -1;
  493|  3.80k|	static int next_https_proxy = -1;
  494|       |
  495|  3.80k|	wget_http_connection
  496|  3.80k|		*conn;
  497|  3.80k|	const char
  498|  3.80k|		*host;
  499|  3.80k|	uint16_t
  500|  3.80k|		port;
  501|  3.80k|	int
  502|  3.80k|		rc,
  503|  3.80k|		ssl = iri->scheme == WGET_IRI_SCHEME_HTTPS;
  504|  3.80k|	bool
  505|  3.80k|		need_connect = false;
  506|       |
  507|  3.80k|	if (!_conn)
  ------------------
  |  Branch (507:6): [True: 0, False: 3.80k]
  ------------------
  508|      0|		return WGET_E_INVALID;
  509|       |
  510|  3.80k|	conn = wget_calloc(1, sizeof(wget_http_connection)); // convenience assignment
  511|  3.80k|	if (!conn)
  ------------------
  |  Branch (511:6): [True: 0, False: 3.80k]
  ------------------
  512|      0|		return WGET_E_MEMORY;
  513|       |
  514|  3.80k|	*_conn = conn;
  515|  3.80k|	host = iri->host;
  516|  3.80k|	port = iri->port;
  517|  3.80k|	conn->tcp = wget_tcp_init();
  518|       |
  519|       |#ifdef HAVE_LIBPROXY
  520|       |{
  521|       |	pxProxyFactory *pf = px_proxy_factory_new();
  522|       |	if (pf) {
  523|       |		char **proxies = px_proxy_factory_get_proxies(pf, iri->uri);
  524|       |
  525|       |		if (proxies) {
  526|       |			if (proxies[0]) {
  527|       |				if (strcmp (proxies[0], "direct://") != 0) {
  528|       |					wget_iri *proxy_iri = wget_iri_parse(proxies[0], "utf-8");
  529|       |					host = strdup(proxy_iri->host);
  530|       |					port = proxy_iri->port;
  531|       |
  532|       |					if (proxy_iri->scheme == WGET_IRI_SCHEME_HTTP) {
  533|       |						ssl = false;
  534|       |						conn->proxied = 1;
  535|       |					} else {
  536|       |						ssl = true;
  537|       |						need_connect = true;
  538|       |					}
  539|       |					wget_iri_free(&proxy_iri);
  540|       |				}
  541|       |			}
  542|       |
  543|       |			px_proxy_factory_free_proxies(proxies);
  544|       |		}
  545|       |
  546|       |		px_proxy_factory_free (pf);
  547|       |	}
  548|       |}
  549|       |#else
  550|  3.80k|	if (!wget_http_match_no_proxy(no_proxies, iri->host)) {
  ------------------
  |  Branch (550:6): [True: 3.80k, False: 0]
  ------------------
  551|  3.80k|		if (!ssl && http_proxies) {
  ------------------
  |  Branch (551:7): [True: 3.80k, False: 0]
  |  Branch (551:15): [True: 0, False: 3.80k]
  ------------------
  552|      0|			wget_thread_mutex_lock(proxy_mutex);
  553|      0|			wget_iri *proxy = wget_vector_get(http_proxies, (++next_http_proxy) % wget_vector_size(http_proxies));
  554|      0|			wget_thread_mutex_unlock(proxy_mutex);
  555|       |
  556|      0|			if (!proxy) {
  ------------------
  |  Branch (556:8): [True: 0, False: 0]
  ------------------
  557|       |				// this practically can't happen
  558|      0|				xfree(conn);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  559|      0|				*_conn = NULL;
  560|      0|				return WGET_E_UNKNOWN;
  561|      0|			}
  562|       |
  563|      0|			host = proxy->host;
  564|      0|			port = proxy->port;
  565|      0|			ssl = proxy->scheme == WGET_IRI_SCHEME_HTTPS;
  566|      0|			conn->proxied = 1;
  567|  3.80k|		} else if (ssl && https_proxies) {
  ------------------
  |  Branch (567:14): [True: 0, False: 3.80k]
  |  Branch (567:21): [True: 0, False: 0]
  ------------------
  568|      0|			wget_thread_mutex_lock(proxy_mutex);
  569|      0|			wget_iri *proxy = wget_vector_get(https_proxies, (++next_https_proxy) % wget_vector_size(https_proxies));
  570|      0|			wget_thread_mutex_unlock(proxy_mutex);
  571|       |
  572|      0|			if (!proxy) {
  ------------------
  |  Branch (572:8): [True: 0, False: 0]
  ------------------
  573|       |				// this practically can't happen
  574|      0|				xfree(conn);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|      0|				*_conn = NULL;
  576|      0|				return WGET_E_UNKNOWN;
  577|      0|			}
  578|       |
  579|      0|			host = proxy->host;
  580|      0|			port = proxy->port;
  581|      0|			ssl = proxy->scheme == WGET_IRI_SCHEME_HTTPS;
  582|       |			// conn->proxied = 1;
  583|       |
  584|      0|			need_connect = true;
  585|      0|		}
  586|  3.80k|	}
  587|  3.80k|#endif
  588|       |
  589|  3.80k|	if (ssl) {
  ------------------
  |  Branch (589:6): [True: 0, False: 3.80k]
  ------------------
  590|      0|		wget_tcp_set_ssl(conn->tcp, 1); // switch SSL on
  591|      0|		wget_tcp_set_ssl_hostname(conn->tcp, host); // enable host name checking
  592|      0|	}
  593|       |
  594|  3.80k|	if ((rc = wget_tcp_connect(conn->tcp, host, port)) != WGET_E_SUCCESS) {
  ------------------
  |  Branch (594:6): [True: 0, False: 3.80k]
  ------------------
  595|      0|		if (server_stats_callback && (rc == WGET_E_CERTIFICATE))
  ------------------
  |  Branch (595:7): [True: 0, False: 0]
  |  Branch (595:32): [True: 0, False: 0]
  ------------------
  596|      0|			server_stats_callback(conn, NULL);
  597|       |
  598|      0|		wget_http_close(_conn);
  599|      0|		return rc;
  600|      0|	}
  601|       |
  602|  3.80k|	if (need_connect) {
  ------------------
  |  Branch (602:6): [True: 0, False: 3.80k]
  ------------------
  603|      0|		if ((rc = establish_proxy_connect(conn->tcp, iri->host, iri->port)) != WGET_E_SUCCESS) {
  ------------------
  |  Branch (603:7): [True: 0, False: 0]
  ------------------
  604|      0|			wget_http_close(_conn);
  605|      0|			return rc;
  606|      0|		}
  607|       |
  608|      0|		if (iri->scheme == WGET_IRI_SCHEME_HTTPS) {
  ------------------
  |  Branch (608:7): [True: 0, False: 0]
  ------------------
  609|      0|			wget_tcp_set_ssl(conn->tcp, 1); // switch SSL on
  610|      0|			wget_tcp_set_ssl_hostname(conn->tcp, iri->host); // enable host name checking
  611|      0|			wget_tcp_tls_start(conn->tcp);
  612|      0|		}
  613|      0|	}
  614|       |
  615|  3.80k|	conn->esc_host = iri->host ? wget_strdup(iri->host) : NULL;
  ------------------
  |  Branch (615:19): [True: 3.80k, False: 0]
  ------------------
  616|  3.80k|	conn->port = iri->port;
  617|  3.80k|	conn->scheme = iri->scheme;
  618|  3.80k|	conn->buf = wget_buffer_alloc(102400); // reusable buffer, large enough for most requests and responses
  619|       |#ifdef WITH_LIBNGHTTP2
  620|       |	if ((conn->protocol = (char) wget_tcp_get_protocol(conn->tcp)) == WGET_PROTOCOL_HTTP_2_0) {
  621|       |		if ((rc = wget_http2_open(conn)) < 0) {
  622|       |			wget_http_close(_conn);
  623|       |			return rc;
  624|       |		}
  625|       |	} else {
  626|       |		conn->pending_requests = wget_vector_create(16, NULL);
  627|       |	}
  628|       |
  629|       |#else
  630|  3.80k|	conn->pending_requests = wget_vector_create(16, NULL);
  631|  3.80k|#endif
  632|       |
  633|  3.80k|	return rc;
  634|  3.80k|}
wget_http_close:
  637|  3.80k|{
  638|  3.80k|	if (*conn) {
  ------------------
  |  Branch (638:6): [True: 3.80k, False: 0]
  ------------------
  639|  3.80k|		debug_printf("closing connection\n");
  ------------------
  |  |   68|  3.80k|#define debug_printf wget_debug_printf
  ------------------
  640|       |#ifdef WITH_LIBNGHTTP2
  641|       |		wget_http2_close(conn);
  642|       |#endif
  643|  3.80k|		wget_tcp_deinit(&(*conn)->tcp);
  644|       |//		if (!wget_tcp_get_dns_caching())
  645|       |//			freeaddrinfo((*conn)->addrinfo);
  646|  3.80k|		xfree((*conn)->esc_host);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 3.80k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  647|       |		// xfree((*conn)->scheme);
  648|  3.80k|		wget_buffer_free(&(*conn)->buf);
  649|  3.80k|		wget_vector_clear_nofree((*conn)->pending_requests);
  650|  3.80k|		wget_vector_free(&(*conn)->pending_requests);
  651|  3.80k|		xfree(*conn);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 3.80k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  652|  3.80k|	}
  653|  3.80k|}
wget_http_send_request:
  656|  3.80k|{
  657|  3.80k|	ssize_t nbytes;
  658|       |
  659|       |#ifdef WITH_LIBNGHTTP2
  660|       |	if (wget_tcp_get_protocol(conn->tcp) == WGET_PROTOCOL_HTTP_2_0) {
  661|       |		return wget_http2_send_request(conn, req);
  662|       |	}
  663|       |#endif
  664|       |
  665|  3.80k|	if ((nbytes = wget_http_request_to_buffer(req, conn->buf, conn->proxied, conn->port)) < 0) {
  ------------------
  |  Branch (665:6): [True: 0, False: 3.80k]
  ------------------
  666|      0|		error_printf(_("Failed to create request buffer\n"));
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              		error_printf(_("Failed to create request buffer\n"));
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  667|      0|		return -1;
  668|      0|	}
  669|       |
  670|  3.80k|	req->request_start = wget_get_timemillis();
  671|       |
  672|  3.80k|	if (wget_tcp_write(conn->tcp, conn->buf->data, nbytes) != nbytes) {
  ------------------
  |  Branch (672:6): [True: 0, False: 3.80k]
  ------------------
  673|       |		// An error will be written by the wget_tcp_write function.
  674|       |		// error_printf(_("Failed to send %zd bytes (%d)\n"), nbytes, errno);
  675|      0|		return -1;
  676|      0|	}
  677|       |
  678|  3.80k|	wget_vector_add(conn->pending_requests, req);
  679|       |
  680|  3.80k|	if (req->debug_skip_body)
  ------------------
  |  Branch (680:6): [True: 0, False: 3.80k]
  ------------------
  681|      0|		debug_printf("# sent %zd bytes:\n%.*s<body skipped>", nbytes, (int)(conn->buf->length - req->body_length), conn->buf->data);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  682|  3.80k|	else
  683|  3.80k|		debug_printf("# sent %zd bytes:\n%.*s", nbytes, (int)conn->buf->length, conn->buf->data);
  ------------------
  |  |   68|  3.80k|#define debug_printf wget_debug_printf
  ------------------
  684|       |
  685|  3.80k|	return 0;
  686|  3.80k|}
wget_http_request_to_buffer:
  689|  3.80k|{
  690|  3.80k|	char have_content_length = 0;
  691|  3.80k|	char check_content_length = req->body && req->body_length;
  ------------------
  |  Branch (691:30): [True: 0, False: 3.80k]
  |  Branch (691:43): [True: 0, False: 0]
  ------------------
  692|       |
  693|       |//	wget_buffer_sprintf(buf, "%s /%s HTTP/1.1\r\nHost: %s", req->method, req->esc_resource.data ? req->esc_resource.data : "",);
  694|       |
  695|  3.80k|	wget_buffer_strcpy(buf, req->method);
  696|  3.80k|	wget_buffer_memcat(buf, " ", 1);
  697|  3.80k|	if (proxied) {
  ------------------
  |  Branch (697:6): [True: 0, False: 3.80k]
  ------------------
  698|      0|		wget_buffer_strcat(buf, wget_iri_scheme_get_name(req->scheme));
  699|      0|		wget_buffer_memcat(buf, "://", 3);
  700|      0|		wget_buffer_bufcat(buf, &req->esc_host);
  701|      0|		wget_buffer_printf_append(buf, ":%d", port);
  702|      0|	}
  703|  3.80k|	wget_buffer_memcat(buf, "/", 1);
  704|  3.80k|	wget_buffer_bufcat(buf, &req->esc_resource);
  705|  3.80k|	wget_buffer_memcat(buf, " HTTP/1.1\r\n", 11);
  706|       |
  707|  7.60k|	for (int it = 0; it < wget_vector_size(req->headers); it++) {
  ------------------
  |  Branch (707:19): [True: 3.80k, False: 3.80k]
  ------------------
  708|  3.80k|		wget_http_header_param *param = wget_vector_get(req->headers, it);
  709|  3.80k|		if (!param)
  ------------------
  |  Branch (709:7): [True: 0, False: 3.80k]
  ------------------
  710|      0|			continue;
  711|       |
  712|  3.80k|		wget_buffer_strcat(buf, param->name);
  713|  3.80k|		wget_buffer_memcat(buf, ": ", 2);
  714|  3.80k|		wget_buffer_strcat(buf, param->value);
  715|       |
  716|  3.80k|		if (buf->data[buf->length - 1] != '\n') {
  ------------------
  |  Branch (716:7): [True: 3.80k, False: 0]
  ------------------
  717|  3.80k|			wget_buffer_memcat(buf, "\r\n", 2);
  718|  3.80k|		}
  719|       |
  720|  3.80k|		if (check_content_length && !wget_strcasecmp_ascii(param->name, "Content-Length"))
  ------------------
  |  Branch (720:7): [True: 0, False: 3.80k]
  |  Branch (720:31): [True: 0, False: 0]
  ------------------
  721|      0|			have_content_length = 1; // User supplied Content-Length header, keep it unchecked
  722|  3.80k|	}
  723|       |
  724|       |/* The use of Proxy-Connection has been discouraged in RFC 7230 A.1.2.
  725|       |	if (proxied)
  726|       |		wget_buffer_strcat(buf, "Proxy-Connection: keep-alive\r\n");
  727|       |*/
  728|       |
  729|  3.80k|	if (check_content_length && !have_content_length)
  ------------------
  |  Branch (729:6): [True: 0, False: 3.80k]
  |  Branch (729:30): [True: 0, False: 0]
  ------------------
  730|      0|		wget_buffer_printf_append(buf, "Content-Length: %zu\r\n", req->body_length);
  731|       |
  732|  3.80k|	wget_buffer_memcat(buf, "\r\n", 2); // end-of-header
  733|       |
  734|  3.80k|	if (req->body && req->body_length)
  ------------------
  |  Branch (734:6): [True: 0, False: 3.80k]
  |  Branch (734:19): [True: 0, False: 0]
  ------------------
  735|      0|		wget_buffer_memcat(buf, req->body, req->body_length);
  736|       |
  737|  3.80k|	return buf->length;
  738|  3.80k|}
wget_http_get_response_cb:
  747|  3.80k|{
  748|  3.80k|	size_t bufsize, body_len = 0, body_size = 0;
  749|  3.80k|	ssize_t nbytes, nread = 0;
  750|  3.80k|	char *buf, *p = NULL;
  751|  3.80k|	wget_http_response *resp = NULL;
  752|       |
  753|       |#ifdef WITH_LIBNGHTTP2
  754|       |	if (conn->protocol == WGET_PROTOCOL_HTTP_2_0) {
  755|       |		return wget_http2_get_response_cb(conn, server_stats_callback);
  756|       |	}
  757|       |#endif
  758|       |
  759|  3.80k|	wget_decompressor *dc = NULL;
  760|  3.80k|	wget_http_request *req = wget_vector_get(conn->pending_requests, 0); // TODO: should use double linked lists here
  761|       |
  762|  3.80k|	debug_printf("### req %p pending requests = %d\n", (void *) req, wget_vector_size(conn->pending_requests));
  ------------------
  |  |   68|  3.80k|#define debug_printf wget_debug_printf
  ------------------
  763|  3.80k|	if (!req)
  ------------------
  |  Branch (763:6): [True: 0, False: 3.80k]
  ------------------
  764|      0|		goto cleanup;
  765|       |
  766|  3.80k|	wget_vector_remove_nofree(conn->pending_requests, 0);
  767|       |
  768|       |	// reuse generic connection buffer
  769|  3.80k|	buf = conn->buf->data;
  770|  3.80k|	bufsize = conn->buf->size;
  771|       |
  772|   165k|	while ((nbytes = wget_tcp_read(conn->tcp, buf + nread, bufsize - nread)) > 0) {
  ------------------
  |  Branch (772:9): [True: 163k, False: 1.90k]
  ------------------
  773|   163k|		req->first_response_start = wget_get_timemillis();
  774|       |		// debug_printf("nbytes %zd nread %zd %zu\n", nbytes, nread, bufsize);
  775|   163k|		nread += nbytes;
  776|   163k|		buf[nread] = 0; // 0-terminate to allow string functions
  777|       |
  778|   163k|		if (nread < 4) continue;
  ------------------
  |  Branch (778:7): [True: 5.70k, False: 158k]
  ------------------
  779|       |
  780|   158k|		if (nread - nbytes <= 4)
  ------------------
  |  Branch (780:7): [True: 5.70k, False: 152k]
  ------------------
  781|  5.70k|			p = buf;
  782|   152k|		else
  783|   152k|			p = buf + nread - nbytes - 3;
  784|       |
  785|   158k|		if ((p = strstr(p, "\r\n\r\n"))) {
  ------------------
  |  Branch (785:7): [True: 1.90k, False: 156k]
  ------------------
  786|       |			// found end-of-header
  787|  1.90k|			*p = 0;
  788|       |
  789|  1.90k|			debug_printf("# got header %zd bytes:\n%s\n\n", p - buf, buf);
  ------------------
  |  |   68|  1.90k|#define debug_printf wget_debug_printf
  ------------------
  790|       |
  791|  1.90k|			if (req->response_keepheader) {
  ------------------
  |  Branch (791:8): [True: 0, False: 1.90k]
  ------------------
  792|      0|				wget_buffer *header = wget_buffer_alloc(p - buf + 4);
  793|      0|				wget_buffer_memcpy(header, buf, p - buf);
  794|      0|				wget_buffer_memcat(header, "\r\n\r\n", 4);
  795|       |
  796|      0|				if (!(resp = wget_http_parse_response_header(buf))) {
  ------------------
  |  Branch (796:9): [True: 0, False: 0]
  ------------------
  797|      0|					wget_buffer_free(&header);
  798|      0|					goto cleanup; // something is wrong with the header
  799|      0|				}
  800|       |
  801|      0|				resp->header = header;
  802|       |
  803|  1.90k|			} else {
  804|  1.90k|				if (!(resp = wget_http_parse_response_header(buf)))
  ------------------
  |  Branch (804:9): [True: 0, False: 1.90k]
  ------------------
  805|      0|					goto cleanup; // something is wrong with the header
  806|  1.90k|			}
  807|       |
  808|  1.90k|			resp->req = req;
  809|       |
  810|  1.90k|			if (server_stats_callback)
  ------------------
  |  Branch (810:8): [True: 0, False: 1.90k]
  ------------------
  811|      0|				server_stats_callback(conn, resp);
  812|       |
  813|  1.90k|			if (req->header_callback) {
  ------------------
  |  Branch (813:8): [True: 0, False: 1.90k]
  ------------------
  814|      0|				req->header_callback(resp, req->header_user_data);
  815|      0|			}
  816|       |
  817|  1.90k|			if (req && !wget_strcasecmp_ascii(req->method, "HEAD"))
  ------------------
  |  Branch (817:8): [True: 1.90k, False: 0]
  |  Branch (817:15): [True: 0, False: 1.90k]
  ------------------
  818|      0|				goto cleanup; // a HEAD response won't have a body
  819|       |
  820|  1.90k|			http_fix_broken_server_encoding(resp);
  821|       |
  822|  1.90k|			p += 4; // skip \r\n\r\n to point to body
  823|  1.90k|			break;
  824|  1.90k|		}
  825|       |
  826|   156k|		if ((size_t)nread + 1024 > bufsize) {
  ------------------
  |  Branch (826:7): [True: 0, False: 156k]
  ------------------
  827|      0|			if (wget_buffer_ensure_capacity(conn->buf, bufsize + 1024) != WGET_E_SUCCESS) {
  ------------------
  |  Branch (827:8): [True: 0, False: 0]
  ------------------
  828|      0|				error_printf(_("Failed to allocate %zu bytes\n"), bufsize + 1024);
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              				error_printf(_("Failed to allocate %zu bytes\n"), bufsize + 1024);
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  829|      0|				goto cleanup;
  830|      0|			}
  831|      0|			buf = conn->buf->data;
  832|      0|			bufsize = conn->buf->size;
  833|      0|		}
  834|   156k|	}
  835|  3.80k|	if (!nread) goto cleanup;
  ------------------
  |  Branch (835:6): [True: 0, False: 3.80k]
  ------------------
  836|  3.80k|	if (!p) goto cleanup;
  ------------------
  |  Branch (836:6): [True: 1.90k, False: 1.90k]
  ------------------
  837|       |
  838|  1.90k|	if (resp && resp->code == HTTP_STATUS_RANGE_NOT_SATISFIABLE) {
  ------------------
  |  |   83|  1.90k|#define HTTP_STATUS_RANGE_NOT_SATISFIABLE 416
  ------------------
  |  Branch (838:6): [True: 1.90k, False: 0]
  |  Branch (838:14): [True: 0, False: 1.90k]
  ------------------
  839|       |		/*
  840|       |		    RFC7233:
  841|       |		    4.4.  416 Range Not Satisfiable
  842|       |
  843|       |		       The 416 (Range Not Satisfiable) status code indicates that none of
  844|       |		       the ranges in the request's Range header field (Section 3.1) overlap
  845|       |		       the current extent of the selected resource or that the set of ranges
  846|       |		       requested has been rejected due to invalid ranges or an excessive
  847|       |		       request of small or overlapping ranges.
  848|       |		*/
  849|      0|		goto cleanup;
  850|      0|	}
  851|  1.90k|	if (!resp
  ------------------
  |  Branch (851:6): [True: 0, False: 1.90k]
  ------------------
  852|  1.90k|	 || H_10X(resp->code)
  ------------------
  |  |   61|  3.80k|#define H_10X(x)        (((x) >= 100) && ((x) < 200))
  |  |  ------------------
  |  |  |  Branch (61:26): [True: 1.90k, False: 0]
  |  |  |  Branch (61:42): [True: 0, False: 1.90k]
  |  |  ------------------
  ------------------
  853|  1.90k|	 || resp->code == HTTP_STATUS_NO_CONTENT
  ------------------
  |  |   67|  3.80k|#define HTTP_STATUS_NO_CONTENT            204
  ------------------
  |  Branch (853:6): [True: 0, False: 1.90k]
  ------------------
  854|  1.90k|	 || resp->code == HTTP_STATUS_NOT_MODIFIED
  ------------------
  |  |   75|  3.80k|#define HTTP_STATUS_NOT_MODIFIED          304
  ------------------
  |  Branch (854:6): [True: 0, False: 1.90k]
  ------------------
  855|  1.90k|	 || (resp->transfer_encoding == wget_transfer_encoding_identity && resp->content_length == 0 && resp->content_length_valid)) {
  ------------------
  |  Branch (855:7): [True: 1.26k, False: 634]
  |  Branch (855:69): [True: 634, False: 634]
  |  Branch (855:98): [True: 0, False: 634]
  ------------------
  856|       |		// - body not included, see RFC 2616 4.3
  857|       |		// - body empty, see RFC 2616 4.4
  858|      0|		goto cleanup;
  859|      0|	}
  860|       |
  861|  1.90k|	dc = wget_decompress_open(resp->content_encoding, http_get_body_cb, resp);
  862|  1.90k|	wget_decompress_set_error_handler(dc, http_decompress_error_handler_cb);
  863|       |
  864|       |	// calculate number of body bytes so far read
  865|  1.90k|	body_len = nread - (p - buf);
  866|       |	// move already read body data to buf
  867|  1.90k|	memmove(buf, p, body_len);
  868|  1.90k|	buf[body_len] = 0;
  869|  1.90k|	resp->cur_downloaded = body_len;
  870|       |
  871|  1.90k|	if (resp->transfer_encoding == wget_transfer_encoding_chunked) {
  ------------------
  |  Branch (871:6): [True: 634, False: 1.26k]
  ------------------
  872|    634|		size_t chunk_size = 0;
  873|    634|		char *end;
  874|       |
  875|    634|		debug_printf("method 1 %zu %zu:\n", body_len, body_size);
  ------------------
  |  |   68|    634|#define debug_printf wget_debug_printf
  ------------------
  876|       |		// RFC 2616 3.6.1
  877|       |		// Chunked-Body   = *chunk last-chunk trailer CRLF
  878|       |		// chunk          = chunk-size [ chunk-extension ] CRLF chunk-data CRLF
  879|       |		// chunk-size     = 1*HEX
  880|       |		// last-chunk     = 1*("0") [ chunk-extension ] CRLF
  881|       |		// chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
  882|       |		// chunk-ext-name = token
  883|       |		// chunk-ext-val  = token | quoted-string
  884|       |		// chunk-data     = chunk-size(OCTET)
  885|       |		// trailer        = *(entity-header CRLF)
  886|       |		// entity-header  = extension-header = message-header
  887|       |		// message-header = field-name ":" [ field-value ]
  888|       |		// field-name     = token
  889|       |		// field-value    = *( field-content | LWS )
  890|       |		// field-content  = <the OCTETs making up the field-value
  891|       |		//                  and consisting of either *TEXT or combinations
  892|       |		//                  of token, separators, and quoted-string>
  893|       |
  894|       |/*
  895|       |			length := 0
  896|       |			read chunk-size, chunk-extension (if any) and CRLF
  897|       |			while (chunk-size > 0) {
  898|       |				read chunk-data and CRLF
  899|       |				append chunk-data to entity-body
  900|       |				length := length + chunk-size
  901|       |				read chunk-size and CRLF
  902|       |			}
  903|       |			read entity-header
  904|       |			while (entity-header not empty) {
  905|       |				append entity-header to existing header fields
  906|       |				read entity-header
  907|       |			}
  908|       |			Content-Length := length
  909|       |			Remove "chunked" from Transfer-Encoding
  910|       |*/
  911|       |
  912|       |		// read each chunk, stripping the chunk info
  913|    634|		p = buf;
  914|  1.45k|		for (;;) {
  915|       |			// read: chunk-size [ chunk-extension ] CRLF
  916|  1.45k|			while ((!(end = strchr(p, '\r')) || end[1] != '\n')) {
  ------------------
  |  Branch (916:12): [True: 17, False: 1.43k]
  |  Branch (916:40): [True: 24, False: 1.41k]
  ------------------
  917|     41|				if (http_connection_is_aborted(conn))
  ------------------
  |  Branch (917:9): [True: 0, False: 41]
  ------------------
  918|      0|					goto cleanup;
  919|       |
  920|     41|				if (body_len + 1024 > bufsize) {
  ------------------
  |  Branch (920:9): [True: 0, False: 41]
  ------------------
  921|      0|					if (wget_buffer_ensure_capacity(conn->buf, bufsize + 1024) != WGET_E_SUCCESS) {
  ------------------
  |  Branch (921:10): [True: 0, False: 0]
  ------------------
  922|      0|						char *page = get_page(req);
  923|      0|						error_printf(_("Failed to allocate %zu bytes (%s)\n"), bufsize + 1024, page);
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              						error_printf(_("Failed to allocate %zu bytes (%s)\n"), bufsize + 1024, page);
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  924|      0|						xfree(page);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  925|      0|						goto cleanup;
  926|      0|					}
  927|      0|					p = conn->buf->data + (p - buf);
  928|      0|					buf = conn->buf->data;
  929|      0|					bufsize = conn->buf->size;
  930|      0|				}
  931|       |
  932|     41|				if ((nbytes = wget_tcp_read(conn->tcp, buf + body_len, bufsize - body_len)) <= 0)
  ------------------
  |  Branch (932:9): [True: 41, False: 0]
  ------------------
  933|     41|					goto cleanup;
  934|       |
  935|      0|				body_len += nbytes;
  936|      0|				buf[body_len] = 0;
  937|       |				// debug_printf("a nbytes %zd body_len %zu\n", nbytes, body_len);
  938|      0|			}
  939|  1.41k|			end += 2;
  940|       |
  941|       |			// now p points to chunk-size (hex)
  942|  1.41k|			errno = 0;
  943|  1.41k|			chunk_size = (size_t) strtoll(p, NULL, 16);
  944|  1.41k|			if (errno) {
  945|    151|				char *page = get_page(req);
  946|    151|				error_printf(_("Failed to convert chunk size '%.31s' (%s)\n"), p, page);
  ------------------
  |  |   66|    151|#define error_printf wget_error_printf
  ------------------
              				error_printf(_("Failed to convert chunk size '%.31s' (%s)\n"), p, page);
  ------------------
  |  |   47|    151|#	define _(STRING) gettext(STRING)
  ------------------
  947|    151|				xfree(page);
  ------------------
  |  |   53|    151|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 151, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  948|    151|				goto cleanup;
  949|    151|			}
  950|       |
  951|       |			// debug_printf("chunk size is %zu\n", chunk_size);
  952|  1.26k|			if (chunk_size == 0) {
  ------------------
  |  Branch (952:8): [True: 113, False: 1.14k]
  ------------------
  953|       |				// now read 'trailer CRLF' which is '*(entity-header CRLF) CRLF'
  954|    113|				if (*end == '\r' && end[1] == '\n') // shortcut for the most likely case (empty trailer)
  ------------------
  |  Branch (954:9): [True: 15, False: 98]
  |  Branch (954:25): [True: 3, False: 12]
  ------------------
  955|      3|					goto cleanup;
  956|       |
  957|    110|				debug_printf("reading trailer\n");
  ------------------
  |  |   68|    110|#define debug_printf wget_debug_printf
  ------------------
  958|    110|				while (!strstr(end, "\r\n\r\n")) {
  ------------------
  |  Branch (958:12): [True: 105, False: 5]
  ------------------
  959|    105|					if (body_len > 3) {
  ------------------
  |  Branch (959:10): [True: 69, False: 36]
  ------------------
  960|       |						// just need to keep the last 3 bytes to avoid buffer resizing
  961|     69|						memmove(buf, buf + body_len - 3, 4); // plus 0 terminator, just in case
  962|     69|						body_len = 3;
  963|     69|					}
  964|       |
  965|    105|					if (http_connection_is_aborted(conn))
  ------------------
  |  Branch (965:10): [True: 0, False: 105]
  ------------------
  966|      0|						goto cleanup;
  967|       |
  968|    105|					if ((nbytes = wget_tcp_read(conn->tcp, buf + body_len, bufsize - body_len)) <= 0)
  ------------------
  |  Branch (968:10): [True: 105, False: 0]
  ------------------
  969|    105|						goto cleanup;
  970|       |
  971|      0|					body_len += nbytes;
  972|      0|					buf[body_len] = 0;
  973|      0|					end = buf;
  974|       |					// debug_printf("a nbytes %zd\n", nbytes);
  975|      0|				}
  976|      5|				debug_printf("end of trailer\n");
  ------------------
  |  |   68|      5|#define debug_printf wget_debug_printf
  ------------------
  977|      5|				goto cleanup;
  978|    110|			}
  979|       |
  980|       |			// check for pointer overflow
  981|  1.14k|			if (chunk_size > SIZE_MAX/2 - 2 || end >= end + chunk_size + 2) {
  ------------------
  |  Branch (981:8): [True: 99, False: 1.05k]
  |  Branch (981:39): [True: 0, False: 1.05k]
  ------------------
  982|       |//			if (end > end + chunk_size || end >= end + chunk_size + 2) {
  983|     99|				char *page = get_page(req);
  984|     99|				error_printf(_("Chunk size overflow: %zX (%s)\n"), chunk_size, page);
  ------------------
  |  |   66|     99|#define error_printf wget_error_printf
  ------------------
              				error_printf(_("Chunk size overflow: %zX (%s)\n"), chunk_size, page);
  ------------------
  |  |   47|     99|#	define _(STRING) gettext(STRING)
  ------------------
  985|     99|				xfree(page);
  ------------------
  |  |   53|     99|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 99, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  986|     99|				goto cleanup;
  987|     99|			}
  988|       |
  989|  1.05k|			p = end + chunk_size + 2;
  990|  1.05k|			if (p <= buf + body_len) {
  ------------------
  |  Branch (990:8): [True: 820, False: 230]
  ------------------
  991|       |				// debug_printf("write full chunk, %zu bytes\n", chunk_size);
  992|    820|				resp->cur_downloaded += chunk_size;
  993|    820|				wget_decompress(dc, end, chunk_size);
  994|    820|				continue;
  995|    820|			}
  996|       |
  997|       |//			resp->cur_downloaded += (buf + body_len) - end;
  998|       |//			wget_decompress(dc, end, (buf + body_len) - end);
  999|       |
 1000|    230|			if ((uintptr_t)((buf + body_len) - end) > chunk_size) {
  ------------------
  |  Branch (1000:8): [True: 3, False: 227]
  ------------------
 1001|      3|				resp->cur_downloaded += chunk_size;
 1002|      3|				wget_decompress(dc, end, chunk_size);
 1003|    227|			} else {
 1004|    227|				resp->cur_downloaded += (buf + body_len) - end;
 1005|    227|				wget_decompress(dc, end, (buf + body_len) - end);
 1006|    227|			}
 1007|       |
 1008|    230|			chunk_size = (((uintptr_t) p) - ((uintptr_t) (buf + body_len))); // in fact needed bytes to have chunk_size+2 in buf
 1009|       |
 1010|    230|			debug_printf("need at least %zu more bytes\n", chunk_size);
  ------------------
  |  |   68|    230|#define debug_printf wget_debug_printf
  ------------------
 1011|       |
 1012|    230|			while (chunk_size > 0) {
  ------------------
  |  Branch (1012:11): [True: 230, False: 0]
  ------------------
 1013|    230|				if (http_connection_is_aborted(conn))
  ------------------
  |  Branch (1013:9): [True: 0, False: 230]
  ------------------
 1014|      0|					goto cleanup;
 1015|       |
 1016|    230|				if ((nbytes = wget_tcp_read(conn->tcp, buf, bufsize)) <= 0)
  ------------------
  |  Branch (1016:9): [True: 230, False: 0]
  ------------------
 1017|    230|					goto cleanup;
 1018|       |				// debug_printf("a nbytes=%zd chunk_size=%zu\n", nread, chunk_size);
 1019|       |
 1020|      0|				if (chunk_size <= (size_t)nbytes) {
  ------------------
  |  Branch (1020:9): [True: 0, False: 0]
  ------------------
 1021|      0|					if (chunk_size == 1 || !strncmp(buf + chunk_size - 2, "\r\n", 2)) {
  ------------------
  |  Branch (1021:10): [True: 0, False: 0]
  |  Branch (1021:29): [True: 0, False: 0]
  ------------------
 1022|      0|						debug_printf("chunk completed\n");
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
 1023|       |						// p=end+chunk_size+2;
 1024|      0|					} else {
 1025|      0|						char *page = get_page(req);
 1026|      0|						error_printf(_("Expected end-of-chunk not found (%s)\n"), page);
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              						error_printf(_("Expected end-of-chunk not found (%s)\n"), page);
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
 1027|      0|						xfree(page);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1028|      0|						goto cleanup;
 1029|      0|					}
 1030|      0|					if (chunk_size > 2) {
  ------------------
  |  Branch (1030:10): [True: 0, False: 0]
  ------------------
 1031|      0|						resp->cur_downloaded += chunk_size - 2;
 1032|      0|						wget_decompress(dc, buf, chunk_size - 2);
 1033|      0|					}
 1034|      0|					body_len = nbytes - chunk_size;
 1035|      0|					if (body_len)
  ------------------
  |  Branch (1035:10): [True: 0, False: 0]
  ------------------
 1036|      0|						memmove(buf, buf + chunk_size, body_len);
 1037|      0|					buf[body_len] = 0;
 1038|      0|					p = buf;
 1039|      0|					break;
 1040|      0|				} else {
 1041|      0|					chunk_size -= nbytes;
 1042|      0|					if (chunk_size >= 2) {
  ------------------
  |  Branch (1042:10): [True: 0, False: 0]
  ------------------
 1043|      0|						resp->cur_downloaded += nbytes;
 1044|      0|						wget_decompress(dc, buf, nbytes);
 1045|      0|					} else {
 1046|       |						// special case: we got a partial end-of-chunk
 1047|      0|						resp->cur_downloaded += nbytes - 1;
 1048|      0|						wget_decompress(dc, buf, nbytes - 1);
 1049|      0|					}
 1050|      0|				}
 1051|      0|			}
 1052|    230|		}
 1053|  1.26k|	} else if (resp->content_length_valid && !resp->req->response_ignorelength) {
  ------------------
  |  Branch (1053:13): [True: 634, False: 634]
  |  Branch (1053:43): [True: 634, False: 0]
  ------------------
 1054|       |		// read content_length bytes
 1055|    634|		debug_printf("method 2\n");
  ------------------
  |  |   68|    634|#define debug_printf wget_debug_printf
  ------------------
 1056|       |
 1057|    634|		if (body_len)
  ------------------
  |  Branch (1057:7): [True: 634, False: 0]
  ------------------
 1058|    634|			wget_decompress(dc, buf, body_len);
 1059|       |
 1060|    634|		while (body_len < resp->content_length) {
  ------------------
  |  Branch (1060:10): [True: 204, False: 430]
  ------------------
 1061|    204|			if (http_connection_is_aborted(conn))
  ------------------
  |  Branch (1061:8): [True: 0, False: 204]
  ------------------
 1062|      0|				break;
 1063|       |
 1064|    204|			if (((nbytes = wget_tcp_read(conn->tcp, buf, bufsize)) <= 0))
  ------------------
  |  Branch (1064:8): [True: 204, False: 0]
  ------------------
 1065|    204|				break;
 1066|       |
 1067|      0|			body_len += nbytes;
 1068|       |			// debug_printf("nbytes %zd total %zu/%zu\n", nbytes, body_len, resp->content_length);
 1069|      0|			resp->cur_downloaded += nbytes;
 1070|      0|			wget_decompress(dc, buf, nbytes);
 1071|      0|		}
 1072|    634|		if (nbytes < 0) {
  ------------------
  |  Branch (1072:7): [True: 0, False: 634]
  ------------------
 1073|      0|			char *page = get_page(req);
 1074|      0|			error_printf(_("Failed to read %zd bytes (%d) (%s)\n"), nbytes, errno, page);
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              			error_printf(_("Failed to read %zd bytes (%d) (%s)\n"), nbytes, errno, page);
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
 1075|      0|			xfree(page);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1076|      0|		}
 1077|    634|		if (body_len < resp->content_length) {
  ------------------
  |  Branch (1077:7): [True: 204, False: 430]
  ------------------
 1078|    204|			resp->length_inconsistent = true;
 1079|    204|			char *page = get_page(req);
 1080|    204|			error_printf(_("Just got %zu of %zu bytes (%s)\n"), body_len, resp->content_length, page);
  ------------------
  |  |   66|    204|#define error_printf wget_error_printf
  ------------------
              			error_printf(_("Just got %zu of %zu bytes (%s)\n"), body_len, resp->content_length, page);
  ------------------
  |  |   47|    204|#	define _(STRING) gettext(STRING)
  ------------------
 1081|    204|			xfree(page);
  ------------------
  |  |   53|    204|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 204, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1082|    430|		} else if (body_len > resp->content_length) {
  ------------------
  |  Branch (1082:14): [True: 407, False: 23]
  ------------------
 1083|    407|			resp->length_inconsistent = true;
 1084|    407|			char *page = get_page(req);
 1085|    407|			error_printf(_("Body too large: %zu instead of %zu bytes (%s)\n"), body_len, resp->content_length, page);
  ------------------
  |  |   66|    407|#define error_printf wget_error_printf
  ------------------
              			error_printf(_("Body too large: %zu instead of %zu bytes (%s)\n"), body_len, resp->content_length, page);
  ------------------
  |  |   47|    407|#	define _(STRING) gettext(STRING)
  ------------------
 1086|    407|			xfree(page);
  ------------------
  |  |   53|    407|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 407, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1087|    407|		}
 1088|    634|		resp->content_length = body_len;
 1089|    634|	} else {
 1090|       |		// read as long as we can
 1091|    634|		debug_printf("method 3\n");
  ------------------
  |  |   68|    634|#define debug_printf wget_debug_printf
  ------------------
 1092|       |
 1093|    634|		if (body_len)
  ------------------
  |  Branch (1093:7): [True: 634, False: 0]
  ------------------
 1094|    634|			wget_decompress(dc, buf, body_len);
 1095|       |
 1096|    634|		while (!http_connection_is_aborted(conn) && (nbytes = wget_tcp_read(conn->tcp, buf, bufsize)) > 0) {
  ------------------
  |  Branch (1096:10): [True: 634, False: 0]
  |  Branch (1096:47): [True: 0, False: 634]
  ------------------
 1097|      0|			body_len += nbytes;
 1098|       |			// debug_printf("nbytes %zd total %zu\n", nbytes, body_len);
 1099|      0|			resp->cur_downloaded += nbytes;
 1100|      0|			wget_decompress(dc, buf, nbytes);
 1101|      0|		}
 1102|    634|		resp->content_length = body_len;
 1103|    634|	}
 1104|       |
 1105|  3.80k|cleanup:
 1106|       |
 1107|  3.80k|	if (resp)
  ------------------
  |  Branch (1107:6): [True: 1.90k, False: 1.90k]
  ------------------
 1108|  1.90k|		resp->response_end = wget_get_timemillis();
 1109|       |
 1110|  3.80k|	wget_decompress_close(dc);
 1111|       |
 1112|  3.80k|	return resp;
 1113|  1.90k|}
wget_http_get_response:
 1118|  3.80k|{
 1119|  3.80k|	wget_http_response *resp;
 1120|       |
 1121|  3.80k|	resp = wget_http_get_response_cb(conn);
 1122|       |
 1123|  3.80k|	if (resp) {
  ------------------
  |  Branch (1123:6): [True: 1.90k, False: 1.90k]
  ------------------
 1124|  1.90k|		if (!wget_strcasecmp_ascii(resp->req->method, "GET"))
  ------------------
  |  Branch (1124:7): [True: 1.90k, False: 0]
  ------------------
 1125|  1.90k|			if (resp->body)
  ------------------
  |  Branch (1125:8): [True: 1.55k, False: 347]
  ------------------
 1126|  1.55k|				resp->content_length = resp->body->length;
 1127|  1.90k|	}
 1128|       |
 1129|  3.80k|	return resp;
 1130|  3.80k|}
wget_http_match_no_proxy:
 1304|  3.80k|{
 1305|  3.80k|	if (wget_vector_size(no_proxies_vec) < 1 || !host)
  ------------------
  |  Branch (1305:6): [True: 3.80k, False: 0]
  |  Branch (1305:46): [True: 0, False: 0]
  ------------------
 1306|  3.80k|		return 0;
 1307|       |
 1308|      0|	struct in_addr addr;
 1309|      0|	struct in6_addr addr6;
 1310|      0|	bool ipv4 = false, ipv6 = false;
 1311|       |
 1312|      0|	if (inet_pton(AF_INET, host, &addr) == 1) {
  ------------------
  |  Branch (1312:6): [True: 0, False: 0]
  ------------------
 1313|      0|		ipv4 = true;
 1314|      0|	} else if (inet_pton(AF_INET6, host, &addr6) == 1) {
  ------------------
  |  Branch (1314:13): [True: 0, False: 0]
  ------------------
 1315|      0|		ipv6 = true;
 1316|      0|	}
 1317|       |
 1318|       |	// https://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html
 1319|      0|	for (int it = 0; it < wget_vector_size(no_proxies_vec); it++) {
  ------------------
  |  Branch (1319:19): [True: 0, False: 0]
  ------------------
 1320|      0|		const char *no_proxy = wget_vector_get(no_proxies_vec, it);
 1321|       |
 1322|      0|		if (!no_proxy)
  ------------------
  |  Branch (1322:7): [True: 0, False: 0]
  ------------------
 1323|      0|			continue;
 1324|       |
 1325|      0|		if (!strcmp(no_proxy, host))
  ------------------
  |  Branch (1325:7): [True: 0, False: 0]
  ------------------
 1326|      0|			return 1; // exact match
 1327|       |
 1328|      0|		if (ipv4) {
  ------------------
  |  Branch (1328:7): [True: 0, False: 0]
  ------------------
 1329|      0|			if (cidr_v4_match(no_proxy, &addr)) {
  ------------------
  |  Branch (1329:8): [True: 0, False: 0]
  ------------------
 1330|      0|				return 1;
 1331|      0|			}
 1332|      0|		} else if (ipv6) {
  ------------------
  |  Branch (1332:14): [True: 0, False: 0]
  ------------------
 1333|      0|			if (cidr_v6_match(no_proxy, &addr6)) {
  ------------------
  |  Branch (1333:8): [True: 0, False: 0]
  ------------------
 1334|      0|				return 1;
 1335|      0|			}
 1336|      0|		}
 1337|       |
 1338|       |		// check for subdomain match
 1339|      0|		if (*no_proxy == '.' && wget_match_tail(host, no_proxy))
  ------------------
  |  Branch (1339:7): [True: 0, False: 0]
  |  Branch (1339:27): [True: 0, False: 0]
  ------------------
 1340|      0|			return 1;
 1341|      0|	}
 1342|       |
 1343|      0|	return 0;
 1344|      0|}
http_connection_is_aborted:
 1355|  1.21k|{
 1356|  1.21k|	return conn->abort_indicator || abort_indicator;
  ------------------
  |  Branch (1356:9): [True: 0, False: 1.21k]
  |  Branch (1356:34): [True: 0, False: 1.21k]
  ------------------
 1357|  1.21k|}
http.c:body_callback:
  123|  2.31k|{
  124|  2.31k|	if (!resp->body)
  ------------------
  |  Branch (124:6): [True: 1.55k, False: 763]
  ------------------
  125|  1.55k|		resp->body = wget_buffer_alloc(102400);
  126|       |
  127|  2.31k|	wget_buffer_memcat(resp->body, data, length);
  128|       |
  129|  2.31k|	return 0;
  130|  2.31k|}
http.c:http_add_header:
  227|  3.80k|{
  228|  3.80k|	wget_http_header_param *param = wget_malloc(sizeof(wget_http_header_param));
  229|       |
  230|  3.80k|	if (!param || !name || !value)
  ------------------
  |  Branch (230:6): [True: 0, False: 3.80k]
  |  Branch (230:16): [True: 0, False: 3.80k]
  |  Branch (230:25): [True: 0, False: 3.80k]
  ------------------
  231|      0|		goto err;
  232|       |
  233|  3.80k|	param->name = name;
  234|  3.80k|	param->value = value;
  235|       |
  236|  3.80k|	if (wget_vector_add(req->headers, param) >= 0)
  ------------------
  |  Branch (236:6): [True: 3.80k, False: 0]
  ------------------
  237|  3.80k|		return WGET_E_SUCCESS;
  238|       |
  239|      0|	xfree(param);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  240|       |
  241|      0|err:
  242|      0|	xfree(value);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  243|      0|	xfree(name);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  244|      0|	return WGET_E_MEMORY;
  245|      0|}
http.c:get_page:
  741|    861|{
  742|    861|	return wget_aprintf("%s://%s/%s",
  743|    861|		wget_iri_scheme_get_name(req->scheme), req->esc_host.data, req->esc_resource.data);
  744|    861|}

wget_http_istoken:
  124|  49.4k|{
  125|  49.4k|	return c > 32 && c <= 126 && !http_isseparator(c);
  ------------------
  |  Branch (125:9): [True: 48.8k, False: 634]
  |  Branch (125:19): [True: 48.8k, False: 0]
  |  Branch (125:31): [True: 44.3k, False: 4.43k]
  ------------------
  126|  49.4k|}
wget_parse_name_fixed:
  221|  4.43k|{
  222|  4.43k|	while (c_isblank(*s)) s++;
  ------------------
  |  Branch (222:9): [True: 0, False: 4.43k]
  ------------------
  223|       |
  224|  4.43k|	*name = s;
  225|       |
  226|  44.3k|	while (wget_http_istoken(*s))
  ------------------
  |  Branch (226:9): [True: 39.9k, False: 4.43k]
  ------------------
  227|  39.9k|		s++;
  228|       |
  229|  4.43k|	*namelen = s - *name;
  230|       |
  231|  4.43k|	while (*s && *s != ':') s++;
  ------------------
  |  Branch (231:9): [True: 4.43k, False: 0]
  |  Branch (231:15): [True: 0, False: 4.43k]
  ------------------
  232|       |
  233|  4.43k|	return *s == ':' ? s + 1 : s;
  ------------------
  |  Branch (233:9): [True: 4.43k, False: 0]
  ------------------
  234|  4.43k|}
wget_http_parse_transfer_encoding:
  454|    634|{
  455|  1.26k|	while (c_isblank(*s)) s++;
  ------------------
  |  Branch (455:9): [True: 634, False: 634]
  ------------------
  456|       |
  457|    634|	if (!wget_strcasecmp_ascii(s, "identity"))
  ------------------
  |  Branch (457:6): [True: 0, False: 634]
  ------------------
  458|      0|		*transfer_encoding = wget_transfer_encoding_identity;
  459|    634|	else
  460|    634|		*transfer_encoding = wget_transfer_encoding_chunked;
  461|       |
  462|  5.07k|	while (wget_http_istoken(*s)) s++;
  ------------------
  |  Branch (462:9): [True: 4.43k, False: 634]
  ------------------
  463|       |
  464|    634|	return s;
  465|    634|}
wget_http_parse_connection:
  715|  1.26k|{
  716|  1.26k|	const char *e;
  717|       |
  718|  1.26k|	*keep_alive = false;
  719|       |
  720|  2.53k|	for (e = s; *e; s = e + 1) {
  ------------------
  |  Branch (720:14): [True: 1.26k, False: 1.26k]
  ------------------
  721|  1.26k|		if ((e = strchrnul(s, ',')) != s) {
  ------------------
  |  Branch (721:7): [True: 1.26k, False: 0]
  ------------------
  722|  2.53k|			while (c_isblank(*s)) s++;
  ------------------
  |  Branch (722:11): [True: 1.26k, False: 1.26k]
  ------------------
  723|       |
  724|  1.26k|			if (!wget_strncasecmp_ascii(s, "keep-alive", 10))
  ------------------
  |  Branch (724:8): [True: 1.26k, False: 0]
  ------------------
  725|  1.26k|				*keep_alive = true;
  726|  1.26k|		}
  727|  1.26k|	}
  728|       |
  729|  1.26k|	return s;
  730|  1.26k|}
wget_http_parse_header_line:
 1071|  4.43k|{
 1072|  4.43k|	if (!name || !value)
  ------------------
  |  Branch (1072:6): [True: 0, False: 4.43k]
  |  Branch (1072:15): [True: 0, False: 4.43k]
  ------------------
 1073|      0|		return WGET_E_INVALID;
 1074|       |
 1075|  4.43k|	char valuebuf[256];
 1076|  4.43k|	char *value0;
 1077|  4.43k|	int ret = WGET_E_SUCCESS;
 1078|       |
 1079|  4.43k|	value0 = wget_strmemcpy_a(valuebuf, sizeof(valuebuf), value, valuelen);
 1080|  4.43k|	if (!value0)
  ------------------
  |  Branch (1080:6): [True: 0, False: 4.43k]
  ------------------
 1081|      0|		return WGET_E_MEMORY;
 1082|       |
 1083|  4.43k|	switch (*name | 0x20) {
 1084|      0|	case ':':
  ------------------
  |  Branch (1084:2): [True: 0, False: 4.43k]
  ------------------
 1085|      0|		if (!memcmp(name, ":status", namelen) && valuelen == 3) {
  ------------------
  |  Branch (1085:7): [True: 0, False: 0]
  |  Branch (1085:44): [True: 0, False: 0]
  ------------------
 1086|      0|			resp->code = ((value[0] - '0') * 10 + (value[1] - '0')) * 10 + (value[2] - '0');
 1087|      0|		} else
 1088|      0|			ret = WGET_E_UNKNOWN;
 1089|      0|		break;
 1090|  1.90k|	case 'c':
  ------------------
  |  Branch (1090:2): [True: 1.90k, False: 2.53k]
  ------------------
 1091|  1.90k|		if (!wget_strncasecmp_ascii(name, "content-encoding", namelen)) {
  ------------------
  |  Branch (1091:7): [True: 0, False: 1.90k]
  ------------------
 1092|      0|			wget_http_parse_content_encoding(value0, &resp->content_encoding);
 1093|  1.90k|		} else if (!wget_strncasecmp_ascii(name, "content-type", namelen)) {
  ------------------
  |  Branch (1093:14): [True: 0, False: 1.90k]
  ------------------
 1094|      0|			if (!resp->content_type && !resp->content_type_encoding)
  ------------------
  |  Branch (1094:8): [True: 0, False: 0]
  |  Branch (1094:31): [True: 0, False: 0]
  ------------------
 1095|      0|				wget_http_parse_content_type(value0, &resp->content_type, &resp->content_type_encoding);
 1096|  1.90k|		} else if (!wget_strncasecmp_ascii(name, "content-length", namelen)) {
  ------------------
  |  Branch (1096:14): [True: 634, False: 1.26k]
  ------------------
 1097|    634|			resp->content_length = (size_t)atoll(value0);
 1098|    634|			resp->content_length_valid = 1;
 1099|  1.26k|		} else if (!wget_strncasecmp_ascii(name, "content-disposition", namelen)) {
  ------------------
  |  Branch (1099:14): [True: 0, False: 1.26k]
  ------------------
 1100|      0|			if (!resp->content_filename)
  ------------------
  |  Branch (1100:8): [True: 0, False: 0]
  ------------------
 1101|      0|				wget_http_parse_content_disposition(value0, &resp->content_filename);
 1102|  1.26k|		} else if (!wget_strncasecmp_ascii(name, "connection", namelen)) {
  ------------------
  |  Branch (1102:14): [True: 1.26k, False: 0]
  ------------------
 1103|  1.26k|			wget_http_parse_connection(value0, &resp->keep_alive);
 1104|  1.26k|		} else if (!wget_strncasecmp_ascii(name, "Content-Security-Policy", namelen)) {
  ------------------
  |  Branch (1104:14): [True: 0, False: 0]
  ------------------
 1105|      0|			resp->csp = 1;
 1106|      0|		} else
 1107|      0|			ret = WGET_E_UNKNOWN;
 1108|  1.90k|		break;
 1109|      0|	case 'd':
  ------------------
  |  Branch (1109:2): [True: 0, False: 4.43k]
  ------------------
 1110|      0|		if (!wget_strncasecmp_ascii(name, "digest", namelen)) {
  ------------------
  |  Branch (1110:7): [True: 0, False: 0]
  ------------------
 1111|       |			// https://tools.ietf.org/html/rfc3230
 1112|      0|			wget_http_digest digest;
 1113|      0|			wget_http_parse_digest(value0, &digest);
 1114|       |			// debug_printf("%s: %s\n",digest.algorithm,digest.encoded_digest);
 1115|      0|			if (!resp->digests) {
  ------------------
  |  Branch (1115:8): [True: 0, False: 0]
  ------------------
 1116|      0|				resp->digests = wget_vector_create(4, NULL);
 1117|      0|				wget_vector_set_destructor(resp->digests, (wget_vector_destructor *) wget_http_free_digest);
 1118|      0|			}
 1119|      0|			wget_vector_add_memdup(resp->digests, &digest, sizeof(digest));
 1120|      0|		} else
 1121|      0|			ret = WGET_E_UNKNOWN;
 1122|      0|		break;
 1123|      0|	case 'e':
  ------------------
  |  Branch (1123:2): [True: 0, False: 4.43k]
  ------------------
 1124|      0|		if (!wget_strncasecmp_ascii(name, "etag", namelen)) {
  ------------------
  |  Branch (1124:7): [True: 0, False: 0]
  ------------------
 1125|      0|			if (!resp->etag)
  ------------------
  |  Branch (1125:8): [True: 0, False: 0]
  ------------------
 1126|      0|				wget_http_parse_etag(value0, &resp->etag);
 1127|      0|		} else
 1128|      0|			ret = WGET_E_UNKNOWN;
 1129|      0|		break;
 1130|      0|	case 'i':
  ------------------
  |  Branch (1130:2): [True: 0, False: 4.43k]
  ------------------
 1131|      0|		if (!wget_strncasecmp_ascii(name, "icy-metaint", namelen)) {
  ------------------
  |  Branch (1131:7): [True: 0, False: 0]
  ------------------
 1132|      0|			resp->icy_metaint = atoi(value0);
 1133|      0|		} else
 1134|      0|			ret = WGET_E_UNKNOWN;
 1135|      0|		break;
 1136|      0|	case 'l':
  ------------------
  |  Branch (1136:2): [True: 0, False: 4.43k]
  ------------------
 1137|      0|		if (!wget_strncasecmp_ascii(name, "last-modified", namelen)) {
  ------------------
  |  Branch (1137:7): [True: 0, False: 0]
  ------------------
 1138|       |			// Last-Modified: Thu, 07 Feb 2008 15:03:24 GMT
 1139|      0|			resp->last_modified = wget_http_parse_full_date(value0);
 1140|      0|		} else if (resp->code / 100 == 3 && !wget_strncasecmp_ascii(name, "location", namelen)) {
  ------------------
  |  Branch (1140:14): [True: 0, False: 0]
  |  Branch (1140:39): [True: 0, False: 0]
  ------------------
 1141|      0|			if (!resp->location)
  ------------------
  |  Branch (1141:8): [True: 0, False: 0]
  ------------------
 1142|      0|				wget_http_parse_location(value0, &resp->location);
 1143|      0|		} else if (resp->code / 100 == 3 && !wget_strncasecmp_ascii(name, "link", namelen)) {
  ------------------
  |  Branch (1143:14): [True: 0, False: 0]
  |  Branch (1143:39): [True: 0, False: 0]
  ------------------
 1144|       |			// debug_printf("s=%.31s\n",s);
 1145|      0|			wget_http_link link;
 1146|      0|			wget_http_parse_link(value0, &link);
 1147|       |			// debug_printf("link->uri=%s\n",link.uri);
 1148|      0|			if (!resp->links) {
  ------------------
  |  Branch (1148:8): [True: 0, False: 0]
  ------------------
 1149|      0|				resp->links = wget_vector_create(8, NULL);
 1150|      0|				wget_vector_set_destructor(resp->links, (wget_vector_destructor *) wget_http_free_link);
 1151|      0|			}
 1152|      0|			wget_vector_add_memdup(resp->links, &link, sizeof(link));
 1153|      0|		} else
 1154|      0|			ret = WGET_E_UNKNOWN;
 1155|      0|		break;
 1156|      0|	case 'p':
  ------------------
  |  Branch (1156:2): [True: 0, False: 4.43k]
  ------------------
 1157|      0|		if (!wget_strncasecmp_ascii(name, "public-key-pins", namelen)) {
  ------------------
  |  Branch (1157:7): [True: 0, False: 0]
  ------------------
 1158|      0|			if (!resp->hpkp) {
  ------------------
  |  Branch (1158:8): [True: 0, False: 0]
  ------------------
 1159|      0|				resp->hpkp = wget_hpkp_new();
 1160|      0|				wget_http_parse_public_key_pins(value0, resp->hpkp);
 1161|      0|				debug_printf("new host pubkey pinnings added to hpkp db\n");
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
 1162|      0|			}
 1163|      0|		}
 1164|      0|		else if (!wget_strncasecmp_ascii(name, "proxy-authenticate", namelen)) {
  ------------------
  |  Branch (1164:12): [True: 0, False: 0]
  ------------------
 1165|      0|			wget_http_challenge *challenge = wget_malloc(sizeof(wget_http_challenge));
 1166|       |
 1167|      0|			if (!challenge) {
  ------------------
  |  Branch (1167:8): [True: 0, False: 0]
  ------------------
 1168|      0|				ret = WGET_E_MEMORY;
 1169|      0|				goto out;
 1170|      0|			}
 1171|       |
 1172|      0|			wget_http_parse_challenge(value0, challenge);
 1173|       |
 1174|      0|			if (!resp->challenges) {
  ------------------
  |  Branch (1174:8): [True: 0, False: 0]
  ------------------
 1175|      0|				resp->challenges = wget_vector_create(2, NULL);
 1176|      0|				wget_vector_set_destructor(resp->challenges, (wget_vector_destructor *) wget_http_free_challenge);
 1177|      0|			}
 1178|      0|			wget_vector_add(resp->challenges, challenge);
 1179|      0|		} else
 1180|      0|			ret = WGET_E_UNKNOWN;
 1181|      0|		break;
 1182|      0|	case 's':
  ------------------
  |  Branch (1182:2): [True: 0, False: 4.43k]
  ------------------
 1183|      0|		if (!wget_strncasecmp_ascii(name, "set-cookie", namelen)) {
  ------------------
  |  Branch (1183:7): [True: 0, False: 0]
  ------------------
 1184|       |			// this is a parser. content validation must be done by higher level functions.
 1185|      0|			wget_cookie *cookie;
 1186|      0|			wget_http_parse_setcookie(value0, &cookie);
 1187|       |
 1188|      0|			if (cookie) {
  ------------------
  |  Branch (1188:8): [True: 0, False: 0]
  ------------------
 1189|      0|				if (!resp->cookies) {
  ------------------
  |  Branch (1189:9): [True: 0, False: 0]
  ------------------
 1190|      0|					resp->cookies = wget_vector_create(4, NULL);
 1191|      0|					wget_vector_set_destructor(resp->cookies, cookie_free);
 1192|      0|				}
 1193|      0|				wget_vector_add(resp->cookies, cookie);
 1194|      0|			}
 1195|      0|		}
 1196|      0|		else if (!wget_strncasecmp_ascii(name, "strict-transport-security", namelen)) {
  ------------------
  |  Branch (1196:12): [True: 0, False: 0]
  ------------------
 1197|      0|			resp->hsts = 1;
 1198|      0|			wget_http_parse_strict_transport_security(value0, &resp->hsts_maxage, &resp->hsts_include_subdomains);
 1199|      0|		} else
 1200|      0|			ret = WGET_E_UNKNOWN;
 1201|      0|		break;
 1202|    634|	case 't':
  ------------------
  |  Branch (1202:2): [True: 634, False: 3.80k]
  ------------------
 1203|    634|		if (!wget_strncasecmp_ascii(name, "transfer-encoding", namelen)) {
  ------------------
  |  Branch (1203:7): [True: 634, False: 0]
  ------------------
 1204|    634|			wget_http_parse_transfer_encoding(value0, &resp->transfer_encoding);
 1205|    634|		} else
 1206|      0|			ret = WGET_E_UNKNOWN;
 1207|    634|		break;
 1208|      0|	case 'w':
  ------------------
  |  Branch (1208:2): [True: 0, False: 4.43k]
  ------------------
 1209|      0|		if (!wget_strncasecmp_ascii(name, "www-authenticate", namelen)) {
  ------------------
  |  Branch (1209:7): [True: 0, False: 0]
  ------------------
 1210|      0|			wget_http_challenge *challenge = wget_malloc(sizeof(wget_http_challenge));
 1211|       |
 1212|      0|			if (!challenge) {
  ------------------
  |  Branch (1212:8): [True: 0, False: 0]
  ------------------
 1213|      0|				ret = WGET_E_MEMORY;
 1214|      0|				goto out;
 1215|      0|			}
 1216|       |
 1217|      0|			wget_http_parse_challenge(value0, challenge);
 1218|       |
 1219|      0|			if (!resp->challenges) {
  ------------------
  |  Branch (1219:8): [True: 0, False: 0]
  ------------------
 1220|      0|				resp->challenges = wget_vector_create(2, NULL);
 1221|      0|				wget_vector_set_destructor(resp->challenges, (wget_vector_destructor *) wget_http_free_challenge);
 1222|      0|			}
 1223|      0|			wget_vector_add(resp->challenges, challenge);
 1224|      0|		} else
 1225|      0|			ret = WGET_E_UNKNOWN;
 1226|      0|		break;
 1227|      0|	case 'x':
  ------------------
  |  Branch (1227:2): [True: 0, False: 4.43k]
  ------------------
 1228|      0|		if (!wget_strncasecmp_ascii(name, "x-archive-orig-last-modified", namelen)) {
  ------------------
  |  Branch (1228:7): [True: 0, False: 0]
  ------------------
 1229|      0|			resp->last_modified = wget_http_parse_full_date(value0);
 1230|      0|		} else
 1231|      0|			ret = WGET_E_UNKNOWN;
 1232|      0|		break;
 1233|  1.90k|	default:
  ------------------
  |  Branch (1233:2): [True: 1.90k, False: 2.53k]
  ------------------
 1234|  1.90k|		ret = WGET_E_UNKNOWN;
 1235|  1.90k|		break;
 1236|  4.43k|	}
 1237|       |
 1238|  4.43k|out:
 1239|  4.43k|	if (value0 != valuebuf)
  ------------------
  |  Branch (1239:6): [True: 0, False: 4.43k]
  ------------------
 1240|      0|		xfree(value0);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1241|       |
 1242|  4.43k|	return ret;
 1243|  4.43k|}
wget_http_parse_response_header:
 1248|  1.90k|{
 1249|  1.90k|	char *eol;
 1250|       |
 1251|  1.90k|	wget_http_response *resp = wget_calloc(1, sizeof(wget_http_response));
 1252|  1.90k|	if (!resp)
  ------------------
  |  Branch (1252:6): [True: 0, False: 1.90k]
  ------------------
 1253|      0|		return NULL;
 1254|       |
 1255|  1.90k|	if (sscanf(buf, " HTTP/%3hd.%3hd %3hd %31[^\r\n] ",
  ------------------
  |  Branch (1255:6): [True: 1.90k, False: 0]
  ------------------
 1256|  1.90k|		&resp->major, &resp->minor, &resp->code, resp->reason) >= 3) {
 1257|  1.90k|		if ((eol = strchr(buf + 10, '\n'))) {
  ------------------
  |  Branch (1257:7): [True: 1.90k, False: 0]
  ------------------
 1258|       |			// eol[-1]=0;
 1259|       |			// debug_printf("# %s\n",buf);
 1260|  1.90k|		} else {
 1261|       |			// empty HTTP header
 1262|      0|			return resp;
 1263|      0|		}
 1264|  1.90k|	} else if (sscanf(buf, " ICY %3hd %31[^\r\n] ", &resp->code, resp->reason) >= 1) {
  ------------------
  |  Branch (1264:13): [True: 0, False: 0]
  ------------------
 1265|      0|		if ((eol = strchr(buf + 4, '\n'))) {
  ------------------
  |  Branch (1265:7): [True: 0, False: 0]
  ------------------
 1266|       |			// eol[-1]=0;
 1267|       |			// debug_printf("# %s\n",buf);
 1268|      0|		} else {
 1269|       |			// empty HTTP header
 1270|      0|			return resp;
 1271|      0|		}
 1272|      0|	} else {
 1273|      0|		error_printf(_("HTTP response header not found\n"));
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              		error_printf(_("HTTP response header not found\n"));
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
 1274|      0|		xfree(resp);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1275|      0|		return NULL;
 1276|      0|	}
 1277|       |
 1278|       |	// 'close' is default on HTTP/1.0, else 'keep_alive' is default
 1279|  1.90k|	if ((resp->major == 1 && resp->minor >= 1) || resp->major > 1)
  ------------------
  |  Branch (1279:7): [True: 1.90k, False: 0]
  |  Branch (1279:27): [True: 1.90k, False: 0]
  |  Branch (1279:48): [True: 0, False: 0]
  ------------------
 1280|  1.90k|		resp->keep_alive = 1;
 1281|       |
 1282|  6.34k|	for (char *line = eol + 1; eol && *line && *line != '\r' && *line != '\n'; line = eol ? eol + 1 : NULL) {
  ------------------
  |  Branch (1282:29): [True: 4.43k, False: 1.90k]
  |  Branch (1282:36): [True: 4.43k, False: 0]
  |  Branch (1282:45): [True: 4.43k, False: 0]
  |  Branch (1282:62): [True: 4.43k, False: 0]
  |  Branch (1282:84): [True: 2.53k, False: 1.90k]
  ------------------
 1283|  4.43k|		eol = strchr(line, '\n');
 1284|  4.43k|		while (eol && c_isblank(eol[1])) { // handle split lines
  ------------------
  |  Branch (1284:10): [True: 2.53k, False: 1.90k]
  |  Branch (1284:17): [True: 0, False: 2.53k]
  ------------------
 1285|      0|			*eol = eol[-1] = ' ';
 1286|      0|			eol = strchr(eol, '\n');
 1287|      0|		}
 1288|       |
 1289|  4.43k|		if (eol) {
  ------------------
  |  Branch (1289:7): [True: 2.53k, False: 1.90k]
  ------------------
 1290|  2.53k|			if (eol[-1] == '\r')
  ------------------
  |  Branch (1290:8): [True: 2.53k, False: 0]
  ------------------
 1291|  2.53k|				eol[-1] = 0;
 1292|      0|			else
 1293|      0|				*eol = 0;
 1294|  2.53k|		}
 1295|       |
 1296|  4.43k|		size_t namelen, valuelen;
 1297|  4.43k|		const char *name;
 1298|  4.43k|		const char *value = wget_parse_name_fixed(line, &name, &namelen);
 1299|       |		// value now points directly after :
 1300|       |
 1301|  4.43k|		if (eol)
  ------------------
  |  Branch (1301:7): [True: 2.53k, False: 1.90k]
  ------------------
 1302|  2.53k|			valuelen = eol - value - (eol[-1] == 0);
 1303|  1.90k|		else
 1304|  1.90k|			valuelen = strlen(value);
 1305|       |
 1306|  4.43k|		wget_http_parse_header_line(resp, name, namelen, value, valuelen);
 1307|  4.43k|	}
 1308|       |
 1309|  1.90k|	return resp;
 1310|  1.90k|}
wget_http_free_param:
 1313|  3.80k|{
 1314|  3.80k|	xfree(param->name);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 3.80k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1315|  3.80k|	xfree(param->value);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 3.80k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1316|  3.80k|	xfree(param);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 3.80k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1317|  3.80k|}
wget_http_free_links:
 1327|  1.90k|{
 1328|  1.90k|	wget_vector_free(links);
 1329|  1.90k|}
wget_http_free_digests:
 1339|  1.90k|{
 1340|  1.90k|	wget_vector_free(digests);
 1341|  1.90k|}
wget_http_free_challenges:
 1351|  1.90k|{
 1352|  1.90k|	wget_vector_free(challenges);
 1353|  1.90k|}
wget_http_free_cookies:
 1356|  1.90k|{
 1357|  1.90k|	wget_vector_free(cookies);
 1358|  1.90k|}
wget_http_free_hpkp_entries:
 1361|  1.90k|{
 1362|  1.90k|	if (hpkp) {
  ------------------
  |  Branch (1362:6): [True: 1.90k, False: 0]
  ------------------
 1363|  1.90k|		wget_hpkp_free(*hpkp);
 1364|  1.90k|		*hpkp = NULL;
 1365|  1.90k|	}
 1366|  1.90k|}
wget_http_free_response:
 1369|  3.80k|{
 1370|  3.80k|	if (resp && *resp) {
  ------------------
  |  Branch (1370:6): [True: 3.80k, False: 0]
  |  Branch (1370:14): [True: 1.90k, False: 1.90k]
  ------------------
 1371|  1.90k|		wget_http_free_links(&(*resp)->links);
 1372|  1.90k|		wget_http_free_digests(&(*resp)->digests);
 1373|  1.90k|		wget_http_free_challenges(&(*resp)->challenges);
 1374|  1.90k|		wget_http_free_cookies(&(*resp)->cookies);
 1375|  1.90k|		wget_http_free_hpkp_entries(&(*resp)->hpkp);
 1376|  1.90k|		xfree((*resp)->content_type);
  ------------------
  |  |   53|  1.90k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 1.90k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1377|  1.90k|		xfree((*resp)->content_type_encoding);
  ------------------
  |  |   53|  1.90k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 1.90k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1378|  1.90k|		xfree((*resp)->content_filename);
  ------------------
  |  |   53|  1.90k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 1.90k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1379|  1.90k|		xfree((*resp)->location);
  ------------------
  |  |   53|  1.90k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 1.90k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1380|  1.90k|		xfree((*resp)->etag);
  ------------------
  |  |   53|  1.90k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 1.90k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1381|       |		// xfree((*resp)->reason);
 1382|  1.90k|		wget_buffer_free(&(*resp)->header);
 1383|  1.90k|		wget_buffer_free(&(*resp)->body);
 1384|  1.90k|		xfree(*resp);
  ------------------
  |  |   53|  1.90k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 1.90k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1385|  1.90k|	}
 1386|  3.80k|}
wget_http_free_request:
 1390|  3.80k|{
 1391|  3.80k|	if (req && *req) {
  ------------------
  |  Branch (1391:6): [True: 3.80k, False: 0]
  |  Branch (1391:13): [True: 3.80k, False: 0]
  ------------------
 1392|  3.80k|		wget_buffer_deinit(&(*req)->esc_resource);
 1393|  3.80k|		wget_buffer_deinit(&(*req)->esc_host);
 1394|  3.80k|		wget_vector_free(&(*req)->headers);
 1395|  3.80k|		xfree((*req)->body);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 3.80k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1396|  3.80k|		xfree(*req);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 3.80k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1397|  3.80k|	}
 1398|  3.80k|}
http_parse.c:http_isseparator:
   68|  48.8k|{
   69|  48.8k|	return (http_ctype[(unsigned char)(c)]&HTTP_CTYPE_SEPARATOR) != 0;
  ------------------
  |  |   42|  48.8k|#define HTTP_CTYPE_SEPARATOR (1<<0)
  ------------------
   70|  48.8k|}

wget_ip_is_family:
   51|  5.07k|{
   52|  5.07k|	struct sockaddr_storage dst;
   53|       |
   54|  5.07k|	if (!host)
  ------------------
  |  Branch (54:6): [True: 0, False: 5.07k]
  ------------------
   55|      0|		return false;
   56|       |
   57|  5.07k|	switch (family) {
   58|    634|	case WGET_NET_FAMILY_IPV4:
  ------------------
  |  | 1883|    634|#define WGET_NET_FAMILY_IPV4 1
  ------------------
  |  Branch (58:2): [True: 634, False: 4.43k]
  ------------------
   59|    634|		return inet_pton(AF_INET, host, (struct in_addr *) &dst) == 1;
   60|  4.43k|	case WGET_NET_FAMILY_IPV6:
  ------------------
  |  | 1884|  4.43k|#define WGET_NET_FAMILY_IPV6 2
  ------------------
  |  Branch (60:2): [True: 4.43k, False: 634]
  ------------------
   61|  4.43k|		return inet_pton(AF_INET6, host, (struct in6_addr *) &dst) == 1;
   62|      0|	default:
  ------------------
  |  Branch (62:2): [True: 0, False: 5.07k]
  ------------------
   63|      0|		return false;
   64|  5.07k|	}
   65|  5.07k|}

wget_iri_scheme_get_name:
   92|    861|{
   93|    861|	if ((unsigned) scheme < countof(schemes))
  ------------------
  |  |   56|    861|#define countof(a) (sizeof(a)/sizeof(*(a)))
  ------------------
  |  Branch (93:6): [True: 861, False: 0]
  ------------------
   94|    861|		return schemes[scheme].name;
   95|       |
   96|      0|	return NULL;
   97|    861|}
wget_iri_unescape_inline:
  352|  1.26k|{
  353|  1.26k|	return iri_unescape_inline(src, 0);
  354|  1.26k|}
wget_iri_free_content:
  389|    634|{
  390|    634|	if (iri) {
  ------------------
  |  Branch (390:6): [True: 634, False: 0]
  ------------------
  391|    634|		if (iri->uri_allocated)
  ------------------
  |  Branch (391:7): [True: 0, False: 634]
  ------------------
  392|      0|			xfree(iri->uri);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  393|    634|		if (iri->host_allocated)
  ------------------
  |  Branch (393:7): [True: 0, False: 634]
  ------------------
  394|      0|			xfree(iri->host);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  395|    634|		if (iri->path_allocated)
  ------------------
  |  Branch (395:7): [True: 0, False: 634]
  ------------------
  396|      0|			xfree(iri->path);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  397|    634|		if (iri->query_allocated)
  ------------------
  |  Branch (397:7): [True: 0, False: 634]
  ------------------
  398|      0|			xfree(iri->query);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  399|    634|		if (iri->fragment_allocated)
  ------------------
  |  Branch (399:7): [True: 0, False: 634]
  ------------------
  400|      0|			xfree(iri->fragment);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  401|    634|		xfree(iri->connection_part);
  ------------------
  |  |   53|    634|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 634]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|    634|	}
  403|    634|}
wget_iri_free:
  413|    634|{
  414|    634|	if (iri && *iri) {
  ------------------
  |  Branch (414:6): [True: 634, False: 0]
  |  Branch (414:13): [True: 634, False: 0]
  ------------------
  415|    634|		wget_iri_free_content(*iri);
  416|    634|		xfree(*iri);
  ------------------
  |  |   53|    634|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 634, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  417|    634|	}
  418|    634|}
wget_iri_parse:
  433|    634|{
  434|    634|	wget_iri *iri;
  435|    634|	char *p, *s, *authority, c;
  436|    634|	size_t slen, extra;
  437|    634|	int have_scheme;
  438|       |
  439|    634|	if (!url)
  ------------------
  |  Branch (439:6): [True: 0, False: 634]
  ------------------
  440|      0|		return NULL;
  441|       |
  442|       |	/*
  443|       |		URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
  444|       |		hier-part   = "//" authority path-abempty / path-absolute / path-rootless / path-empty
  445|       |		scheme      =  ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  446|       |	 */
  447|    634|	while (c_isspace(*url)) url++;
  ------------------
  |  Branch (447:9): [True: 0, False: 634]
  ------------------
  448|    634|	if (!*url) return NULL;
  ------------------
  |  Branch (448:6): [True: 0, False: 634]
  ------------------
  449|       |/*
  450|       |	// first unescape, than convert to UTF-8
  451|       |	if (strchr(url, '%')) {
  452|       |		char *unesc_url = wget_strdup(url);
  453|       |
  454|       |		wget_percent_unescape(unesc_url);
  455|       |
  456|       |		if (wget_str_needs_encoding(unesc_url)) {
  457|       |			if ((url = wget_str_to_utf8(unesc_url, encoding)))
  458|       |				xfree(unesc_url);
  459|       |			else
  460|       |				url = unesc_url; // on error, use what we have
  461|       |		} else
  462|       |			url = unesc_url;
  463|       |
  464|       |		url_allocated = 1;
  465|       |	} else {
  466|       |		url_allocated = 0;
  467|       |
  468|       |		if (wget_str_needs_encoding(url)) {
  469|       |			if ((s = wget_str_to_utf8(url, encoding))) {
  470|       |				url = s;
  471|       |				url_allocated = 1;
  472|       |			}
  473|       |		}
  474|       |	}
  475|       |*/
  476|       |
  477|    634|	if (c_isalpha(*url)) {
  ------------------
  |  Branch (477:6): [True: 634, False: 0]
  ------------------
  478|    634|		const char *x;
  479|    634|		have_scheme = 1;
  480|       |
  481|  3.17k|		for (x = url; *x && iri_isscheme(*x); x++)
  ------------------
  |  |  121|  3.17k|#define iri_isscheme(c) (c_isalnum(c) || c == '+' || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  Branch (121:26): [True: 2.53k, False: 634]
  |  |  |  Branch (121:42): [True: 0, False: 634]
  |  |  |  Branch (121:54): [True: 0, False: 634]
  |  |  |  Branch (121:66): [True: 0, False: 634]
  |  |  ------------------
  ------------------
  |  Branch (481:17): [True: 3.17k, False: 0]
  ------------------
  482|  2.53k|			;
  483|       |
  484|    634|		if (*x != ':' || c_isdigit(x[1]))
  ------------------
  |  Branch (484:7): [True: 0, False: 634]
  |  Branch (484:20): [True: 0, False: 634]
  ------------------
  485|      0|			have_scheme = 0; // not a scheme
  486|    634|	} else
  487|      0|		have_scheme = 0;
  488|       |
  489|       |	// just use one block of memory for all parsed URI parts
  490|    634|	slen = strlen(url);
  491|    634|	extra = have_scheme ? 0 : sizeof("http://") - 1; // extra space for http://
  ------------------
  |  Branch (491:10): [True: 634, False: 0]
  ------------------
  492|       |
  493|    634|	iri = wget_malloc(sizeof(wget_iri) + (slen + extra + 1) * 2);
  494|    634|	if (!iri)
  ------------------
  |  Branch (494:6): [True: 0, False: 634]
  ------------------
  495|      0|		return NULL;
  496|       |
  497|    634|	memset(iri, 0, sizeof(wget_iri));
  498|       |
  499|    634|	if (have_scheme) {
  ------------------
  |  Branch (499:6): [True: 634, False: 0]
  ------------------
  500|    634|		iri->msize = slen + 1;
  501|    634|		iri->uri = memcpy(iri + 1, url, iri->msize);
  502|    634|		p = s = memcpy((char *)iri->uri + iri->msize, url, iri->msize);
  503|    634|		s = strchr(s, ':'); // we know there is a :
  504|    634|		*s++ = 0;
  505|       |
  506|       |		// p points to scheme
  507|    634|		wget_iri_unescape_inline(p); // percent unescape
  508|    634|		wget_strtolower(p); // convert to lowercase
  509|       |
  510|    634|		bool found = false; // assume the scheme is unsupported
  511|       |
  512|       |		// find the scheme in our static list of supported schemes
  513|       |		// for later comparisons we compare pointers (avoiding strcasecmp())
  514|    634|		for (unsigned it = 0; it < countof(schemes); it++) {
  ------------------
  |  |   56|    634|#define countof(a) (sizeof(a)/sizeof(*(a)))
  ------------------
  |  Branch (514:25): [True: 634, False: 0]
  ------------------
  515|    634|			if (!strcmp(schemes[it].name, p)) {
  ------------------
  |  Branch (515:8): [True: 634, False: 0]
  ------------------
  516|    634|				iri->scheme = it;
  517|    634|				iri->port = schemes[it].port;
  518|    634|				found = true;
  519|    634|				break;
  520|    634|			}
  521|    634|		}
  522|       |
  523|    634|		if (!found) {
  ------------------
  |  Branch (523:7): [True: 0, False: 634]
  ------------------
  524|      0|			debug_printf("Unsupported scheme in '%s'\n", url);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  525|      0|			wget_iri_free(&iri);
  526|      0|			return NULL;
  527|      0|		}
  528|    634|	} else {
  529|       |		// add http:// scheme to url
  530|      0|		iri->uri = memcpy(iri + 1, "http://", extra);
  531|      0|		memcpy((char *)iri->uri + extra, url, slen + 1);
  532|      0|		iri->msize = extra + slen + 1;
  533|      0|		s = memcpy((char *)iri->uri + iri->msize, iri->uri, iri->msize);
  534|      0|		s[extra - 3] = 0;
  535|      0|		s += extra;
  536|       |
  537|      0|		iri->scheme = WGET_IRI_SCHEME_HTTP;
  538|      0|		iri->port = schemes[WGET_IRI_SCHEME_HTTP].port;
  539|      0|	}
  540|       |
  541|       |//	if (url_allocated)
  542|       |//		xfree(url);
  543|       |
  544|       |	// this is true for http, https, ftp, file (accept any number of /, like most browsers)
  545|  1.90k|	while (*s == '/')
  ------------------
  |  Branch (545:9): [True: 1.26k, False: 634]
  ------------------
  546|  1.26k|		s++;
  547|       |
  548|       |	// authority
  549|    634|	authority = s;
  550|  7.60k|	while (*s && *s != '/' && *s != '?' && *s != '#')
  ------------------
  |  Branch (550:9): [True: 6.97k, False: 634]
  |  Branch (550:15): [True: 6.97k, False: 0]
  |  Branch (550:28): [True: 6.97k, False: 0]
  |  Branch (550:41): [True: 6.97k, False: 0]
  ------------------
  551|  6.97k|		s++;
  552|    634|	c = *s;
  553|    634|	if (c) *s++ = 0;
  ------------------
  |  Branch (553:6): [True: 0, False: 634]
  ------------------
  554|    634|	wget_iri_unescape_inline(authority);
  555|       |
  556|       |	// left over: [path][?query][#fragment]
  557|    634|	if (c == '/') {
  ------------------
  |  Branch (557:6): [True: 0, False: 634]
  ------------------
  558|      0|		iri->path = s;
  559|      0|		while (*s && *s != '?' && *s != '#')
  ------------------
  |  Branch (559:10): [True: 0, False: 0]
  |  Branch (559:16): [True: 0, False: 0]
  |  Branch (559:29): [True: 0, False: 0]
  ------------------
  560|      0|			s++;
  561|      0|		c = *s;
  562|      0|		if (c) *s++ = 0;
  ------------------
  |  Branch (562:7): [True: 0, False: 0]
  ------------------
  563|      0|		wget_iri_unescape_inline((char *)iri->path);
  564|      0|	}
  565|       |
  566|    634|	if (c == '?') {
  ------------------
  |  Branch (566:6): [True: 0, False: 634]
  ------------------
  567|      0|		iri->query = s;
  568|      0|		while (*s && *s != '#') {
  ------------------
  |  Branch (568:10): [True: 0, False: 0]
  |  Branch (568:16): [True: 0, False: 0]
  ------------------
  569|      0|			if (*s == '+')
  ------------------
  |  Branch (569:8): [True: 0, False: 0]
  ------------------
  570|      0|				*s = ' ';
  571|      0|			s++;
  572|      0|		}
  573|      0|		c = *s;
  574|      0|		if (c) *s++ = 0;
  ------------------
  |  Branch (574:7): [True: 0, False: 0]
  ------------------
  575|       |		/* do not unescape query else we get ambiguity for chars like &, =, +, ... */
  576|      0|	}
  577|       |
  578|    634|	if (c == '#') {
  ------------------
  |  Branch (578:6): [True: 0, False: 634]
  ------------------
  579|      0|		iri->fragment = s;
  580|      0|		s += strlen(s);
  581|      0|		wget_iri_unescape_inline((char *)iri->fragment);
  582|      0|	}
  583|       |
  584|    634|	if (*s) {
  ------------------
  |  Branch (584:6): [True: 0, False: 634]
  ------------------
  585|      0|		debug_printf("unparsed rest '%s'\n", s);
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  586|      0|	}
  587|       |
  588|    634|	if (*authority) {
  ------------------
  |  Branch (588:6): [True: 634, False: 0]
  ------------------
  589|    634|		s = authority;
  590|    634|		p = strchr(authority, '@');
  591|    634|		if (p) {
  ------------------
  |  Branch (591:7): [True: 0, False: 634]
  ------------------
  592|      0|			iri->userinfo = s;
  593|      0|			*p = 0;
  594|      0|			if ((s = strchr(s, ':'))) {
  ------------------
  |  Branch (594:8): [True: 0, False: 0]
  ------------------
  595|      0|				*s = 0;
  596|      0|				iri->password = s + 1;
  597|      0|			}
  598|      0|			s = p + 1;
  599|      0|		}
  600|    634|		if (*s == '[') {
  ------------------
  |  Branch (600:7): [True: 0, False: 634]
  ------------------
  601|      0|			p = strrchr(s, ']');
  602|      0|			if (p) {
  ------------------
  |  Branch (602:8): [True: 0, False: 0]
  ------------------
  603|      0|				iri->host = s + 1;
  604|      0|				*p = 0;
  605|      0|				s = p + 1;
  606|      0|			} else {
  607|       |				// something is broken
  608|      0|				iri->host = s + 1;
  609|      0|				s += strlen(s);
  610|      0|			}
  611|    634|		} else {
  612|    634|			iri->host = s;
  613|  7.60k|			while (*s && *s != ':')
  ------------------
  |  Branch (613:11): [True: 6.97k, False: 634]
  |  Branch (613:17): [True: 6.97k, False: 0]
  ------------------
  614|  6.97k|				s++;
  615|    634|		}
  616|    634|		if (*s == ':') {
  ------------------
  |  Branch (616:7): [True: 0, False: 634]
  ------------------
  617|      0|			if (c_isdigit(s[1])) {
  ------------------
  |  Branch (617:8): [True: 0, False: 0]
  ------------------
  618|      0|				int port = atoi(s + 1);
  619|      0|				if (port > 0 && port < 65536) {
  ------------------
  |  Branch (619:9): [True: 0, False: 0]
  |  Branch (619:21): [True: 0, False: 0]
  ------------------
  620|      0|					iri->port = (uint16_t) port;
  621|      0|					iri->port_given = true;
  622|      0|				}
  623|      0|			}
  624|      0|		}
  625|    634|		*s = 0;
  626|    634|	}
  627|       |
  628|       |	// now unescape all components (not interested in display, userinfo, password right now)
  629|       |
  630|    634|	if (iri->host) {
  ------------------
  |  Branch (630:6): [True: 634, False: 0]
  ------------------
  631|    634|		wget_strtolower((char *)iri->host);
  632|    634|		if (wget_str_needs_encoding(iri->host)) {
  ------------------
  |  Branch (632:7): [True: 0, False: 634]
  ------------------
  633|      0|			if ((s = wget_str_to_utf8(iri->host, encoding))) {
  ------------------
  |  Branch (633:8): [True: 0, False: 0]
  ------------------
  634|      0|				iri->host = s;
  635|      0|				iri->host_allocated = true;
  636|      0|			}
  637|      0|		}
  638|    634|		if ((p = (char *)wget_str_to_ascii(iri->host)) != iri->host) {
  ------------------
  |  Branch (638:7): [True: 0, False: 634]
  ------------------
  639|      0|			if (iri->host_allocated)
  ------------------
  |  Branch (639:8): [True: 0, False: 0]
  ------------------
  640|      0|				xfree(iri->host);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  641|      0|			iri->host = p;
  642|      0|			iri->host_allocated = true;
  643|      0|		}
  644|       |
  645|       |		// Finally, if the host is a literal IPv4 or IPv6 address, mark it as so
  646|    634|		if (wget_ip_is_family(iri->host, WGET_NET_FAMILY_IPV4) || wget_ip_is_family(iri->host, WGET_NET_FAMILY_IPV6))
  ------------------
  |  | 1883|    634|#define WGET_NET_FAMILY_IPV4 1
  ------------------
              		if (wget_ip_is_family(iri->host, WGET_NET_FAMILY_IPV4) || wget_ip_is_family(iri->host, WGET_NET_FAMILY_IPV6))
  ------------------
  |  | 1884|    634|#define WGET_NET_FAMILY_IPV6 2
  ------------------
  |  Branch (646:7): [True: 0, False: 634]
  |  Branch (646:61): [True: 0, False: 634]
  ------------------
  647|      0|			iri->is_ip_address = true;
  648|    634|	}
  649|       |
  650|    634|	if (!iri->host) {
  ------------------
  |  Branch (650:6): [True: 0, False: 634]
  ------------------
  651|      0|		error_printf(_("Missing host/domain in URI '%s'\n"), iri->uri);
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              		error_printf(_("Missing host/domain in URI '%s'\n"), iri->uri);
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  652|      0|		wget_iri_free(&iri);
  653|      0|		return NULL;
  654|      0|	}
  655|       |
  656|    634|	if (iri->path && wget_str_needs_encoding(iri->path)) {
  ------------------
  |  Branch (656:6): [True: 0, False: 634]
  |  Branch (656:19): [True: 0, False: 0]
  ------------------
  657|      0|		if ((s = wget_str_to_utf8(iri->path, encoding))) {
  ------------------
  |  Branch (657:7): [True: 0, False: 0]
  ------------------
  658|      0|			iri->path = s;
  659|      0|			iri->path_allocated = true;
  660|      0|		}
  661|      0|	}
  662|       |
  663|    634|	if (iri->query && wget_str_needs_encoding(iri->query)) {
  ------------------
  |  Branch (663:6): [True: 0, False: 634]
  |  Branch (663:20): [True: 0, False: 0]
  ------------------
  664|      0|		if ((s = wget_str_to_utf8(iri->query, encoding))) {
  ------------------
  |  Branch (664:7): [True: 0, False: 0]
  ------------------
  665|      0|			iri->query = s;
  666|      0|			iri->query_allocated = true;
  667|      0|		}
  668|      0|	}
  669|       |
  670|    634|	if (iri->fragment && wget_str_needs_encoding(iri->fragment)) {
  ------------------
  |  Branch (670:6): [True: 0, False: 634]
  |  Branch (670:23): [True: 0, False: 0]
  ------------------
  671|      0|		if ((s = wget_str_to_utf8(iri->fragment, encoding))) {
  ------------------
  |  Branch (671:7): [True: 0, False: 0]
  ------------------
  672|      0|			iri->fragment = s;
  673|      0|			iri->fragment_allocated = true;
  674|      0|		}
  675|      0|	}
  676|       |
  677|       |/*
  678|       |	debug_printf("scheme=%s\n",iri->scheme);
  679|       |	debug_printf("host=%s\n",iri->host);
  680|       |	debug_printf("path=%s\n",iri->path);
  681|       |	debug_printf("query=%s\n",iri->query);
  682|       |	debug_printf("fragment=%s\n",iri->fragment);
  683|       |*/
  684|       |
  685|    634|	return iri;
  686|    634|}
wget_iri_escape:
 1063|  3.80k|{
 1064|  3.80k|	const char *begin;
 1065|       |
 1066|  3.80k|	if (!src)
  ------------------
  |  Branch (1066:6): [True: 0, False: 3.80k]
  ------------------
 1067|      0|		return buf->data;
 1068|       |
 1069|  45.6k|	for (begin = src; *src; src++) {
  ------------------
  |  Branch (1069:20): [True: 41.8k, False: 3.80k]
  ------------------
 1070|  41.8k|		if (!iri_isunreserved(*src)) {
  ------------------
  |  |  119|  41.8k|#define iri_isunreserved(c) (iri_ctype[(unsigned char)(c)] & IRI_CTYPE_UNRESERVED)
  |  |  ------------------
  |  |  |  |  118|  41.8k|#define IRI_CTYPE_UNRESERVED (1<<2)
  |  |  ------------------
  ------------------
  |  Branch (1070:7): [True: 0, False: 41.8k]
  ------------------
 1071|      0|			if (begin != src)
  ------------------
  |  Branch (1071:8): [True: 0, False: 0]
  ------------------
 1072|      0|				wget_buffer_memcat(buf, begin, src - begin);
 1073|      0|			begin = src + 1;
 1074|      0|			wget_buffer_printf_append(buf, "%%%02X", (unsigned char)*src);
 1075|      0|		}
 1076|  41.8k|	}
 1077|       |
 1078|  3.80k|	if (begin != src)
  ------------------
  |  Branch (1078:6): [True: 3.80k, False: 0]
  ------------------
 1079|  3.80k|		wget_buffer_memcat(buf, begin, src - begin);
 1080|       |
 1081|  3.80k|	return buf->data;
 1082|  3.80k|}
wget_iri_get_escaped_host:
 1158|  3.80k|{
 1159|  3.80k|	return wget_iri_escape(iri->host, buf);
 1160|  3.80k|}
wget_iri_get_escaped_resource:
 1183|  3.80k|{
 1184|  3.80k|	if (iri->path)
  ------------------
  |  Branch (1184:6): [True: 0, False: 3.80k]
  ------------------
 1185|      0|		wget_iri_escape_path(iri->path, buf);
 1186|       |
 1187|       |	// Do not actually escape the query field. This part of the URL *MAY*
 1188|       |	// contain reserved characters which should be passed on as-is and without
 1189|       |	// escaping them. This is according to the rules laid out in RFC 2616 and
 1190|       |	// RFC 7230. But we have to replace spaces in any case.
 1191|  3.80k|	if (iri->query) {
  ------------------
  |  Branch (1191:6): [True: 0, False: 3.80k]
  ------------------
 1192|      0|		wget_buffer_memcat(buf, "?", 1);
 1193|      0|		for (const char *p = iri->query; *p; p++)
  ------------------
  |  Branch (1193:36): [True: 0, False: 0]
  ------------------
 1194|      0|			wget_buffer_memcat(buf, *p == ' ' ? "+" : p, 1);
  ------------------
  |  Branch (1194:28): [True: 0, False: 0]
  ------------------
 1195|      0|	}
 1196|       |
 1197|  3.80k|	return buf->data;
 1198|  3.80k|}
iri.c:iri_unescape_inline:
  278|  1.26k|{
  279|  1.26k|	char *ret = NULL;
  280|  1.26k|	unsigned char *s = (unsigned char *)src; // just a helper to avoid casting a lot
  281|  1.26k|	unsigned char *d = s;
  282|       |
  283|  10.7k|	while (*s) {
  ------------------
  |  Branch (283:9): [True: 9.51k, False: 1.26k]
  ------------------
  284|  9.51k|		if (*s == '%') {
  ------------------
  |  Branch (284:7): [True: 0, False: 9.51k]
  ------------------
  285|      0|			if (c_isxdigit(s[1]) && c_isxdigit(s[2])) {
  ------------------
  |  Branch (285:8): [True: 0, False: 0]
  |  Branch (285:28): [True: 0, False: 0]
  ------------------
  286|      0|				unsigned char c = (unsigned char) (unhex(s[1]) << 4) | unhex(s[2]);
  287|      0|				if (!ctype || (!(iri_ctype[(unsigned char)(c)] & ctype) && c != '%')) {
  ------------------
  |  Branch (287:9): [True: 0, False: 0]
  |  Branch (287:20): [True: 0, False: 0]
  |  Branch (287:64): [True: 0, False: 0]
  ------------------
  288|      0|					*d++ = c;
  289|      0|					s += 3;
  290|      0|					ret = src;
  291|      0|					continue;
  292|      0|				}
  293|      0|			}
  294|  9.51k|		} else if (*s == '#') {
  ------------------
  |  Branch (294:14): [True: 0, False: 9.51k]
  ------------------
  295|      0|			uint32_t value = 0;
  296|       |
  297|      0|			if (s[1] == 'x') {
  ------------------
  |  Branch (297:8): [True: 0, False: 0]
  ------------------
  298|      0|				unsigned char *p = s + 2;
  299|      0|				while (c_isxdigit(*p)) {
  ------------------
  |  Branch (299:12): [True: 0, False: 0]
  ------------------
  300|      0|					value = ((value & 0x0FFFFFFF) << 4) | unhex(*p);
  301|      0|					p++;
  302|      0|				}
  303|      0|				if (*p == ';') {
  ------------------
  |  Branch (303:9): [True: 0, False: 0]
  ------------------
  304|      0|					if (value > 0 && value < 128) {
  ------------------
  |  Branch (304:10): [True: 0, False: 0]
  |  Branch (304:23): [True: 0, False: 0]
  ------------------
  305|      0|						*d++ = (unsigned char) value;
  306|      0|						s = p + 1;
  307|      0|						continue;
  308|      0|					}
  309|       |					// else: we have to convert the unicode value to whatever encoding the URL is in (likely UTF-8)
  310|       |					// this cannot be done inline since the URL's length may increase
  311|      0|				}
  312|      0|			} else {
  313|      0|				unsigned char *p = s + 1;
  314|      0|				while (c_isdigit(*p) && value <= 0x10FFFF) { // max. Unicode value
  ------------------
  |  Branch (314:12): [True: 0, False: 0]
  |  Branch (314:29): [True: 0, False: 0]
  ------------------
  315|      0|					value = value * 10 + (*p - '0');
  316|      0|					p++;
  317|      0|				}
  318|      0|				if (*p == ';') {
  ------------------
  |  Branch (318:9): [True: 0, False: 0]
  ------------------
  319|      0|					if (value > 0 && value < 128) {
  ------------------
  |  Branch (319:10): [True: 0, False: 0]
  |  Branch (319:23): [True: 0, False: 0]
  ------------------
  320|      0|						*d++ = (unsigned char) value;
  321|      0|						s = p + 1;
  322|      0|						continue;
  323|      0|					}
  324|       |					// else: we have to convert the unicode value to whatever encoding the URL is in (likely UTF-8)
  325|       |					// this cannot be done inline since the URL's length may increase
  326|      0|				}
  327|      0|			}
  328|  9.51k|		} else if (*s == '\r' || *s == '\n') {
  ------------------
  |  Branch (328:14): [True: 0, False: 9.51k]
  |  Branch (328:28): [True: 0, False: 9.51k]
  ------------------
  329|       |			// Ignore / remove CR and LF from URLs. See https://gitlab.com/gnuwget/wget2/-/issues/522
  330|      0|			s++;
  331|      0|			continue;
  332|      0|		}
  333|       |
  334|  9.51k|		*d++ = *s++;
  335|  9.51k|	}
  336|  1.26k|	*d = 0;
  337|       |
  338|  1.26k|	return ret;
  339|  1.26k|}

wget_error_printf:
   70|    861|{
   71|    861|	if (error_logger.vprintf) {
  ------------------
  |  Branch (71:6): [True: 0, False: 861]
  ------------------
   72|      0|		va_list args;
   73|       |
   74|      0|		va_start(args, fmt);
   75|      0|		error_logger.vprintf(&error_logger, fmt, args);
   76|      0|		va_end(args);
   77|      0|	}
   78|    861|}
wget_debug_printf:
  100|  19.3k|{
  101|  19.3k|	if (debug_logger.vprintf) {
  ------------------
  |  Branch (101:6): [True: 0, False: 19.3k]
  ------------------
  102|      0|		va_list args;
  103|       |
  104|      0|		va_start(args, fmt);
  105|      0|		debug_logger.vprintf(&debug_logger, fmt, args);
  106|      0|		va_end(args);
  107|      0|	}
  108|  19.3k|}
wget_get_logger:
  117|  7.60k|{
  118|  7.60k|	if (id == WGET_LOGGER_DEBUG)
  ------------------
  |  |  647|  7.60k|#define WGET_LOGGER_DEBUG  3
  ------------------
  |  Branch (118:6): [True: 7.60k, False: 0]
  ------------------
  119|  7.60k|		return &debug_logger;
  120|      0|	else if (id == WGET_LOGGER_ERROR)
  ------------------
  |  |  646|      0|#define WGET_LOGGER_ERROR  2
  ------------------
  |  Branch (120:11): [True: 0, False: 0]
  ------------------
  121|      0|		return &error_logger;
  122|      0|	else if (id == WGET_LOGGER_INFO)
  ------------------
  |  |  645|      0|#define WGET_LOGGER_INFO   1
  ------------------
  |  Branch (122:11): [True: 0, False: 0]
  ------------------
  123|      0|		return &info_logger;
  124|      0|	else
  125|      0|		return NULL;
  126|  7.60k|}

wget_logger_is_active:
  151|  7.60k|{
  152|  7.60k|	return logger->vprintf != 0;
  153|  7.60k|}

wget_memdup:
   55|  22.8k|{
   56|  22.8k|	if (!m) return NULL;
  ------------------
  |  Branch (56:6): [True: 0, False: 22.8k]
  ------------------
   57|       |
   58|  22.8k|	void *d = wget_malloc(n);
   59|  22.8k|	if (!d)
  ------------------
  |  Branch (59:6): [True: 0, False: 22.8k]
  ------------------
   60|      0|		return NULL;
   61|       |
   62|  22.8k|	return memcpy(d, m, n);
   63|  22.8k|}
wget_strdup:
   75|  19.0k|{
   76|  19.0k|	return s ? wget_memdup(s, strlen(s) + 1) : NULL;
  ------------------
  |  Branch (76:9): [True: 15.2k, False: 3.80k]
  ------------------
   77|  19.0k|}
wget_strmemcpy_a:
  147|  4.43k|{
  148|  4.43k|	if (n >= ssize) {
  ------------------
  |  Branch (148:6): [True: 0, False: 4.43k]
  ------------------
  149|      0|		if (!(s = wget_malloc(n + 1)))
  ------------------
  |  Branch (149:7): [True: 0, False: 0]
  ------------------
  150|      0|			return NULL;
  151|      0|	}
  152|       |
  153|  4.43k|	memmove(s, m, n);
  154|  4.43k|	s[n] = 0;
  155|  4.43k|	return s;
  156|  4.43k|}

wget_tcp_set_connect_timeout:
  381|    634|{
  382|    634|	(tcp ? tcp : &global_tcp)->connect_timeout = timeout;
  ------------------
  |  Branch (382:3): [True: 0, False: 634]
  ------------------
  383|    634|}
wget_tcp_set_timeout:
  397|    634|{
  398|    634|	(tcp ? tcp : &global_tcp)->timeout = timeout;
  ------------------
  |  Branch (398:3): [True: 0, False: 634]
  ------------------
  399|    634|}
wget_tcp_init:
  557|  3.80k|{
  558|  3.80k|	wget_tcp *tcp = wget_malloc(sizeof(wget_tcp));
  559|       |
  560|  3.80k|	if (tcp) {
  ------------------
  |  Branch (560:6): [True: 3.80k, False: 0]
  ------------------
  561|  3.80k|		*tcp = global_tcp;
  562|  3.80k|		tcp->ssl_hostname = wget_strdup(global_tcp.ssl_hostname);
  563|  3.80k|	}
  564|       |
  565|  3.80k|	return tcp;
  566|  3.80k|}
wget_tcp_deinit:
  581|  3.80k|{
  582|  3.80k|	wget_tcp *tcp;
  583|       |
  584|  3.80k|	if (!_tcp) {
  ------------------
  |  Branch (584:6): [True: 0, False: 3.80k]
  ------------------
  585|      0|		xfree(global_tcp.ssl_hostname);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  586|      0|		return;
  587|      0|	}
  588|       |
  589|  3.80k|	if ((tcp = *_tcp)) {
  ------------------
  |  Branch (589:6): [True: 3.80k, False: 0]
  ------------------
  590|  3.80k|		wget_tcp_close(tcp);
  591|       |
  592|  3.80k|		wget_dns_freeaddrinfo(tcp->dns, &tcp->bind_addrinfo);
  593|       |
  594|  3.80k|		xfree(tcp->ssl_hostname);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 3.80k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  595|  3.80k|		xfree(tcp->ip);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 3.80k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  596|  3.80k|		xfree(tcp);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 3.80k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  597|       |
  598|  3.80k|		*_tcp = NULL;
  599|  3.80k|	}
  600|  3.80k|}
wget_tcp_connect:
  742|  3.80k|{
  743|  3.80k|	struct addrinfo *ai;
  744|  3.80k|	int rc, ret = WGET_E_UNKNOWN;
  745|  3.80k|	char adr[NI_MAXHOST], s_port[NI_MAXSERV];
  746|  3.80k|	bool debug = wget_logger_is_active(wget_get_logger(WGET_LOGGER_DEBUG));
  ------------------
  |  |  647|  3.80k|#define WGET_LOGGER_DEBUG  3
  ------------------
  747|       |
  748|  3.80k|	if (unlikely(!tcp))
  ------------------
  |  |  116|  3.80k|#	define unlikely(expr) __builtin_expect(!!(expr), 0)
  |  |  ------------------
  |  |  |  Branch (116:25): [True: 0, False: 3.80k]
  |  |  ------------------
  ------------------
  749|      0|		return WGET_E_INVALID;
  750|       |
  751|  3.80k|	wget_dns_freeaddrinfo(tcp->dns, &tcp->addrinfo);
  752|  3.80k|	xfree(tcp->host);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 3.80k]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  753|       |
  754|  3.80k|	tcp->addrinfo = wget_dns_resolve(tcp->dns, host, port, tcp->family, tcp->preferred_family);
  755|  3.80k|	tcp->remote_port = port;
  756|       |
  757|  3.80k|	for (ai = tcp->addrinfo; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (757:27): [True: 3.80k, False: 0]
  ------------------
  758|       |		// Skip non-TCP sockets
  759|  3.80k|		if (ai->ai_socktype != SOCK_STREAM)
  ------------------
  |  Branch (759:7): [True: 0, False: 3.80k]
  ------------------
  760|      0|			continue;
  761|       |
  762|  3.80k|		if (debug)
  ------------------
  |  Branch (762:7): [True: 0, False: 3.80k]
  ------------------
  763|      0|			debug_addr("trying", ai->ai_addr, ai->ai_addrlen);
  764|       |
  765|  3.80k|		int sockfd;
  766|  3.80k|		if ((sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) != -1) {
  ------------------
  |  Branch (766:7): [True: 3.80k, False: 0]
  ------------------
  767|  3.80k|			_set_async(sockfd);
  768|  3.80k|			set_socket_options(tcp, sockfd);
  769|       |
  770|  3.80k|			if (tcp->bind_addrinfo) {
  ------------------
  |  Branch (770:8): [True: 0, False: 3.80k]
  ------------------
  771|      0|				if (debug)
  ------------------
  |  Branch (771:9): [True: 0, False: 0]
  ------------------
  772|      0|					debug_addr("binding to",
  773|      0|						   tcp->bind_addrinfo->ai_addr, tcp->bind_addrinfo->ai_addrlen);
  774|       |
  775|      0|				if (bind(sockfd, tcp->bind_addrinfo->ai_addr, tcp->bind_addrinfo->ai_addrlen) != 0) {
  ------------------
  |  Branch (775:9): [True: 0, False: 0]
  ------------------
  776|      0|					print_error_host(_("Failed to bind"), host);
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  777|      0|					close(sockfd);
  778|       |
  779|      0|					return WGET_E_UNKNOWN;
  780|      0|				}
  781|      0|			}
  782|       |
  783|  3.80k|			rc = tcp_connect(tcp, ai, sockfd);
  784|  3.80k|			if (rc < 0
  ------------------
  |  Branch (784:8): [True: 0, False: 3.80k]
  ------------------
  785|  3.80k|				&& errno != EAGAIN
  ------------------
  |  Branch (785:8): [True: 0, False: 0]
  ------------------
  786|  3.80k|				&& errno != EINPROGRESS
  ------------------
  |  Branch (786:8): [True: 0, False: 0]
  ------------------
  787|  3.80k|			) {
  788|      0|				print_error_host(_("Failed to connect"), host);
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  789|      0|				ret = WGET_E_CONNECT;
  790|      0|				close(sockfd);
  791|  3.80k|			} else {
  792|  3.80k|				tcp->sockfd = sockfd;
  793|  3.80k|				if (tcp->ssl) {
  ------------------
  |  Branch (793:9): [True: 0, False: 3.80k]
  ------------------
  794|      0|					if ((ret = wget_ssl_open(tcp))) {
  ------------------
  |  Branch (794:10): [True: 0, False: 0]
  ------------------
  795|      0|						if (ret == WGET_E_CERTIFICATE) {
  ------------------
  |  Branch (795:11): [True: 0, False: 0]
  ------------------
  796|      0|							wget_tcp_close(tcp);
  797|      0|							break; /* stop here - the server cert couldn't be validated */
  798|      0|						}
  799|       |
  800|       |						/* do not free tcp->addrinfo when calling wget_tcp_close() */
  801|      0|						struct addrinfo *ai_tmp = tcp->addrinfo;
  802|       |
  803|      0|						tcp->addrinfo = NULL;
  804|      0|						wget_tcp_close(tcp);
  805|      0|						tcp->addrinfo = ai_tmp;
  806|       |
  807|      0|						continue;
  808|      0|					}
  809|      0|				}
  810|       |
  811|  3.80k|				if (getnameinfo(ai->ai_addr, ai->ai_addrlen,
  ------------------
  |  Branch (811:9): [True: 0, False: 3.80k]
  ------------------
  812|  3.80k|						adr, sizeof(adr), s_port, sizeof(s_port), NI_NUMERICHOST | NI_NUMERICSERV) == 0)
  813|      0|					tcp->ip = wget_strdup(adr);
  814|  3.80k|				else
  815|  3.80k|					tcp->ip = NULL;
  816|       |
  817|  3.80k|				tcp->host = wget_strdup(host);
  818|       |
  819|  3.80k|				return WGET_E_SUCCESS;
  820|  3.80k|			}
  821|  3.80k|		} else
  822|      0|			print_error_host(_("Failed to create socket"), host);
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  823|  3.80k|	}
  824|       |
  825|      0|	return ret;
  826|  3.80k|}
wget_tcp_tls_stop:
  851|  3.80k|{
  852|  3.80k|	if (tcp)
  ------------------
  |  Branch (852:6): [True: 3.80k, False: 0]
  ------------------
  853|  3.80k|		wget_ssl_close(&tcp->ssl_session);
  854|  3.80k|}
wget_tcp_read:
  883|   167k|{
  884|   167k|	ssize_t rc;
  885|       |
  886|   167k|	if (unlikely(!tcp || !buf))
  ------------------
  |  |  116|   334k|#	define unlikely(expr) __builtin_expect(!!(expr), 0)
  |  |  ------------------
  |  |  |  Branch (116:25): [True: 0, False: 167k]
  |  |  |  Branch (116:45): [True: 0, False: 167k]
  |  |  |  Branch (116:45): [True: 0, False: 167k]
  |  |  ------------------
  ------------------
  887|      0|		return 0;
  888|       |
  889|   167k|	if (tcp->ssl_session) {
  ------------------
  |  Branch (889:6): [True: 0, False: 167k]
  ------------------
  890|      0|		rc = wget_ssl_read_timeout(tcp->ssl_session, buf, count, tcp->timeout);
  891|   167k|	} else {
  892|   167k|		if (tcp->timeout) {
  ------------------
  |  Branch (892:7): [True: 0, False: 167k]
  ------------------
  893|      0|			if ((rc = wget_ready_2_read(tcp->sockfd, tcp->timeout)) <= 0)
  ------------------
  |  Branch (893:8): [True: 0, False: 0]
  ------------------
  894|      0|				return rc;
  895|      0|		}
  896|       |
  897|   167k|		rc = recvfrom(tcp->sockfd, buf, count, 0, NULL, NULL);
  898|   167k|	}
  899|       |
  900|   167k|	if (rc < 0)
  ------------------
  |  Branch (900:6): [True: 0, False: 167k]
  ------------------
  901|      0|		error_printf(_("Failed to read %zu bytes (hostname='%s', ip=%s, errno=%d)\n"),
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              		error_printf(_("Failed to read %zu bytes (hostname='%s', ip=%s, errno=%d)\n"),
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  902|      0|			count, tcp->host, tcp->ip, errno);
  903|       |
  904|   167k|	return rc;
  905|   167k|}
wget_tcp_write:
  934|  3.80k|{
  935|  3.80k|	ssize_t nwritten = 0;
  936|       |
  937|  3.80k|	if (unlikely(!tcp || !buf))
  ------------------
  |  |  116|  7.60k|#	define unlikely(expr) __builtin_expect(!!(expr), 0)
  |  |  ------------------
  |  |  |  Branch (116:25): [True: 0, False: 3.80k]
  |  |  |  Branch (116:45): [True: 0, False: 3.80k]
  |  |  |  Branch (116:45): [True: 0, False: 3.80k]
  |  |  ------------------
  ------------------
  938|      0|		return -1;
  939|       |
  940|  3.80k|	if (tcp->ssl_session)
  ------------------
  |  Branch (940:6): [True: 0, False: 3.80k]
  ------------------
  941|      0|		return wget_ssl_write_timeout(tcp->ssl_session, buf, count, tcp->timeout);
  942|       |
  943|  3.80k|	while (count) {
  ------------------
  |  Branch (943:9): [True: 3.80k, False: 0]
  ------------------
  944|  3.80k|		ssize_t n;
  945|       |
  946|       |#ifdef TCP_FASTOPEN_LINUX
  947|       |		if (tcp->tcp_fastopen && tcp->first_send) {
  948|       |			n = sendto(tcp->sockfd, buf, count, MSG_FASTOPEN,
  949|       |				tcp->connect_addrinfo->ai_addr, tcp->connect_addrinfo->ai_addrlen);
  950|       |			tcp->first_send = 0;
  951|       |
  952|       |			if (n < 0 && errno == EOPNOTSUPP) {
  953|       |				/* fallback from fastopen, e.g. when fastopen is disabled in system */
  954|       |				tcp->tcp_fastopen = 0;
  955|       |
  956|       |				int rc = connect(tcp->sockfd, tcp->connect_addrinfo->ai_addr, tcp->connect_addrinfo->ai_addrlen);
  957|       |				if (rc < 0
  958|       |					&& errno != EAGAIN
  959|       |					&& errno != ENOTCONN
  960|       |					&& errno != EINPROGRESS)
  961|       |				{
  962|       |					print_error(tcp, _("Failed to connect"));
  963|       |					return -1;
  964|       |				}
  965|       |				errno = EAGAIN;
  966|       |			}
  967|       |		} else
  968|       |#endif
  969|  3.80k|			n = send(tcp->sockfd, buf, count, 0);
  970|       |
  971|  3.80k|		if (n >= 0) {
  ------------------
  |  Branch (971:7): [True: 3.80k, False: 0]
  ------------------
  972|  3.80k|			nwritten += n;
  973|       |
  974|  3.80k|			if ((size_t)n >= count)
  ------------------
  |  Branch (974:8): [True: 3.80k, False: 0]
  ------------------
  975|  3.80k|				return nwritten;
  976|       |
  977|      0|			count -= n;
  978|      0|			buf += n;
  979|      0|		} else {
  980|      0|			if (errno != EAGAIN
  ------------------
  |  Branch (980:8): [True: 0, False: 0]
  ------------------
  981|      0|				&& errno != ENOTCONN
  ------------------
  |  Branch (981:8): [True: 0, False: 0]
  ------------------
  982|      0|				&& errno != EINPROGRESS)
  ------------------
  |  Branch (982:8): [True: 0, False: 0]
  ------------------
  983|      0|			{
  984|      0|				error_printf(_("Failed to send %zu bytes (hostname='%s', ip=%s, errno=%d)\n"),
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              				error_printf(_("Failed to send %zu bytes (hostname='%s', ip=%s, errno=%d)\n"),
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  985|      0|					count, tcp->host, tcp->ip, errno);
  986|      0|				return -1;
  987|      0|			}
  988|       |
  989|      0|			if (tcp->timeout) {
  ------------------
  |  Branch (989:8): [True: 0, False: 0]
  ------------------
  990|      0|				int rc = wget_ready_2_write(tcp->sockfd, tcp->timeout);
  991|      0|				if (rc <= 0)
  ------------------
  |  Branch (991:9): [True: 0, False: 0]
  ------------------
  992|      0|					return rc;
  993|      0|			}
  994|      0|		}
  995|  3.80k|	}
  996|       |
  997|      0|	return 0;
  998|  3.80k|}
wget_tcp_close:
 1056|  3.80k|{
 1057|  3.80k|	if (likely(tcp)) {
  ------------------
  |  |  117|  3.80k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 3.80k, False: 0]
  |  |  ------------------
  ------------------
 1058|  3.80k|		wget_tcp_tls_stop(tcp);
 1059|  3.80k|		if (tcp->sockfd != -1) {
  ------------------
  |  Branch (1059:7): [True: 3.80k, False: 0]
  ------------------
 1060|  3.80k|			close(tcp->sockfd);
 1061|  3.80k|			tcp->sockfd = -1;
 1062|  3.80k|		}
 1063|  3.80k|		wget_dns_freeaddrinfo(tcp->dns, &tcp->addrinfo);
 1064|  3.80k|		xfree(tcp->host);
  ------------------
  |  |   53|  3.80k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 3.80k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1065|  3.80k|	}
 1066|  3.80k|}
net.c:_set_async:
  603|  3.80k|{
  604|       |#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
  605|       |	unsigned long blocking = 0;
  606|       |
  607|       |	if (ioctl(fd, FIONBIO, &blocking))
  608|       |		error_printf_exit(_("Failed to set socket to non-blocking\n"));
  609|       |#else
  610|  3.80k|	int flags;
  611|       |
  612|  3.80k|	if ((flags = fcntl(fd, F_GETFL)) < 0)
  ------------------
  |  Branch (612:6): [True: 0, False: 3.80k]
  ------------------
  613|      0|		error_printf_exit(_("Failed to get socket flags\n"));
  ------------------
  |  |   67|      0|#define error_printf_exit wget_error_printf_exit
  ------------------
              		error_printf_exit(_("Failed to get socket flags\n"));
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  614|       |
  615|  3.80k|	if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0)
  ------------------
  |  Branch (615:6): [True: 0, False: 3.80k]
  ------------------
  616|      0|		error_printf_exit(_("Failed to set socket to non-blocking\n"));
  ------------------
  |  |   67|      0|#define error_printf_exit wget_error_printf_exit
  ------------------
              		error_printf_exit(_("Failed to set socket to non-blocking\n"));
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  617|  3.80k|#endif
  618|  3.80k|}
net.c:set_socket_options:
  621|  3.80k|{
  622|  3.80k|	int on = 1;
  623|       |
  624|  3.80k|	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)) == -1)
  ------------------
  |  Branch (624:6): [True: 0, False: 3.80k]
  ------------------
  625|      0|		error_printf(_("Failed to set socket option REUSEADDR\n"));
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              		error_printf(_("Failed to set socket option REUSEADDR\n"));
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  626|       |
  627|  3.80k|	on = 1;
  628|  3.80k|	if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (void *)&on, sizeof(on)) == -1)
  ------------------
  |  Branch (628:6): [True: 0, False: 3.80k]
  ------------------
  629|      0|		error_printf(_("Failed to set socket option NODELAY\n"));
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              		error_printf(_("Failed to set socket option NODELAY\n"));
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  630|       |
  631|  3.80k|#ifdef SO_BINDTODEVICE
  632|  3.80k|	if (tcp->bind_interface) {
  ------------------
  |  Branch (632:6): [True: 0, False: 3.80k]
  ------------------
  633|      0|		if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, tcp->bind_interface, (socklen_t)strlen(tcp->bind_interface)) == -1)
  ------------------
  |  Branch (633:7): [True: 0, False: 0]
  ------------------
  634|      0|			error_printf(_("Failed to set socket option BINDTODEVICE\n"));
  ------------------
  |  |   66|      0|#define error_printf wget_error_printf
  ------------------
              			error_printf(_("Failed to set socket option BINDTODEVICE\n"));
  ------------------
  |  |   47|      0|#	define _(STRING) gettext(STRING)
  ------------------
  635|      0|	}
  636|       |#else
  637|       |	// Let's exit here instead of using a wrong interface (privacy concerns)
  638|       |	if (tcp->bind_interface)
  639|       |		error_printf_exit(_("Unsupported socket option BINDTODEVICE\n"));
  640|       |#endif
  641|       |
  642|  3.80k|#ifdef TCP_FASTOPEN_LINUX_411
  643|  3.80k|	on = 1;
  644|  3.80k|	if (setsockopt(fd, IPPROTO_TCP, TCP_FASTOPEN_CONNECT, (void *)&on, sizeof(on)) == -1)
  ------------------
  |  Branch (644:6): [True: 0, False: 3.80k]
  ------------------
  645|      0|		debug_printf("Failed to set socket option TCP_FASTOPEN_CONNECT\n");
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
  646|  3.80k|#endif
  647|  3.80k|}
net.c:tcp_connect:
  684|  3.80k|{
  685|  3.80k|	int rc;
  686|       |
  687|       |	/* Enable TCP Fast Open, if required by the user and available */
  688|       |#ifdef TCP_FASTOPEN_OSX
  689|       |	if (tcp->tcp_fastopen) {
  690|       |		sa_endpoints_t endpoints = { .sae_dstaddr = ai->ai_addr, .sae_dstaddrlen = ai->ai_addrlen };
  691|       |		rc = connectx(sockfd, &endpoints,
  692|       |			      SAE_ASSOCID_ANY, CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT, NULL, 0, NULL, NULL);
  693|       |		tcp->first_send = 0;
  694|       |#elif defined TCP_FASTOPEN_LINUX
  695|       |	if (tcp->tcp_fastopen) {
  696|       |		errno = 0;
  697|       |		tcp->connect_addrinfo = ai;
  698|       |		rc = 0;
  699|       |		tcp->first_send = 1;
  700|       |#elif defined TCP_FASTOPEN_LINUX_411
  701|  3.80k|	if (tcp->tcp_fastopen) {
  ------------------
  |  Branch (701:6): [True: 3.80k, False: 0]
  ------------------
  702|  3.80k|		tcp->connect_addrinfo = ai;
  703|  3.80k|		rc = connect(sockfd, ai->ai_addr, ai->ai_addrlen);
  704|  3.80k|		tcp->first_send = 0;
  705|       |#else
  706|       |	if (0) {
  707|       |#endif
  708|  3.80k|	} else {
  709|      0|		rc = connect(sockfd, ai->ai_addr, ai->ai_addrlen);
  710|      0|		tcp->first_send = 0;
  711|      0|	}
  712|       |
  713|  3.80k|	return rc;
  714|  3.80k|}

wget_vasprintf:
   52|    861|{
   53|    861|	wget_buffer buf;
   54|       |
   55|    861|	wget_buffer_init(&buf, NULL, 128);
   56|       |
   57|    861|	size_t len = wget_buffer_vprintf(&buf, fmt, args);
   58|       |
   59|    861|	if (unlikely(buf.error)) {
  ------------------
  |  |  116|    861|#	define unlikely(expr) __builtin_expect(!!(expr), 0)
  |  |  ------------------
  |  |  |  Branch (116:25): [True: 0, False: 861]
  |  |  ------------------
  ------------------
   60|      0|		xfree(buf.data);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
   61|      0|		return (size_t) -1;
   62|      0|	}
   63|       |
   64|    861|	if (strp) {
  ------------------
  |  Branch (64:6): [True: 861, False: 0]
  ------------------
   65|       |		// shrink memory to real usage
   66|    861|		*strp = wget_realloc(buf.data, len + 1);
   67|    861|	} else {
   68|       |		// behave like C99/POSIX snprintf - just return the length
   69|      0|		xfree(buf.data);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
   70|      0|	}
   71|       |
   72|    861|	return len;
   73|    861|}
wget_aprintf:
  121|    861|{
  122|    861|	va_list args;
  123|    861|	char *s = NULL;
  124|       |
  125|    861|	va_start(args, fmt);
  126|    861|	wget_vasprintf(&s, fmt, args);
  127|    861|	va_end(args);
  128|       |
  129|    861|	return s;
  130|    861|}
wget_vsnprintf:
  215|  3.80k|{
  216|  3.80k|	wget_buffer buf;
  217|       |
  218|  3.80k|	wget_buffer_init(&buf, str, size);
  219|       |
  220|  3.80k|	size_t len = wget_buffer_vprintf(&buf, fmt, args);
  221|       |
  222|  3.80k|	if (unlikely(buf.error)) {
  ------------------
  |  |  116|  3.80k|#	define unlikely(expr) __builtin_expect(!!(expr), 0)
  |  |  ------------------
  |  |  |  Branch (116:25): [True: 0, False: 3.80k]
  |  |  ------------------
  ------------------
  223|      0|		wget_buffer_deinit(&buf);
  224|      0|		return (size_t) -1;
  225|      0|	}
  226|       |
  227|  3.80k|	if (str) {
  ------------------
  |  Branch (227:6): [True: 3.80k, False: 0]
  ------------------
  228|  3.80k|		if (buf.data == str) {
  ------------------
  |  Branch (228:7): [True: 3.80k, False: 0]
  ------------------
  229|  3.80k|			buf.data = NULL;
  230|  3.80k|		} else if (len < size) {
  ------------------
  |  Branch (230:14): [True: 0, False: 0]
  ------------------
  231|      0|			memcpy(str, buf.data, len + 1);
  232|      0|		} else {
  233|      0|			memcpy(str, buf.data, size - 1);
  234|      0|			str[size - 1] = 0;
  235|      0|		}
  236|  3.80k|	}
  237|       |
  238|  3.80k|	wget_buffer_deinit(&buf);
  239|       |
  240|  3.80k|	return len;
  241|  3.80k|}
wget_snprintf:
  256|  3.80k|{
  257|  3.80k|	va_list args;
  258|       |
  259|  3.80k|	va_start(args, fmt);
  260|  3.80k|	size_t len = wget_vsnprintf(str, size, fmt, args);
  261|  3.80k|	va_end(args);
  262|       |
  263|  3.80k|	return len;
  264|  3.80k|}

random.c:random_init:
   65|      2|{
   66|      2|	if (!initialized) {
  ------------------
  |  Branch (66:6): [True: 2, False: 0]
  ------------------
   67|      2|		wget_thread_mutex_init(&mutex);
   68|      2|		initialized = true;
   69|      2|		atexit(random_exit);
   70|      2|	}
   71|      2|}

wget_ssl_default_cert_dir:
   30|      2|{
   31|      2|	return "/etc/ssl/certs";
   32|      2|}
wget_ssl_default_ca_bundle_path:
   35|      2|{
   36|      2|	return NULL;
   37|      2|}

ssl_gnutls.c:tls_init:
 1257|      2|{
 1258|      2|	if (!mutex) {
  ------------------
  |  Branch (1258:6): [True: 2, False: 0]
  ------------------
 1259|      2|		wget_thread_mutex_init(&mutex);
 1260|       |
 1261|       |		// Initialize paths while in a thread-safe environment (mostly for _WIN32).
 1262|      2|		wget_ssl_default_cert_dir();
 1263|      2|		wget_ssl_default_ca_bundle_path();
 1264|       |
 1265|      2|		atexit(tls_exit);
 1266|      2|	}
 1267|      2|}
wget_ssl_close:
 1905|  3.80k|{
 1906|  3.80k|	if (session && *session) {
  ------------------
  |  Branch (1906:6): [True: 3.80k, False: 0]
  |  Branch (1906:17): [True: 0, False: 3.80k]
  ------------------
 1907|      0|		gnutls_session_t s = *session;
 1908|      0|		struct session_context *ctx = gnutls_session_get_ptr(s);
 1909|      0|		int ret;
 1910|       |
 1911|      0|		do
 1912|      0|			ret = gnutls_bye(s, GNUTLS_SHUT_WR);
 1913|      0|		while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
  ------------------
  |  | 3366|      0|#define GNUTLS_E_INTERRUPTED -52
  ------------------
              		while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
  ------------------
  |  | 3337|      0|#define GNUTLS_E_AGAIN -28
  ------------------
  |  Branch (1913:10): [True: 0, False: 0]
  |  Branch (1913:41): [True: 0, False: 0]
  ------------------
 1914|       |
 1915|      0|		if (ret < 0)
  ------------------
  |  Branch (1915:7): [True: 0, False: 0]
  ------------------
 1916|      0|			debug_printf("TLS shutdown failed: %s\n", gnutls_strerror(ret));
  ------------------
  |  |   68|      0|#define debug_printf wget_debug_printf
  ------------------
 1917|       |
 1918|      0|		gnutls_deinit(s);
 1919|      0|		*session = NULL;
 1920|       |
 1921|      0|		xfree(ctx->hostname);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1922|      0|		xfree(ctx);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1923|      0|	}
 1924|  3.80k|}

wget_strscpy:
   44|  3.80k|{
   45|  3.80k|	if (unlikely(!dst))
  ------------------
  |  |  116|  3.80k|#	define unlikely(expr) __builtin_expect(!!(expr), 0)
  |  |  ------------------
  |  |  |  Branch (116:25): [True: 0, False: 3.80k]
  |  |  ------------------
  ------------------
   46|      0|		return -1;
   47|       |
   48|  3.80k|	if (unlikely(!src)) {
  ------------------
  |  |  116|  3.80k|#	define unlikely(expr) __builtin_expect(!!(expr), 0)
  |  |  ------------------
  |  |  |  Branch (116:25): [True: 0, False: 3.80k]
  |  |  ------------------
  ------------------
   49|      0|		if (size) {
  ------------------
  |  Branch (49:7): [True: 0, False: 0]
  ------------------
   50|      0|			*dst = 0;
   51|      0|			return 0;
   52|      0|		} else
   53|      0|			return -1;
   54|      0|	}
   55|       |
   56|  3.80k|	const char *old = src;
   57|       |
   58|       |	// Copy as many bytes as will fit
   59|  3.80k|	if (likely(size)) {
  ------------------
  |  |  117|  3.80k|#	define likely(expr) __builtin_expect(!!(expr), 1)
  |  |  ------------------
  |  |  |  Branch (117:23): [True: 3.80k, False: 0]
  |  |  ------------------
  ------------------
   60|  15.2k|		while (--size) {
  ------------------
  |  Branch (60:10): [True: 15.2k, False: 0]
  ------------------
   61|  15.2k|			if (!(*dst++ = *src++))
  ------------------
  |  Branch (61:8): [True: 3.80k, False: 11.4k]
  ------------------
   62|  3.80k|				return src - old - 1;
   63|  15.2k|		}
   64|       |
   65|      0|		*dst = 0;
   66|      0|		return src - old;
   67|  3.80k|	}
   68|       |
   69|      0|	return -1;
   70|  3.80k|}

wget_thread_mutex_init:
   84|     10|{
   85|     10|	*mutex = wget_malloc(sizeof(struct wget_thread_mutex_st));
   86|       |
   87|     10|	if (!*mutex)
  ------------------
  |  Branch (87:6): [True: 0, False: 10]
  ------------------
   88|      0|		return WGET_E_MEMORY;
   89|       |
   90|     10|	return glthread_lock_init(&((*mutex)->mutex));
  ------------------
  |  |  309|     10|    (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0)
  |  |  ------------------
  |  |  |  |  179|     10|      (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|      0|#  define c11_threads_in_use() (thrd_exit != NULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (87:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (179:8): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   91|     10|}

wget_strcasecmp_ascii:
  132|  4.43k|{
  133|  4.43k|	if (!s1) {
  ------------------
  |  Branch (133:6): [True: 0, False: 4.43k]
  ------------------
  134|      0|		if (!s2)
  ------------------
  |  Branch (134:7): [True: 0, False: 0]
  ------------------
  135|      0|			return 0;
  136|      0|		else
  137|      0|			return -1;
  138|  4.43k|	} else {
  139|  4.43k|		if (!s2)
  ------------------
  |  Branch (139:7): [True: 0, False: 4.43k]
  ------------------
  140|      0|			return 1;
  141|  4.43k|		else
  142|  4.43k|			return c_strcasecmp(s1, s2);
  143|  4.43k|	}
  144|  4.43k|}
wget_strncasecmp_ascii:
  160|  10.1k|{
  161|  10.1k|	if (!s1) {
  ------------------
  |  Branch (161:6): [True: 0, False: 10.1k]
  ------------------
  162|      0|		if (!s2)
  ------------------
  |  Branch (162:7): [True: 0, False: 0]
  ------------------
  163|      0|			return 0;
  164|      0|		else
  165|      0|			return -1;
  166|  10.1k|	} else {
  167|  10.1k|		if (!s2)
  ------------------
  |  Branch (167:7): [True: 0, False: 10.1k]
  ------------------
  168|      0|			return 1;
  169|  10.1k|		else
  170|  10.1k|			return c_strncasecmp(s1, s2, n);
  171|  10.1k|	}
  172|  10.1k|}
wget_strtolower:
  181|  1.26k|{
  182|  1.26k|	if (s) {
  ------------------
  |  Branch (182:6): [True: 1.26k, False: 0]
  ------------------
  183|  10.7k|		for (char *d = s; *d; d++) {
  ------------------
  |  Branch (183:21): [True: 9.51k, False: 1.26k]
  ------------------
  184|  9.51k|			if (c_isupper(*d))
  ------------------
  |  Branch (184:8): [True: 0, False: 9.51k]
  ------------------
  185|      0|				*d = (char) c_tolower(*d);
  186|  9.51k|		}
  187|  1.26k|	}
  188|       |
  189|  1.26k|	return s;
  190|  1.26k|}
wget_get_timemillis:
  294|   169k|{
  295|   169k|	struct timespec ts;
  296|       |
  297|   169k|	gettime(&ts);
  298|       |
  299|   169k|	return ts.tv_sec * 1000LL + ts.tv_nsec / 1000000;
  300|   169k|}

wget_vector_create:
   70|  7.60k|{
   71|  7.60k|	wget_vector *v = wget_calloc(1, sizeof(wget_vector));
   72|       |
   73|  7.60k|	if (!v)
  ------------------
  |  Branch (73:6): [True: 0, False: 7.60k]
  ------------------
   74|      0|		return NULL;
   75|       |
   76|  7.60k|	if (!(v->entry = wget_malloc(max * sizeof(void *)))) {
  ------------------
  |  Branch (76:6): [True: 0, False: 7.60k]
  ------------------
   77|      0|		xfree(v);
  ------------------
  |  |   53|      0|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 0, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
   78|      0|		return NULL;
   79|      0|	}
   80|       |
   81|  7.60k|	v->max = max;
   82|  7.60k|	v->resize_factor = 2;
   83|  7.60k|	v->cmp = cmp;
   84|  7.60k|	v->destructor = free;
   85|       |
   86|  7.60k|	return v;
   87|  7.60k|}
wget_vector_add:
  248|  7.60k|{
  249|  7.60k|	return v ? insert_element(v, elem, v->cur, 0) : WGET_E_INVALID;
  ------------------
  |  Branch (249:9): [True: 7.60k, False: 0]
  ------------------
  250|  7.60k|}
wget_vector_remove_nofree:
  369|  3.80k|{
  370|  3.80k|	return remove_element(v, pos, 0);
  371|  3.80k|}
wget_vector_free:
  443|  15.2k|{
  444|  15.2k|	if (v && *v) {
  ------------------
  |  Branch (444:6): [True: 15.2k, False: 0]
  |  Branch (444:11): [True: 7.60k, False: 7.60k]
  ------------------
  445|  7.60k|		wget_vector_clear(*v);
  446|  7.60k|		xfree((*v)->entry);
  ------------------
  |  |   53|  7.60k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 7.60k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  447|  7.60k|		xfree(*v);
  ------------------
  |  |   53|  7.60k|#define xfree(a) do { if (a) { wget_free((void *)(a)); a=NULL; } } while (0)
  |  |  ------------------
  |  |  |  Branch (53:27): [True: 7.60k, False: 0]
  |  |  |  Branch (53:75): [Folded - Ignored]
  |  |  ------------------
  ------------------
  448|  7.60k|	}
  449|  15.2k|}
wget_vector_clear:
  460|  7.60k|{
  461|  7.60k|	if (v) {
  ------------------
  |  Branch (461:6): [True: 7.60k, False: 0]
  ------------------
  462|  7.60k|		if (v->destructor) {
  ------------------
  |  Branch (462:7): [True: 7.60k, False: 0]
  ------------------
  463|  11.4k|			for (int it = 0; it < v->cur; it++) {
  ------------------
  |  Branch (463:21): [True: 3.80k, False: 7.60k]
  ------------------
  464|  3.80k|				v->destructor(v->entry[it]);
  465|  3.80k|				v->entry[it] = NULL;
  466|  3.80k|			}
  467|  7.60k|		}
  468|       |
  469|  7.60k|		v->cur = 0;
  470|  7.60k|	}
  471|  7.60k|}
wget_vector_clear_nofree:
  482|  3.80k|{
  483|  3.80k|	if (v) {
  ------------------
  |  Branch (483:6): [True: 3.80k, False: 0]
  ------------------
  484|  3.80k|		for (int it = 0; it < v->cur; it++)
  ------------------
  |  Branch (484:20): [True: 0, False: 3.80k]
  ------------------
  485|      0|			v->entry[it] = NULL;
  486|  3.80k|		v->cur = 0;
  487|  3.80k|	}
  488|  3.80k|}
wget_vector_size:
  498|  15.2k|{
  499|  15.2k|	return v ? v->cur : 0;
  ------------------
  |  Branch (499:9): [True: 11.4k, False: 3.80k]
  ------------------
  500|  15.2k|}
wget_vector_get:
  512|  7.60k|{
  513|  7.60k|	if (pos < 0 || !v || pos >= v->cur)
  ------------------
  |  Branch (513:6): [True: 0, False: 7.60k]
  |  Branch (513:17): [True: 0, False: 7.60k]
  |  Branch (513:23): [True: 0, False: 7.60k]
  ------------------
  514|      0|		return NULL;
  515|       |
  516|  7.60k|	return v->entry[pos];
  517|  7.60k|}
wget_vector_set_destructor:
  569|  3.80k|{
  570|  3.80k|	if (v)
  ------------------
  |  Branch (570:6): [True: 3.80k, False: 0]
  ------------------
  571|  3.80k|		v->destructor = destructor;
  572|  3.80k|}
vector.c:insert_element:
  108|  7.60k|{
  109|  7.60k|	if (pos < 0 || !v || pos > v->cur)
  ------------------
  |  Branch (109:6): [True: 0, False: 7.60k]
  |  Branch (109:17): [True: 0, False: 7.60k]
  |  Branch (109:23): [True: 0, False: 7.60k]
  ------------------
  110|      0|		return WGET_E_INVALID;
  111|       |
  112|  7.60k|	if (!replace) {
  ------------------
  |  Branch (112:6): [True: 7.60k, False: 0]
  ------------------
  113|  7.60k|		if (v->max == v->cur) {
  ------------------
  |  Branch (113:7): [True: 0, False: 7.60k]
  ------------------
  114|      0|			int newsize = (int) (v->max * v->resize_factor);
  115|       |
  116|      0|			if (newsize <= v->max)
  ------------------
  |  Branch (116:8): [True: 0, False: 0]
  ------------------
  117|      0|				return WGET_E_INVALID;
  118|       |
  119|      0|			void **tmp = wget_realloc(v->entry, newsize * sizeof(void *));
  120|      0|			if (!tmp)
  ------------------
  |  Branch (120:8): [True: 0, False: 0]
  ------------------
  121|      0|				return WGET_E_MEMORY;
  122|       |
  123|      0|			v->entry = tmp;
  124|      0|			v->max = newsize;
  125|      0|		}
  126|       |
  127|  7.60k|		memmove(&v->entry[pos + 1], &v->entry[pos], (v->cur - pos) * sizeof(void *));
  128|  7.60k|		v->cur++;
  129|  7.60k|	}
  130|       |
  131|  7.60k|	v->entry[pos] = (void *) elem;
  132|       |
  133|  7.60k|	if (v->cmp) {
  ------------------
  |  Branch (133:6): [True: 0, False: 7.60k]
  ------------------
  134|      0|		if (v->cur == 1) v->sorted = 1;
  ------------------
  |  Branch (134:7): [True: 0, False: 0]
  ------------------
  135|      0|		else if (v->cur > 1 && v->sorted) {
  ------------------
  |  Branch (135:12): [True: 0, False: 0]
  |  Branch (135:26): [True: 0, False: 0]
  ------------------
  136|      0|			if (pos == 0) {
  ------------------
  |  Branch (136:8): [True: 0, False: 0]
  ------------------
  137|      0|				if (v->cmp(elem, v->entry[1]) > 0) v->sorted = 0;
  ------------------
  |  Branch (137:9): [True: 0, False: 0]
  ------------------
  138|      0|			} else if (pos == v->cur - 1) {
  ------------------
  |  Branch (138:15): [True: 0, False: 0]
  ------------------
  139|      0|				if (v->cmp(elem, v->entry[v->cur - 2]) < 0) v->sorted = 0;
  ------------------
  |  Branch (139:9): [True: 0, False: 0]
  ------------------
  140|      0|			} else {
  141|      0|				if (v->cmp(elem, v->entry[pos - 1]) < 0 ||
  ------------------
  |  Branch (141:9): [True: 0, False: 0]
  ------------------
  142|      0|					v->cmp(elem, v->entry[pos + 1]) > 0) {
  ------------------
  |  Branch (142:6): [True: 0, False: 0]
  ------------------
  143|      0|					v->sorted = 0;
  144|      0|				}
  145|      0|			}
  146|      0|		}
  147|      0|	}
  148|       |
  149|  7.60k|	return pos; // return position of new element
  150|  7.60k|}
vector.c:remove_element:
  327|  3.80k|{
  328|  3.80k|	if (pos < 0 || !v || pos >= v->cur)
  ------------------
  |  Branch (328:6): [True: 0, False: 3.80k]
  |  Branch (328:17): [True: 0, False: 3.80k]
  |  Branch (328:23): [True: 0, False: 3.80k]
  ------------------
  329|      0|		return WGET_E_INVALID;
  330|       |
  331|  3.80k|	if (free_entry) {
  ------------------
  |  Branch (331:6): [True: 0, False: 3.80k]
  ------------------
  332|      0|		if (v->destructor)
  ------------------
  |  Branch (332:7): [True: 0, False: 0]
  ------------------
  333|      0|			v->destructor(v->entry[pos]);
  334|      0|	}
  335|       |
  336|  3.80k|	memmove(&v->entry[pos], &v->entry[pos + 1], (v->cur - pos - 1) * sizeof(void *));
  337|  3.80k|	v->cur--;
  338|       |
  339|  3.80k|	return pos;
  340|  3.80k|}

