main(i) {
  for (; i < 101; puts(i++ % 5 ? "" : "Buzz"))
    printf(i % 3 ? i % 5 ? "%d" : "" : "Fizz", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    11cb <main+0xab>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1179 <main+0x59>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
lea    0xea0(%rip),%rax
lea    0xe97(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1189 <main+0x69>
lea    0xe83(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1189 <main+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    $0x5,%ecx
cltd
idiv   %ecx
lea    0xe57(%rip),%rdi
lea    0xe4a(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rdi
mov    $0x0,%al
call   1030 <puts@plt>
jmp    1132 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x64,%edi
jg     119f <main+0x7f>
mov    %edi,%ebx
lea    0xec9(%rip),%r15
lea    0xec0(%rip),%r12
lea    0xec1(%rip),%r13
lea    0xeb5(%rip),%rbp
xchg   %ax,%ax
imul   $0xaaaaaaab,%ebx,%eax
add    $0x2aaaaaaa,%eax
imul   $0xcccccccd,%ebx,%ecx
add    $0x19999999,%ecx
cmp    $0x33333333,%ecx
mov    %r12,%rdi
cmovb  %r15,%rdi
mov    %r15,%r14
cmovb  %r13,%r14
cmp    $0x55555555,%eax
cmovb  %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
cmp    $0x65,%ebx
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"Fizz\00"
@.str.3 = [5 x i8] c"Buzz\00"
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %2
store i32 %0, i32* %3
br label %4
4: ; preds = %22, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 101
br i1 %6, label %7, label %30
7: ; preds = %4
%8 = load i32, i32* %3
%9 = srem i32 %8, 3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32, i32* %3
%13 = srem i32 %12, 5
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
br label %18
17: ; preds = %7
br label %18
18: ; preds = %17, %11
%19 = phi i8* [ %16, %11 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), %17 ]
%20 = load i32, i32* %3
%21 = call i32 (i8*, ...) @printf(i8* %19, i32 %20)
br label %22
22: ; preds = %18
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
%25 = srem i32 %23, 5
%26 = icmp ne i32 %25, 0
%27 = zext i1 %26 to i64
%28 = select i1 %26, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0)
%29 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %28)
br label %4
30: ; preds = %4
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"Fizz\00"
@.str.3 = [5 x i8] c"Buzz\00"
define i32 @main(i32 %0) {
%2 = icmp slt i32 %0, 101
br i1 %2, label %3, label %17
3: ; preds = %1, %3
%4 = phi i32 [ %12, %3 ], [ %0, %1 ]
%5 = srem i32 %4, 3
%6 = icmp eq i32 %5, 0
%7 = srem i32 %4, 5
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%10 = select i1 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %10, i32 %4)
%12 = add i32 %4, 1
%13 = icmp eq i32 %7, 0
%14 = select i1 %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%15 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %14)
%16 = icmp eq i32 %12, 101
br i1 %16, label %17, label %3
17: ; preds = %3, %1
ret i32 0
}