#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() {
  int p[100];
  int z = 0;
  for (int x = 100; x > 1; x--) {
    for (int n = 2; x % n != 0; n++) {
      if (n == x - 1) {
        p[z++] = x;
        break;
      }
    }
  }
  while (z >= 0)
    printf("%d ", p[z--]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1a4(%rbp)
movl   $0x64,-0x1a8(%rbp)
cmpl   $0x1,-0x1a8(%rbp)
jle    11d1 <main+0xc1>
movl   $0x2,-0x1ac(%rbp)
mov    -0x1a8(%rbp),%eax
cltd
idivl  -0x1ac(%rbp)
cmp    $0x0,%edx
je     11b8 <main+0xa8>
mov    -0x1ac(%rbp),%eax
mov    -0x1a8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    119f <main+0x8f>
mov    -0x1a8(%rbp),%ecx
mov    -0x1a4(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1a4(%rbp)
cltq
mov    %ecx,-0x1a0(%rbp,%rax,4)
jmp    11b8 <main+0xa8>
jmp    11a4 <main+0x94>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    114d <main+0x3d>
jmp    11bd <main+0xad>
mov    -0x1a8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1136 <main+0x26>
jmp    11d6 <main+0xc6>
cmpl   $0x0,-0x1a4(%rbp)
jl     120e <main+0xfe>
mov    -0x1a4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1a4(%rbp)
cltq
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xdfc(%rip),%rdi
call   1030 <printf@plt>
jmp    11d6 <main+0xc6>
mov    -0x4(%rbp),%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x198,%rsp
xor    %esi,%esi
mov    $0x64,%ecx
mov    $0xffffff9f,%edi
jmp    1146 <main+0x36>
nopl   0x0(%rax,%rax,1)
movslq %esi,%rax
add    $0x1,%esi
mov    %ecx,(%rsp,%rax,4)
lea    -0x1(%rcx),%eax
add    $0x1,%edi
cmp    $0x2,%ecx
mov    %eax,%ecx
jbe    1166 <main+0x56>
test   $0x1,%cl
je     1139 <main+0x29>
mov    $0x3,%ebx
lea    (%rdi,%rbx,1),%eax
cmp    $0x3,%eax
je     1130 <main+0x20>
mov    %ecx,%eax
cltd
idiv   %ebx
add    $0x1,%ebx
test   %edx,%edx
jne    1150 <main+0x40>
jmp    1139 <main+0x29>
test   %esi,%esi
js     1191 <main+0x81>
mov    %esi,%ebx
lea    0xe8d(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rsp,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
jb     1180 <main+0x70>
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 [100 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 100, i32* %4
br label %6
6: ; preds = %31, %0
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %34
9: ; preds = %6
store i32 2, i32* %5
br label %10
10: ; preds = %27, %9
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = srem i32 %11, %12
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %30
15: ; preds = %10
%16 = load i32, i32* %5
%17 = load i32, i32* %4
%18 = sub nsw i32 %17, 1
%19 = icmp eq i32 %16, %18
br i1 %19, label %20, label %26
20: ; preds = %15
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
%24 = sext i32 %22 to i64
%25 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %24
store i32 %21, i32* %25
br label %30
26: ; preds = %15
br label %27
27: ; preds = %26
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %10
30: ; preds = %20, %10
br label %31
31: ; preds = %30
%32 = load i32, i32* %4
%33 = add nsw i32 %32, -1
store i32 %33, i32* %4
br label %6
34: ; preds = %6
br label %35
35: ; preds = %38, %34
%36 = load i32, i32* %3
%37 = icmp sge i32 %36, 0
br i1 %37, label %38, label %45
38: ; preds = %35
%39 = load i32, i32* %3
%40 = add nsw i32 %39, -1
store i32 %40, i32* %3
%41 = sext i32 %39 to i64
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %43)
br label %35
45: ; preds = %35
%46 = load i32, i32* %1
ret i32 %46
}

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*
br label %3
3: ; preds = %0, %24
%4 = phi i32 [ 100, %0 ], [ %8, %24 ]
%5 = phi i32 [ 0, %0 ], [ %25, %24 ]
%6 = and i32 %4, 1
%7 = icmp eq i32 %6, 0
%8 = add nsw i32 %4, -1
br i1 %7, label %24, label %16
9: ; preds = %24
%10 = icmp sgt i32 %25, -1
br i1 %10, label %11, label %34
11: ; preds = %9
%12 = zext i32 %25 to i64
br label %27
13: ; preds = %16
%14 = srem i32 %4, %19
%15 = icmp eq i32 %14, 0
br i1 %15, label %24, label %16
16: ; preds = %3, %13
%17 = phi i32 [ %19, %13 ], [ 2, %3 ]
%18 = icmp eq i32 %17, %8
%19 = add nuw nsw i32 %17, 1
br i1 %18, label %20, label %13
20: ; preds = %16
%21 = add nsw i32 %5, 1
%22 = sext i32 %5 to i64
%23 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %22
store i32 %4, i32* %23
br label %24
24: ; preds = %13, %3, %20
%25 = phi i32 [ %21, %20 ], [ %5, %3 ], [ %5, %13 ]
%26 = icmp ugt i32 %4, 2
br i1 %26, label %3, label %9
27: ; preds = %11, %27
%28 = phi i64 [ %12, %11 ], [ %29, %27 ]
%29 = add nsw i64 %28, -1
%30 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %28
%31 = load i32, i32* %30
%32 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = icmp eq i64 %28, 0
br i1 %33, label %34, label %27
34: ; preds = %27, %9
ret i32 0
}