#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 */
typedef int /*<<< orphan*/ *mpfr_srcptr;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ mpfr_out_str(int /*<<< orphan*/ *, int, int,
                                int /*<<< orphan*/ *, int /*<<< orphan*/);
void file_write(mpfr_srcptr A, unsigned long grp_size, FILE **f) {
  unsigned long i;
  for (i = 0; i < grp_size; i++) {
    mpfr_out_str(f[i], 10, 80, &(A[i]), MPFR_RNDN);
    fputc('\n', f[i]);
  }
}


x86 assembly (clang, -O0):
<file_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    11a5 <file_write+0x85>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
mov    0x2e7c(%rip),%rax
mov    (%rax),%r8d
mov    $0xa,%esi
mov    $0x50,%edx
call   1030 <mpfr_out_str@plt>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    113c <file_write+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_write>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %rsi,%rsi
je     1175 <file_write+0x55>
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%r12
xor    %ebx,%ebx
mov    0x2ea8(%rip),%r13
mov    (%r15,%rbx,8),%rdi
mov    0x0(%r13),%r8d
mov    $0xa,%esi
mov    $0x50,%edx
mov    %r12,%rcx
call   1030 <mpfr_out_str@plt>
mov    (%r15,%rbx,8),%rsi
mov    $0xa,%edi
call   1040 <fputc@plt>
add    $0x1,%rbx
add    $0x4,%r12
cmp    %rbx,%r14
jne    1140 <file_write+0x20>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@MPFR_RNDN = global i32 0
define void @file_write(i32* %0, i64 %1, i32** %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32**
%7 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32** %2, i32*** %6
store i64 0, i64* %7
br label %8
8: ; preds = %27, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %5
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %30
12: ; preds = %8
%13 = load i32**, i32*** %6
%14 = load i64, i64* %7
%15 = getelementptr inbounds i32*, i32** %13, i64 %14
%16 = load i32*, i32** %15
%17 = load i32*, i32** %4
%18 = load i64, i64* %7
%19 = getelementptr inbounds i32, i32* %17, i64 %18
%20 = load i32, i32* @MPFR_RNDN
%21 = call i32 @mpfr_out_str(i32* %16, i32 10, i32 80, i32* %19, i32 %20)
%22 = load i32**, i32*** %6
%23 = load i64, i64* %7
%24 = getelementptr inbounds i32*, i32** %22, i64 %23
%25 = load i32*, i32** %24
%26 = call i32 @fputc(i8 signext 10, i32* %25)
br label %27
27: ; preds = %12
%28 = load i64, i64* %7
%29 = add i64 %28, 1
store i64 %29, i64* %7
br label %8
30: ; preds = %8
ret void
}

LLVM IR (-O2):
@MPFR_RNDN = global i32 0
define void @file_write(i32* %0, i64 %1, i32** nocapture %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %16, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %14, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i32*, i32** %2, i64 %6
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %0, i64 %6
%10 = load i32, i32* @MPFR_RNDN
%11 = tail call i32 @mpfr_out_str(i32* %8, i32 10, i32 80, i32* %9, i32 %10)
%12 = load i32*, i32** %7
%13 = tail call i32 @fputc(i8 signext 10, i32* %12)
%14 = add nuw i64 %6, 1
%15 = icmp eq i64 %14, %1
br i1 %15, label %16, label %5
16: ; preds = %5, %3
ret void
}