#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 *, float, float);
int main() {
  int i, j;
  float iR, jR;
  for (i = 0; i <= 20; i += 2) {
    for (j = 10; j <= 30; j += 10) {
      iR = (float)i / 10;
      jR = (float)(i + j) / 10;
      if (i % 10)
        printf("I=%.1f J=%.1f\n", iR, jR);
      else
        printf("I=%.0f J=%.0f\n", iR, jR);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     11dd <main+0xcd>
movl   $0xa,-0xc(%rbp)
cmpl   $0x1e,-0xc(%rbp)
jg     11ca <main+0xba>
cvtsi2ssl -0x8(%rbp),%xmm0
movss  0xeb2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xe97(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11a1 <main+0x91>
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <main+0xa7>
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
jmp    11bc <main+0xac>
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    11cf <main+0xbf>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
xor    %r12d,%r12d
lea    0xeed(%rip),%r14
lea    0xed7(%rip),%r15
xor    %ebp,%ebp
nop
movzbl %bpl,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%eax
xorps  %xmm1,%xmm1
cvtsi2ss %ebp,%xmm1
movss  0xeae(%rip),%xmm2
divss  %xmm2,%xmm1
movaps %xmm1,%xmm0
movss  %xmm1,0xc(%rsp)
lea    0xa(%rbp),%ecx
xorps  %xmm1,%xmm1
cvtsi2ss %ecx,%xmm1
add    %r12b,%al
divss  %xmm2,%xmm1
mov    %r15,%rbx
cmove  %r14,%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x14(%rbp),%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
divss  0xe6f(%rip),%xmm1
mov    %rbx,%rdi
movss  0xc(%rsp),%xmm0
call   1030 <printf@plt>
lea    0x1e(%rbp),%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
divss  0xe4f(%rip),%xmm1
mov    %rbx,%rdi
movss  0xc(%rsp),%xmm0
call   1030 <printf@plt>
add    $0xfe,%r12b
lea    0x2(%rbp),%eax
cmp    $0x13,%ebp
mov    %eax,%ebp
jb     1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"I=%.1f J=%.1f\0A\00"
@.str.1 = [15 x i8] c"I=%.0f J=%.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store i32 0, i32* %2
br label %6
6: ; preds = %38, %0
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 20
br i1 %8, label %9, label %41
9: ; preds = %6
store i32 10, i32* %3
br label %10
10: ; preds = %34, %9
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 30
br i1 %12, label %13, label %37
13: ; preds = %10
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to float
%16 = fdiv float %15, 1.000000e+01
store float %16, float* %4
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = add nsw i32 %17, %18
%20 = sitofp i32 %19 to float
%21 = fdiv float %20, 1.000000e+01
store float %21, float* %5
%22 = load i32, i32* %2
%23 = srem i32 %22, 10
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %13
%26 = load float, float* %4
%27 = load float, float* %5
%28 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), float %26, float %27)
br label %33
29: ; preds = %13
%30 = load float, float* %4
%31 = load float, float* %5
%32 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), float %30, float %31)
br label %33
33: ; preds = %29, %25
br label %34
34: ; preds = %33
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 10
store i32 %36, i32* %3
br label %10
37: ; preds = %10
br label %38
38: ; preds = %37
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 2
store i32 %40, i32* %2
br label %6
41: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"I=%.1f J=%.1f\0A\00"
@.str.1 = [15 x i8] c"I=%.0f J=%.0f\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %21, %1 ]
%3 = sitofp i32 %2 to float
%4 = fdiv float %3, 1.000000e+01
%5 = trunc i32 %2 to i8
%6 = urem i8 %5, 10
%7 = icmp eq i8 %6, 0
%8 = add nuw nsw i32 %2, 10
%9 = sitofp i32 %8 to float
%10 = fdiv float %9, 1.000000e+01
%11 = select i1 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
%12 = tail call i32 @printf(i8* %11, float %4, float %10)
%13 = add nuw nsw i32 %2, 20
%14 = sitofp i32 %13 to float
%15 = fdiv float %14, 1.000000e+01
%16 = tail call i32 @printf(i8* %11, float %4, float %15)
%17 = add nuw nsw i32 %2, 30
%18 = sitofp i32 %17 to float
%19 = fdiv float %18, 1.000000e+01
%20 = tail call i32 @printf(i8* %11, float %4, float %19)
%21 = add nuw nsw i32 %2, 2
%22 = icmp ult i32 %2, 19
br i1 %22, label %1, label %23
23: ; preds = %1
ret i32 0
}