#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 */
scalar_t__ pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int i;
  for (i = 0; i <= 200; ++i) {
    int v = (int)pow(10, (50 + i) / 49.828);
    printf("%d,", v);
    if (i % 10 == 9)
      printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jg     11b0 <main+0x90>
mov    -0x8(%rbp),%eax
add    $0x32,%eax
cvtsi2sd %eax,%xmm0
movsd  0xeab(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    $0xa,%edi
call   1040 <pow@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x9,%edx
jne    119d <main+0x7d>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a2 <main+0x82>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x32,%ebp
lea    0xec5(%rip),%r14
xor    %ebx,%ebx
jmp    115e <main+0x2e>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebp
add    $0x1,%bl
cmp    $0xfb,%ebp
je     11b6 <main+0x86>
movzbl %bl,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%eax
mov    $0xf6,%cl
sub    %al,%cl
movzbl %cl,%r15d
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
add    %ebp,%r15d
divsd  0xe76(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0xa,%edi
call   1050 <pow@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x31,%r15b
jne    1150 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d,\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %23, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 200
br i1 %6, label %7, label %26
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add nsw i32 50, %8
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 4.982800e+01
%12 = fptosi double %11 to i32
%13 = call i64 @pow(i32 10, i32 %12)
%14 = trunc i64 %13 to i32
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %2
%18 = srem i32 %17, 10
%19 = icmp eq i32 %18, 9
br i1 %19, label %20, label %22
20: ; preds = %7
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20, %7
br label %23
23: ; preds = %22
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
br label %4
26: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d,\00"
define i32 @main() {
br label %1
1: ; preds = %0, %15
%2 = phi i32 [ 0, %0 ], [ %16, %15 ]
%3 = add nuw nsw i32 %2, 50
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 4.982800e+01
%6 = fptosi double %5 to i32
%7 = tail call i64 @pow(i32 10, i32 %6)
%8 = trunc i64 %7 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = trunc i32 %2 to i8
%11 = urem i8 %10, 10
%12 = icmp eq i8 %11, 9
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = tail call i32 @putchar(i32 10)
br label %15
15: ; preds = %13, %1
%16 = add nuw nsw i32 %2, 1
%17 = icmp eq i32 %16, 201
br i1 %17, label %18, label %1
18: ; preds = %15
ret i32 0
}