#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*/ printf(char *, char *);
char *timelib_timezone_id_from_abbr(char *, int, int);
int main(void) {
  char *id;
  id = timelib_timezone_id_from_abbr("cest", 10800, 1);
  printf("%s\n", id);
  id = timelib_timezone_id_from_abbr("cest", 7200, 1);
  printf("%s\n", id);
  id = timelib_timezone_id_from_abbr("cest", 7200, 0);
  printf("%s\n", id);
  id = timelib_timezone_id_from_abbr("foobar", 7200, 0);
  printf("%s\n", id);
  id = timelib_timezone_id_from_abbr("foobar", -7 * 3600, 0);
  printf("%s\n", id);
  id = timelib_timezone_id_from_abbr("foobar", -5 * 3600, 1);
  printf("%s\n", id);
  id = timelib_timezone_id_from_abbr("foobar", 7201, 1);
  printf("%s\n", id);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x2a30,%esi
mov    $0x1,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
mov    $0x1c20,%esi
mov    $0x1,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
mov    $0x1c20,%esi
xor    %edx,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
lea    0xe58(%rip),%rdi
mov    $0x1c20,%esi
xor    %edx,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
lea    0xe31(%rip),%rdi
mov    $0xffff9d90,%esi
xor    %edx,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
lea    0xe0a(%rip),%rdi
mov    $0xffffb9b0,%esi
mov    $0x1,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xde8(%rip),%rdi
call   1030 <printf@plt>
lea    0xde0(%rip),%rdi
mov    $0x1c21,%esi
mov    $0x1,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xdbe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
mov    %r14,%rdi
mov    $0x2a30,%esi
mov    $0x1,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x1c20,%esi
mov    $0x1,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x1c20,%esi
xor    %edx,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
lea    0xe7c(%rip),%r14
mov    %r14,%rdi
mov    $0x1c20,%esi
xor    %edx,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0xffff9d90,%esi
xor    %edx,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0xffffb9b0,%esi
mov    $0x1,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x1c21,%esi
mov    $0x1,%edx
call   1040 <timelib_timezone_id_from_abbr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"cest\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [7 x i8] c"foobar\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 10800, i32 1)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 7200, i32 1)
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 7200, i32 0)
store i8* %9, i8** %2
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 7200, i32 0)
store i8* %12, i8** %2
%13 = load i8*, i8** %2
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 -25200, i32 0)
store i8* %15, i8** %2
%16 = load i8*, i8** %2
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 -18000, i32 1)
store i8* %18, i8** %2
%19 = load i8*, i8** %2
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 7201, i32 1)
store i8* %21, i8** %2
%22 = load i8*, i8** %2
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"cest\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [7 x i8] c"foobar\00"
define i32 @main() {
%1 = tail call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 10800, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 7200, i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = tail call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 7200, i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = tail call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 7200, i32 0)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = tail call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 -25200, i32 0)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = tail call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 -18000, i32 1)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = tail call i8* @timelib_timezone_id_from_abbr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 7201, i32 1)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %13)
ret i32 0
}