#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 */
struct Village {
  int dummy;
};
struct Patient {
  int dummy;
};
struct List {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ addList(struct List *, struct Patient *);
int /*<<< orphan*/ removeList(struct List *, struct Patient *);
void check_patients_waiting(struct Village *village, struct List *list) {
  int i;
  struct Patient *p;
  void *__cil_tmp5;
  unsigned int __cil_tmp6;
  unsigned int __cil_tmp7;
  unsigned int __cil_tmp8;
  unsigned int __cil_tmp9;
  unsigned int __cil_tmp10;
  unsigned int __cil_tmp11;
  unsigned int __cil_tmp12;
  unsigned int __cil_tmp13;
  unsigned int __cil_tmp14;
  unsigned int __cil_tmp15;
  unsigned int __cil_tmp16;
  int __cil_tmp17;
  unsigned int __cil_tmp18;
  unsigned int __cil_tmp19;
  unsigned int __cil_tmp20;
  unsigned int __cil_tmp21;
  unsigned int __cil_tmp22;
  unsigned int __cil_tmp23;
  int __cil_tmp24;
  unsigned int __cil_tmp25;
  unsigned int __cil_tmp26;
  int __cil_tmp27;
  unsigned int __cil_tmp28;
  unsigned int __cil_tmp29;
  unsigned int __cil_tmp30;
  struct List *__cil_tmp31;
  unsigned int __cil_tmp32;
  unsigned int __cil_tmp33;
  unsigned int __cil_tmp34;
  struct List *__cil_tmp35;
  unsigned int __cil_tmp36;
  unsigned int __cil_tmp37;
  unsigned int __cil_tmp38;
  unsigned int __cil_tmp39;
  int __cil_tmp40;
  unsigned int __cil_tmp41;
  unsigned int __cil_tmp42;
  int *mem_43;
  struct Patient **mem_44;
  int *mem_45;
  int *mem_46;
  int *mem_47;
  int *mem_48;
  int *mem_49;
  int *mem_50;
  int *mem_51;
  int *mem_52;
  struct List **mem_53;
  {
    {
      while (1) {
      while_5_continue:;
        {
          __cil_tmp5 = (void *)0;
          __cil_tmp6 = (unsigned int)__cil_tmp5;
          __cil_tmp7 = (unsigned int)list;
          if (__cil_tmp7 != __cil_tmp6) {
          } else {
            goto while_5_break;
          }
        }
        __cil_tmp8 = 32 + 4;
        __cil_tmp9 = (unsigned int)village;
        __cil_tmp10 = __cil_tmp9 + __cil_tmp8;
        mem_43 = (int *)__cil_tmp10;
        i = *mem_43;
        mem_44 = (struct Patient **)list;
        p = *mem_44;
        if (i > 0) {
          {
            __cil_tmp11 = 32 + 4;
            __cil_tmp12 = (unsigned int)village;
            __cil_tmp13 = __cil_tmp12 + __cil_tmp11;
            __cil_tmp14 = 32 + 4;
            __cil_tmp15 = (unsigned int)village;
            __cil_tmp16 = __cil_tmp15 + __cil_tmp14;
            mem_45 = (int *)__cil_tmp16;
            __cil_tmp17 = *mem_45;
            mem_46 = (int *)__cil_tmp13;
            *mem_46 = __cil_tmp17 - 1;
            __cil_tmp18 = (unsigned int)p;
            __cil_tmp19 = __cil_tmp18 + 8;
            mem_47 = (int *)__cil_tmp19;
            *mem_47 = 3;
            __cil_tmp20 = (unsigned int)p;
            __cil_tmp21 = __cil_tmp20 + 4;
            __cil_tmp22 = (unsigned int)p;
            __cil_tmp23 = __cil_tmp22 + 8;
            mem_48 = (int *)__cil_tmp23;
            __cil_tmp24 = *mem_48;
            __cil_tmp25 = (unsigned int)p;
            __cil_tmp26 = __cil_tmp25 + 4;
            mem_49 = (int *)__cil_tmp26;
            __cil_tmp27 = *mem_49;
            mem_50 = (int *)__cil_tmp21;
            *mem_50 = __cil_tmp27 + __cil_tmp24;
            __cil_tmp28 = 32 + 12;
            __cil_tmp29 = (unsigned int)village;
            __cil_tmp30 = __cil_tmp29 + __cil_tmp28;
            __cil_tmp31 = (struct List *)__cil_tmp30;
            removeList(__cil_tmp31, p);
            __cil_tmp32 = 32 + 24;
            __cil_tmp33 = (unsigned int)village;
            __cil_tmp34 = __cil_tmp33 + __cil_tmp32;
            __cil_tmp35 = (struct List *)__cil_tmp34;
            addList(__cil_tmp35, p);
          }
        } else {
          __cil_tmp36 = (unsigned int)p;
          __cil_tmp37 = __cil_tmp36 + 4;
          __cil_tmp38 = (unsigned int)p;
          __cil_tmp39 = __cil_tmp38 + 4;
          mem_51 = (int *)__cil_tmp39;
          __cil_tmp40 = *mem_51;
          mem_52 = (int *)__cil_tmp37;
          *mem_52 = __cil_tmp40 + 1;
        }
        __cil_tmp41 = (unsigned int)list;
        __cil_tmp42 = __cil_tmp41 + 8;
        mem_53 = (struct List **)__cil_tmp42;
        list = *mem_53;
      }
    while_5_break:;
    }
    return;
  }
}


x86 assembly (clang, -O0):
<check_patients_waiting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1138 <check_patients_waiting+0x18>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     115f <check_patients_waiting+0x3f>
jmp    1164 <check_patients_waiting+0x44>
jmp    13de <check_patients_waiting+0x2be>
movl   $0x24,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0xe0(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1338 <check_patients_waiting+0x218>
movl   $0x24,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    -0x40(%rbp),%eax
mov    %eax,-0x48(%rbp)
movl   $0x24,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
add    -0x4c(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    -0x48(%rbp),%eax
mov    %rax,-0xf0(%rbp)
mov    -0x58(%rbp),%ecx
sub    $0x1,%ecx
mov    -0xf0(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x20(%rbp),%rax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x68(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    %rax,-0x100(%rbp)
mov    -0x100(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x74(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x80(%rbp)
mov    -0x68(%rbp),%eax
mov    %rax,-0x110(%rbp)
mov    -0x80(%rbp),%ecx
add    -0x74(%rbp),%ecx
mov    -0x110(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x2c,-0x84(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%eax
add    -0x84(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <removeList@plt>
movl   $0x38,-0x9c(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xa0(%rbp)
mov    -0xa0(%rbp),%eax
add    -0x9c(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <addList@plt>
jmp    13a5 <check_patients_waiting+0x285>
mov    -0x20(%rbp),%rax
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0xb8(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0xc0(%rbp)
mov    -0xc0(%rbp),%eax
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc4(%rbp)
mov    -0xb8(%rbp),%eax
mov    %rax,-0x120(%rbp)
mov    -0xc4(%rbp),%ecx
add    $0x1,%ecx
mov    -0x120(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    %eax,-0xc8(%rbp)
mov    -0xc8(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0xcc(%rbp)
mov    -0xcc(%rbp),%eax
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
jmp    1133 <check_patients_waiting+0x13>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_patients_waiting>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%rbx
test   %ebx,%ebx
je     11a0 <check_patients_waiting+0x80>
mov    %rdi,%r14
lea    0x24(%rdi),%r13d
lea    0x2c(%rdi),%r15d
add    $0x38,%r14d
jmp    1163 <check_patients_waiting+0x43>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x4,%r12d
addl   $0x1,(%r12)
add    $0x8,%ebx
mov    (%rbx),%rbx
test   %ebx,%ebx
je     11a0 <check_patients_waiting+0x80>
mov    0x0(%r13),%eax
mov    (%rbx),%r12
test   %eax,%eax
jle    1150 <check_patients_waiting+0x30>
add    $0xffffffff,%eax
mov    %eax,0x0(%r13)
lea    0x8(%r12),%eax
movl   $0x3,(%rax)
lea    0x4(%r12),%eax
addl   $0x3,(%rax)
mov    %r15,%rdi
mov    %r12,%rsi
call   1030 <removeList@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <addList@plt>
jmp    1159 <check_patients_waiting+0x39>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.Village = type { i32 }
%struct.List = type { i32 }
%struct.Patient = type { i32 }
define void @check_patients_waiting(%struct.Village* %0, %struct.List* %1) {
%3 = alloca %struct.Village*
%4 = alloca %struct.List*
%5 = alloca i32
%6 = alloca %struct.Patient*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca %struct.List*
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca %struct.List*
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32*
%46 = alloca %struct.Patient**
%47 = alloca i32*
%48 = alloca i32*
%49 = alloca i32*
%50 = alloca i32*
%51 = alloca i32*
%52 = alloca i32*
%53 = alloca i32*
%54 = alloca i32*
%55 = alloca %struct.List**
store %struct.Village* %0, %struct.Village** %3
store %struct.List* %1, %struct.List** %4
br label %56
56: ; preds = %2, %185
br label %57
57: ; preds = %56
store i8* null, i8** %7
%58 = load i8*, i8** %7
%59 = ptrtoint i8* %58 to i32
store i32 %59, i32* %8
%60 = load %struct.List*, %struct.List** %4
%61 = ptrtoint %struct.List* %60 to i32
store i32 %61, i32* %9
%62 = load i32, i32* %9
%63 = load i32, i32* %8
%64 = icmp ne i32 %62, %63
br i1 %64, label %65, label %66
65: ; preds = %57
br label %67
66: ; preds = %57
br label %195
67: ; preds = %65
store i32 36, i32* %10
%68 = load %struct.Village*, %struct.Village** %3
%69 = ptrtoint %struct.Village* %68 to i32
store i32 %69, i32* %11
%70 = load i32, i32* %11
%71 = load i32, i32* %10
%72 = add i32 %70, %71
store i32 %72, i32* %12
%73 = load i32, i32* %12
%74 = zext i32 %73 to i64
%75 = inttoptr i64 %74 to i32*
store i32* %75, i32** %45
%76 = load i32*, i32** %45
%77 = load i32, i32* %76
store i32 %77, i32* %5
%78 = load %struct.List*, %struct.List** %4
%79 = bitcast %struct.List* %78 to %struct.Patient**
store %struct.Patient** %79, %struct.Patient*** %46
%80 = load %struct.Patient**, %struct.Patient*** %46
%81 = load %struct.Patient*, %struct.Patient** %80
store %struct.Patient* %81, %struct.Patient** %6
%82 = load i32, i32* %5
%83 = icmp sgt i32 %82, 0
br i1 %83, label %84, label %165
84: ; preds = %67
store i32 36, i32* %13
%85 = load %struct.Village*, %struct.Village** %3
%86 = ptrtoint %struct.Village* %85 to i32
store i32 %86, i32* %14
%87 = load i32, i32* %14
%88 = load i32, i32* %13
%89 = add i32 %87, %88
store i32 %89, i32* %15
store i32 36, i32* %16
%90 = load %struct.Village*, %struct.Village** %3
%91 = ptrtoint %struct.Village* %90 to i32
store i32 %91, i32* %17
%92 = load i32, i32* %17
%93 = load i32, i32* %16
%94 = add i32 %92, %93
store i32 %94, i32* %18
%95 = load i32, i32* %18
%96 = zext i32 %95 to i64
%97 = inttoptr i64 %96 to i32*
store i32* %97, i32** %47
%98 = load i32*, i32** %47
%99 = load i32, i32* %98
store i32 %99, i32* %19
%100 = load i32, i32* %15
%101 = zext i32 %100 to i64
%102 = inttoptr i64 %101 to i32*
store i32* %102, i32** %48
%103 = load i32, i32* %19
%104 = sub nsw i32 %103, 1
%105 = load i32*, i32** %48
store i32 %104, i32* %105
%106 = load %struct.Patient*, %struct.Patient** %6
%107 = ptrtoint %struct.Patient* %106 to i32
store i32 %107, i32* %20
%108 = load i32, i32* %20
%109 = add i32 %108, 8
store i32 %109, i32* %21
%110 = load i32, i32* %21
%111 = zext i32 %110 to i64
%112 = inttoptr i64 %111 to i32*
store i32* %112, i32** %49
%113 = load i32*, i32** %49
store i32 3, i32* %113
%114 = load %struct.Patient*, %struct.Patient** %6
%115 = ptrtoint %struct.Patient* %114 to i32
store i32 %115, i32* %22
%116 = load i32, i32* %22
%117 = add i32 %116, 4
store i32 %117, i32* %23
%118 = load %struct.Patient*, %struct.Patient** %6
%119 = ptrtoint %struct.Patient* %118 to i32
store i32 %119, i32* %24
%120 = load i32, i32* %24
%121 = add i32 %120, 8
store i32 %121, i32* %25
%122 = load i32, i32* %25
%123 = zext i32 %122 to i64
%124 = inttoptr i64 %123 to i32*
store i32* %124, i32** %50
%125 = load i32*, i32** %50
%126 = load i32, i32* %125
store i32 %126, i32* %26
%127 = load %struct.Patient*, %struct.Patient** %6
%128 = ptrtoint %struct.Patient* %127 to i32
store i32 %128, i32* %27
%129 = load i32, i32* %27
%130 = add i32 %129, 4
store i32 %130, i32* %28
%131 = load i32, i32* %28
%132 = zext i32 %131 to i64
%133 = inttoptr i64 %132 to i32*
store i32* %133, i32** %51
%134 = load i32*, i32** %51
%135 = load i32, i32* %134
store i32 %135, i32* %29
%136 = load i32, i32* %23
%137 = zext i32 %136 to i64
%138 = inttoptr i64 %137 to i32*
store i32* %138, i32** %52
%139 = load i32, i32* %29
%140 = load i32, i32* %26
%141 = add nsw i32 %139, %140
%142 = load i32*, i32** %52
store i32 %141, i32* %142
store i32 44, i32* %30
%143 = load %struct.Village*, %struct.Village** %3
%144 = ptrtoint %struct.Village* %143 to i32
store i32 %144, i32* %31
%145 = load i32, i32* %31
%146 = load i32, i32* %30
%147 = add i32 %145, %146
store i32 %147, i32* %32
%148 = load i32, i32* %32
%149 = zext i32 %148 to i64
%150 = inttoptr i64 %149 to %struct.List*
store %struct.List* %150, %struct.List** %33
%151 = load %struct.List*, %struct.List** %33
%152 = load %struct.Patient*, %struct.Patient** %6
%153 = call i32 @removeList(%struct.List* %151, %struct.Patient* %152)
store i32 56, i32* %34
%154 = load %struct.Village*, %struct.Village** %3
%155 = ptrtoint %struct.Village* %154 to i32
store i32 %155, i32* %35
%156 = load i32, i32* %35
%157 = load i32, i32* %34
%158 = add i32 %156, %157
store i32 %158, i32* %36
%159 = load i32, i32* %36
%160 = zext i32 %159 to i64
%161 = inttoptr i64 %160 to %struct.List*
store %struct.List* %161, %struct.List** %37
%162 = load %struct.List*, %struct.List** %37
%163 = load %struct.Patient*, %struct.Patient** %6
%164 = call i32 @addList(%struct.List* %162, %struct.Patient* %163)
br label %185
165: ; preds = %67
%166 = load %struct.Patient*, %struct.Patient** %6
%167 = ptrtoint %struct.Patient* %166 to i32
store i32 %167, i32* %38
%168 = load i32, i32* %38
%169 = add i32 %168, 4
store i32 %169, i32* %39
%170 = load %struct.Patient*, %struct.Patient** %6
%171 = ptrtoint %struct.Patient* %170 to i32
store i32 %171, i32* %40
%172 = load i32, i32* %40
%173 = add i32 %172, 4
store i32 %173, i32* %41
%174 = load i32, i32* %41
%175 = zext i32 %174 to i64
%176 = inttoptr i64 %175 to i32*
store i32* %176, i32** %53
%177 = load i32*, i32** %53
%178 = load i32, i32* %177
store i32 %178, i32* %42
%179 = load i32, i32* %39
%180 = zext i32 %179 to i64
%181 = inttoptr i64 %180 to i32*
store i32* %181, i32** %54
%182 = load i32, i32* %42
%183 = add nsw i32 %182, 1
%184 = load i32*, i32** %54
store i32 %183, i32* %184
br label %185
185: ; preds = %165, %84
%186 = load %struct.List*, %struct.List** %4
%187 = ptrtoint %struct.List* %186 to i32
store i32 %187, i32* %43
%188 = load i32, i32* %43
%189 = add i32 %188, 8
store i32 %189, i32* %44
%190 = load i32, i32* %44
%191 = zext i32 %190 to i64
%192 = inttoptr i64 %191 to %struct.List**
store %struct.List** %192, %struct.List*** %55
%193 = load %struct.List**, %struct.List*** %55
%194 = load %struct.List*, %struct.List** %193
store %struct.List* %194, %struct.List** %4
br label %56
195: ; preds = %66
ret void
}

LLVM IR (-O2):
%struct.Village = type { i32 }
%struct.List = type { i32 }
%struct.Patient = type { i32 }
define void @check_patients_waiting(%struct.Village* %0, %struct.List* %1) {
%3 = ptrtoint %struct.List* %1 to i64
%4 = trunc i64 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %52, label %6
6: ; preds = %2
%7 = ptrtoint %struct.Village* %0 to i64
%8 = add i64 %7, 36
%9 = and i64 %8, 4294967295
%10 = inttoptr i64 %9 to i32*
%11 = add i64 %7, 44
%12 = and i64 %11, 4294967295
%13 = inttoptr i64 %12 to %struct.List*
%14 = add i64 %7, 56
%15 = and i64 %14, 4294967295
%16 = inttoptr i64 %15 to %struct.List*
br label %17
17: ; preds = %6, %44
%18 = phi i64 [ %3, %6 ], [ %49, %44 ]
%19 = phi %struct.List* [ %1, %6 ], [ %48, %44 ]
%20 = load i32, i32* %10
%21 = bitcast %struct.List* %19 to %struct.Patient**
%22 = load %struct.Patient*, %struct.Patient** %21
%23 = icmp sgt i32 %20, 0
br i1 %23, label %24, label %37
24: ; preds = %17
%25 = add nsw i32 %20, -1
store i32 %25, i32* %10
%26 = ptrtoint %struct.Patient* %22 to i64
%27 = add i64 %26, 8
%28 = and i64 %27, 4294967295
%29 = inttoptr i64 %28 to i32*
store i32 3, i32* %29
%30 = add i64 %26, 4
%31 = and i64 %30, 4294967295
%32 = inttoptr i64 %31 to i32*
%33 = load i32, i32* %32
%34 = add nsw i32 %33, 3
store i32 %34, i32* %32
%35 = tail call i32 @removeList(%struct.List* %13, %struct.Patient* %22)
%36 = tail call i32 @addList(%struct.List* %16, %struct.Patient* %22)
br label %44
37: ; preds = %17
%38 = ptrtoint %struct.Patient* %22 to i64
%39 = add i64 %38, 4
%40 = and i64 %39, 4294967295
%41 = inttoptr i64 %40 to i32*
%42 = load i32, i32* %41
%43 = add nsw i32 %42, 1
store i32 %43, i32* %41
br label %44
44: ; preds = %37, %24
%45 = add i64 %18, 8
%46 = and i64 %45, 4294967295
%47 = inttoptr i64 %46 to %struct.List**
%48 = load %struct.List*, %struct.List** %47
%49 = ptrtoint %struct.List* %48 to i64
%50 = trunc i64 %49 to i32
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %17
52: ; preds = %44, %2
ret void
}