#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ iprintf(char *, int, int);
int /*<<< orphan*/ pass(char *);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stdout;
main() {
  int i, j, k;
  print("\r\nDemo Program Start\r\n");
  printf("Value = %d, %d\r\n", 2, 1);
  pass("printf [OKI006]");
  print("\r\nDemo Program Start\r\n");
  iprintf("Value = %d, %d\r\n", 2, 1);
  pass("iprintf [OKI007]");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xea1(%rip),%rdi
call   1050 <print@plt>
lea    0xeac(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
call   1030 <pass@plt>
lea    0xe73(%rip),%rdi
call   1050 <print@plt>
lea    0xe7e(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1070 <iprintf@plt>
lea    0xe89(%rip),%rdi
call   1030 <pass@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xea5(%rip),%r14
mov    %r14,%rdi
call   1050 <print@plt>
lea    0xead(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1040 <printf@plt>
lea    0xea5(%rip),%rdi
call   1030 <pass@plt>
mov    %r14,%rdi
call   1050 <print@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1070 <iprintf@plt>
lea    0xe8f(%rip),%rdi
call   1030 <pass@plt>
mov    0x2e2b(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\0D\0ADemo Program Start\0D\0A\00"
@.str.1 = [17 x i8] c"Value = %d, %d\0D\0A\00"
@.str.2 = [16 x i8] c"printf [OKI006]\00"
@.str.3 = [17 x i8] c"iprintf [OKI007]\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1)
%6 = call i32 @pass(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @iprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1)
%9 = call i32 @pass(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @stdout
%11 = call i32 @fflush(i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"\0D\0ADemo Program Start\0D\0A\00"
@.str.1 = [17 x i8] c"Value = %d, %d\0D\0A\00"
@.str.2 = [16 x i8] c"printf [OKI006]\00"
@.str.3 = [17 x i8] c"iprintf [OKI007]\00"
@stdout = global i32 0
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1)
%3 = tail call i32 @pass(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @iprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1)
%6 = tail call i32 @pass(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fflush(i32 %7)
ret i32 0
}