#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 */
scalar_t__ ceil(int /*<<< orphan*/);
scalar_t__ judge(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sqrt(double);
int main() {
  int n = 50;
  int endNum = (int)(ceil(sqrt((double)n)));
  for (int i = 2; i <= n; i++) {
    if (judge(i, endNum) != 0) {
      printf("%d ", i);
    } else {
      continue;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
call   1060 <sqrt@plt>
mov    %eax,%edi
call   1030 <ceil@plt>
mov    %eax,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11be <main+0x7e>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <judge@plt>
cmp    $0x0,%rax
je     11a6 <main+0x66>
mov    -0x10(%rbp),%esi
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
jmp    11ab <main+0x6b>
jmp    11b0 <main+0x70>
jmp    11b0 <main+0x70>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1171 <main+0x31>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
movsd  0xeb4(%rip),%xmm0
call   1060 <sqrt@plt>
mov    %eax,%edi
call   1030 <ceil@plt>
mov    %rax,%rbx
mov    $0x2,%ebp
lea    0xea1(%rip),%r14
jmp    1178 <main+0x38>
nopl   0x0(%rax)
add    $0x1,%ebp
cmp    $0x33,%ebp
je     1192 <main+0x52>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <judge@plt>
test   %rax,%rax
je     1170 <main+0x30>
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
jmp    1170 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
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 i32
store i32 0, i32* %1
store i32 50, i32* %2
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to double
%7 = call i32 @sqrt(double %6)
%8 = call i64 @ceil(i32 %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %3
store i32 2, i32* %4
br label %10
10: ; preds = %24, %0
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = call i64 @judge(i32 %15, i32 %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = load i32, i32* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %23
22: ; preds = %14
br label %24
23: ; preds = %19
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %10
27: ; preds = %10
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = tail call i32 @sqrt(double 5.000000e+01)
%2 = tail call i64 @ceil(i32 %1)
%3 = trunc i64 %2 to i32
br label %5
4: ; preds = %11
ret i32 0
5: ; preds = %0, %11
%6 = phi i32 [ 2, %0 ], [ %12, %11 ]
%7 = tail call i64 @judge(i32 %6, i32 %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %11
11: ; preds = %5, %9
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, 51
br i1 %13, label %4, label %5
}