#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 tinh3() {
  printf("The number 555 in various forms:\n");
  printf("Without any modifier: \n");
  printf("[%d]\n", 555);
  printf("With  modifier :\n");
  printf("[%-d]\n", 555);
  printf("With digit string 10 as modifier :\n");
  printf("[%10d]\n", 555);
  printf("With 0 as modifier : \n");
  printf("[%0d]\n", 555);
  printf("With 0 and digit string 10 as modifiers :\n");
  printf("[%010d]\n", 555);
  printf("With -,0 and digit string 10 as modifiers:\n");
  printf("[%-010d]\n", 555);
  return 0;
}


x86 assembly (clang, -O0):
<tinh3>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x22b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x22b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x22b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0x22b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf15(%rip),%rdi
mov    $0x22b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
mov    $0x22b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tinh3>:
push   %rax
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x22b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
lea    0xea7(%rip),%rdi
mov    $0x22b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8f(%rip),%rdi
mov    $0x22b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xe78(%rip),%rdi
mov    $0x22b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xe60(%rip),%rdi
mov    $0x22b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0e(%rip),%rdi
call   1030 <puts@plt>
lea    0xe4a(%rip),%rdi
mov    $0x22b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"The number 555 in various forms:\0A\00"
@.str.1 = [24 x i8] c"Without any modifier: \0A\00"
@.str.2 = [6 x i8] c"[%d]\0A\00"
@.str.3 = [20 x i8] c"With \C2\96 modifier :\0A\00"
@.str.4 = [7 x i8] c"[%-d]\0A\00"
@.str.5 = [36 x i8] c"With digit string 10 as modifier :\0A\00"
@.str.6 = [8 x i8] c"[%10d]\0A\00"
@.str.7 = [23 x i8] c"With 0 as modifier : \0A\00"
@.str.8 = [7 x i8] c"[%0d]\0A\00"
@.str.9 = [43 x i8] c"With 0 and digit string 10 as modifiers :\0A\00"
@.str.10 = [9 x i8] c"[%010d]\0A\00"
@.str.11 = [44 x i8] c"With -,0 and digit string 10 as modifiers:\0A\00"
@.str.12 = [10 x i8] c"[%-010d]\0A\00"
define i32 @tinh3() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 555)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 555)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 555)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 555)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 555)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 555)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [6 x i8] c"[%d]\0A\00"
@.str.4 = [7 x i8] c"[%-d]\0A\00"
@.str.6 = [8 x i8] c"[%10d]\0A\00"
@.str.8 = [7 x i8] c"[%0d]\0A\00"
@.str.10 = [9 x i8] c"[%010d]\0A\00"
@.str.12 = [10 x i8] c"[%-010d]\0A\00"
@str = [33 x i8] c"The number 555 in various forms:\00"
@str.13 = [23 x i8] c"Without any modifier: \00"
@str.14 = [19 x i8] c"With \C2\96 modifier :\00"
@str.15 = [35 x i8] c"With digit string 10 as modifier :\00"
@str.16 = [22 x i8] c"With 0 as modifier : \00"
@str.17 = [42 x i8] c"With 0 and digit string 10 as modifiers :\00"
@str.18 = [43 x i8] c"With -,0 and digit string 10 as modifiers:\00"
define i32 @tinh3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.13, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 555)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.14, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 555)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 555)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.16, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 555)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.17, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 555)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.18, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 555)
ret i32 0
}