#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, k, n, j;
  k = 0;
  do {
    k = k + 1;
  } while (k <= 19);
  if (k = 19)
    ;
  {
    do {
      k = k + 2;
      if (k % 3 == 0 && k % 7 == 0) {
        printf("%d\n", k);
      }
    } while (k <= 30000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x13,-0xc(%rbp)
jle    1126 <main+0x16>
movl   $0x13,-0xc(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    114f <main+0x3f>
jmp    1154 <main+0x44>
jmp    1154 <main+0x44>
jmp    1159 <main+0x49>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1199 <main+0x89>
mov    -0xc(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1199 <main+0x89>
mov    -0xc(%rbp),%esi
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
jmp    119e <main+0x8e>
cmpl   $0x7530,-0xc(%rbp)
jle    1159 <main+0x49>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x15,%ebx
mov    $0xaaaaaaab,%r15d
lea    0xed9(%rip),%r14
jmp    1140 <main+0x30>
nopl   0x0(%rax)
lea    0x2(%rbx),%eax
add    $0xfffffffe,%ebx
cmp    $0x752f,%ebx
mov    %eax,%ebx
jae    1182 <main+0x72>
mov    %ebx,%eax
imul   $0x24924925,%rax,%rcx
shr    $0x20,%rcx
mov    %ebx,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x2,%edx
lea    0x0(,%rdx,8),%ecx
sub    %ecx,%edx
imul   %r15,%rax
shr    $0x21,%rax
lea    (%rax,%rax,2),%eax
mov    %ebx,%ecx
sub    %eax,%ecx
add    %ebx,%edx
or     %ecx,%edx
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
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
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %6
6: ; preds = %9, %0
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
br label %9
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 19
br i1 %11, label %6, label %12
12: ; preds = %9
store i32 19, i32* %3
br i1 true, label %13, label %14
13: ; preds = %12
br label %14
14: ; preds = %13, %12
br label %15
15: ; preds = %29, %14
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 2
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = srem i32 %18, 3
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %28
21: ; preds = %15
%22 = load i32, i32* %3
%23 = srem i32 %22, 7
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = load i32, i32* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %21, %15
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = icmp sle i32 %30, 30000
br i1 %31, label %15, label %32
32: ; preds = %29
ret i32 0
}

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