#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*/ fwrite(char *, int, int /*<<< orphan*/,
                          int /*<<< orphan*/ *);
int getArgv(int /*<<< orphan*/ *, int, char **);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ strlen(char *);
int myFile(void *myf, int arg, char *argv[]) {
  int Eret = 0;
  FILE *myfile = myf;
  char myStc[] =
      ".SUFFIXES:$(SFMT) "
      "$(OBMT)\n\nOBJS=$(SRCS:$(SFMT)=$(OBMT))\n\nOBJSWP=$(SRCS:$(SFMT)=$(OBMT)"
      ".swp)\n\nstart: $(OBJS)\n\t$(CC) -o $(EXEC) $(OBJS)\n\t@echo "
      "'------OK------'\n\n$(SFMT)$(OBMT):\n\t$(CC) -Wall -g -o $@ -c "
      "$<\n\n.PHONY:clean\n\nclean:\n\trm -f $(OBJS)\n\trm -f "
      "core*\n\ncleswp:\n\trm -f $(OBJSWP)\n\n";
  if (myfile == NULL) {
    Eret = -1;
    printf("func myFile() error: if (myfile == NULL)  line: %d", 117 - 3);
    return Eret;
  }
  Eret = getArgv(myfile, arg, argv);
  if (Eret == 1) {
    return Eret;
  }
  fwrite(myStc, 1, strlen(myStc), myfile);
  return Eret;
}


x86 assembly (clang, -O0):
<myFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x150(%rbp),%rdi
lea    0xe7d(%rip),%rsi
mov    $0x119,%edx
call   1060 <memcpy@plt>
cmpq   $0x0,-0x30(%rbp)
jne    11bb <myFile+0x6b>
movl   $0xffffffff,-0x24(%rbp)
lea    0xf73(%rip),%rdi
mov    $0x72,%esi
call   1050 <printf@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    121a <myFile+0xca>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1040 <getArgv@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    11e3 <myFile+0x93>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    121a <myFile+0xca>
lea    -0x150(%rbp),%rax
mov    %rax,-0x158(%rbp)
lea    -0x150(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x158(%rbp),%rdi
mov    %eax,%edx
mov    -0x30(%rbp),%rcx
mov    $0x1,%esi
call   1070 <fwrite@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myFile>:
push   %rbp
push   %r14
push   %rbx
sub    $0x120,%rsp
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xe96(%rip),%rsi
mov    %rsp,%rdi
mov    $0x119,%edx
call   1060 <memcpy@plt>
test   %rbx,%rbx
je     11b6 <myFile+0x66>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1040 <getArgv@plt>
mov    %eax,%ebp
mov    $0x1,%eax
cmp    $0x1,%ebp
je     11cc <myFile+0x7c>
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %eax,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %ebp,%eax
jmp    11cc <myFile+0x7c>
lea    0xf5c(%rip),%rdi
mov    $0x72,%esi
call   1050 <printf@plt>
mov    $0xffffffff,%eax
add    $0x120,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.myFile.myStc = [281 x i8] c".SUFFIXES:$(SFMT) $(OBMT)\0A\0AOBJS=$(SRCS:$(SFMT)=$(OBMT))\0A\0AOBJSWP=$(SRCS:$(SFMT)=$(OBMT).swp)\0A\0Astart: $(OBJS)\0A\09$(CC) -o $(EXEC) $(OBJS)\0A\09@echo '------OK------'\0A\0A$(SFMT)$(OBMT):\0A\09$(CC) -Wall -g -o $@ -c $<\0A\0A.PHONY:clean\0A\0Aclean:\0A\09rm -f $(OBJS)\0A\09rm -f core*\0A\0Acleswp:\0A\09rm -f $(OBJSWP)\0A\0A\00"
@.str = [51 x i8] c"func myFile() error: if (myfile == NULL) line: %d\00"
define i32 @myFile(i8* %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32*
%10 = alloca [281 x i8]
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32 0, i32* %8
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %9
%13 = bitcast [281 x i8]* %10 to i8*
%14 = load i32*, i32** %9
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %19
16: ; preds = %3
store i32 -1, i32* %8
%17 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 114)
%18 = load i32, i32* %8
store i32 %18, i32* %4
br label %35
19: ; preds = %3
%20 = load i32*, i32** %9
%21 = load i32, i32* %6
%22 = load i8**, i8*** %7
%23 = call i32 @getArgv(i32* %20, i32 %21, i8** %22)
store i32 %23, i32* %8
%24 = load i32, i32* %8
%25 = icmp eq i32 %24, 1
br i1 %25, label %26, label %28
26: ; preds = %19
%27 = load i32, i32* %8
store i32 %27, i32* %4
br label %35
28: ; preds = %19
%29 = getelementptr inbounds [281 x i8], [281 x i8]* %10, i64 0, i64 0
%30 = getelementptr inbounds [281 x i8], [281 x i8]* %10, i64 0, i64 0
%31 = call i32 @strlen(i8* %30)
%32 = load i32*, i32** %9
%33 = call i32 @fwrite(i8* %29, i32 1, i32 %31, i32* %32)
%34 = load i32, i32* %8
store i32 %34, i32* %4
br label %35
35: ; preds = %28, %26, %16
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
@__const.myFile.myStc = [281 x i8] c".SUFFIXES:$(SFMT) $(OBMT)\0A\0AOBJS=$(SRCS:$(SFMT)=$(OBMT))\0A\0AOBJSWP=$(SRCS:$(SFMT)=$(OBMT).swp)\0A\0Astart: $(OBJS)\0A\09$(CC) -o $(EXEC) $(OBJS)\0A\09@echo '------OK------'\0A\0A$(SFMT)$(OBMT):\0A\09$(CC) -Wall -g -o $@ -c $<\0A\0A.PHONY:clean\0A\0Aclean:\0A\09rm -f $(OBJS)\0A\09rm -f core*\0A\0Acleswp:\0A\09rm -f $(OBJSWP)\0A\0A\00"
@.str = [51 x i8] c"func myFile() error: if (myfile == NULL) line: %d\00"
define i32 @myFile(i8* %0, i32 %1, i8** %2) {
%4 = alloca [281 x i8]
%5 = bitcast i8* %0 to i32*
%6 = getelementptr inbounds [281 x i8], [281 x i8]* %4, i64 0, i64 0
%7 = icmp eq i8* %0, null
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 114)
br label %16
10: ; preds = %3
%11 = tail call i32 @getArgv(i32* %5, i32 %1, i8** %2)
%12 = icmp eq i32 %11, 1
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = call i32 @strlen(i8* %6)
%15 = call i32 @fwrite(i8* %6, i32 1, i32 %14, i32* %5)
br label %16
16: ; preds = %10, %13, %8
%17 = phi i32 [ -1, %8 ], [ %11, %13 ], [ 1, %10 ]
ret i32 %17
}