#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 */

/* Variables and functions */
unsigned char *
background_generating_process_identifier_location(unsigned char **sec) {
  int p, center;
  p = (((int)((sec[4][7] << 8) + (sec[4][8]))));
  center = ((int)((sec[1][5] << 8) + (sec[1][6])));
  if ((center == 34) || (center == 35)) {
    switch (p) {
    case 50000:
    case 50008:
    case 50009:
    case 50010:
    case 50011:
      return sec[4] + 12;
      break;
    default:
      break;
    }
  }
  if (p <= 15 || (p >= 32 && p <= 34) || p == 60 || p == 61 || p == 1000 ||
      p == 1001 || p == 1002 || p == 1100 || p == 1101)
    return sec[4] + 12;
  if ((p >= 40 && p <= 43))
    return sec[4] + 14;
  if (p == 44)
    return sec[4] + 25;
  if (p == 45)
    return sec[4] + 25;
  if (p == 46)
    return sec[4] + 25;
  if (p == 47)
    return sec[4] + 25;
  if (p == 48)
    return sec[4] + 36;
  if (p == 52)
    return sec[4] + 15;
  return NULL;
}


x86 assembly (clang, -O0):
<background_generating_process_identifier_location>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x7(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    0x20(%rcx),%rcx
movzbl 0x8(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movzbl 0x5(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
movzbl 0x6(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x22,-0x18(%rbp)
je     115c <background_generating_process_identifier_location+0x5c>
cmpl   $0x23,-0x18(%rbp)
jne    11a7 <background_generating_process_identifier_location+0xa7>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0xc350,%eax
je     1188 <background_generating_process_identifier_location+0x88>
jmp    1172 <background_generating_process_identifier_location+0x72>
mov    -0x1c(%rbp),%eax
add    $0xffff3ca8,%eax
sub    $0x3,%eax
ja     119d <background_generating_process_identifier_location+0x9d>
jmp    1188 <background_generating_process_identifier_location+0x88>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0xc,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
jmp    11a2 <background_generating_process_identifier_location+0xa2>
jmp    11a7 <background_generating_process_identifier_location+0xa7>
cmpl   $0xf,-0x14(%rbp)
jle    121a <background_generating_process_identifier_location+0x11a>
cmpl   $0x20,-0x14(%rbp)
jl     11c5 <background_generating_process_identifier_location+0xc5>
cmpl   $0x22,-0x14(%rbp)
jle    121a <background_generating_process_identifier_location+0x11a>
cmpl   $0x3c,-0x14(%rbp)
je     121a <background_generating_process_identifier_location+0x11a>
cmpl   $0x3d,-0x14(%rbp)
je     121a <background_generating_process_identifier_location+0x11a>
cmpl   $0x3e8,-0x14(%rbp)
je     121a <background_generating_process_identifier_location+0x11a>
cmpl   $0x3e9,-0x14(%rbp)
je     121a <background_generating_process_identifier_location+0x11a>
cmpl   $0x3ea,-0x14(%rbp)
je     121a <background_generating_process_identifier_location+0x11a>
cmpl   $0x44c,-0x14(%rbp)
je     121a <background_generating_process_identifier_location+0x11a>
cmpl   $0x44d,-0x14(%rbp)
jne    122f <background_generating_process_identifier_location+0x12f>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0xc,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
cmpl   $0x28,-0x14(%rbp)
jl     1258 <background_generating_process_identifier_location+0x158>
cmpl   $0x2b,-0x14(%rbp)
jg     1258 <background_generating_process_identifier_location+0x158>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0xe,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
cmpl   $0x2c,-0x14(%rbp)
jne    1277 <background_generating_process_identifier_location+0x177>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x19,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
cmpl   $0x2d,-0x14(%rbp)
jne    1296 <background_generating_process_identifier_location+0x196>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x19,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
cmpl   $0x2e,-0x14(%rbp)
jne    12b5 <background_generating_process_identifier_location+0x1b5>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x19,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
cmpl   $0x2f,-0x14(%rbp)
jne    12d4 <background_generating_process_identifier_location+0x1d4>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x19,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
cmpl   $0x30,-0x14(%rbp)
jne    12f3 <background_generating_process_identifier_location+0x1f3>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x24,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
cmpl   $0x34,-0x14(%rbp)
jne    1312 <background_generating_process_identifier_location+0x212>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0xf,%rax
mov    %rax,-0x8(%rbp)
jmp    131a <background_generating_process_identifier_location+0x21a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<background_generating_process_identifier_location>:
mov    0x8(%rdi),%rax
mov    0x20(%rdi),%rcx
movzwl 0x7(%rcx),%edx
shl    $0x10,%edx
bswap  %edx
movzbl 0x5(%rax),%esi
shl    $0x8,%esi
movzbl 0x6(%rax),%eax
and    $0xfffffffe,%eax
or     %esi,%eax
cmp    $0x22,%eax
jne    113c <background_generating_process_identifier_location+0x3c>
lea    0x3ca8(%rdx),%eax
cmp    $0x4,%ax
jb     118b <background_generating_process_identifier_location+0x8b>
movzwl %dx,%eax
cmp    $0xc350,%eax
je     118b <background_generating_process_identifier_location+0x8b>
cmp    $0x10,%edx
jb     118b <background_generating_process_identifier_location+0x8b>
mov    %edx,%eax
and    $0xfffffffe,%eax
cmp    $0x3c,%eax
je     118b <background_generating_process_identifier_location+0x8b>
lea    -0x20(%rdx),%eax
cmp    $0x3,%eax
jb     118b <background_generating_process_identifier_location+0x8b>
cmp    $0x3e8,%edx
je     118b <background_generating_process_identifier_location+0x8b>
cmp    $0x3e9,%edx
je     118b <background_generating_process_identifier_location+0x8b>
cmp    $0x3ea,%edx
je     118b <background_generating_process_identifier_location+0x8b>
cmp    $0x44c,%edx
je     118b <background_generating_process_identifier_location+0x8b>
cmp    $0x44d,%edx
je     118b <background_generating_process_identifier_location+0x8b>
mov    %edx,%eax
and    $0xfffffffc,%eax
cmp    $0x28,%eax
jne    1193 <background_generating_process_identifier_location+0x93>
add    $0xe,%rcx
jmp    118f <background_generating_process_identifier_location+0x8f>
add    $0xc,%rcx
mov    %rcx,%rax
ret
xor    %eax,%eax
add    $0xffffffd4,%edx
cmp    $0x8,%dx
ja     1192 <background_generating_process_identifier_location+0x92>
movzwl %dx,%edx
lea    0xe58(%rip),%rsi
movslq (%rsi,%rdx,4),%rdx
add    %rsi,%rdx
jmp    *%rdx
add    $0x19,%rcx
jmp    118f <background_generating_process_identifier_location+0x8f>
add    $0x24,%rcx
jmp    118f <background_generating_process_identifier_location+0x8f>
add    $0xf,%rcx
jmp    118f <background_generating_process_identifier_location+0x8f>

LLVM IR (-O0):
define i8* @background_generating_process_identifier_location(i8** %0) {
%2 = alloca i8*
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
%6 = load i8**, i8*** %3
%7 = getelementptr inbounds i8*, i8** %6, i64 4
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i64 7
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8**, i8*** %3
%14 = getelementptr inbounds i8*, i8** %13, i64 4
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8, i8* %15, i64 8
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = add nsw i32 %12, %18
store i32 %19, i32* %4
%20 = load i8**, i8*** %3
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i64 5
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = shl i32 %25, 8
%27 = load i8**, i8*** %3
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = getelementptr inbounds i8, i8* %29, i64 6
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = add nsw i32 %26, %32
store i32 %33, i32* %5
%34 = load i32, i32* %5
%35 = icmp eq i32 %34, 34
br i1 %35, label %39, label %36
36: ; preds = %1
%37 = load i32, i32* %5
%38 = icmp eq i32 %37, 35
br i1 %38, label %39, label %48
39: ; preds = %36, %1
%40 = load i32, i32* %4
switch i32 %40, label %46 [
i32 50000, label %41
i32 50008, label %41
i32 50009, label %41
i32 50010, label %41
i32 50011, label %41
]
41: ; preds = %39, %39, %39, %39, %39
%42 = load i8**, i8*** %3
%43 = getelementptr inbounds i8*, i8** %42, i64 4
%44 = load i8*, i8** %43
%45 = getelementptr inbounds i8, i8* %44, i64 12
store i8* %45, i8** %2
br label %143
46: ; preds = %39
br label %47
47: ; preds = %46
br label %48
48: ; preds = %47, %36
%49 = load i32, i32* %4
%50 = icmp sle i32 %49, 15
br i1 %50, label %78, label %51
51: ; preds = %48
%52 = load i32, i32* %4
%53 = icmp sge i32 %52, 32
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = load i32, i32* %4
%56 = icmp sle i32 %55, 34
br i1 %56, label %78, label %57
57: ; preds = %54, %51
%58 = load i32, i32* %4
%59 = icmp eq i32 %58, 60
br i1 %59, label %78, label %60
60: ; preds = %57
%61 = load i32, i32* %4
%62 = icmp eq i32 %61, 61
br i1 %62, label %78, label %63
63: ; preds = %60
%64 = load i32, i32* %4
%65 = icmp eq i32 %64, 1000
br i1 %65, label %78, label %66
66: ; preds = %63
%67 = load i32, i32* %4
%68 = icmp eq i32 %67, 1001
br i1 %68, label %78, label %69
69: ; preds = %66
%70 = load i32, i32* %4
%71 = icmp eq i32 %70, 1002
br i1 %71, label %78, label %72
72: ; preds = %69
%73 = load i32, i32* %4
%74 = icmp eq i32 %73, 1100
br i1 %74, label %78, label %75
75: ; preds = %72
%76 = load i32, i32* %4
%77 = icmp eq i32 %76, 1101
br i1 %77, label %78, label %83
78: ; preds = %75, %72, %69, %66, %63, %60, %57, %54, %48
%79 = load i8**, i8*** %3
%80 = getelementptr inbounds i8*, i8** %79, i64 4
%81 = load i8*, i8** %80
%82 = getelementptr inbounds i8, i8* %81, i64 12
store i8* %82, i8** %2
br label %143
83: ; preds = %75
%84 = load i32, i32* %4
%85 = icmp sge i32 %84, 40
br i1 %85, label %86, label %94
86: ; preds = %83
%87 = load i32, i32* %4
%88 = icmp sle i32 %87, 43
br i1 %88, label %89, label %94
89: ; preds = %86
%90 = load i8**, i8*** %3
%91 = getelementptr inbounds i8*, i8** %90, i64 4
%92 = load i8*, i8** %91
%93 = getelementptr inbounds i8, i8* %92, i64 14
store i8* %93, i8** %2
br label %143
94: ; preds = %86, %83
%95 = load i32, i32* %4
%96 = icmp eq i32 %95, 44
br i1 %96, label %97, label %102
97: ; preds = %94
%98 = load i8**, i8*** %3
%99 = getelementptr inbounds i8*, i8** %98, i64 4
%100 = load i8*, i8** %99
%101 = getelementptr inbounds i8, i8* %100, i64 25
store i8* %101, i8** %2
br label %143
102: ; preds = %94
%103 = load i32, i32* %4
%104 = icmp eq i32 %103, 45
br i1 %104, label %105, label %110
105: ; preds = %102
%106 = load i8**, i8*** %3
%107 = getelementptr inbounds i8*, i8** %106, i64 4
%108 = load i8*, i8** %107
%109 = getelementptr inbounds i8, i8* %108, i64 25
store i8* %109, i8** %2
br label %143
110: ; preds = %102
%111 = load i32, i32* %4
%112 = icmp eq i32 %111, 46
br i1 %112, label %113, label %118
113: ; preds = %110
%114 = load i8**, i8*** %3
%115 = getelementptr inbounds i8*, i8** %114, i64 4
%116 = load i8*, i8** %115
%117 = getelementptr inbounds i8, i8* %116, i64 25
store i8* %117, i8** %2
br label %143
118: ; preds = %110
%119 = load i32, i32* %4
%120 = icmp eq i32 %119, 47
br i1 %120, label %121, label %126
121: ; preds = %118
%122 = load i8**, i8*** %3
%123 = getelementptr inbounds i8*, i8** %122, i64 4
%124 = load i8*, i8** %123
%125 = getelementptr inbounds i8, i8* %124, i64 25
store i8* %125, i8** %2
br label %143
126: ; preds = %118
%127 = load i32, i32* %4
%128 = icmp eq i32 %127, 48
br i1 %128, label %129, label %134
129: ; preds = %126
%130 = load i8**, i8*** %3
%131 = getelementptr inbounds i8*, i8** %130, i64 4
%132 = load i8*, i8** %131
%133 = getelementptr inbounds i8, i8* %132, i64 36
store i8* %133, i8** %2
br label %143
134: ; preds = %126
%135 = load i32, i32* %4
%136 = icmp eq i32 %135, 52
br i1 %136, label %137, label %142
137: ; preds = %134
%138 = load i8**, i8*** %3
%139 = getelementptr inbounds i8*, i8** %138, i64 4
%140 = load i8*, i8** %139
%141 = getelementptr inbounds i8, i8* %140, i64 15
store i8* %141, i8** %2
br label %143
142: ; preds = %134
store i8* null, i8** %2
br label %143
143: ; preds = %142, %137, %129, %121, %113, %105, %97, %89, %78, %41
%144 = load i8*, i8** %2
ret i8* %144
}

LLVM IR (-O2):
define i8* @background_generating_process_identifier_location(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 4
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 7
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = getelementptr inbounds i8, i8* %3, i64 8
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = or i32 %7, %10
%12 = getelementptr inbounds i8*, i8** %0, i64 1
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i64 5
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw nsw i32 %16, 8
%18 = getelementptr inbounds i8, i8* %13, i64 6
%19 = load i8, i8* %18
%20 = and i8 %19, -2
%21 = zext i8 %20 to i32
%22 = or i32 %17, %21
%23 = icmp eq i32 %22, 34
br i1 %23, label %24, label %28
24: ; preds = %1
%25 = trunc i32 %11 to i16
switch i16 %25, label %28 [
i16 -15536, label %26
i16 -15528, label %26
i16 -15527, label %26
i16 -15526, label %26
i16 -15525, label %26
]
26: ; preds = %24, %24, %24, %24, %24
%27 = getelementptr inbounds i8, i8* %3, i64 12
br label %67
28: ; preds = %24, %1
%29 = icmp ult i32 %11, 16
br i1 %29, label %46, label %30
30: ; preds = %28
%31 = add nsw i32 %11, -32
%32 = icmp ult i32 %31, 3
%33 = and i32 %11, 65534
%34 = icmp eq i32 %33, 60
%35 = or i1 %34, %32
%36 = icmp eq i32 %11, 1000
%37 = select i1 %35, i1 true, i1 %36
%38 = icmp eq i32 %11, 1001
%39 = select i1 %37, i1 true, i1 %38
%40 = icmp eq i32 %11, 1002
%41 = select i1 %39, i1 true, i1 %40
%42 = icmp eq i32 %11, 1100
%43 = select i1 %41, i1 true, i1 %42
%44 = icmp eq i32 %11, 1101
%45 = select i1 %43, i1 true, i1 %44
br i1 %45, label %46, label %48
46: ; preds = %30, %28
%47 = getelementptr inbounds i8, i8* %3, i64 12
br label %67
48: ; preds = %30
%49 = and i32 %11, 65532
%50 = icmp eq i32 %49, 40
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = getelementptr inbounds i8, i8* %3, i64 14
br label %67
53: ; preds = %48
%54 = trunc i32 %11 to i16
switch i16 %54, label %67 [
i16 44, label %55
i16 45, label %57
i16 46, label %59
i16 47, label %61
i16 48, label %63
i16 52, label %65
]
55: ; preds = %53
%56 = getelementptr inbounds i8, i8* %3, i64 25
br label %67
57: ; preds = %53
%58 = getelementptr inbounds i8, i8* %3, i64 25
br label %67
59: ; preds = %53
%60 = getelementptr inbounds i8, i8* %3, i64 25
br label %67
61: ; preds = %53
%62 = getelementptr inbounds i8, i8* %3, i64 25
br label %67
63: ; preds = %53
%64 = getelementptr inbounds i8, i8* %3, i64 36
br label %67
65: ; preds = %53
%66 = getelementptr inbounds i8, i8* %3, i64 15
br label %67
67: ; preds = %53, %65, %63, %61, %59, %57, %55, %51, %46, %26
%68 = phi i8* [ %47, %46 ], [ %52, %51 ], [ %56, %55 ], [ %58, %57 ], [ %60, %59 ], [ %62, %61 ], [ %64, %63 ], [ %66, %65 ], [ %27, %26 ], [ null, %53 ]
ret i8* %68
}