#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, ...);
void main(void) {
  printf("%.1d\n", 12345);
  printf("%.2d\n", 12345);
  printf("%.3d\n", 12345);
  printf("%.4d\n", 12345);
  printf("%.5d\n", 12345);
  printf("%*.*f\n", 1, 1, 1.2345);
  printf("%*.*f\n", 1, 2, 1.2345);
  printf("%*.*f\n", 1, 3, 1.2345);
  printf("%*.*f\n", 1, 4, 1.2345);
  printf("%*.*f\n", 1, 5, 1.2345);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
mov    $0x3039,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x3039,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x3039,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x3039,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x3039,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0x1,%edx
movsd  0xe79(%rip),%xmm0
mov    %edx,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
movsd  0xe57(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe6f(%rip),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
movsd  0xe37(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe4f(%rip),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
movsd  0xe17(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe2f(%rip),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
movsd  0xdf7(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef0(%rip),%rdi
mov    $0x3039,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x3039,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x3039,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0x3039,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x3039,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeaf(%rip),%rbx
movsd  0xe81(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
movsd  0xe58(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
movsd  0xe3c(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
movsd  0xe20(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
movsd  0xe04(%rip),%xmm0
mov    $0x1,%al
pop    %rbx
jmp    1030 <printf@plt>

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

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