#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 */
scalar_t__ getConfigInt(char *);
int /*<<< orphan*/ updateConfigInt(char *, scalar_t__);
int setGlobalVars() {
  updateConfigInt("taskarea_w",
                  getConfigInt("screen_w") - getConfigInt("points_w"));
  updateConfigInt("taskarea_h",
                  getConfigInt("screen_h") - getConfigInt("points_h"));
  updateConfigInt("clock_x",
                  getConfigInt("screen_w") - getConfigInt("clock_x"));
  updateConfigInt("clock_y",
                  getConfigInt("screen_h") - getConfigInt("clock_r") - 5);
  return 0;
}


x86 assembly (clang, -O0):
<setGlobalVars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xedc(%rip),%rdi
call   1030 <getConfigInt@plt>
mov    %rax,-0x20(%rbp)
lea    0xed5(%rip),%rdi
call   1030 <getConfigInt@plt>
mov    -0x20(%rbp),%rsi
sub    %rax,%rsi
lea    0xeae(%rip),%rdi
call   1040 <updateConfigInt@plt>
lea    0xeca(%rip),%rdi
call   1030 <getConfigInt@plt>
mov    %rax,-0x18(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <getConfigInt@plt>
mov    -0x18(%rbp),%rsi
sub    %rax,%rsi
lea    0xe9c(%rip),%rdi
call   1040 <updateConfigInt@plt>
lea    0xe7e(%rip),%rdi
call   1030 <getConfigInt@plt>
mov    %rax,-0x10(%rbp)
lea    0xe9d(%rip),%rdi
call   1030 <getConfigInt@plt>
mov    -0x10(%rbp),%rsi
sub    %rax,%rsi
lea    0xe8a(%rip),%rdi
call   1040 <updateConfigInt@plt>
lea    0xe6c(%rip),%rdi
call   1030 <getConfigInt@plt>
mov    %rax,-0x8(%rbp)
lea    0xe7e(%rip),%rdi
call   1030 <getConfigInt@plt>
mov    -0x8(%rbp),%rsi
sub    %rax,%rsi
sub    $0x5,%rsi
lea    0xe5f(%rip),%rdi
call   1040 <updateConfigInt@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setGlobalVars>:
push   %r15
push   %r14
push   %rbx
lea    0xedf(%rip),%r14
mov    %r14,%rdi
call   1030 <getConfigInt@plt>
mov    %rax,%rbx
lea    0xed6(%rip),%rdi
call   1030 <getConfigInt@plt>
sub    %rax,%rbx
lea    0xeb3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <updateConfigInt@plt>
lea    0xecc(%rip),%r15
mov    %r15,%rdi
call   1030 <getConfigInt@plt>
mov    %rax,%rbx
lea    0xec3(%rip),%rdi
call   1030 <getConfigInt@plt>
sub    %rax,%rbx
lea    0xea0(%rip),%rdi
mov    %rbx,%rsi
call   1040 <updateConfigInt@plt>
mov    %r14,%rdi
call   1030 <getConfigInt@plt>
mov    %rax,%rbx
lea    0xea3(%rip),%r14
mov    %r14,%rdi
call   1030 <getConfigInt@plt>
sub    %rax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <updateConfigInt@plt>
mov    %r15,%rdi
call   1030 <getConfigInt@plt>
mov    %rax,%rbx
lea    0xe8b(%rip),%rdi
call   1030 <getConfigInt@plt>
sub    %rax,%rbx
add    $0xfffffffffffffffb,%rbx
lea    0xe70(%rip),%rdi
mov    %rbx,%rsi
call   1040 <updateConfigInt@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"taskarea_w\00"
@.str.1 = [9 x i8] c"screen_w\00"
@.str.2 = [9 x i8] c"points_w\00"
@.str.3 = [11 x i8] c"taskarea_h\00"
@.str.4 = [9 x i8] c"screen_h\00"
@.str.5 = [9 x i8] c"points_h\00"
@.str.6 = [8 x i8] c"clock_x\00"
@.str.7 = [8 x i8] c"clock_y\00"
@.str.8 = [8 x i8] c"clock_r\00"
define i32 @setGlobalVars() {
%1 = call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%2 = call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%3 = sub nsw i64 %1, %2
%4 = call i32 @updateConfigInt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%6 = call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%7 = sub nsw i64 %5, %6
%8 = call i32 @updateConfigInt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64 %7)
%9 = call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%10 = call i64 @getConfigInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%11 = sub nsw i64 %9, %10
%12 = call i32 @updateConfigInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i64 %11)
%13 = call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%14 = call i64 @getConfigInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%15 = sub nsw i64 %13, %14
%16 = sub nsw i64 %15, 5
%17 = call i32 @updateConfigInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i64 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"taskarea_w\00"
@.str.1 = [9 x i8] c"screen_w\00"
@.str.2 = [9 x i8] c"points_w\00"
@.str.3 = [11 x i8] c"taskarea_h\00"
@.str.4 = [9 x i8] c"screen_h\00"
@.str.5 = [9 x i8] c"points_h\00"
@.str.6 = [8 x i8] c"clock_x\00"
@.str.7 = [8 x i8] c"clock_y\00"
@.str.8 = [8 x i8] c"clock_r\00"
define i32 @setGlobalVars() {
%1 = tail call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%3 = sub nsw i64 %1, %2
%4 = tail call i32 @updateConfigInt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = tail call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%7 = sub nsw i64 %5, %6
%8 = tail call i32 @updateConfigInt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64 %7)
%9 = tail call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i64 @getConfigInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%11 = sub nsw i64 %9, %10
%12 = tail call i32 @updateConfigInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i64 %11)
%13 = tail call i64 @getConfigInt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%14 = tail call i64 @getConfigInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%15 = add i64 %13, -5
%16 = sub i64 %15, %14
%17 = tail call i32 @updateConfigInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i64 %16)
ret i32 0
}