#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*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, unsigned int *);
int main() {
  unsigned int number;
  printf("Enter number: ");
  if ((scanf("%du", &number)) != 1) {
    printf("Not digit!");
    exit(EXIT_FAILURE);
  } else {
    int ctr = 1;
    while (ctr <= number) {
      if (((ctr % 3) != 0) && ((ctr % 7) != 0)) {
        printf("%d ", ctr);
      }
      ctr++;
    }
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     1182 <main+0x52>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     11dc <main+0xac>
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11ce <main+0x9e>
mov    -0xc(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11ce <main+0x9e>
mov    -0xc(%rbp),%esi
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1189 <main+0x59>
jmp    11e1 <main+0xb1>
mov    0x2df0(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    11ea <main+0xba>
mov    0x4(%rsp),%eax
test   %eax,%eax
je     11d6 <main+0xa6>
mov    $0x1,%ebx
mov    $0xaaaaaaab,%r15d
lea    0xea5(%rip),%r14
xor    %ebp,%ebp
jmp    1187 <main+0x57>
nopl   (%rax)
add    $0x1,%ebx
cmp    %eax,%ebp
jae    11d6 <main+0xa6>
mov    %ebp,%ecx
lea    0x1(%rcx),%ebp
mov    %ebx,%edx
mov    %rdx,%rsi
imul   %r15,%rsi
shr    $0x21,%rsi
lea    (%rsi,%rsi,2),%esi
add    $0xffffffff,%esi
cmp    %ecx,%esi
je     1180 <main+0x50>
imul   $0x24924925,%rdx,%rdx
shr    $0x20,%rdx
mov    %ebx,%esi
sub    %edx,%esi
shr    %esi
add    %edx,%esi
shr    $0x2,%esi
mov    %esi,%edx
not    %edx
lea    (%rdx,%rsi,8),%edx
cmp    %ecx,%edx
je     1180 <main+0x50>
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
jmp    1180 <main+0x50>
mov    0x2dfb(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe22(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Enter number: \00"
@.str.1 = [4 x i8] c"%du\00"
@.str.2 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [4 x i8] c"%d \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = icmp ne i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %0
store i32 1, i32* %3
br label %12
12: ; preds = %27, %11
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = icmp ule i32 %13, %14
br i1 %15, label %16, label %30
16: ; preds = %12
%17 = load i32, i32* %3
%18 = srem i32 %17, 3
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %27
20: ; preds = %16
%21 = load i32, i32* %3
%22 = srem i32 %21, 7
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = load i32, i32* %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24, %20, %16
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %12
30: ; preds = %12
br label %31
31: ; preds = %30
%32 = load i32, i32* @EXIT_SUCCESS
ret i32 %32
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter number: \00"
@.str.1 = [4 x i8] c"%du\00"
@.str.2 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [4 x i8] c"%d \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %28, label %13
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %6, %24
%14 = phi i32 [ %25, %24 ], [ %7, %6 ]
%15 = phi i32 [ %26, %24 ], [ 1, %6 ]
%16 = urem i32 %15, 3
%17 = icmp eq i32 %16, 0
%18 = urem i32 %15, 7
%19 = icmp eq i32 %18, 0
%20 = or i1 %17, %19
br i1 %20, label %24, label %21
21: ; preds = %13
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%23 = load i32, i32* %1
br label %24
24: ; preds = %21, %13
%25 = phi i32 [ %23, %21 ], [ %14, %13 ]
%26 = add nuw nsw i32 %15, 1
%27 = icmp ult i32 %15, %25
br i1 %27, label %13, label %28
28: ; preds = %24, %6
%29 = load i32, i32* @EXIT_SUCCESS
ret i32 %29
}