#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 *, ...);
int /*<<< orphan*/ putchar(char);
void print_row(const char *msg, const int n, const float *lp, const int row) {
  printf("%s", msg);
  for (int j = 0; j < n; j++)
    printf("%.10"
           "f"
           " ",
           lp[row * n + j]);
  putchar('\n');
}


x86 assembly (clang, -O0):
<print_row>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1191 <print_row+0x71>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x20(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe87(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    114f <print_row+0x2f>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_row>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%r14
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    117c <print_row+0x5c>
imul   %ebx,%ebp
movslq %ebp,%rax
mov    %ebx,%r15d
lea    (%r14,%rax,4),%rbx
xor    %ebp,%ebp
lea    0xeaa(%rip),%r14
nopl   0x0(%rax)
movss  (%rbx,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1160 <print_row+0x40>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"%.10f \00"
define void @print_row(i8* %0, i32 %1, float* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca float*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store float* %2, float** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
store i32 0, i32* %9
br label %12
12: ; preds = %28, %4
%13 = load i32, i32* %9
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %31
16: ; preds = %12
%17 = load float*, float** %7
%18 = load i32, i32* %8
%19 = load i32, i32* %6
%20 = mul nsw i32 %18, %19
%21 = load i32, i32* %9
%22 = add nsw i32 %20, %21
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %17, i64 %23
%25 = load float, float* %24
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %26)
br label %28
28: ; preds = %16
%29 = load i32, i32* %9
%30 = add nsw i32 %29, 1
store i32 %30, i32* %9
br label %12
31: ; preds = %12
%32 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"%.10f \00"
define void @print_row(i8* %0, i32 %1, float* nocapture %2, i32 %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = icmp sgt i32 %1, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = mul nsw i32 %3, %1
%9 = sext i32 %8 to i64
%10 = zext i32 %1 to i64
br label %13
11: ; preds = %13, %4
%12 = tail call i32 @putchar(i8 signext 10)
ret void
13: ; preds = %7, %13
%14 = phi i64 [ 0, %7 ], [ %20, %13 ]
%15 = add nsw i64 %14, %9
%16 = getelementptr inbounds float, float* %2, i64 %15
%17 = load float, float* %16
%18 = fpext float %17 to double
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %18)
%20 = add nuw nsw i64 %14, 1
%21 = icmp eq i64 %20, %10
br i1 %21, label %11, label %13
}