#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 main() {
  int weight = 63;
  printf("weight is %d kg \n", weight);
  printf("weight is %1d kg \n", weight);
  printf("weight is %2d kg \n", weight);
  printf("weight is %4d kf \n", weight);
  printf("weight is %6d kg \n", weight);
  printf("weight is %-6d kg \n ", weight);
  char firstname1[] = "Sandy";
  char lastname1[] = "Malya";
  char firstname2[] = "Ajay Kumar";
  char lastname2[] = "Gurubaxani";
  printf("%20s %20s \n", firstname1, lastname1);
  printf("%20s %20s \n", firstname2, lastname2);
  printf("%10.1f %10.1f %10.1f %10.6f", 5.0, 13.567, 133.57966, 67.67);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x3f,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xf08(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xf02(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xefa(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xef4(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x1b(%rbp)
mov    0xee8(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xee0(%rip),%al
mov    %al,-0x11(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x26(%rbp)
mov    0xed4(%rip),%ax
mov    %ax,-0x1e(%rbp)
mov    0xecc(%rip),%al
mov    %al,-0x1c(%rbp)
lea    -0xa(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x1b(%rbp),%rsi
lea    -0x26(%rbp),%rdx
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
movsd  0xdda(%rip),%xmm0
movsd  0xdda(%rip),%xmm1
movsd  0xdda(%rip),%xmm2
movsd  0xdda(%rip),%xmm3
mov    $0x4,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xf04(%rip),%rdi
mov    $0x3f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x3f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x3f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x3f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x3f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x3f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
movw   $0x79,0xc(%rsp)
movl   $0x646e6153,0x8(%rsp)
64
movw   $0x61,0x4(%rsp)
movl   $0x796c614d,(%rsp)
movabs $0x6d754b2079616a41,%rax
4b 75 6d
mov    %rax,0x20(%rsp)
movl   $0x72616d,0x27(%rsp)
movabs $0x6178616275727547,%rax
61 78 61
mov    %rax,0x10(%rsp)
movl   $0x696e61,0x17(%rsp)
lea    0xedc(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x20(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
movsd  0xdf2(%rip),%xmm0
movsd  0xdf2(%rip),%xmm1
movsd  0xdf2(%rip),%xmm2
movsd  0xdf2(%rip),%xmm3
mov    $0x4,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"weight is %d kg \0A\00"
@.str.1 = [19 x i8] c"weight is %1d kg \0A\00"
@.str.2 = [19 x i8] c"weight is %2d kg \0A\00"
@.str.3 = [19 x i8] c"weight is %4d kf \0A\00"
@.str.4 = [19 x i8] c"weight is %6d kg \0A\00"
@.str.5 = [21 x i8] c"weight is %-6d kg \0A \00"
@__const.main.firstname1 = [6 x i8] c"Sandy\00"
@__const.main.lastname1 = [6 x i8] c"Malya\00"
@__const.main.firstname2 = [11 x i8] c"Ajay Kumar\00"
@__const.main.lastname2 = [11 x i8] c"Gurubaxani\00"
@.str.6 = [12 x i8] c"%20s %20s \0A\00"
@.str.7 = [28 x i8] c"%10.1f %10.1f %10.1f %10.6f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca [6 x i8]
%4 = alloca [11 x i8]
%5 = alloca [11 x i8]
store i32 63, i32* %1
%6 = load i32, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %1
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 %16)
%18 = bitcast [6 x i8]* %2 to i8*
%19 = bitcast [6 x i8]* %3 to i8*
%20 = bitcast [11 x i8]* %4 to i8*
%21 = bitcast [11 x i8]* %5 to i8*
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %22, i8* %23)
%25 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%26 = getelementptr inbounds [11 x i8], [11 x i8]* %5, i64 0, i64 0
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %25, i8* %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), double 5.000000e+00, double 1.356700e+01, double 0x4060B28C9320D994, double 6.767000e+01)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"weight is %d kg \0A\00"
@.str.1 = [19 x i8] c"weight is %1d kg \0A\00"
@.str.2 = [19 x i8] c"weight is %2d kg \0A\00"
@.str.3 = [19 x i8] c"weight is %4d kf \0A\00"
@.str.4 = [19 x i8] c"weight is %6d kg \0A\00"
@.str.5 = [21 x i8] c"weight is %-6d kg \0A \00"
@__const.main.firstname1 = [6 x i8] c"Sandy\00"
@__const.main.lastname1 = [6 x i8] c"Malya\00"
@__const.main.firstname2 = [11 x i8] c"Ajay Kumar\00"
@__const.main.lastname2 = [11 x i8] c"Gurubaxani\00"
@.str.6 = [12 x i8] c"%20s %20s \0A\00"
@.str.7 = [28 x i8] c"%10.1f %10.1f %10.1f %10.6f\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [6 x i8]
%3 = alloca [11 x i8]
%4 = alloca [11 x i8]
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 63)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 63)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 63)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 63)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 63)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 63)
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %11, i8* %12)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %13, i8* %14)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), double 5.000000e+00, double 1.356700e+01, double 0x4060B28C9320D994, double 6.767000e+01)
ret i32 0
}