#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 n = 0;
  int soma = 0;
  while (n < 200) {
    if (n % 3 == 0 && n % 7 != 0) {
      soma = soma + n;
    }
    n++;
  }
  printf("a soma é igual a %d", soma);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jge    1179 <main+0x69>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116b <main+0x5b>
mov    -0x8(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     116b <main+0x5b>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movdqa 0xee6(%rip),%xmm8
movdqa 0xeee(%rip),%xmm2
pxor   %xmm0,%xmm0
mov    $0xc8,%eax
movdqa 0xf0c(%rip),%xmm10
movdqa 0xf14(%rip),%xmm6
movdqa 0xf1b(%rip),%xmm11
pcmpeqd %xmm14,%xmm14
movdqa 0xf1d(%rip),%xmm15
movdqa 0xf25(%rip),%xmm7
movdqa 0xf3c(%rip),%xmm13
pxor   %xmm5,%xmm5
nopl   0x0(%rax,%rax,1)
movdqa %xmm8,%xmm1
paddb  0xeb3(%rip),%xmm1
punpcklbw %xmm1,%xmm1
movdqa %xmm8,%xmm4
punpcklbw %xmm4,%xmm4
movdqa %xmm4,%xmm3
pmullw %xmm10,%xmm3
pand   %xmm6,%xmm3
packuswb %xmm3,%xmm3
movdqa %xmm3,%xmm9
pminub %xmm11,%xmm9
pcmpeqb %xmm3,%xmm9
movdqa %xmm1,%xmm3
pmullw %xmm10,%xmm3
pand   %xmm6,%xmm3
packuswb %xmm3,%xmm3
movdqa %xmm3,%xmm12
pminub %xmm11,%xmm12
pcmpeqb %xmm3,%xmm12
pmullw %xmm15,%xmm4
pand   %xmm6,%xmm4
packuswb %xmm4,%xmm4
movdqa %xmm4,%xmm3
pminub %xmm7,%xmm3
pcmpeqb %xmm4,%xmm3
pxor   %xmm14,%xmm9
por    %xmm9,%xmm3
pmullw %xmm15,%xmm1
pand   %xmm6,%xmm1
packuswb %xmm1,%xmm1
movdqa %xmm1,%xmm4
pminub %xmm7,%xmm4
pcmpeqb %xmm1,%xmm4
pxor   %xmm14,%xmm12
por    %xmm12,%xmm4
movdqa %xmm2,%xmm1
paddd  0xe04(%rip),%xmm1
punpcklbw %xmm4,%xmm4
punpcklwd %xmm4,%xmm4
psrad  $0x18,%xmm4
pandn  %xmm1,%xmm4
paddd  %xmm4,%xmm5
punpcklbw %xmm3,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm1
pandn  %xmm2,%xmm1
paddd  %xmm1,%xmm0
paddd  0xe42(%rip),%xmm2
paddb  %xmm13,%xmm8
add    $0xfffffff8,%eax
jne    1170 <main+0x60>
paddd  %xmm0,%xmm5
pshufd $0xee,%xmm5,%xmm0
paddd  %xmm5,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%esi
lea    0xe33(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"a soma \C3\A9 igual a %d\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %23, %1 ]
%3 = phi <4 x i32> [ zeroinitializer, %0 ], [ %21, %1 ]
%4 = phi <4 x i32> [ zeroinitializer, %0 ], [ %22, %1 ]
%5 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %0 ], [ %24, %1 ]
%6 = phi <4 x i8> [ <i8 0, i8 1, i8 2, i8 3>, %0 ], [ %25, %1 ]
%7 = add <4 x i32> %5, <i32 4, i32 4, i32 4, i32 4>
%8 = add <4 x i8> %6, <i8 4, i8 4, i8 4, i8 4>
%9 = urem <4 x i8> %6, <i8 3, i8 3, i8 3, i8 3>
%10 = urem <4 x i8> %8, <i8 3, i8 3, i8 3, i8 3>
%11 = icmp ne <4 x i8> %9, zeroinitializer
%12 = icmp ne <4 x i8> %10, zeroinitializer
%13 = urem <4 x i8> %6, <i8 7, i8 7, i8 7, i8 7>
%14 = urem <4 x i8> %8, <i8 7, i8 7, i8 7, i8 7>
%15 = icmp eq <4 x i8> %13, zeroinitializer
%16 = icmp eq <4 x i8> %14, zeroinitializer
%17 = or <4 x i1> %11, %15
%18 = or <4 x i1> %12, %16
%19 = select <4 x i1> %17, <4 x i32> zeroinitializer, <4 x i32> %5
%20 = select <4 x i1> %18, <4 x i32> zeroinitializer, <4 x i32> %7
%21 = add <4 x i32> %19, %3
%22 = add <4 x i32> %20, %4
%23 = add nuw i32 %2, 8
%24 = add <4 x i32> %5, <i32 8, i32 8, i32 8, i32 8>
%25 = add <4 x i8> %6, <i8 8, i8 8, i8 8, i8 8>
%26 = icmp eq i32 %23, 200
br i1 %26, label %27, label %1
27: ; preds = %1
%28 = add <4 x i32> %22, %21
%29 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %28)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %29)
ret i32 0
}