#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*/ sprintf(char *, char *, char *, int, int);
scalar_t__ system(char *);
void cr10_parse_date_range(char *filename) {
  char sys_string[1024];
  sprintf(sys_string,
          "head -1 %s				|"
          "dayofyear2date.e ',' %d %d y 		|"
          "piece.e ',' 2 				|"
          "cat					 ",
          filename, 1, 2);
  if (system(sys_string)) {
  };
  sprintf(sys_string,
          "tail -1 %s				|"
          "dayofyear2date.e ',' %d %d y 		|"
          "piece.e ',' 2 				|"
          "cat					 ",
          filename, 1, 2);
  if (system(sys_string)) {
  };
}


x86 assembly (clang, -O0):
<cr10_parse_date_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
mov    $0x1,%ecx
mov    $0x2,%r8d
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     116c <cr10_parse_date_range+0x4c>
jmp    116c <cr10_parse_date_range+0x4c>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xece(%rip),%rsi
mov    $0x1,%ecx
mov    $0x2,%r8d
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     11a9 <cr10_parse_date_range+0x89>
jmp    11a9 <cr10_parse_date_range+0x89>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cr10_parse_date_range>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
lea    0xecc(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
mov    $0x1,%ecx
mov    $0x2,%r8d
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
lea    0xef0(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    $0x1,%ecx
mov    $0x2,%r8d
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [76 x i8] c"head -1 %s\09\09\09\09|dayofyear2date.e ',' %d %d y \09\09|piece.e ',' 2 \09\09\09\09|cat\09\09\09\09\09 \00"
@.str.1 = [76 x i8] c"tail -1 %s\09\09\09\09|dayofyear2date.e ',' %d %d y \09\09|piece.e ',' 2 \09\09\09\09|cat\09\09\09\09\09 \00"
define void @cr10_parse_date_range(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i8* %5, i32 1, i32 2)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i64 @system(i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %1
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%13 = load i8*, i8** %2
%14 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8* %13, i32 1, i32 2)
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%16 = call i64 @system(i8* %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %11
br label %19
19: ; preds = %18, %11
ret void
}

LLVM IR (-O2):
@.str = [76 x i8] c"head -1 %s\09\09\09\09|dayofyear2date.e ',' %d %d y \09\09|piece.e ',' 2 \09\09\09\09|cat\09\09\09\09\09 \00"
@.str.1 = [76 x i8] c"tail -1 %s\09\09\09\09|dayofyear2date.e ',' %d %d y \09\09|piece.e ',' 2 \09\09\09\09|cat\09\09\09\09\09 \00"
define void @cr10_parse_date_range(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1, i32 2)
%5 = call i64 @system(i8* %3)
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 1, i32 2)
%7 = call i64 @system(i8* %3)
ret void
}