#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 /*<<< orphan*/ doprime(int);
int main(int argc, char *argv[]) {
  int i;
  for (i = 2; i <= 50; i++) {
    doprime(i);
  }
  int j = 7 * 11 * 13 * 17 * 19;
  for (i = j - 15; i <= j + 15; i++) {
    doprime(i);
  }
  j = 23 * 29 * 31 * 37;
  for (i = j - 15; i <= j + 15; i++) {
    doprime(i);
  }
  return 0;
}


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   $0x2,-0x14(%rbp)
cmpl   $0x32,-0x14(%rbp)
jg     114d <main+0x3d>
mov    -0x14(%rbp),%edi
call   1030 <doprime@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
movl   $0x4eefb,-0x18(%rbp)
mov    -0x18(%rbp),%eax
sub    $0xf,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0xf,%ecx
cmp    %ecx,%eax
jg     1184 <main+0x74>
mov    -0x14(%rbp),%edi
call   1030 <doprime@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115d <main+0x4d>
movl   $0xbac79,-0x18(%rbp)
mov    -0x18(%rbp),%eax
sub    $0xf,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0xf,%ecx
cmp    %ecx,%eax
jg     11bb <main+0xab>
mov    -0x14(%rbp),%edi
call   1030 <doprime@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1194 <main+0x84>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <doprime@plt>
mov    $0x3,%edi
call   1030 <doprime@plt>
mov    $0x4,%edi
call   1030 <doprime@plt>
mov    $0x5,%edi
call   1030 <doprime@plt>
mov    $0x6,%edi
call   1030 <doprime@plt>
mov    $0x7,%edi
call   1030 <doprime@plt>
mov    $0x8,%edi
call   1030 <doprime@plt>
mov    $0x9,%edi
call   1030 <doprime@plt>
mov    $0xa,%edi
call   1030 <doprime@plt>
mov    $0xb,%edi
call   1030 <doprime@plt>
mov    $0xc,%edi
call   1030 <doprime@plt>
mov    $0xd,%edi
call   1030 <doprime@plt>
mov    $0xe,%edi
call   1030 <doprime@plt>
mov    $0xf,%edi
call   1030 <doprime@plt>
mov    $0x10,%edi
call   1030 <doprime@plt>
mov    $0x11,%edi
call   1030 <doprime@plt>
mov    $0x12,%edi
call   1030 <doprime@plt>
mov    $0x13,%edi
call   1030 <doprime@plt>
mov    $0x14,%edi
call   1030 <doprime@plt>
mov    $0x15,%edi
call   1030 <doprime@plt>
mov    $0x16,%edi
call   1030 <doprime@plt>
mov    $0x17,%edi
call   1030 <doprime@plt>
mov    $0x18,%edi
call   1030 <doprime@plt>
mov    $0x19,%edi
call   1030 <doprime@plt>
mov    $0x1a,%edi
call   1030 <doprime@plt>
mov    $0x1b,%edi
call   1030 <doprime@plt>
mov    $0x1c,%edi
call   1030 <doprime@plt>
mov    $0x1d,%edi
call   1030 <doprime@plt>
mov    $0x1e,%edi
call   1030 <doprime@plt>
mov    $0x1f,%edi
call   1030 <doprime@plt>
mov    $0x20,%edi
call   1030 <doprime@plt>
mov    $0x21,%edi
call   1030 <doprime@plt>
mov    $0x22,%edi
call   1030 <doprime@plt>
mov    $0x23,%edi
call   1030 <doprime@plt>
mov    $0x24,%edi
call   1030 <doprime@plt>
mov    $0x25,%edi
call   1030 <doprime@plt>
mov    $0x26,%edi
call   1030 <doprime@plt>
mov    $0x27,%edi
call   1030 <doprime@plt>
mov    $0x28,%edi
call   1030 <doprime@plt>
mov    $0x29,%edi
call   1030 <doprime@plt>
mov    $0x2a,%edi
call   1030 <doprime@plt>
mov    $0x2b,%edi
call   1030 <doprime@plt>
mov    $0x2c,%edi
call   1030 <doprime@plt>
mov    $0x2d,%edi
call   1030 <doprime@plt>
mov    $0x2e,%edi
call   1030 <doprime@plt>
mov    $0x2f,%edi
call   1030 <doprime@plt>
mov    $0x30,%edi
call   1030 <doprime@plt>
mov    $0x31,%edi
call   1030 <doprime@plt>
mov    $0x32,%edi
call   1030 <doprime@plt>
mov    $0x4eeec,%edi
call   1030 <doprime@plt>
mov    $0x4eeed,%edi
call   1030 <doprime@plt>
mov    $0x4eeee,%edi
call   1030 <doprime@plt>
mov    $0x4eeef,%edi
call   1030 <doprime@plt>
mov    $0x4eef0,%edi
call   1030 <doprime@plt>
mov    $0x4eef1,%edi
call   1030 <doprime@plt>
mov    $0x4eef2,%edi
call   1030 <doprime@plt>
mov    $0x4eef3,%edi
call   1030 <doprime@plt>
mov    $0x4eef4,%edi
call   1030 <doprime@plt>
mov    $0x4eef5,%edi
call   1030 <doprime@plt>
mov    $0x4eef6,%edi
call   1030 <doprime@plt>
mov    $0x4eef7,%edi
call   1030 <doprime@plt>
mov    $0x4eef8,%edi
call   1030 <doprime@plt>
mov    $0x4eef9,%edi
call   1030 <doprime@plt>
mov    $0x4eefa,%edi
call   1030 <doprime@plt>
mov    $0x4eefb,%edi
call   1030 <doprime@plt>
mov    $0x4eefc,%edi
call   1030 <doprime@plt>
mov    $0x4eefd,%edi
call   1030 <doprime@plt>
mov    $0x4eefe,%edi
call   1030 <doprime@plt>
mov    $0x4eeff,%edi
call   1030 <doprime@plt>
mov    $0x4ef00,%edi
call   1030 <doprime@plt>
mov    $0x4ef01,%edi
call   1030 <doprime@plt>
mov    $0x4ef02,%edi
call   1030 <doprime@plt>
mov    $0x4ef03,%edi
call   1030 <doprime@plt>
mov    $0x4ef04,%edi
call   1030 <doprime@plt>
mov    $0x4ef05,%edi
call   1030 <doprime@plt>
mov    $0x4ef06,%edi
call   1030 <doprime@plt>
mov    $0x4ef07,%edi
call   1030 <doprime@plt>
mov    $0x4ef08,%edi
call   1030 <doprime@plt>
mov    $0x4ef09,%edi
call   1030 <doprime@plt>
mov    $0x4ef0a,%edi
call   1030 <doprime@plt>
mov    $0xbac6a,%edi
call   1030 <doprime@plt>
mov    $0xbac6b,%edi
call   1030 <doprime@plt>
mov    $0xbac6c,%edi
call   1030 <doprime@plt>
mov    $0xbac6d,%edi
call   1030 <doprime@plt>
mov    $0xbac6e,%edi
call   1030 <doprime@plt>
mov    $0xbac6f,%edi
call   1030 <doprime@plt>
mov    $0xbac70,%edi
call   1030 <doprime@plt>
mov    $0xbac71,%edi
call   1030 <doprime@plt>
mov    $0xbac72,%edi
call   1030 <doprime@plt>
mov    $0xbac73,%edi
call   1030 <doprime@plt>
mov    $0xbac74,%edi
call   1030 <doprime@plt>
mov    $0xbac75,%edi
call   1030 <doprime@plt>
mov    $0xbac76,%edi
call   1030 <doprime@plt>
mov    $0xbac77,%edi
call   1030 <doprime@plt>
mov    $0xbac78,%edi
call   1030 <doprime@plt>
mov    $0xbac79,%edi
call   1030 <doprime@plt>
mov    $0xbac7a,%edi
call   1030 <doprime@plt>
mov    $0xbac7b,%edi
call   1030 <doprime@plt>
mov    $0xbac7c,%edi
call   1030 <doprime@plt>
mov    $0xbac7d,%edi
call   1030 <doprime@plt>
mov    $0xbac7e,%edi
call   1030 <doprime@plt>
mov    $0xbac7f,%edi
call   1030 <doprime@plt>
mov    $0xbac80,%edi
call   1030 <doprime@plt>
mov    $0xbac81,%edi
call   1030 <doprime@plt>
mov    $0xbac82,%edi
call   1030 <doprime@plt>
mov    $0xbac83,%edi
call   1030 <doprime@plt>
mov    $0xbac84,%edi
call   1030 <doprime@plt>
mov    $0xbac85,%edi
call   1030 <doprime@plt>
mov    $0xbac86,%edi
call   1030 <doprime@plt>
mov    $0xbac87,%edi
call   1030 <doprime@plt>
mov    $0xbac88,%edi
call   1030 <doprime@plt>
xor    %eax,%eax
pop    %rcx
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 2, i32* %6
br label %8
8: ; preds = %14, %2
%9 = load i32, i32* %6
%10 = icmp sle i32 %9, 50
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %6
%13 = call i32 @doprime(i32 %12)
br label %14
14: ; preds = %11
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
br label %8
17: ; preds = %8
store i32 323323, i32* %7
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 15
store i32 %19, i32* %6
br label %20
20: ; preds = %28, %17
%21 = load i32, i32* %6
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 15
%24 = icmp sle i32 %21, %23
br i1 %24, label %25, label %31
25: ; preds = %20
%26 = load i32, i32* %6
%27 = call i32 @doprime(i32 %26)
br label %28
28: ; preds = %25
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %20
31: ; preds = %20
store i32 765049, i32* %7
%32 = load i32, i32* %7
%33 = sub nsw i32 %32, 15
store i32 %33, i32* %6
br label %34
34: ; preds = %42, %31
%35 = load i32, i32* %6
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 15
%38 = icmp sle i32 %35, %37
br i1 %38, label %39, label %45
39: ; preds = %34
%40 = load i32, i32* %6
%41 = call i32 @doprime(i32 %40)
br label %42
42: ; preds = %39
%43 = load i32, i32* %6
%44 = add nsw i32 %43, 1
store i32 %44, i32* %6
br label %34
45: ; preds = %34
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @doprime(i32 2)
%4 = tail call i32 @doprime(i32 3)
%5 = tail call i32 @doprime(i32 4)
%6 = tail call i32 @doprime(i32 5)
%7 = tail call i32 @doprime(i32 6)
%8 = tail call i32 @doprime(i32 7)
%9 = tail call i32 @doprime(i32 8)
%10 = tail call i32 @doprime(i32 9)
%11 = tail call i32 @doprime(i32 10)
%12 = tail call i32 @doprime(i32 11)
%13 = tail call i32 @doprime(i32 12)
%14 = tail call i32 @doprime(i32 13)
%15 = tail call i32 @doprime(i32 14)
%16 = tail call i32 @doprime(i32 15)
%17 = tail call i32 @doprime(i32 16)
%18 = tail call i32 @doprime(i32 17)
%19 = tail call i32 @doprime(i32 18)
%20 = tail call i32 @doprime(i32 19)
%21 = tail call i32 @doprime(i32 20)
%22 = tail call i32 @doprime(i32 21)
%23 = tail call i32 @doprime(i32 22)
%24 = tail call i32 @doprime(i32 23)
%25 = tail call i32 @doprime(i32 24)
%26 = tail call i32 @doprime(i32 25)
%27 = tail call i32 @doprime(i32 26)
%28 = tail call i32 @doprime(i32 27)
%29 = tail call i32 @doprime(i32 28)
%30 = tail call i32 @doprime(i32 29)
%31 = tail call i32 @doprime(i32 30)
%32 = tail call i32 @doprime(i32 31)
%33 = tail call i32 @doprime(i32 32)
%34 = tail call i32 @doprime(i32 33)
%35 = tail call i32 @doprime(i32 34)
%36 = tail call i32 @doprime(i32 35)
%37 = tail call i32 @doprime(i32 36)
%38 = tail call i32 @doprime(i32 37)
%39 = tail call i32 @doprime(i32 38)
%40 = tail call i32 @doprime(i32 39)
%41 = tail call i32 @doprime(i32 40)
%42 = tail call i32 @doprime(i32 41)
%43 = tail call i32 @doprime(i32 42)
%44 = tail call i32 @doprime(i32 43)
%45 = tail call i32 @doprime(i32 44)
%46 = tail call i32 @doprime(i32 45)
%47 = tail call i32 @doprime(i32 46)
%48 = tail call i32 @doprime(i32 47)
%49 = tail call i32 @doprime(i32 48)
%50 = tail call i32 @doprime(i32 49)
%51 = tail call i32 @doprime(i32 50)
%52 = tail call i32 @doprime(i32 323308)
%53 = tail call i32 @doprime(i32 323309)
%54 = tail call i32 @doprime(i32 323310)
%55 = tail call i32 @doprime(i32 323311)
%56 = tail call i32 @doprime(i32 323312)
%57 = tail call i32 @doprime(i32 323313)
%58 = tail call i32 @doprime(i32 323314)
%59 = tail call i32 @doprime(i32 323315)
%60 = tail call i32 @doprime(i32 323316)
%61 = tail call i32 @doprime(i32 323317)
%62 = tail call i32 @doprime(i32 323318)
%63 = tail call i32 @doprime(i32 323319)
%64 = tail call i32 @doprime(i32 323320)
%65 = tail call i32 @doprime(i32 323321)
%66 = tail call i32 @doprime(i32 323322)
%67 = tail call i32 @doprime(i32 323323)
%68 = tail call i32 @doprime(i32 323324)
%69 = tail call i32 @doprime(i32 323325)
%70 = tail call i32 @doprime(i32 323326)
%71 = tail call i32 @doprime(i32 323327)
%72 = tail call i32 @doprime(i32 323328)
%73 = tail call i32 @doprime(i32 323329)
%74 = tail call i32 @doprime(i32 323330)
%75 = tail call i32 @doprime(i32 323331)
%76 = tail call i32 @doprime(i32 323332)
%77 = tail call i32 @doprime(i32 323333)
%78 = tail call i32 @doprime(i32 323334)
%79 = tail call i32 @doprime(i32 323335)
%80 = tail call i32 @doprime(i32 323336)
%81 = tail call i32 @doprime(i32 323337)
%82 = tail call i32 @doprime(i32 323338)
%83 = tail call i32 @doprime(i32 765034)
%84 = tail call i32 @doprime(i32 765035)
%85 = tail call i32 @doprime(i32 765036)
%86 = tail call i32 @doprime(i32 765037)
%87 = tail call i32 @doprime(i32 765038)
%88 = tail call i32 @doprime(i32 765039)
%89 = tail call i32 @doprime(i32 765040)
%90 = tail call i32 @doprime(i32 765041)
%91 = tail call i32 @doprime(i32 765042)
%92 = tail call i32 @doprime(i32 765043)
%93 = tail call i32 @doprime(i32 765044)
%94 = tail call i32 @doprime(i32 765045)
%95 = tail call i32 @doprime(i32 765046)
%96 = tail call i32 @doprime(i32 765047)
%97 = tail call i32 @doprime(i32 765048)
%98 = tail call i32 @doprime(i32 765049)
%99 = tail call i32 @doprime(i32 765050)
%100 = tail call i32 @doprime(i32 765051)
%101 = tail call i32 @doprime(i32 765052)
%102 = tail call i32 @doprime(i32 765053)
%103 = tail call i32 @doprime(i32 765054)
%104 = tail call i32 @doprime(i32 765055)
%105 = tail call i32 @doprime(i32 765056)
%106 = tail call i32 @doprime(i32 765057)
%107 = tail call i32 @doprime(i32 765058)
%108 = tail call i32 @doprime(i32 765059)
%109 = tail call i32 @doprime(i32 765060)
%110 = tail call i32 @doprime(i32 765061)
%111 = tail call i32 @doprime(i32 765062)
%112 = tail call i32 @doprime(i32 765063)
%113 = tail call i32 @doprime(i32 765064)
ret i32 0
}