#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SeekComments(int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
int main(void) {
  FILE *fptr;
  char name[] = "input.txt";
  if ((fptr = fopen(name, "r")) != NULL) {
    SeekComments(fptr);
  } else {
    printf("Не удалось открыть файл!\n");
  }
  fclose(fptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x1a(%rbp)
mov    0xea7(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    -0x1a(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1191 <main+0x51>
mov    -0x10(%rbp),%rdi
call   1040 <SeekComments@plt>
jmp    119d <main+0x5d>
lea    0xe74(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x78742e7475706e69,%rax
2e 74 78
mov    %rax,(%rsp)
movw   $0x74,0x8(%rsp)
lea    0xea9(%rip),%rsi
mov    %rsp,%rdi
call   1060 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     117b <main+0x3b>
mov    %rbx,%rdi
call   1050 <SeekComments@plt>
jmp    1187 <main+0x47>
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.name = [10 x i8] c"input.txt\00"
@.str = [2 x i8] c"r\00"
@.str.1 = [46 x i8] c"\D0\9D\D0\B5 \D1\83\D0\B4\D0\B0\D0\BB\D0\BE\D1\81\D1\8C \D0\BE\D1\82\D0\BA\D1\80\D1\8B\D1\82\D1\8C \D1\84\D0\B0\D0\B9\D0\BB!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [10 x i8]
store i32 0, i32* %1
%4 = bitcast [10 x i8]* %3 to i8*
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %2
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32*, i32** %2
%10 = call i32 @SeekComments(i32* %9)
br label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = load i32*, i32** %2
%15 = call i32 @fclose(i32* %14)
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [10 x i8] c"input.txt\00"
@.str = [2 x i8] c"r\00"
@str = [45 x i8] c"\D0\9D\D0\B5 \D1\83\D0\B4\D0\B0\D0\BB\D0\BE\D1\81\D1\8C \D0\BE\D1\82\D0\BA\D1\80\D1\8B\D1\82\D1\8C \D1\84\D0\B0\D0\B9\D0\BB!\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @SeekComments(i32* %3)
br label %9
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = tail call i32 @fclose(i32* %3)
ret i32 0
}