#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 *, unsigned int, ...);
int main(int argc, char *argv[]) {
  int bugs = 100;
  double bug_rate = 1.2;
  printf("You have %d bugs at the imaginari rate %f.\n", bugs, bug_rate);
  long universe_of_defects = 1L * 1024L * 1024L * 1024L;
  printf("The entire of universe has %ld bugs.\n", universe_of_defects);
  double expected_bugs = bugs * bug_rate;
  printf("You are expected to have %f bugs.\n", expected_bugs);
  double part_of_universe = expected_bugs / universe_of_defects;
  printf("That is only a %e portion of the universe.\n", part_of_universe);
  char null_byte = '\0';
  int care_percentage = bugs * null_byte;
  printf("Which means you should care %d%%.\n", care_percentage);
  printf("Xablau %e\n", null_byte * 12.3f);
  printf("%c\n", '\0');
  printf("%d\n", '\0');
  printf("%d\n", 'a');
  unsigned int x = 10;
  unsigned y = 11;
  printf("The total number is %d", x * y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
movabs $0x3ff3333333333333,%rax
33 f3 3f
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
movsd  -0x20(%rbp),%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movq   $0x40000000,-0x28(%rbp)
40
mov    -0x28(%rbp),%esi
lea    0xecd(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x49(%rbp)
call   1030 <printf@plt>
mov    -0x49(%rbp),%al
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
cvttsd2si -0x30(%rbp),%rcx
mov    %ecx,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x49(%rbp),%al
movsd  -0x30(%rbp),%xmm0
cvtsi2sdq -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
cvttsd2si -0x38(%rbp),%rcx
mov    %ecx,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x49(%rbp),%al
movb   $0x0,-0x39(%rbp)
mov    -0x14(%rbp),%ecx
movsbl -0x39(%rbp),%edx
imul   %edx,%ecx
mov    %ecx,-0x40(%rbp)
mov    -0x40(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x39(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xe0b(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%rax
mov    %eax,%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
mov    $0x61,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xa,-0x44(%rbp)
movl   $0xb,-0x48(%rbp)
mov    -0x44(%rbp),%esi
imul   -0x48(%rbp),%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
mov    $0x64,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
mov    $0x40000000,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf14(%rip),%rdi
mov    $0x78,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf24(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf40(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf53(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf42(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf24(%rip),%rdi
mov    $0x6e,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"You have %d bugs at the imaginari rate %f.\0A\00"
@.str.1 = [38 x i8] c"The entire of universe has %ld bugs.\0A\00"
@.str.2 = [35 x i8] c"You are expected to have %f bugs.\0A\00"
@.str.3 = [44 x i8] c"That is only a %e portion of the universe.\0A\00"
@.str.4 = [35 x i8] c"Which means you should care %d%%.\0A\00"
@.str.5 = [11 x i8] c"Xablau %e\0A\00"
@.str.6 = [4 x i8] c"%c\0A\00"
@.str.7 = [4 x i8] c"%d\0A\00"
@.str.8 = [23 x i8] c"The total number is %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca i64
%9 = alloca double
%10 = alloca double
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
store double 1.200000e+00, double* %7
%15 = load i32, i32* %6
%16 = load double, double* %7
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %15, double %16)
store i64 1073741824, i64* %8
%18 = load i64, i64* %8
%19 = trunc i64 %18 to i32
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %6
%22 = sitofp i32 %21 to double
%23 = load double, double* %7
%24 = fmul double %22, %23
store double %24, double* %9
%25 = load double, double* %9
%26 = fptoui double %25 to i32
%27 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %26)
%28 = load double, double* %9
%29 = load i64, i64* %8
%30 = sitofp i64 %29 to double
%31 = fdiv double %28, %30
store double %31, double* %10
%32 = load double, double* %10
%33 = fptoui double %32 to i32
%34 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %33)
store i8 0, i8* %11
%35 = load i32, i32* %6
%36 = load i8, i8* %11
%37 = sext i8 %36 to i32
%38 = mul nsw i32 %35, %37
store i32 %38, i32* %12
%39 = load i32, i32* %12
%40 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = load i8, i8* %11
%42 = sext i8 %41 to i32
%43 = sitofp i32 %42 to float
%44 = fmul float %43, 0x40289999A0000000
%45 = fptoui float %44 to i32
%46 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %45)
%47 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 0)
%48 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 0)
%49 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 97)
store i32 10, i32* %13
store i32 11, i32* %14
%50 = load i32, i32* %13
%51 = load i32, i32* %14
%52 = mul i32 %50, %51
%53 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %52)
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"You have %d bugs at the imaginari rate %f.\0A\00"
@.str.1 = [38 x i8] c"The entire of universe has %ld bugs.\0A\00"
@.str.2 = [35 x i8] c"You are expected to have %f bugs.\0A\00"
@.str.3 = [44 x i8] c"That is only a %e portion of the universe.\0A\00"
@.str.4 = [35 x i8] c"Which means you should care %d%%.\0A\00"
@.str.5 = [11 x i8] c"Xablau %e\0A\00"
@.str.6 = [4 x i8] c"%c\0A\00"
@.str.7 = [4 x i8] c"%d\0A\00"
@.str.8 = [23 x i8] c"The total number is %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 100, double 1.200000e+00)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 1073741824)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 120)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 0)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 0)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 0)
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 0)
%10 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 0)
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 97)
%12 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 110)
ret i32 0
}