#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 */
scalar_t__ checkouttext(char *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  {
    if (checkouttext("text1.txt")) {
      printf("%s ÊÇÒ»¸öºÏ·¨µÄÌâ¿âÎÄ¼þ !\n", argv[1]);
    } else {
      printf("%s ²»ÊÇÒ»¸öºÏ·¨µÄÌâ¿âÎÄ¼þ !\n", argv[1]);
    }
  }
  {}
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1050 <checkouttext@plt>
cmp    $0x0,%rax
je     1175 <main+0x45>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    1189 <main+0x59>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
lea    0xec5(%rip),%rdi
call   1050 <checkouttext@plt>
test   %rax,%rax
mov    0x8(%rbx),%rsi
lea    0xeeb(%rip),%rax
lea    0xeb5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"text1.txt\00"
@.str.1 = [47 x i8] c"%s \C3\8A\C3\87\C3\92\C2\BB\C2\B8\C3\B6\C2\BA\C3\8F\C2\B7\C2\A8\C2\B5\C3\84\C3\8C\C3\A2\C2\BF\C3\A2\C3\8E\C3\84\C2\BC\C3\BE !\0A\00"
@.str.2 = [51 x i8] c"%s \C2\B2\C2\BB\C3\8A\C3\87\C3\92\C2\BB\C2\B8\C3\B6\C2\BA\C3\8F\C2\B7\C2\A8\C2\B5\C3\84\C3\8C\C3\A2\C2\BF\C3\A2\C3\8E\C3\84\C2\BC\C3\BE !\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @checkouttext(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %18
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %13, %8
%19 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"text1.txt\00"
@.str.1 = [47 x i8] c"%s \C3\8A\C3\87\C3\92\C2\BB\C2\B8\C3\B6\C2\BA\C3\8F\C2\B7\C2\A8\C2\B5\C3\84\C3\8C\C3\A2\C2\BF\C3\A2\C3\8E\C3\84\C2\BC\C3\BE !\0A\00"
@.str.2 = [51 x i8] c"%s \C2\B2\C2\BB\C3\8A\C3\87\C3\92\C2\BB\C2\B8\C3\B6\C2\BA\C3\8F\C2\B7\C2\A8\C2\B5\C3\84\C3\8C\C3\A2\C2\BF\C3\A2\C3\8E\C3\84\C2\BC\C3\BE !\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i64 @checkouttext(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = select i1 %4, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i8* %6)
%9 = tail call i32 (...) @getchar()
ret i32 0
}