#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 */
float clock();
int /*<<< orphan*/ printf(char *, float, ...);
int main() {
  float start, end;
  start = clock();
  int x, y;
  for (x = 0; x < 200; x++)
    for (y = 0; y < 200; y++)
      if (3 * x - 5 * y == 7)
        printf("%4d%4d\n", x, y);
  end = clock();
  printf("%f\n", (end - start) / 1000);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xc8,-0x10(%rbp)
jge    11b2 <main+0x92>
movl   $0x0,-0x14(%rbp)
cmpl   $0xc8,-0x14(%rbp)
jge    119f <main+0x7f>
imul   $0x3,-0x10(%rbp),%eax
imul   $0x5,-0x14(%rbp),%ecx
sub    %ecx,%eax
cmp    $0x7,%eax
jne    118c <main+0x6c>
cvtsi2ssl -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%esi
lea    0xe7f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1191 <main+0x71>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <main+0x36>
jmp    11a4 <main+0x84>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <main+0x22>
mov    $0x0,%al
call   1030 <clock@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  0xe30(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xe31(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%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
xor    %eax,%eax
call   1030 <clock@plt>
movss  %xmm0,0x8(%rsp)
mov    $0x7,%r15d
lea    0xebb(%rip),%r14
jmp    1161 <main+0x41>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12d
add    $0xfffffffd,%r15d
cmp    $0xc8,%r12d
je     11a6 <main+0x86>
xorps  %xmm0,%xmm0
cvtsi2ss %r12d,%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r15d,%ebx
xor    %ebp,%ebp
jmp    118e <main+0x6e>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebp
add    $0x5,%ebx
cmp    $0xc8,%ebp
je     1150 <main+0x30>
test   %ebx,%ebx
jne    1180 <main+0x60>
mov    %r14,%rdi
movss  0xc(%rsp),%xmm0
mov    %ebp,%esi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1180 <main+0x60>
xor    %eax,%eax
call   1030 <clock@plt>
subss  0x8(%rsp),%xmm0
divss  0xe45(%rip),%xmm0
lea    0xe4a(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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