#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*/ printf(char *, int);
int main(void) {
  int i, j, z[100];
  for (i = 2; i <= 100; ++i)
    z[i] = i;
  for (i = 2; i < 100; i++) {
    for (j = i; j <= 100; ++j) {
      if (z[j] != 0 && j != i && z[j] % i == 0)
        z[j] = 0;
    }
  }
  for (i = 2; i <= 100; ++i)
    if (z[i] != 0)
      printf("%d ", z[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     114f <main+0x3f>
mov    -0x8(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
movl   $0x2,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11db <main+0xcb>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jg     11c8 <main+0xb8>
movslq -0xc(%rbp),%rax
cmpl   $0x0,-0x1a0(%rbp,%rax,4)
je     11b5 <main+0xa5>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     11b5 <main+0xa5>
movslq -0xc(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    11b5 <main+0xa5>
movslq -0xc(%rbp),%rax
movl   $0x0,-0x1a0(%rbp,%rax,4)
jmp    11ba <main+0xaa>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1166 <main+0x56>
jmp    11cd <main+0xbd>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x46>
movl   $0x2,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1228 <main+0x118>
movslq -0x8(%rbp),%rax
cmpl   $0x0,-0x1a0(%rbp,%rax,4)
je     1215 <main+0x105>
movslq -0x8(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xdf0(%rip),%rdi
call   1030 <printf@plt>
jmp    121a <main+0x10a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e2 <main+0xd2>
mov    -0x4(%rbp),%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x198,%rsp
lea    0x8(%rsp),%rcx
movaps 0xeda(%rip),%xmm0
movups %xmm0,0x8(%rsp)
movaps 0xede(%rip),%xmm0
movups %xmm0,0x18(%rsp)
movaps 0xee2(%rip),%xmm0
movups %xmm0,0x28(%rsp)
movaps 0xee6(%rip),%xmm0
movups %xmm0,0x38(%rsp)
movaps 0xeea(%rip),%xmm0
movups %xmm0,0x48(%rsp)
movaps 0xeee(%rip),%xmm0
movups %xmm0,0x58(%rsp)
movaps 0xef2(%rip),%xmm0
movups %xmm0,0x68(%rsp)
movaps 0xef6(%rip),%xmm0
movups %xmm0,0x78(%rsp)
movaps 0xefa(%rip),%xmm0
movups %xmm0,0x88(%rsp)
movaps 0xefb(%rip),%xmm0
movups %xmm0,0x98(%rsp)
movaps 0xefc(%rip),%xmm0
movups %xmm0,0xa8(%rsp)
movaps 0xefd(%rip),%xmm0
movups %xmm0,0xb8(%rsp)
movaps 0xefe(%rip),%xmm0
movups %xmm0,0xc8(%rsp)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0xd8(%rsp)
movaps 0xf00(%rip),%xmm0
movups %xmm0,0xe8(%rsp)
movaps 0xf01(%rip),%xmm0
movups %xmm0,0xf8(%rsp)
movaps 0xf02(%rip),%xmm0
movups %xmm0,0x108(%rsp)
movaps 0xf03(%rip),%xmm0
movups %xmm0,0x118(%rsp)
movaps 0xf04(%rip),%xmm0
movups %xmm0,0x128(%rsp)
movaps 0xf05(%rip),%xmm0
movups %xmm0,0x138(%rsp)
movaps 0xf06(%rip),%xmm0
movups %xmm0,0x148(%rsp)
movaps 0xf07(%rip),%xmm0
movups %xmm0,0x158(%rsp)
movaps 0xf08(%rip),%xmm0
movups %xmm0,0x168(%rsp)
movaps 0xf09(%rip),%xmm0
movups %xmm0,0x178(%rsp)
movabs $0x6300000062,%rax
mov    %rax,0x188(%rsp)
movl   $0x64,0x190(%rsp)
mov    $0x2,%esi
mov    $0x18c,%edi
jmp    12b2 <main+0x1a2>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
add    $0x4,%rcx
add    $0xfffffffffffffffc,%rdi
cmp    $0x64,%rsi
je     12e5 <main+0x1d5>
xor    %ebx,%ebx
jmp    12c9 <main+0x1b9>
cs nopw 0x0(%rax,%rax,1)
add    $0x4,%rbx
cmp    %rbx,%rdi
je     12a0 <main+0x190>
mov    (%rcx,%rbx,1),%eax
test   %eax,%eax
je     12c0 <main+0x1b0>
test   %rbx,%rbx
je     12c0 <main+0x1b0>
cltd
idiv   %esi
test   %edx,%edx
jne    12c0 <main+0x1b0>
movl   $0x0,(%rcx,%rbx,1)
jmp    12c0 <main+0x1b0>
mov    $0x2,%ebx
lea    0xe8f(%rip),%r14
jmp    130a <main+0x1fa>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    $0x65,%rbx
je     131b <main+0x20b>
mov    (%rsp,%rbx,4),%esi
test   %esi,%esi
je     1300 <main+0x1f0>
mov    %r14,%rdi
call   1030 <printf@plt>
jmp    1300 <main+0x1f0>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [100 x i32]
store i32 0, i32* %1
store i32 2, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %11
store i32 %9, i32* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
store i32 2, i32* %2
br label %17
17: ; preds = %52, %16
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 100
br i1 %19, label %20, label %55
20: ; preds = %17
%21 = load i32, i32* %2
store i32 %21, i32* %3
br label %22
22: ; preds = %48, %20
%23 = load i32, i32* %3
%24 = icmp sle i32 %23, 100
br i1 %24, label %25, label %51
25: ; preds = %22
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %47
31: ; preds = %25
%32 = load i32, i32* %3
%33 = load i32, i32* %2
%34 = icmp ne i32 %32, %33
br i1 %34, label %35, label %47
35: ; preds = %31
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = load i32, i32* %2
%41 = srem i32 %39, %40
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %47
43: ; preds = %35
%44 = load i32, i32* %3
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %45
store i32 0, i32* %46
br label %47
47: ; preds = %43, %35, %31, %25
br label %48
48: ; preds = %47
%49 = load i32, i32* %3
%50 = add nsw i32 %49, 1
store i32 %50, i32* %3
br label %22
51: ; preds = %22
br label %52
52: ; preds = %51
%53 = load i32, i32* %2
%54 = add nsw i32 %53, 1
store i32 %54, i32* %2
br label %17
55: ; preds = %17
store i32 2, i32* %2
br label %56
56: ; preds = %72, %55
%57 = load i32, i32* %2
%58 = icmp sle i32 %57, 100
br i1 %58, label %59, label %75
59: ; preds = %56
%60 = load i32, i32* %2
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %61
%63 = load i32, i32* %62
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %71
65: ; preds = %59
%66 = load i32, i32* %2
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %67
%69 = load i32, i32* %68
%70 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %69)
br label %71
71: ; preds = %65, %59
br label %72
72: ; preds = %71
%73 = load i32, i32* %2
%74 = add nsw i32 %73, 1
store i32 %74, i32* %2
br label %56
75: ; preds = %56
%76 = load i32, i32* %1
ret i32 %76
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 2
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 2, i32 3, i32 4, i32 5>, <4 x i32>* %4
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 6
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 6, i32 7, i32 8, i32 9>, <4 x i32>* %6
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 10
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 10, i32 11, i32 12, i32 13>, <4 x i32>* %8
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 14
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> <i32 14, i32 15, i32 16, i32 17>, <4 x i32>* %10
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 18
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> <i32 18, i32 19, i32 20, i32 21>, <4 x i32>* %12
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 22
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> <i32 22, i32 23, i32 24, i32 25>, <4 x i32>* %14
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 26
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> <i32 26, i32 27, i32 28, i32 29>, <4 x i32>* %16
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 30
%18 = bitcast i32* %17 to <4 x i32>*
store <4 x i32> <i32 30, i32 31, i32 32, i32 33>, <4 x i32>* %18
%19 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 34
%20 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> <i32 34, i32 35, i32 36, i32 37>, <4 x i32>* %20
%21 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 38
%22 = bitcast i32* %21 to <4 x i32>*
store <4 x i32> <i32 38, i32 39, i32 40, i32 41>, <4 x i32>* %22
%23 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 42
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> <i32 42, i32 43, i32 44, i32 45>, <4 x i32>* %24
%25 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 46
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> <i32 46, i32 47, i32 48, i32 49>, <4 x i32>* %26
%27 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 50
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> <i32 50, i32 51, i32 52, i32 53>, <4 x i32>* %28
%29 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 54
%30 = bitcast i32* %29 to <4 x i32>*
store <4 x i32> <i32 54, i32 55, i32 56, i32 57>, <4 x i32>* %30
%31 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 58
%32 = bitcast i32* %31 to <4 x i32>*
store <4 x i32> <i32 58, i32 59, i32 60, i32 61>, <4 x i32>* %32
%33 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 62
%34 = bitcast i32* %33 to <4 x i32>*
store <4 x i32> <i32 62, i32 63, i32 64, i32 65>, <4 x i32>* %34
%35 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 66
%36 = bitcast i32* %35 to <4 x i32>*
store <4 x i32> <i32 66, i32 67, i32 68, i32 69>, <4 x i32>* %36
%37 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 70
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> <i32 70, i32 71, i32 72, i32 73>, <4 x i32>* %38
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 74
%40 = bitcast i32* %39 to <4 x i32>*
store <4 x i32> <i32 74, i32 75, i32 76, i32 77>, <4 x i32>* %40
%41 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 78
%42 = bitcast i32* %41 to <4 x i32>*
store <4 x i32> <i32 78, i32 79, i32 80, i32 81>, <4 x i32>* %42
%43 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 82
%44 = bitcast i32* %43 to <4 x i32>*
store <4 x i32> <i32 82, i32 83, i32 84, i32 85>, <4 x i32>* %44
%45 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 86
%46 = bitcast i32* %45 to <4 x i32>*
store <4 x i32> <i32 86, i32 87, i32 88, i32 89>, <4 x i32>* %46
%47 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 90
%48 = bitcast i32* %47 to <4 x i32>*
store <4 x i32> <i32 90, i32 91, i32 92, i32 93>, <4 x i32>* %48
%49 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 94
%50 = bitcast i32* %49 to <4 x i32>*
store <4 x i32> <i32 94, i32 95, i32 96, i32 97>, <4 x i32>* %50
%51 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 98
store i32 98, i32* %51
%52 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 99
store i32 99, i32* %52
%53 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 100
store i32 100, i32* %53
br label %54
54: ; preds = %0, %71
%55 = phi i64 [ %72, %71 ], [ 2, %0 ]
%56 = trunc i64 %55 to i32
br label %57
57: ; preds = %54, %68
%58 = phi i64 [ %55, %54 ], [ %69, %68 ]
%59 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = icmp eq i32 %60, 0
%62 = icmp eq i64 %58, %55
%63 = select i1 %61, i1 true, i1 %62
br i1 %63, label %68, label %64
64: ; preds = %57
%65 = srem i32 %60, %56
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %68
67: ; preds = %64
store i32 0, i32* %59
br label %68
68: ; preds = %57, %64, %67
%69 = add nuw nsw i64 %58, 1
%70 = icmp eq i64 %69, 101
br i1 %70, label %71, label %57
71: ; preds = %68
%72 = add nuw nsw i64 %55, 1
%73 = icmp eq i64 %72, 100
br i1 %73, label %74, label %54
74: ; preds = %71, %81
%75 = phi i64 [ %82, %81 ], [ 2, %71 ]
%76 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %75
%77 = load i32, i32* %76
%78 = icmp eq i32 %77, 0
br i1 %78, label %81, label %79
79: ; preds = %74
%80 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %77)
br label %81
81: ; preds = %74, %79
%82 = add nuw nsw i64 %75, 1
%83 = icmp eq i64 %82, 101
br i1 %83, label %84, label %74
84: ; preds = %81
ret i32 0
}