#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 *, char);
int main() {
  float num1 = 2.7;
  float num2 = 5.2;
  float num3 = num1 / num2;
  printf("%f\n", num3);
  printf("%.2f\n", num3);
  printf("%.4f\n", num3);
  char myChar = 'A';
  printf("%c", myChar);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x402ccccd,-0x8(%rbp)
movl   $0x40a66666,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
cvttss2si -0x10(%rbp),%eax
movsbl %al,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
cvttss2si -0x10(%rbp),%eax
movsbl %al,%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvttss2si %xmm0,%eax
lea    0xe92(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movb   $0x41,-0x11(%rbp)
lea    0xe85(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
@.str.2 = [6 x i8] c"%.4f\0A\00"
@.str.3 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i8
store i32 0, i32* %1
store float 0x40059999A0000000, float* %2
store float 0x4014CCCCC0000000, float* %3
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fdiv float %6, %7
store float %8, float* %4
%9 = load float, float* %4
%10 = fptosi float %9 to i8
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %10)
%12 = load float, float* %4
%13 = fptosi float %12 to i8
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8 signext %13)
%15 = load float, float* %4
%16 = fptosi float %15 to i8
%17 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8 signext %16)
store i8 65, i8* %5
%18 = load i8, i8* %5
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8 signext %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
@.str.2 = [6 x i8] c"%.4f\0A\00"
@.str.3 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8 signext 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8 signext 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8 signext 65)
ret i32 0
}