#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 */
int atoi(char *);
int /*<<< orphan*/ browser(int, int);
int main(int argc, char *argv[]) {
  int port = 8989, addr = 0xbf89ba38;
  if (argc > 1)
    port = atoi(argv[1]);
  for (addr = 0xb7000060; addr <= 0xb7fff060; addr = addr + 0x00001000)
    browser(port, addr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x231d,-0x14(%rbp)
movl   $0xbf89ba38,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    115e <main+0x3e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
movl   $0xb7000060,-0x18(%rbp)
cmpl   $0xb7fff060,-0x18(%rbp)
ja     118d <main+0x6d>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <browser@plt>
mov    -0x18(%rbp),%eax
add    $0x1000,%eax
mov    %eax,-0x18(%rbp)
jmp    1165 <main+0x45>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x231d,%ebx
cmp    $0x2,%edi
jl     1138 <main+0x18>
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebx
mov    $0xb6fff060,%ebp
nopl   (%rax)
add    $0x1000,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <browser@plt>
cmp    $0xb7ffe061,%ebp
jb     1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 8989, i32* %6
store i32 -1081492936, i32* %7
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %6
br label %15
15: ; preds = %10, %2
store i32 -1224736672, i32* %7
br label %16
16: ; preds = %23, %15
%17 = load i32, i32* %7
%18 = icmp ule i32 %17, -1207963552
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = call i32 @browser(i32 %20, i32 %21)
br label %23
23: ; preds = %19
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 4096
store i32 %25, i32* %7
br label %16
26: ; preds = %16
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ %7, %4 ], [ 8989, %2 ]
br label %10
10: ; preds = %8, %10
%11 = phi i32 [ -1224736672, %8 ], [ %13, %10 ]
%12 = tail call i32 @browser(i32 %9, i32 %11)
%13 = add nuw nsw i32 %11, 4096
%14 = icmp ult i32 %11, -1207967647
br i1 %14, label %10, label %15
15: ; preds = %10
ret i32 0
}