#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*/ *popen(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char, char *);
FILE *measurement_backup_html_table_open(void) {
  char sys_string[1024];
  char *heading_comma_string;
  char *justify_string;
  heading_comma_string = "update_date,"
                         "update_time,"
                         "station,"
                         "datatype,"
                         "measurement_date,"
                         "measurement_time,"
                         "method/login,"
                         "original_value";
  justify_string = "left,left,left,left,left,left,left,right";
  sprintf(sys_string, "html_table.e '' '%s' '%c' '%s'", heading_comma_string,
          '^', justify_string);
  return popen(sys_string, "w");
}


x86 assembly (clang, -O0):
<measurement_backup_html_table_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
lea    0xece(%rip),%rax
mov    %rax,-0x408(%rbp)
lea    0xf27(%rip),%rax
mov    %rax,-0x410(%rbp)
lea    -0x400(%rbp),%rdi
mov    -0x408(%rbp),%rdx
mov    -0x410(%rbp),%r8
lea    0xf2d(%rip),%rsi
mov    $0x5e,%ecx
call   1040 <sprintf@plt>
lea    -0x400(%rbp),%rdi
lea    0xf34(%rip),%rsi
call   1030 <popen@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<measurement_backup_html_table_open>:
push   %rbx
sub    $0x400,%rsp
lea    0xf61(%rip),%rsi
lea    0xeca(%rip),%rdx
lea    0xf2a(%rip),%r8
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5e,%ecx
call   1040 <sprintf@plt>
lea    0xf5b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <popen@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [103 x i8] c"update_date,update_time,station,datatype,measurement_date,measurement_time,method/login,original_value\00"
@.str.1 = [41 x i8] c"left,left,left,left,left,left,left,right\00"
@.str.2 = [31 x i8] c"html_table.e '' '%s' '%c' '%s'\00"
@.str.3 = [2 x i8] c"w\00"
define i32* @measurement_backup_html_table_open() {
%1 = alloca [1024 x i8]
%2 = alloca i8*
%3 = alloca i8*
store i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %5, i8 signext 94, i8* %6)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%9 = call i32* @popen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32* %9
}

LLVM IR (-O2):
@.str = [103 x i8] c"update_date,update_time,station,datatype,measurement_date,measurement_time,method/login,original_value\00"
@.str.1 = [41 x i8] c"left,left,left,left,left,left,left,right\00"
@.str.2 = [31 x i8] c"html_table.e '' '%s' '%c' '%s'\00"
@.str.3 = [2 x i8] c"w\00"
define noalias i32* @measurement_backup_html_table_open() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0), i8 signext 94, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32* @popen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32* %4
}