#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 */
char *f(int);
int /*<<< orphan*/ getid(int);
int /*<<< orphan*/ print(char *);
void main() {
  int n;
  print("Ââåäèòå ÷èñëî");
  getid(n);
  print("Ôàêòîðèàë ÷èñëà\n");
  if (f(n) > 0)
    print(f(n));
  else
    print("Incorrectly");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1050 <print@plt>
mov    -0x4(%rbp),%edi
call   1040 <getid@plt>
lea    0xec7(%rip),%rdi
call   1050 <print@plt>
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
cmp    $0x0,%rax
jbe    117f <main+0x4f>
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
mov    %rax,%rdi
call   1050 <print@plt>
jmp    118b <main+0x5b>
lea    0xeb3(%rip),%rdi
call   1050 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <print@plt>
call   1040 <getid@plt>
lea    0xed1(%rip),%rdi
call   1050 <print@plt>
call   1030 <f@plt>
test   %rax,%rax
je     1166 <main+0x36>
call   1030 <f@plt>
mov    %rax,%rdi
pop    %rax
jmp    1050 <print@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1050 <print@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\C3\82\C3\A2\C3\A5\C3\A4\C3\A8\C3\B2\C3\A5 \C3\B7\C3\A8\C3\B1\C3\AB\C3\AE\00"
@.str.1 = [31 x i8] c"\C3\94\C3\A0\C3\AA\C3\B2\C3\AE\C3\B0\C3\A8\C3\A0\C3\AB \C3\B7\C3\A8\C3\B1\C3\AB\C3\A0\0A\00"
@.str.2 = [12 x i8] c"Incorrectly\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @print(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
%4 = call i32 @getid(i32 %3)
%5 = call i32 @print(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %1
%7 = call i8* @f(i32 %6)
%8 = icmp ugt i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = load i32, i32* %1
%11 = call i8* @f(i32 %10)
%12 = call i32 @print(i8* %11)
br label %15
13: ; preds = %0
%14 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"\C3\82\C3\A2\C3\A5\C3\A4\C3\A8\C3\B2\C3\A5 \C3\B7\C3\A8\C3\B1\C3\AB\C3\AE\00"
@.str.1 = [31 x i8] c"\C3\94\C3\A0\C3\AA\C3\B2\C3\AE\C3\B0\C3\A8\C3\A0\C3\AB \C3\B7\C3\A8\C3\B1\C3\AB\C3\A0\0A\00"
@.str.2 = [12 x i8] c"Incorrectly\00"
define void @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @getid(i32 undef)
%3 = tail call i32 @print(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i8* @f(i32 undef)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i8* @f(i32 undef)
br label %8
8: ; preds = %0, %6
%9 = phi i8* [ %7, %6 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %0 ]
%10 = tail call i32 @print(i8* %9)
ret void
}