#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int strlen(char const *);
int __attribute__((__unused__))
init_const_uint8_t_p(uint8_t vect[], size_t *len, const char *argv[]) {
  *len = 0;
  if (argv[0][0] == '0' && argv[0][1] == 'x') {
    int i = 0;
    const char *str = &argv[0][2];
    if (strlen(str) % 2) {
      vect[i] = ({
        char x = *str++;
        int ret = -1;
        if (x >= '0' && x <= '9')
          ret = x - '0';
        else if (x >= 'A' && x <= 'F')
          ret = x - 'A' + 10;
        else if (x >= 'a' && x <= 'f')
          ret = x - 'a' + 10;
        else
          do {
            fprintf(stderr, "FATAL[%s:%d]: ",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/0mark/linux-sunxi/refs/"
                    "heads/2.6.34.15-mali19/drivers/amlogic/wifi/nano_c047_12/"
                    "userspace/libnrx/autotest/testprogram.in.c",
                    163);
            fprintf(stderr, "Not a hex char: '%c'.\n", x);
            return -1;
          } while (0);
        ret;
      });
      i++;
    }
    while (*str != '\0') {
      vect[i] =
          ({
            char x = *str++;
            int ret = -1;
            if (x >= '0' && x <= '9')
              ret = x - '0';
            else if (x >= 'A' && x <= 'F')
              ret = x - 'A' + 10;
            else if (x >= 'a' && x <= 'f')
              ret = x - 'a' + 10;
            else
              do {
                fprintf(
                    stderr, "FATAL[%s:%d]: ",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/0mark/linux-sunxi/refs/"
                    "heads/2.6.34.15-mali19/drivers/amlogic/wifi/nano_c047_12/"
                    "userspace/libnrx/autotest/testprogram.in.c",
                    167);
                fprintf(stderr, "Not a hex char: '%c'.\n", x);
                return -1;
              } while (0);
            ret;
          })
          << 4;
      vect[i] += ({
        char x = *str++;
        int ret = -1;
        if (x >= '0' && x <= '9')
          ret = x - '0';
        else if (x >= 'A' && x <= 'F')
          ret = x - 'A' + 10;
        else if (x >= 'a' && x <= 'f')
          ret = x - 'a' + 10;
        else
          do {
            fprintf(stderr, "FATAL[%s:%d]: ",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/0mark/linux-sunxi/refs/"
                    "heads/2.6.34.15-mali19/drivers/amlogic/wifi/nano_c047_12/"
                    "userspace/libnrx/autotest/testprogram.in.c",
                    168);
            fprintf(stderr, "Not a hex char: '%c'.\n", x);
            return -1;
          } while (0);
        ret;
      });
      i++;
    }
    *len = i;
  } else {
    do {
      fprintf(stderr, "FATAL[%s:%d]: ",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/0mark/linux-sunxi/refs/heads/"
              "2.6.34.15-mali19/drivers/amlogic/wifi/nano_c047_12/userspace/"
              "libnrx/autotest/testprogram.in.c",
              174);
      fprintf(stderr, "Only hex supported. Use C format: 0x... (%s)\n", *argv);
      return -1;
    } while (0);
  }
  return 1;
}


