#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 */
double p(int, int);
int /*<<< orphan*/ printf(char *, int, int, double);
int main(void) {
  int input[][2] = {{4, 1},  {4, 4},     {4, 5}, {4, 6},
                    {1, 10}, {100, 200}, {8, 20}};
  for (int i = 0; i < 7; i++)
    printf("%3d : %3d  -->   %0.5f\n", input[i][0], input[i][1],
           p(input[i][0], input[i][1]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x38,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x7,-0x44(%rbp)
jge    11b0 <main+0x80>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%eax
mov    %eax,-0x4c(%rbp)
movslq -0x44(%rbp),%rax
mov    -0x3c(%rbp,%rax,8),%eax
mov    %eax,-0x48(%rbp)
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%edi
movslq -0x44(%rbp),%rax
mov    -0x3c(%rbp,%rax,8),%esi
call   1030 <p@plt>
mov    -0x4c(%rbp),%esi
mov    -0x48(%rbp),%edx
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    115b <main+0x2b>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <p@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <printf@plt>
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <p@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
call   1040 <printf@plt>
mov    $0x4,%edi
mov    $0x5,%esi
call   1030 <p@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x5,%edx
call   1040 <printf@plt>
mov    $0x4,%edi
mov    $0x6,%esi
call   1030 <p@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x6,%edx
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   1030 <p@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1040 <printf@plt>
mov    $0x64,%edi
mov    $0xc8,%esi
call   1030 <p@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0xc8,%edx
call   1040 <printf@plt>
mov    $0x8,%edi
mov    $0x14,%esi
call   1030 <p@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x14,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.input = [7 x [2 x i32]] [[2 x i32] [i32 4, i32 1], [2 x i32] [i32 4, i32 4], [2 x i32] [i32 4, i32 5], [2 x i32] [i32 4, i32 6], [2 x i32] [i32 1, i32 10], [2 x i32] [i32 100, i32 200], [2 x i32] [i32 8, i32 20]]
@.str = [24 x i8] c"%3d : %3d --> %0.5f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x [2 x i32]]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [7 x [2 x i32]]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %31, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 7
br i1 %7, label %8, label %34
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [7 x [2 x i32]], [7 x [2 x i32]]* %2, i64 0, i64 %10
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%13 = load i32, i32* %12
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [7 x [2 x i32]], [7 x [2 x i32]]* %2, i64 0, i64 %15
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
%18 = load i32, i32* %17
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [7 x [2 x i32]], [7 x [2 x i32]]* %2, i64 0, i64 %20
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %21, i64 0, i64 0
%23 = load i32, i32* %22
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [7 x [2 x i32]], [7 x [2 x i32]]* %2, i64 0, i64 %25
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %26, i64 0, i64 1
%28 = load i32, i32* %27
%29 = call double @p(i32 %23, i32 %28)
%30 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %18, double %29)
br label %31
31: ; preds = %8
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %5
34: ; preds = %5
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
@.str = [24 x i8] c"%3d : %3d --> %0.5f\0A\00"
define i32 @main() {
%1 = tail call double @p(i32 4, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 4, i32 1, double %1)
%3 = tail call double @p(i32 4, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 4, i32 4, double %3)
%5 = tail call double @p(i32 4, i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 4, i32 5, double %5)
%7 = tail call double @p(i32 4, i32 6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 4, i32 6, double %7)
%9 = tail call double @p(i32 1, i32 10)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 1, i32 10, double %9)
%11 = tail call double @p(i32 100, i32 200)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 100, i32 200, double %11)
%13 = tail call double @p(i32 8, i32 20)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 8, i32 20, double %13)
ret i32 0
}