#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ getStat(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int main(void) {
  printf("Cache-Control: no-cache, no-store, must-revalidate\n");
  printf("Pragma: no-cache\n");
  printf("Expires: 0\n");
  printf("Content-Type: text/javascript\n\n");
  printf("pushResourceStat('");
  getStat("/sys/class/thermal/thermal_zone0/temp");
  getStat("/proc/meminfo");
  getStat("/proc/stat");
  printf("');");
  fflush(stdout);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
call   1040 <printf@plt>
lea    0xef3(%rip),%rdi
call   1030 <getStat@plt>
lea    0xf0d(%rip),%rdi
call   1030 <getStat@plt>
lea    0xf0f(%rip),%rdi
call   1030 <getStat@plt>
lea    0xf0e(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e1e(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
lea    0xe78(%rip),%rdi
call   1050 <printf@plt>
lea    0xe7f(%rip),%rdi
call   1040 <getStat@plt>
lea    0xe99(%rip),%rdi
call   1040 <getStat@plt>
lea    0xe9b(%rip),%rdi
call   1040 <getStat@plt>
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"Cache-Control: no-cache, no-store, must-revalidate\0A\00"
@.str.1 = [18 x i8] c"Pragma: no-cache\0A\00"
@.str.2 = [12 x i8] c"Expires: 0\0A\00"
@.str.3 = [32 x i8] c"Content-Type: text/javascript\0A\0A\00"
@.str.4 = [19 x i8] c"pushResourceStat('\00"
@.str.5 = [38 x i8] c"/sys/class/thermal/thermal_zone0/temp\00"
@.str.6 = [14 x i8] c"/proc/meminfo\00"
@.str.7 = [11 x i8] c"/proc/stat\00"
@.str.8 = [4 x i8] c"');\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @getStat(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @getStat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @getStat(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = call i32 @fflush(i32 %11)
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.4 = [19 x i8] c"pushResourceStat('\00"
@.str.5 = [38 x i8] c"/sys/class/thermal/thermal_zone0/temp\00"
@.str.6 = [14 x i8] c"/proc/meminfo\00"
@.str.7 = [11 x i8] c"/proc/stat\00"
@.str.8 = [4 x i8] c"');\00"
@stdout = global i32 0
@str = [51 x i8] c"Cache-Control: no-cache, no-store, must-revalidate\00"
@str.9 = [17 x i8] c"Pragma: no-cache\00"
@str.10 = [11 x i8] c"Expires: 0\00"
@str.11 = [31 x i8] c"Content-Type: text/javascript\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.9, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.10, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @getStat(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @getStat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @getStat(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%10 = load i32, i32* @stdout
%11 = tail call i32 @fflush(i32 %10)
%12 = tail call i32 @exit(i32 0)
unreachable
}