x86 assembly (clang, -O0):
<init_const_uint8_t_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    14f3 <init_const_uint8_t_p+0x3d3>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x78,%eax
jne    14f3 <init_const_uint8_t_p+0x3d3>
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
add    $0x2,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     12a8 <init_const_uint8_t_p+0x188>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%al
mov    %al,-0x31(%rbp)
movl   $0xffffffff,-0x38(%rbp)
movsbl -0x31(%rbp),%eax
cmp    $0x30,%eax
jl     11da <init_const_uint8_t_p+0xba>
movsbl -0x31(%rbp),%eax
cmp    $0x39,%eax
jg     11da <init_const_uint8_t_p+0xba>
movsbl -0x31(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x38(%rbp)
jmp    128b <init_const_uint8_t_p+0x16b>
movsbl -0x31(%rbp),%eax
cmp    $0x41,%eax
jl     1206 <init_const_uint8_t_p+0xe6>
movsbl -0x31(%rbp),%eax
cmp    $0x46,%eax
jg     1206 <init_const_uint8_t_p+0xe6>
movsbl -0x31(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x38(%rbp)
jmp    1286 <init_const_uint8_t_p+0x166>
movsbl -0x31(%rbp),%eax
cmp    $0x61,%eax
jl     1232 <init_const_uint8_t_p+0x112>
movsbl -0x31(%rbp),%eax
cmp    $0x66,%eax
jg     1232 <init_const_uint8_t_p+0x112>
movsbl -0x31(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x38(%rbp)
jmp    1281 <init_const_uint8_t_p+0x161>
jmp    1237 <init_const_uint8_t_p+0x117>
mov    0x2da2(%rip),%rax
mov    (%rax),%edi
lea    0xdb9(%rip),%rsi
lea    0xdc1(%rip),%rdx
mov    $0xa3,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d7f(%rip),%rax
mov    (%rax),%edi
movsbl -0x31(%rbp),%edx
lea    0xe76(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    154c <init_const_uint8_t_p+0x42c>
jmp    1286 <init_const_uint8_t_p+0x166>
jmp    128b <init_const_uint8_t_p+0x16b>
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12ad <init_const_uint8_t_p+0x18d>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     14e3 <init_const_uint8_t_p+0x3c3>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%al
mov    %al,-0x3d(%rbp)
movl   $0xffffffff,-0x44(%rbp)
movsbl -0x3d(%rbp),%eax
cmp    $0x30,%eax
jl     1301 <init_const_uint8_t_p+0x1e1>
movsbl -0x3d(%rbp),%eax
cmp    $0x39,%eax
jg     1301 <init_const_uint8_t_p+0x1e1>
movsbl -0x3d(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x44(%rbp)
jmp    13b2 <init_const_uint8_t_p+0x292>
movsbl -0x3d(%rbp),%eax
cmp    $0x41,%eax
jl     132d <init_const_uint8_t_p+0x20d>
movsbl -0x3d(%rbp),%eax
cmp    $0x46,%eax
jg     132d <init_const_uint8_t_p+0x20d>
movsbl -0x3d(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x44(%rbp)
jmp    13ad <init_const_uint8_t_p+0x28d>
movsbl -0x3d(%rbp),%eax
cmp    $0x61,%eax
jl     1359 <init_const_uint8_t_p+0x239>
movsbl -0x3d(%rbp),%eax
cmp    $0x66,%eax
jg     1359 <init_const_uint8_t_p+0x239>
movsbl -0x3d(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x44(%rbp)
jmp    13a8 <init_const_uint8_t_p+0x288>
jmp    135e <init_const_uint8_t_p+0x23e>
mov    0x2c7b(%rip),%rax
mov    (%rax),%edi
lea    0xc92(%rip),%rsi
lea    0xc9a(%rip),%rdx
mov    $0xa7,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
movsbl -0x3d(%rbp),%edx
lea    0xd4f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    154c <init_const_uint8_t_p+0x42c>
jmp    13ad <init_const_uint8_t_p+0x28d>
jmp    13b2 <init_const_uint8_t_p+0x292>
mov    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edx
shl    $0x4,%edx
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%al
mov    %al,-0x49(%rbp)
movl   $0xffffffff,-0x50(%rbp)
movsbl -0x49(%rbp),%eax
cmp    $0x30,%eax
jl     140d <init_const_uint8_t_p+0x2ed>
movsbl -0x49(%rbp),%eax
cmp    $0x39,%eax
jg     140d <init_const_uint8_t_p+0x2ed>
movsbl -0x49(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x50(%rbp)
jmp    14be <init_const_uint8_t_p+0x39e>
movsbl -0x49(%rbp),%eax
cmp    $0x41,%eax
jl     1439 <init_const_uint8_t_p+0x319>
movsbl -0x49(%rbp),%eax
cmp    $0x46,%eax
jg     1439 <init_const_uint8_t_p+0x319>
movsbl -0x49(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x50(%rbp)
jmp    14b9 <init_const_uint8_t_p+0x399>
movsbl -0x49(%rbp),%eax
cmp    $0x61,%eax
jl     1465 <init_const_uint8_t_p+0x345>
movsbl -0x49(%rbp),%eax
cmp    $0x66,%eax
jg     1465 <init_const_uint8_t_p+0x345>
movsbl -0x49(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x50(%rbp)
jmp    14b4 <init_const_uint8_t_p+0x394>
jmp    146a <init_const_uint8_t_p+0x34a>
mov    0x2b6f(%rip),%rax
mov    (%rax),%edi
lea    0xb86(%rip),%rsi
lea    0xb8e(%rip),%rdx
mov    $0xa8,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2b4c(%rip),%rax
mov    (%rax),%edi
movsbl -0x49(%rbp),%edx
lea    0xc43(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    154c <init_const_uint8_t_p+0x42c>
jmp    14b9 <init_const_uint8_t_p+0x399>
jmp    14be <init_const_uint8_t_p+0x39e>
mov    -0x50(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
add    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12ad <init_const_uint8_t_p+0x18d>
movslq -0x24(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    1545 <init_const_uint8_t_p+0x425>
jmp    14f8 <init_const_uint8_t_p+0x3d8>
mov    0x2ae1(%rip),%rax
mov    (%rax),%edi
lea    0xaf8(%rip),%rsi
lea    0xb00(%rip),%rdx
mov    $0xae,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2abe(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
lea    0xbc9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    154c <init_const_uint8_t_p+0x42c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_const_uint8_t_p>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbx
movq   $0x0,(%rsi)
mov    (%rdx),%r12
cmpb   $0x30,(%r12)
jne    1277 <init_const_uint8_t_p+0x157>
cmpb   $0x78,0x1(%r12)
jne    1277 <init_const_uint8_t_p+0x157>
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x2(%r12),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
xor    %ecx,%ecx
test   $0x1,%al
je     11a7 <init_const_uint8_t_p+0x87>
movsbl 0x2(%r12),%ebx
lea    -0x30(%rbx),%ecx
mov    $0xffffffd0,%eax
cmp    $0xa,%cl
jb     1196 <init_const_uint8_t_p+0x76>
lea    -0x41(%rbx),%ecx
mov    $0xffffffc9,%eax
cmp    $0x6,%cl
jb     1196 <init_const_uint8_t_p+0x76>
lea    -0x61(%rbx),%ecx
mov    $0xffffffa9,%eax
cmp    $0x6,%cl
jae    12fd <init_const_uint8_t_p+0x1dd>
add    $0x3,%r12
add    %ebx,%eax
mov    %eax,(%r15)
mov    $0x1,%ecx
mov    %r12,%rbx
mov    (%rbx),%sil
test   %sil,%sil
je     12c0 <init_const_uint8_t_p+0x1a0>
mov    %ecx,%ecx
add    $0x2,%rbx
jmp    11dd <init_const_uint8_t_p+0xbd>
nopl   0x0(%rax,%rax,1)
add    %r12d,%edx
add    %edx,%eax
mov    %eax,(%r15,%rcx,4)
add    $0x1,%rcx
movzbl (%rbx),%esi
add    $0x2,%rbx
test   %sil,%sil
je     12c0 <init_const_uint8_t_p+0x1a0>
movsbl %sil,%r12d
lea    -0x30(%r12),%edi
mov    $0xffffffd0,%edx
mov    $0xffffffd0,%eax
cmp    $0xa,%dil
jb     1217 <init_const_uint8_t_p+0xf7>
lea    -0x41(%rsi),%edi
mov    $0xffffffc9,%eax
cmp    $0x6,%dil
jb     1217 <init_const_uint8_t_p+0xf7>
add    $0x9f,%sil
mov    $0xffffffa9,%eax
cmp    $0x6,%sil
jae    12cc <init_const_uint8_t_p+0x1ac>
add    %r12d,%eax
shl    $0x4,%eax
mov    %eax,(%r15,%rcx,4)
movsbl -0x1(%rbx),%r12d
lea    -0x30(%r12),%esi
cmp    $0xa,%sil
jb     11c0 <init_const_uint8_t_p+0xa0>
lea    -0x41(%r12),%esi
mov    $0xffffffc9,%edx
cmp    $0x6,%sil
jb     11c0 <init_const_uint8_t_p+0xa0>
lea    -0x61(%r12),%esi
mov    $0xffffffa9,%edx
cmp    $0x6,%sil
jb     11c0 <init_const_uint8_t_p+0xa0>
mov    0x2d80(%rip),%rbx
mov    (%rbx),%edi
lea    0xd97(%rip),%rsi
lea    0xd9f(%rip),%rdx
mov    $0xa8,%ecx
jmp    12e8 <init_const_uint8_t_p+0x1c8>
mov    0x2d62(%rip),%r14
mov    (%r14),%edi
lea    0xd78(%rip),%rsi
lea    0xd80(%rip),%rdx
mov    $0xae,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
mov    (%rbx),%rdx
lea    0xe53(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    %ecx,%eax
mov    %rax,(%r14)
mov    $0x1,%eax
jmp    12b4 <init_const_uint8_t_p+0x194>
mov    0x2d0d(%rip),%rbx
mov    (%rbx),%edi
lea    0xd24(%rip),%rsi
lea    0xd2c(%rip),%rdx
mov    $0xa7,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdec(%rip),%rsi
mov    %r12d,%edx
jmp    132d <init_const_uint8_t_p+0x20d>
mov    0x2cdc(%rip),%r14
mov    (%r14),%edi
lea    0xcf2(%rip),%rsi
lea    0xcfa(%rip),%rdx
mov    $0xa3,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xdb9(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    12af <init_const_uint8_t_p+0x18f>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"FATAL[%s:%d]: \00"
@.str.1 = [213 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/0mark/linux-sunxi/refs/heads/2.6.34.15-mali19/drivers/amlogic/wifi/nano_c047_12/userspace/libnrx/autotest/testprogram.in.c\00"
@.str.2 = [23 x i8] c"Not a hex char: '%c'.\0A\00"
@.str.3 = [46 x i8] c"Only hex supported. Use C format: 0x... (%s)\0A\00"
define i32 @init_const_uint8_t_p(i32* %0, i64* %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i64*
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8
%17 = alloca i32
%18 = alloca i32
store i32* %0, i32** %5
store i64* %1, i64** %6
store i8** %2, i8*** %7
%19 = load i64*, i64** %6
store i64 0, i64* %19
%20 = load i8**, i8*** %7
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 48
br i1 %26, label %27, label %237
27: ; preds = %3
%28 = load i8**, i8*** %7
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = getelementptr inbounds i8, i8* %30, i64 1
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 120
br i1 %34, label %35, label %237
35: ; preds = %27
store i32 0, i32* %8
%36 = load i8**, i8*** %7
%37 = getelementptr inbounds i8*, i8** %36, i64 0
%38 = load i8*, i8** %37
%39 = getelementptr inbounds i8, i8* %38, i64 2
store i8* %39, i8** %9
%40 = load i8*, i8** %9
%41 = call i32 @strlen(i8* %40)
%42 = srem i32 %41, 2
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %105
44: ; preds = %35
%45 = load i8*, i8** %9
%46 = getelementptr inbounds i8, i8* %45, i32 1
store i8* %46, i8** %9
%47 = load i8, i8* %45
store i8 %47, i8* %10
store i32 -1, i32* %11
%48 = load i8, i8* %10
%49 = sext i8 %48 to i32
%50 = icmp sge i32 %49, 48
br i1 %50, label %51, label %59
51: ; preds = %44
%52 = load i8, i8* %10
%53 = sext i8 %52 to i32
%54 = icmp sle i32 %53, 57
br i1 %54, label %55, label %59
55: ; preds = %51
%56 = load i8, i8* %10
%57 = sext i8 %56 to i32
%58 = sub nsw i32 %57, 48
store i32 %58, i32* %11
br label %96
59: ; preds = %51, %44
%60 = load i8, i8* %10
%61 = sext i8 %60 to i32
%62 = icmp sge i32 %61, 65
br i1 %62, label %63, label %72
63: ; preds = %59
%64 = load i8, i8* %10
%65 = sext i8 %64 to i32
%66 = icmp sle i32 %65, 70
br i1 %66, label %67, label %72
67: ; preds = %63
%68 = load i8, i8* %10
%69 = sext i8 %68 to i32
%70 = sub nsw i32 %69, 65
%71 = add nsw i32 %70, 10
store i32 %71, i32* %11
br label %95
72: ; preds = %63, %59
%73 = load i8, i8* %10
%74 = sext i8 %73 to i32
%75 = icmp sge i32 %74, 97
br i1 %75, label %76, label %85
76: ; preds = %72
%77 = load i8, i8* %10
%78 = sext i8 %77 to i32
%79 = icmp sle i32 %78, 102
br i1 %79, label %80, label %85
80: ; preds = %76
%81 = load i8, i8* %10
%82 = sext i8 %81 to i32
%83 = sub nsw i32 %82, 97
%84 = add nsw i32 %83, 10
store i32 %84, i32* %11
br label %94
85: ; preds = %76, %72
br label %86
86: ; preds = %85
%87 = load i32, i32* @stderr
%88 = call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.1, i64 0, i64 0), i32 163)
%89 = load i32, i32* @stderr
%90 = load i8, i8* %10
%91 = sext i8 %90 to i32
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %91)
store i32 -1, i32* %4
br label %247
93: ; No predecessors!
br label %94
94: ; preds = %93, %80
br label %95
95: ; preds = %94, %67
br label %96
96: ; preds = %95, %55
%97 = load i32, i32* %11
store i32 %97, i32* %12
%98 = load i32, i32* %12
%99 = load i32*, i32** %5
%100 = load i32, i32* %8
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i32, i32* %99, i64 %101
store i32 %98, i32* %102
%103 = load i32, i32* %8
%104 = add nsw i32 %103, 1
store i32 %104, i32* %8
br label %105
105: ; preds = %96, %35
br label %106
106: ; preds = %222, %105
%107 = load i8*, i8** %9
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = icmp ne i32 %109, 0
br i1 %110, label %111, label %233
111: ; preds = %106
%112 = load i8*, i8** %9
%113 = getelementptr inbounds i8, i8* %112, i32 1
store i8* %113, i8** %9
%114 = load i8, i8* %112
store i8 %114, i8* %13
store i32 -1, i32* %14
%115 = load i8, i8* %13
%116 = sext i8 %115 to i32
%117 = icmp sge i32 %116, 48
br i1 %117, label %118, label %126
118: ; preds = %111
%119 = load i8, i8* %13
%120 = sext i8 %119 to i32
%121 = icmp sle i32 %120, 57
br i1 %121, label %122, label %126
122: ; preds = %118
%123 = load i8, i8* %13
%124 = sext i8 %123 to i32
%125 = sub nsw i32 %124, 48
store i32 %125, i32* %14
br label %163
126: ; preds = %118, %111
%127 = load i8, i8* %13
%128 = sext i8 %127 to i32
%129 = icmp sge i32 %128, 65
br i1 %129, label %130, label %139
130: ; preds = %126
%131 = load i8, i8* %13
%132 = sext i8 %131 to i32
%133 = icmp sle i32 %132, 70
br i1 %133, label %134, label %139
134: ; preds = %130
%135 = load i8, i8* %13
%136 = sext i8 %135 to i32
%137 = sub nsw i32 %136, 65
%138 = add nsw i32 %137, 10
store i32 %138, i32* %14
br label %162
139: ; preds = %130, %126
%140 = load i8, i8* %13
%141 = sext i8 %140 to i32
%142 = icmp sge i32 %141, 97
br i1 %142, label %143, label %152
143: ; preds = %139
%144 = load i8, i8* %13
%145 = sext i8 %144 to i32
%146 = icmp sle i32 %145, 102
br i1 %146, label %147, label %152
147: ; preds = %143
%148 = load i8, i8* %13
%149 = sext i8 %148 to i32
%150 = sub nsw i32 %149, 97
%151 = add nsw i32 %150, 10
store i32 %151, i32* %14
br label %161
152: ; preds = %143, %139
br label %153
153: ; preds = %152
%154 = load i32, i32* @stderr
%155 = call i32 (i32, i8*, ...) @fprintf(i32 %154, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.1, i64 0, i64 0), i32 167)
%156 = load i32, i32* @stderr
%157 = load i8, i8* %13
%158 = sext i8 %157 to i32
%159 = call i32 (i32, i8*, ...) @fprintf(i32 %156, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %158)
store i32 -1, i32* %4
br label %247
160: ; No predecessors!
br label %161
161: ; preds = %160, %147
br label %162
162: ; preds = %161, %134
br label %163
163: ; preds = %162, %122
%164 = load i32, i32* %14
store i32 %164, i32* %15
%165 = load i32, i32* %15
%166 = shl i32 %165, 4
%167 = load i32*, i32** %5
%168 = load i32, i32* %8
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds i32, i32* %167, i64 %169
store i32 %166, i32* %170
%171 = load i8*, i8** %9
%172 = getelementptr inbounds i8, i8* %171, i32 1
store i8* %172, i8** %9
%173 = load i8, i8* %171
store i8 %173, i8* %16
store i32 -1, i32* %17
%174 = load i8, i8* %16
%175 = sext i8 %174 to i32
%176 = icmp sge i32 %175, 48
br i1 %176, label %177, label %185
177: ; preds = %163
%178 = load i8, i8* %16
%179 = sext i8 %178 to i32
%180 = icmp sle i32 %179, 57
br i1 %180, label %181, label %185
181: ; preds = %177
%182 = load i8, i8* %16
%183 = sext i8 %182 to i32
%184 = sub nsw i32 %183, 48
store i32 %184, i32* %17
br label %222
185: ; preds = %177, %163
%186 = load i8, i8* %16
%187 = sext i8 %186 to i32
%188 = icmp sge i32 %187, 65
br i1 %188, label %189, label %198
189: ; preds = %185
%190 = load i8, i8* %16
%191 = sext i8 %190 to i32
%192 = icmp sle i32 %191, 70
br i1 %192, label %193, label %198
193: ; preds = %189
%194 = load i8, i8* %16
%195 = sext i8 %194 to i32
%196 = sub nsw i32 %195, 65
%197 = add nsw i32 %196, 10
store i32 %197, i32* %17
br label %221
198: ; preds = %189, %185
%199 = load i8, i8* %16
%200 = sext i8 %199 to i32
%201 = icmp sge i32 %200, 97
br i1 %201, label %202, label %211
202: ; preds = %198
%203 = load i8, i8* %16
%204 = sext i8 %203 to i32
%205 = icmp sle i32 %204, 102
br i1 %205, label %206, label %211
206: ; preds = %202
%207 = load i8, i8* %16
%208 = sext i8 %207 to i32
%209 = sub nsw i32 %208, 97
%210 = add nsw i32 %209, 10
store i32 %210, i32* %17
br label %220
211: ; preds = %202, %198
br label %212
212: ; preds = %211
%213 = load i32, i32* @stderr
%214 = call i32 (i32, i8*, ...) @fprintf(i32 %213, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.1, i64 0, i64 0), i32 168)
%215 = load i32, i32* @stderr
%216 = load i8, i8* %16
%217 = sext i8 %216 to i32
%218 = call i32 (i32, i8*, ...) @fprintf(i32 %215, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %217)
store i32 -1, i32* %4
br label %247
219: ; No predecessors!
br label %220
220: ; preds = %219, %206
br label %221
221: ; preds = %220, %193
br label %222
222: ; preds = %221, %181
%223 = load i32, i32* %17
store i32 %223, i32* %18
%224 = load i32, i32* %18
%225 = load i32*, i32** %5
%226 = load i32, i32* %8
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds i32, i32* %225, i64 %227
%229 = load i32, i32* %228
%230 = add nsw i32 %229, %224
store i32 %230, i32* %228
%231 = load i32, i32* %8
%232 = add nsw i32 %231, 1
store i32 %232, i32* %8
br label %106
233: ; preds = %106
%234 = load i32, i32* %8
%235 = sext i32 %234 to i64
%236 = load i64*, i64** %6
store i64 %235, i64* %236
br label %246
237: ; preds = %27, %3
br label %238
238: ; preds = %237
%239 = load i32, i32* @stderr
%240 = call i32 (i32, i8*, ...) @fprintf(i32 %239, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.1, i64 0, i64 0), i32 174)
%241 = load i32, i32* @stderr
%242 = load i8**, i8*** %7
%243 = load i8*, i8** %242
%244 = call i32 (i32, i8*, ...) @fprintf(i32 %241, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i8* %243)
store i32 -1, i32* %4
br label %247
245: ; No predecessors!
br label %246
246: ; preds = %245, %233
store i32 1, i32* %4
br label %247
247: ; preds = %246, %238, %212, %153, %86
%248 = load i32, i32* %4
ret i32 %248
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"FATAL[%s:%d]: \00"
@.str.1 = [213 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/0mark/linux-sunxi/refs/heads/2.6.34.15-mali19/drivers/amlogic/wifi/nano_c047_12/userspace/libnrx/autotest/testprogram.in.c\00"
@.str.2 = [23 x i8] c"Not a hex char: '%c'.\0A\00"
@.str.3 = [46 x i8] c"Only hex supported. Use C format: 0x... (%s)\0A\00"
define i32 @init_const_uint8_t_p(i32* nocapture %0, i64* nocapture writeonly %1, i8** nocapture %2) {
store i64 0, i64* %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 48
br i1 %6, label %7, label %96
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 120
br i1 %10, label %11, label %96
11: ; preds = %7
%12 = getelementptr inbounds i8, i8* %4, i64 2
%13 = tail call i32 @strlen(i8* %12)
%14 = and i32 %13, 1
%15 = icmp eq i32 %14, 0
br i1 %15, label %36, label %16
16: ; preds = %11
%17 = getelementptr inbounds i8, i8* %4, i64 3
%18 = load i8, i8* %12
%19 = sext i8 %18 to i32
%20 = add i8 %18, -48
%21 = icmp ult i8 %20, 10
br i1 %21, label %33, label %22
22: ; preds = %16
%23 = add i8 %18, -65
%24 = icmp ult i8 %23, 6
br i1 %24, label %33, label %25
25: ; preds = %22
%26 = add i8 %18, -97
%27 = icmp ult i8 %26, 6
br i1 %27, label %33, label %28
28: ; preds = %25
%29 = load i32, i32* @stderr
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.1, i64 0, i64 0), i32 163)
%31 = load i32, i32* @stderr
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %102
33: ; preds = %25, %22, %16
%34 = phi i32 [ -48, %16 ], [ -55, %22 ], [ -87, %25 ]
%35 = add nsw i32 %34, %19
store i32 %35, i32* %0
br label %36
36: ; preds = %33, %11
%37 = phi i8* [ %17, %33 ], [ %12, %11 ]
%38 = phi i32 [ 1, %33 ], [ 0, %11 ]
%39 = load i8, i8* %37
%40 = icmp eq i8 %39, 0
br i1 %40, label %93, label %41
41: ; preds = %36
%42 = zext i32 %38 to i64
br label %43
43: ; preds = %41, %84
%44 = phi i64 [ %42, %41 ], [ %88, %84 ]
%45 = phi i8 [ %39, %41 ], [ %89, %84 ]
%46 = phi i8* [ %37, %41 ], [ %67, %84 ]
%47 = sext i8 %45 to i32
%48 = getelementptr inbounds i8, i8* %46, i64 1
%49 = add i8 %45, -48
%50 = icmp ult i8 %49, 10
br i1 %50, label %62, label %51
51: ; preds = %43
%52 = add i8 %45, -65
%53 = icmp ult i8 %52, 6
br i1 %53, label %62, label %54
54: ; preds = %51
%55 = add i8 %45, -97
%56 = icmp ult i8 %55, 6
br i1 %56, label %62, label %57
57: ; preds = %54
%58 = load i32, i32* @stderr
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.1, i64 0, i64 0), i32 167)
%60 = load i32, i32* @stderr
%61 = tail call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %47)
br label %102
62: ; preds = %54, %51, %43
%63 = phi i32 [ -48, %43 ], [ -55, %51 ], [ -87, %54 ]
%64 = add nsw i32 %63, %47
%65 = shl nsw i32 %64, 4
%66 = getelementptr inbounds i32, i32* %0, i64 %44
store i32 %65, i32* %66
%67 = getelementptr inbounds i8, i8* %46, i64 2
%68 = load i8, i8* %48
%69 = sext i8 %68 to i32
%70 = add i8 %68, -48
%71 = icmp ult i8 %70, 10
br i1 %71, label %84, label %72
72: ; preds = %62
%73 = add i8 %68, -65
%74 = icmp ult i8 %73, 6
br i1 %74, label %84, label %75
75: ; preds = %72
%76 = add i8 %68, -97
%77 = icmp ult i8 %76, 6
br i1 %77, label %84, label %78
78: ; preds = %75
%79 = sext i8 %68 to i32
%80 = load i32, i32* @stderr
%81 = tail call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.1, i64 0, i64 0), i32 168)
%82 = load i32, i32* @stderr
%83 = tail call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %79)
br label %102
84: ; preds = %75, %72, %62
%85 = phi i32 [ -48, %62 ], [ -55, %72 ], [ -87, %75 ]
%86 = add nsw i32 %85, %69
%87 = add nsw i32 %65, %86
store i32 %87, i32* %66
%88 = add nuw i64 %44, 1
%89 = load i8, i8* %67
%90 = icmp eq i8 %89, 0
br i1 %90, label %91, label %43
91: ; preds = %84
%92 = trunc i64 %88 to i32
br label %93
93: ; preds = %91, %36
%94 = phi i32 [ %38, %36 ], [ %92, %91 ]
%95 = zext i32 %94 to i64
store i64 %95, i64* %1
br label %102
96: ; preds = %3, %7
%97 = load i32, i32* @stderr
%98 = tail call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.1, i64 0, i64 0), i32 174)
%99 = load i32, i32* @stderr
%100 = load i8*, i8** %2
%101 = tail call i32 (i32, i8*, ...) @fprintf(i32 %99, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i8* %100)
br label %102
102: ; preds = %28, %57, %78, %93, %96
%103 = phi i32 [ -1, %96 ], [ 1, %93 ], [ -1, %78 ], [ -1, %57 ], [ -1, %28 ]
ret i32 %103
}