#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 i;
  for (i = 21; i <= 30000; i += 21) {
    if (i % 3 == 0)
      if (i % 2 != 0)
        printf("%d\n", i);
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x15,-0x8(%rbp)
cmpl   $0x7530,-0x8(%rbp)
jg     1182 <main+0x72>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116f <main+0x5f>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     116a <main+0x5a>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    116f <main+0x5f>
jmp    1174 <main+0x64>
mov    -0x8(%rbp),%eax
add    $0x15,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x15,%ebx
lea    0xee0(%rip),%r14
jmp    113d <main+0x2d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x15(%rbx),%eax
cmp    $0x751c,%ebx
mov    %eax,%ebx
jae    1166 <main+0x56>
test   $0x1,%bl
je     1130 <main+0x20>
movzwl %bx,%eax
imul   $0xaaab,%eax,%eax
shr    $0x11,%eax
lea    (%rax,%rax,2),%eax
mov    %ebx,%ecx
sub    %eax,%ecx
test   %cx,%cx
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 21, i32* %2
br label %3
3: ; preds = %19, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 30000
br i1 %5, label %6, label %22
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i32, i32* %2
%12 = srem i32 %11, 2
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %2
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %14, %10
br label %18
18: ; preds = %17, %6
br label %19
19: ; preds = %18
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 21
store i32 %21, i32* %2
br label %3
22: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %11
%2 = phi i32 [ 21, %0 ], [ %12, %11 ]
%3 = trunc i32 %2 to i16
%4 = urem i16 %3, 3
%5 = icmp ne i16 %4, 0
%6 = and i32 %2, 1
%7 = icmp eq i32 %6, 0
%8 = or i1 %7, %5
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %11
11: ; preds = %1, %9
%12 = add nuw nsw i32 %2, 21
%13 = icmp ult i32 %2, 29980
br i1 %13, label %1, label %14
14: ; preds = %11
ret i32 0
}