#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, char, ...);
int main() {
  int pi = 3.14;
  printf("%d; %d\n", pi, 3.14);
  char ch = 'A';
  printf("%c; %c; %c;\n", ch, ch + 32, 66);
  int a = 80, b = 83, c = 70, sum = a + b + c;
  printf("합 = %d\n평균 = %5.2lf\n", sum, sum / 3.0);
  const int N = 100;
  char m1 = '?', m2 = '!';
  printf("%c %c\n", m1, m2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movsbl -0x8(%rbp),%esi
lea    0xed7(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x23(%rbp)
mov    $0x3,%edx
call   1030 <printf@plt>
mov    -0x23(%rbp),%al
movb   $0x41,-0x9(%rbp)
movsbl -0x9(%rbp),%esi
mov    %esi,%ecx
add    $0x20,%ecx
movsbl %cl,%edx
lea    0xeb6(%rip),%rdi
mov    $0x42,%ecx
call   1030 <printf@plt>
movl   $0x50,-0x10(%rbp)
movl   $0x53,-0x14(%rbp)
movl   $0x46,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %al,%cl
cvtsi2sd %eax,%xmm0
movsd  0xe66(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
lea    0xe74(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x64,-0x20(%rbp)
movb   $0x3f,-0x21(%rbp)
movb   $0x21,-0x22(%rbp)
mov    -0x21(%rbp),%al
lea    0xe68(%rip),%rdi
movsbl %al,%esi
movsbl -0x22(%rbp),%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x41,%esi
mov    $0x61,%edx
mov    $0x42,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0xffffffe9,%esi
mov    $0x4d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x3f,%esi
mov    $0x21,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d; %d\0A\00"
@.str.1 = [13 x i8] c"%c; %c; %c;\0A\00"
@.str.2 = [26 x i8] c"\ED\95\A9 = %d\0A\ED\8F\89\EA\B7\A0 = %5.2lf\0A\00"
@.str.3 = [7 x i8] c"%c %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
store i32 0, i32* %1
store i32 3, i32* %2
%11 = load i32, i32* %2
%12 = trunc i32 %11 to i8
%13 = call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %12, i8 signext 3)
store i8 65, i8* %3
%14 = load i8, i8* %3
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = add nsw i32 %16, 32
%18 = trunc i32 %17 to i8
%19 = call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8 signext %14, i8 signext %18, i32 66)
store i32 80, i32* %4
store i32 83, i32* %5
store i32 70, i32* %6
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = add nsw i32 %20, %21
%23 = load i32, i32* %6
%24 = add nsw i32 %22, %23
store i32 %24, i32* %7
%25 = load i32, i32* %7
%26 = trunc i32 %25 to i8
%27 = load i32, i32* %7
%28 = sitofp i32 %27 to double
%29 = fdiv double %28, 3.000000e+00
%30 = fptosi double %29 to i8
%31 = call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8 signext %26, i8 signext %30)
store i32 100, i32* %8
store i8 63, i8* %9
store i8 33, i8* %10
%32 = load i8, i8* %9
%33 = load i8, i8* %10
%34 = call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8 signext %32, i8 signext %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d; %d\0A\00"
@.str.1 = [13 x i8] c"%c; %c; %c;\0A\00"
@.str.2 = [26 x i8] c"\ED\95\A9 = %d\0A\ED\8F\89\EA\B7\A0 = %5.2lf\0A\00"
@.str.3 = [7 x i8] c"%c %c\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext 3, i8 signext 3)
%2 = tail call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8 signext 65, i8 signext 97, i32 66)
%3 = tail call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8 signext -23, i8 signext 77)
%4 = tail call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8 signext 63, i8 signext 33)
ret i32 0
}