#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 main() {
  printf("문자열[%s]\n", "Hello World");
  printf("문자 1개[%c]\n", 'H');
  printf("부호있는정수[%d]\n", -3);
  printf("실수[%f]\n", 2.1234);
  printf("실수 소수 2자리만[%0.2f]\n", 2.1234);
  printf("16진수 대문자[%X]\n", 'H');
  printf("16진수 소문자[%x]\n", 'i');
  printf("16진수 2자리만[%02X]\n", 255);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    0xeea(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x48,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0xfffffffd,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
movsd  0xe97(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
movsd  0xe81(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x48,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x69,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
lea    0xef8(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x48,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0xfffffffd,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
movsd  0xea5(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
movsd  0xe8f(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x48,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x69,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"\EB\AC\B8\EC\9E\90\EC\97\B4[%s]\0A\00"
@.str.1 = [12 x i8] c"Hello World\00"
@.str.2 = [17 x i8] c"\EB\AC\B8\EC\9E\90 1\EA\B0\9C[%c]\0A\00"
@.str.3 = [24 x i8] c"\EB\B6\80\ED\98\B8\EC\9E\88\EB\8A\94\EC\A0\95\EC\88\98[%d]\0A\00"
@.str.4 = [12 x i8] c"\EC\8B\A4\EC\88\98[%f]\0A\00"
@.str.5 = [33 x i8] c"\EC\8B\A4\EC\88\98 \EC\86\8C\EC\88\98 2\EC\9E\90\EB\A6\AC\EB\A7\8C[%0.2f]\0A\00"
@.str.6 = [24 x i8] c"16\EC\A7\84\EC\88\98 \EB\8C\80\EB\AC\B8\EC\9E\90[%X]\0A\00"
@.str.7 = [24 x i8] c"16\EC\A7\84\EC\88\98 \EC\86\8C\EB\AC\B8\EC\9E\90[%x]\0A\00"
@.str.8 = [27 x i8] c"16\EC\A7\84\EC\88\98 2\EC\9E\90\EB\A6\AC\EB\A7\8C[%02X]\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 72)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 -3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), double 2.123400e+00)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), double 2.123400e+00)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 72)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 105)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 255)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"\EB\AC\B8\EC\9E\90\EC\97\B4[%s]\0A\00"
@.str.1 = [12 x i8] c"Hello World\00"
@.str.2 = [17 x i8] c"\EB\AC\B8\EC\9E\90 1\EA\B0\9C[%c]\0A\00"
@.str.3 = [24 x i8] c"\EB\B6\80\ED\98\B8\EC\9E\88\EB\8A\94\EC\A0\95\EC\88\98[%d]\0A\00"
@.str.4 = [12 x i8] c"\EC\8B\A4\EC\88\98[%f]\0A\00"
@.str.5 = [33 x i8] c"\EC\8B\A4\EC\88\98 \EC\86\8C\EC\88\98 2\EC\9E\90\EB\A6\AC\EB\A7\8C[%0.2f]\0A\00"
@.str.6 = [24 x i8] c"16\EC\A7\84\EC\88\98 \EB\8C\80\EB\AC\B8\EC\9E\90[%X]\0A\00"
@.str.7 = [24 x i8] c"16\EC\A7\84\EC\88\98 \EC\86\8C\EB\AC\B8\EC\9E\90[%x]\0A\00"
@.str.8 = [27 x i8] c"16\EC\A7\84\EC\88\98 2\EC\9E\90\EB\A6\AC\EB\A7\8C[%02X]\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 72)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 -3)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), double 2.123400e+00)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), double 2.123400e+00)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 72)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 105)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 255)
ret i32 0
}