#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, double);
void main(void) {
  printf("%.*g\n", 1, 9876.12345);
  printf("%.*g\n", 2, 9876.12345);
  printf("%.*g\n", 3, 9876.12345);
  printf("%.*g\n", 4, 9876.12345);
  printf("%.*g\n", 5, 9876.12345);
  printf("%.*g\n", 6, 9876.12345);
  printf("%.*g\n", 7, 9876.12345);
  printf("%.*g\n", 8, 9876.12345);
  printf("%.*g\n", 9, 9876.12345);
  printf("%.*g\n", 0, 9876.12345);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
mov    $0x1,%esi
movsd  0xed8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x2,%esi
movsd  0xebf(%rip),%xmm0
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
mov    $0x3,%esi
movsd  0xea6(%rip),%xmm0
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
mov    $0x4,%esi
movsd  0xe8d(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe89(%rip),%rdi
mov    $0x5,%esi
movsd  0xe74(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe70(%rip),%rdi
mov    $0x6,%esi
movsd  0xe5b(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe57(%rip),%rdi
mov    $0x7,%esi
movsd  0xe42(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe3e(%rip),%rdi
mov    $0x8,%esi
movsd  0xe29(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe25(%rip),%rdi
mov    $0x9,%esi
movsd  0xe10(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe0c(%rip),%rdi
xor    %esi,%esi
movsd  0xdfa(%rip),%xmm0
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef0(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
movsd  0xec3(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
movsd  0xeae(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
movsd  0xe99(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
movsd  0xe84(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
movsd  0xe6f(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
movsd  0xe5a(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
movsd  0xe45(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
movsd  0xe30(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
movsd  0xe1e(%rip),%xmm0
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%.*g\0A\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, double 0x40C34A0FCD35A858)
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2, double 0x40C34A0FCD35A858)
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 3, double 0x40C34A0FCD35A858)
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4, double 0x40C34A0FCD35A858)
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5, double 0x40C34A0FCD35A858)
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 6, double 0x40C34A0FCD35A858)
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 7, double 0x40C34A0FCD35A858)
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 8, double 0x40C34A0FCD35A858)
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 9, double 0x40C34A0FCD35A858)
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0, double 0x40C34A0FCD35A858)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.*g\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, double 0x40C34A0FCD35A858)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2, double 0x40C34A0FCD35A858)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 3, double 0x40C34A0FCD35A858)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4, double 0x40C34A0FCD35A858)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5, double 0x40C34A0FCD35A858)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 6, double 0x40C34A0FCD35A858)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 7, double 0x40C34A0FCD35A858)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 8, double 0x40C34A0FCD35A858)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 9, double 0x40C34A0FCD35A858)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0, double 0x40C34A0FCD35A858)
ret void
}