#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 a = 0;
  for (; a < 20; a++) {
    if ((a % 5 == 3) && (a % 7 == 4) && (a < 20))
      printf("a=%d", a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1184 <main+0x74>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x3,%edx
jne    1171 <main+0x61>
mov    -0x8(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x4,%edx
jne    1171 <main+0x61>
cmpl   $0x14,-0x8(%rbp)
jge    1171 <main+0x61>
mov    -0x8(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
jmp    1176 <main+0x66>
mov    -0x8(%rbp),%eax
add    $0x1,%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
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
jmp    1128 <main+0x18>
nop
add    $0x1,%ebx
cmp    $0x14,%ebx
je     1171 <main+0x61>
movzbl %bl,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
lea    (%rcx,%rcx,4),%ecx
add    $0x3,%cl
cmp    %al,%cl
jne    1120 <main+0x10>
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
mov    %eax,%edx
sub    %cl,%dl
shr    %dl
add    %cl,%dl
shr    $0x2,%dl
movzbl %dl,%ecx
lea    0x0(,%rcx,8),%edx
sub    %ecx,%edx
add    $0x4,%dl
cmp    %al,%dl
jne    1120 <main+0x10>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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