#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 daylight;
int /*<<< orphan*/ printf(char *, ...);
int timezone;
char **tzname;
void print_tzvars(void) {
  printf("tzname[0]: %s\n", tzname[0]);
  printf("tzname[1]: %s\n", tzname[1]);
  printf("daylight: %d\n", daylight);
  printf("timezone: %ld\n", timezone);
}


x86 assembly (clang, -O0):
<print_tzvars>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%rsi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%rax
mov    0x8(%rax),%rsi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_tzvars>:
push   %rbx
mov    0x2ec0(%rip),%rbx
mov    (%rbx),%rax
mov    (%rax),%rsi
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%rax
mov    0x8(%rax),%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%esi
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"tzname[0]: %s\0A\00"
@tzname = global i8** null
@.str.1 = [15 x i8] c"tzname[1]: %s\0A\00"
@.str.2 = [14 x i8] c"daylight: %d\0A\00"
@daylight = global i32 0
@.str.3 = [15 x i8] c"timezone: %ld\0A\00"
@timezone = global i32 0
define void @print_tzvars() {
%1 = load i8**, i8*** @tzname
%2 = getelementptr inbounds i8*, i8** %1, i64 0
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8**, i8*** @tzname
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @daylight
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @timezone
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"tzname[0]: %s\0A\00"
@tzname = global i8** null
@.str.1 = [15 x i8] c"tzname[1]: %s\0A\00"
@.str.2 = [14 x i8] c"daylight: %d\0A\00"
@daylight = global i32 0
@.str.3 = [15 x i8] c"timezone: %ld\0A\00"
@timezone = global i32 0
define void @print_tzvars() {
%1 = load i8**, i8*** @tzname
%2 = load i8*, i8** %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8**, i8*** @tzname
%5 = getelementptr inbounds i8*, i8** %4, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @daylight
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @timezone
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %10)
ret void
}