#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, ...);
int main() {
  int i = 5, j = 6, k = 7, radius1 = 8, radius2 = 9;
  float pi = (float)22 / 7;
  printf("%d\n", (i + j));
  printf("%d\n", (j + k));
  printf("%d\n", (i + k));
  printf("The perimeter of circle with %d radius is %f\n", radius1,
         ((float)2 * pi * radius1));
  printf("The perimeter of circle with %d radius is %f\n", radius2,
         ((float)2 * pi * radius2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x7,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
movl   $0x9,-0x18(%rbp)
movss  0xeba(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
add    -0x10(%rbp),%esi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
add    -0x10(%rbp),%esi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
movss  0xe6a(%rip),%xmm0
mulss  -0x1c(%rbp),%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
movss  0xe3f(%rip),%xmm0
mulss  -0x1c(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe32(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec8(%rip),%rbx
movsd  0xeac(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe9d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [46 x i8] c"The perimeter of circle with %d radius is %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store i32 0, i32* %1
store i32 5, i32* %2
store i32 6, i32* %3
store i32 7, i32* %4
store i32 8, i32* %5
store i32 9, i32* %6
store float 0x4009249240000000, float* %7
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %2
%17 = load i32, i32* %4
%18 = add nsw i32 %16, %17
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %5
%21 = load float, float* %7
%22 = fmul float 2.000000e+00, %21
%23 = load i32, i32* %5
%24 = sitofp i32 %23 to float
%25 = fmul float %22, %24
%26 = fpext float %25 to double
%27 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %20, double %26)
%28 = load i32, i32* %6
%29 = load float, float* %7
%30 = fmul float 2.000000e+00, %29
%31 = load i32, i32* %6
%32 = sitofp i32 %31 to float
%33 = fmul float %30, %32
%34 = fpext float %33 to double
%35 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %28, double %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [46 x i8] c"The perimeter of circle with %d radius is %f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 11)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 13)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 12)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 8, double 0x4049249240000000)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 9, double 0x404C492480000000)
ret i32 0
}