#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 *, ...);
int /*<<< orphan*/ setTimeZone(int);
void callSetTimeZone(int cargs, void **pargs) {
  int tz = pargs[1];
  if (tz >= -12 && tz <= 12) {
    setTimeZone(tz);
    printf("\nTime set correctly to GTM %d \n", tz);
  } else {
    printf("\nInput error\n");
  }
}


x86 assembly (clang, -O0):
<callSetTimeZone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %eax,-0x14(%rbp)
cmpl   $0xfffffff4,-0x14(%rbp)
jl     116c <callSetTimeZone+0x4c>
cmpl   $0xc,-0x14(%rbp)
jg     116c <callSetTimeZone+0x4c>
mov    -0x14(%rbp),%edi
call   1040 <setTimeZone@plt>
mov    -0x14(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117a <callSetTimeZone+0x5a>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callSetTimeZone>:
push   %rbx
mov    0x8(%rsi),%ebx
lea    0xc(%rbx),%eax
cmp    $0x18,%eax
ja     1154 <callSetTimeZone+0x24>
mov    %ebx,%edi
call   1050 <setTimeZone@plt>
lea    0xeb6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>
lea    0xec5(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\0ATime set correctly to GTM %d \0A\00"
@.str.1 = [14 x i8] c"\0AInput error\0A\00"
define void @callSetTimeZone(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = ptrtoint i8* %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, -12
br i1 %11, label %12, label %20
12: ; preds = %2
%13 = load i32, i32* %5
%14 = icmp sle i32 %13, 12
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %5
%17 = call i32 @setTimeZone(i32 %16)
%18 = load i32, i32* %5
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %18)
br label %22
20: ; preds = %12, %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20, %15
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0ATime set correctly to GTM %d \0A\00"
@str = [13 x i8] c"\0AInput error\00"
define void @callSetTimeZone(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
%7 = add i32 %6, 12
%8 = icmp ult i32 %7, 25
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = tail call i32 @setTimeZone(i32 %6)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %14
12: ; preds = %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
ret void
}