#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 ts;
  ts = 20;
  while (ts < 30000) {
    ts++;
    int moda = ts % 21;
    int chet = ts % 2;
    if (moda == 0) {
      if (chet != 0) {
        printf("%d\n", ts);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
cmpl   $0x7530,-0x8(%rbp)
jge    1185 <main+0x75>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x15,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1180 <main+0x70>
cmpl   $0x0,-0x10(%rbp)
je     117b <main+0x6b>
mov    -0x8(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
jmp    1180 <main+0x70>
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    113b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x7531,%ebx
je     1173 <main+0x63>
test   $0x1,%bl
je     1130 <main+0x20>
movzwl %bx,%eax
imul   $0x8619,%eax,%eax
shr    $0x10,%eax
mov    %ebx,%ecx
sub    %eax,%ecx
movzwl %cx,%ecx
shr    %ecx
add    %eax,%ecx
movzwl %cx,%eax
shr    $0x4,%eax
imul   $0xffffffeb,%eax,%eax
add    %ebx,%eax
test   %ax,%ax
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
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
br label %5
5: ; preds = %24, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 30000
br i1 %7, label %8, label %25
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = srem i32 %11, 21
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = srem i32 %13, 2
store i32 %14, i32* %4
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %8
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %20, %17
br label %24
24: ; preds = %23, %8
br label %5
25: ; preds = %5
ret i32 0
}

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