#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 Address {
  int dummy;
};
typedef int /*<<< orphan*/ str;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ delAddress(struct Address *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
struct Address *newAddress();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printAddress(struct Address *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ setCityState(struct Address *, char *);
int /*<<< orphan*/ setLastNameFirstName(struct Address *, char *);
int /*<<< orphan*/ setStreetAddress(struct Address *, char *);
int /*<<< orphan*/ setZipCode(struct Address *, char *);
int /*<<< orphan*/ zipCodeSort(struct Address **, unsigned int);
int main() {
  FILE *input = NULL;
  struct Address *contactList[50];
  unsigned int contactX = 0;
  unsigned int lineN = 0;
  char str[512];
  unsigned int i = 0;
  input = fopen("benihana.txt", "r");
  if (input != NULL) {
    contactList[contactX] = newAddress();
    if (contactList[contactX] == NULL) {
      printf("newAddress: Unsuccessful.\nProgram terminated.\n");
      exit(EXIT_FAILURE);
    }
    while (fgets(str, sizeof(str), input)) {
      if (lineN == 5) {
        lineN = 0;
        ++contactX;
        if (contactX > 50) {
          --contactX;
          printf("This program was designed to process a maximum of %d "
                 "contacts. Further input will be ignored.\n",
                 contactX);
          break;
        }
        contactList[contactX] = newAddress();
        if (contactList[contactX] == NULL) {
          printf("newAddress: Unsuccessful.\nProgram terminated.\n");
          exit(EXIT_FAILURE);
        }
      }
      if (lineN == 0)
        setLastNameFirstName(contactList[contactX], str);
      if (lineN == 1)
        setStreetAddress(contactList[contactX], str);
      if (lineN == 2)
        setCityState(contactList[contactX], str);
      if (lineN == 3)
        setZipCode(contactList[contactX], str);
      ++lineN;
    }
  } else {
    perror("fopen: Unsuccessful.\nProgram terminated.\n");
    exit(EXIT_FAILURE);
  }
  fclose(input);
  zipCodeSort(contactList, contactX);
  for (i; i <= contactX; ++i) {
    printAddress(contactList[i]);
    delAddress(contactList[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3c0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x1a4(%rbp)
movl   $0x0,-0x1a8(%rbp)
movl   $0x0,-0x3b4(%rbp)
lea    0xde1(%rip),%rdi
lea    0xde7(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1405 <main+0x225>
mov    $0x0,%al
call   10f0 <newAddress@plt>
mov    %rax,%rcx
mov    -0x1a4(%rbp),%eax
mov    %rcx,-0x1a0(%rbp,%rax,8)
ff
mov    -0x1a4(%rbp),%eax
cmpq   $0x0,-0x1a0(%rbp,%rax,8)
jne    1283 <main+0xa3>
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2d64(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
jmp    1288 <main+0xa8>
lea    -0x3b0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x200,%esi
call   10b0 <fgets@plt>
cmp    $0x0,%rax
je     1400 <main+0x220>
cmpl   $0x5,-0x1a8(%rbp)
jne    1350 <main+0x170>
movl   $0x0,-0x1a8(%rbp)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
cmpl   $0x32,-0x1a4(%rbp)
jbe    1302 <main+0x122>
mov    -0x1a4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%esi
lea    0xd48(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1400 <main+0x220>
mov    $0x0,%al
call   10f0 <newAddress@plt>
mov    %rax,%rcx
mov    -0x1a4(%rbp),%eax
mov    %rcx,-0x1a0(%rbp,%rax,8)
ff
mov    -0x1a4(%rbp),%eax
cmpq   $0x0,-0x1a0(%rbp,%rax,8)
jne    134b <main+0x16b>
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2c9c(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
jmp    1350 <main+0x170>
cmpl   $0x0,-0x1a8(%rbp)
jne    1377 <main+0x197>
mov    -0x1a4(%rbp),%eax
mov    -0x1a0(%rbp,%rax,8),%rdi
ff
lea    -0x3b0(%rbp),%rsi
call   1090 <setLastNameFirstName@plt>
cmpl   $0x1,-0x1a8(%rbp)
jne    139e <main+0x1be>
mov    -0x1a4(%rbp),%eax
mov    -0x1a0(%rbp,%rax,8),%rdi
ff
lea    -0x3b0(%rbp),%rsi
call   10c0 <setStreetAddress@plt>
cmpl   $0x2,-0x1a8(%rbp)
jne    13c5 <main+0x1e5>
mov    -0x1a4(%rbp),%eax
mov    -0x1a0(%rbp,%rax,8),%rdi
ff
lea    -0x3b0(%rbp),%rsi
call   1040 <setCityState@plt>
cmpl   $0x3,-0x1a8(%rbp)
jne    13ec <main+0x20c>
mov    -0x1a4(%rbp),%eax
mov    -0x1a0(%rbp,%rax,8),%rdi
ff
lea    -0x3b0(%rbp),%rsi
call   1060 <setZipCode@plt>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1288 <main+0xa8>
jmp    141f <main+0x23f>
lea    0xc91(%rip),%rdi
call   10e0 <perror@plt>
mov    0x2bc8(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    -0x1a0(%rbp),%rdi
mov    -0x1a4(%rbp),%esi
call   1070 <zipCodeSort@plt>
mov    -0x3b4(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
ja     1486 <main+0x2a6>
mov    -0x3b4(%rbp),%eax
mov    -0x1a0(%rbp,%rax,8),%rdi
ff
call   1080 <printAddress@plt>
mov    -0x3b4(%rbp),%eax
mov    -0x1a0(%rbp,%rax,8),%rdi
ff
call   10a0 <delAddress@plt>
mov    -0x3b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3b4(%rbp)
jmp    143a <main+0x25a>
xor    %eax,%eax
add    $0x3c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x398,%rsp
lea    0xe10(%rip),%rdi
lea    0xe16(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     137e <main+0x18e>
mov    %rax,%r14
xor    %r13d,%r13d
xor    %eax,%eax
call   1100 <newAddress@plt>
mov    %rax,(%rsp)
test   %rax,%rax
je     1370 <main+0x180>
lea    0x190(%rsp),%rdi
mov    $0x200,%esi
mov    %r14,%rdx
call   10c0 <fgets@plt>
test   %rax,%rax
je     1325 <main+0x135>
lea    0x190(%rsp),%r15
lea    0xd9c(%rip),%r12
xor    %ebp,%ebp
xor    %r13d,%r13d
jmp    129c <main+0xac>
mov    %r13d,%eax
mov    (%rsp,%rax,8),%rdi
mov    %r15,%rsi
call   1070 <setZipCode@plt>
mov    $0x3,%ebp
nop
add    $0x1,%ebp
mov    %r15,%rdi
mov    $0x200,%esi
mov    %r14,%rdx
call   10c0 <fgets@plt>
test   %rax,%rax
je     1325 <main+0x135>
cmp    $0x5,%ebp
ja     1280 <main+0x90>
mov    %ebp,%eax
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
mov    %r13d,%eax
mov    (%rsp,%rax,8),%rax
mov    %r13d,%ebx
jmp    12ff <main+0x10f>
mov    %r13d,%eax
mov    (%rsp,%rax,8),%rdi
mov    %r15,%rsi
call   10d0 <setStreetAddress@plt>
mov    $0x1,%ebp
jmp    1280 <main+0x90>
mov    %r13d,%eax
mov    (%rsp,%rax,8),%rdi
mov    %r15,%rsi
call   1050 <setCityState@plt>
mov    $0x2,%ebp
jmp    1280 <main+0x90>
lea    0x1(%r13),%ebx
cmp    $0x33,%ebx
jae    1314 <main+0x124>
xor    %eax,%eax
call   1100 <newAddress@plt>
mov    %ebx,%ecx
mov    %rax,(%rsp,%rcx,8)
test   %rax,%rax
je     1370 <main+0x180>
mov    %rax,%rdi
mov    %r15,%rsi
call   10a0 <setLastNameFirstName@plt>
xor    %ebp,%ebp
mov    %ebx,%r13d
jmp    1280 <main+0x90>
lea    0xd0c(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %rsp,%rdi
mov    %r13d,%esi
call   1080 <zipCodeSort@plt>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%ebp
mov    (%rsp,%rbp,8),%rdi
call   1090 <printAddress@plt>
mov    (%rsp,%rbp,8),%rdi
call   10b0 <delAddress@plt>
add    $0x1,%ebx
cmp    %r13d,%ebx
jbe    1340 <main+0x150>
xor    %eax,%eax
add    $0x398,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd39(%rip),%rdi
call   1030 <puts@plt>
jmp    138a <main+0x19a>
lea    0xd01(%rip),%rdi
call   10f0 <perror@plt>
mov    0x2c4f(%rip),%rax
mov    (%rax),%edi
call   1110 <exit@plt>

LLVM IR (-O0):
%struct.Address = type { i32 }
@.str = [13 x i8] c"benihana.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [47 x i8] c"newAddress: Unsuccessful.\0AProgram terminated.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [95 x i8] c"This program was designed to process a maximum of %d contacts. Further input will be ignored.\0A\00"
@.str.4 = [42 x i8] c"fopen: Unsuccessful.\0AProgram terminated.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [50 x %struct.Address*]
%4 = alloca i32
%5 = alloca i32
%6 = alloca [512 x i8]
%7 = alloca i32
store i32 0, i32* %1
store i32* null, i32** %2
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %7
%8 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %8, i32** %2
%9 = load i32*, i32** %2
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %103
11: ; preds = %0
%12 = call %struct.Address* (...) @newAddress()
%13 = load i32, i32* %4
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %14
store %struct.Address* %12, %struct.Address** %15
%16 = load i32, i32* %4
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %17
%19 = load %struct.Address*, %struct.Address** %18
%20 = icmp eq %struct.Address* %19, null
br i1 %20, label %21, label %25
21: ; preds = %11
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%23 = load i32, i32* @EXIT_FAILURE
%24 = call i32 @exit(i32 %23)
unreachable
25: ; preds = %11
br label %26
26: ; preds = %99, %25
%27 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%28 = load i32*, i32** %2
%29 = call i64 @fgets(i8* %27, i32 512, i32* %28)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %102
31: ; preds = %26
%32 = load i32, i32* %5
%33 = icmp eq i32 %32, 5
br i1 %33, label %34, label %59
34: ; preds = %31
store i32 0, i32* %5
%35 = load i32, i32* %4
%36 = add i32 %35, 1
store i32 %36, i32* %4
%37 = load i32, i32* %4
%38 = icmp ugt i32 %37, 50
br i1 %38, label %39, label %44
39: ; preds = %34
%40 = load i32, i32* %4
%41 = add i32 %40, -1
store i32 %41, i32* %4
%42 = load i32, i32* %4
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.3, i64 0, i64 0), i32 %42)
br label %102
44: ; preds = %34
%45 = call %struct.Address* (...) @newAddress()
%46 = load i32, i32* %4
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %47
store %struct.Address* %45, %struct.Address** %48
%49 = load i32, i32* %4
%50 = zext i32 %49 to i64
%51 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %50
%52 = load %struct.Address*, %struct.Address** %51
%53 = icmp eq %struct.Address* %52, null
br i1 %53, label %54, label %58
54: ; preds = %44
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%56 = load i32, i32* @EXIT_FAILURE
%57 = call i32 @exit(i32 %56)
unreachable
58: ; preds = %44
br label %59
59: ; preds = %58, %31
%60 = load i32, i32* %5
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %69
62: ; preds = %59
%63 = load i32, i32* %4
%64 = zext i32 %63 to i64
%65 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %64
%66 = load %struct.Address*, %struct.Address** %65
%67 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%68 = call i32 @setLastNameFirstName(%struct.Address* %66, i8* %67)
br label %69
69: ; preds = %62, %59
%70 = load i32, i32* %5
%71 = icmp eq i32 %70, 1
br i1 %71, label %72, label %79
72: ; preds = %69
%73 = load i32, i32* %4
%74 = zext i32 %73 to i64
%75 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %74
%76 = load %struct.Address*, %struct.Address** %75
%77 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%78 = call i32 @setStreetAddress(%struct.Address* %76, i8* %77)
br label %79
79: ; preds = %72, %69
%80 = load i32, i32* %5
%81 = icmp eq i32 %80, 2
br i1 %81, label %82, label %89
82: ; preds = %79
%83 = load i32, i32* %4
%84 = zext i32 %83 to i64
%85 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %84
%86 = load %struct.Address*, %struct.Address** %85
%87 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%88 = call i32 @setCityState(%struct.Address* %86, i8* %87)
br label %89
89: ; preds = %82, %79
%90 = load i32, i32* %5
%91 = icmp eq i32 %90, 3
br i1 %91, label %92, label %99
92: ; preds = %89
%93 = load i32, i32* %4
%94 = zext i32 %93 to i64
%95 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %94
%96 = load %struct.Address*, %struct.Address** %95
%97 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%98 = call i32 @setZipCode(%struct.Address* %96, i8* %97)
br label %99
99: ; preds = %92, %89
%100 = load i32, i32* %5
%101 = add i32 %100, 1
store i32 %101, i32* %5
br label %26
102: ; preds = %39, %26
br label %107
103: ; preds = %0
%104 = call i32 @perror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
%105 = load i32, i32* @EXIT_FAILURE
%106 = call i32 @exit(i32 %105)
unreachable
107: ; preds = %102
%108 = load i32*, i32** %2
%109 = call i32 @fclose(i32* %108)
%110 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 0
%111 = load i32, i32* %4
%112 = call i32 @zipCodeSort(%struct.Address** %110, i32 %111)
%113 = load i32, i32* %7
br label %114
114: ; preds = %129, %107
%115 = load i32, i32* %7
%116 = load i32, i32* %4
%117 = icmp ule i32 %115, %116
br i1 %117, label %118, label %132
118: ; preds = %114
%119 = load i32, i32* %7
%120 = zext i32 %119 to i64
%121 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %120
%122 = load %struct.Address*, %struct.Address** %121
%123 = call i32 @printAddress(%struct.Address* %122)
%124 = load i32, i32* %7
%125 = zext i32 %124 to i64
%126 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %3, i64 0, i64 %125
%127 = load %struct.Address*, %struct.Address** %126
%128 = call i32 @delAddress(%struct.Address* %127)
br label %129
129: ; preds = %118
%130 = load i32, i32* %7
%131 = add i32 %130, 1
store i32 %131, i32* %7
br label %114
132: ; preds = %114
ret i32 0
}

LLVM IR (-O2):
%struct.Address = type { i32 }
@.str = [13 x i8] c"benihana.txt\00"
@.str.1 = [2 x i8] c"r\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [95 x i8] c"This program was designed to process a maximum of %d contacts. Further input will be ignored.\0A\00"
@.str.4 = [42 x i8] c"fopen: Unsuccessful.\0AProgram terminated.\0A\00"
@str.5 = [46 x i8] c"newAddress: Unsuccessful.\0AProgram terminated.\00"
define i32 @main() {
%1 = alloca [50 x %struct.Address*]
%2 = alloca [512 x i8]
%3 = bitcast [50 x %struct.Address*]* %1 to i8*
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %64, label %7
7: ; preds = %0
%8 = tail call %struct.Address* (...) @newAddress()
%9 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %1, i64 0, i64 0
store %struct.Address* %8, %struct.Address** %9
%10 = icmp eq %struct.Address* %8, null
br i1 %10, label %14, label %11
11: ; preds = %7
%12 = call i64 @fgets(i8* %4, i32 512, i32* %5)
%13 = icmp eq i64 %12, 0
br i1 %13, label %68, label %18
14: ; preds = %7
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.5, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = tail call i32 @exit(i32 %16)
unreachable
18: ; preds = %11, %58
%19 = phi i32 [ %61, %58 ], [ 0, %11 ]
%20 = phi i32 [ %60, %58 ], [ 0, %11 ]
switch i32 %19, label %58 [
i32 5, label %25
i32 0, label %21
i32 1, label %43
i32 2, label %48
i32 3, label %53
]
21: ; preds = %18
%22 = zext i32 %20 to i64
%23 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %1, i64 0, i64 %22
%24 = load %struct.Address*, %struct.Address** %23
br label %39
25: ; preds = %18
%26 = add i32 %20, 1
%27 = icmp ugt i32 %26, 50
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @.str.3, i64 0, i64 0), i32 %20)
br label %68
30: ; preds = %25
%31 = call %struct.Address* (...) @newAddress()
%32 = zext i32 %26 to i64
%33 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %1, i64 0, i64 %32
store %struct.Address* %31, %struct.Address** %33
%34 = icmp eq %struct.Address* %31, null
br i1 %34, label %35, label %39
35: ; preds = %30
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.5, i64 0, i64 0))
%37 = load i32, i32* @EXIT_FAILURE
%38 = call i32 @exit(i32 %37)
unreachable
39: ; preds = %21, %30
%40 = phi %struct.Address* [ %31, %30 ], [ %24, %21 ]
%41 = phi i32 [ %26, %30 ], [ %20, %21 ]
%42 = call i32 @setLastNameFirstName(%struct.Address* %40, i8* %4)
br label %58
43: ; preds = %18
%44 = zext i32 %20 to i64
%45 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %1, i64 0, i64 %44
%46 = load %struct.Address*, %struct.Address** %45
%47 = call i32 @setStreetAddress(%struct.Address* %46, i8* %4)
br label %58
48: ; preds = %18
%49 = zext i32 %20 to i64
%50 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %1, i64 0, i64 %49
%51 = load %struct.Address*, %struct.Address** %50
%52 = call i32 @setCityState(%struct.Address* %51, i8* %4)
br label %58
53: ; preds = %18
%54 = zext i32 %20 to i64
%55 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %1, i64 0, i64 %54
%56 = load %struct.Address*, %struct.Address** %55
%57 = call i32 @setZipCode(%struct.Address* %56, i8* %4)
br label %58
58: ; preds = %18, %48, %43, %39, %53
%59 = phi i32 [ 2, %48 ], [ 1, %43 ], [ 0, %39 ], [ 3, %53 ], [ %19, %18 ]
%60 = phi i32 [ %20, %48 ], [ %20, %43 ], [ %41, %39 ], [ %20, %53 ], [ %20, %18 ]
%61 = add i32 %59, 1
%62 = call i64 @fgets(i8* %4, i32 512, i32* %5)
%63 = icmp eq i64 %62, 0
br i1 %63, label %68, label %18
64: ; preds = %0
%65 = tail call i32 @perror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
%66 = load i32, i32* @EXIT_FAILURE
%67 = tail call i32 @exit(i32 %66)
unreachable
68: ; preds = %58, %11, %28
%69 = phi i32 [ %20, %28 ], [ 0, %11 ], [ %60, %58 ]
%70 = call i32 @fclose(i32* %5)
%71 = call i32 @zipCodeSort(%struct.Address** %9, i32 %69)
br label %72
72: ; preds = %68, %72
%73 = phi i32 [ 0, %68 ], [ %80, %72 ]
%74 = zext i32 %73 to i64
%75 = getelementptr inbounds [50 x %struct.Address*], [50 x %struct.Address*]* %1, i64 0, i64 %74
%76 = load %struct.Address*, %struct.Address** %75
%77 = call i32 @printAddress(%struct.Address* %76)
%78 = load %struct.Address*, %struct.Address** %75
%79 = call i32 @delAddress(%struct.Address* %78)
%80 = add i32 %73, 1
%81 = icmp ugt i32 %80, %69
br i1 %81, label %82, label %72
82: ; preds = %72
ret i32 0
}