#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*/ Delay_ms(int);
int /*<<< orphan*/ Glcd_Dot(int, int, int);
int /*<<< orphan*/ Glcd_Write_Text(char *, int, int, int);
int /*<<< orphan*/ TP_Calibrate_Bottom_Left();
int /*<<< orphan*/ TP_Calibrate_Upper_Right();
void Calibrate() {
  Glcd_Dot(0, 63, 1);
  Glcd_Write_Text("TOUCH BOTTOM LEFT", 12, 3, 1);
  TP_Calibrate_Bottom_Left();
  Delay_ms(1000);
  Glcd_Dot(0, 63, 0);
  Glcd_Dot(127, 0, 1);
  Glcd_Write_Text("                 ", 12, 3, 1);
  Glcd_Write_Text("TOUCH UPPER RIGHT", 12, 4, 1);
  TP_Calibrate_Upper_Right();
  Delay_ms(1000);
}


x86 assembly (clang, -O0):
<Calibrate>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x3f,%esi
mov    $0x1,%edx
call   1050 <Glcd_Dot@plt>
lea    0xe94(%rip),%rdi
mov    $0xc,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1030 <Glcd_Write_Text@plt>
mov    $0x0,%al
call   1060 <TP_Calibrate_Bottom_Left@plt>
mov    $0x3e8,%edi
call   1070 <Delay_ms@plt>
xor    %edx,%edx
mov    $0x3f,%esi
mov    %edx,%edi
call   1050 <Glcd_Dot@plt>
mov    $0x7f,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1050 <Glcd_Dot@plt>
lea    0xe5b(%rip),%rdi
mov    $0xc,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1030 <Glcd_Write_Text@plt>
lea    0xe52(%rip),%rdi
mov    $0xc,%esi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1030 <Glcd_Write_Text@plt>
mov    $0x0,%al
call   1040 <TP_Calibrate_Upper_Right@plt>
mov    $0x3e8,%edi
call   1070 <Delay_ms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calibrate>:
push   %rax
xor    %edi,%edi
mov    $0x3f,%esi
mov    $0x1,%edx
call   1050 <Glcd_Dot@plt>
lea    0xe97(%rip),%rdi
mov    $0xc,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1030 <Glcd_Write_Text@plt>
xor    %eax,%eax
call   1060 <TP_Calibrate_Bottom_Left@plt>
mov    $0x3e8,%edi
call   1070 <Delay_ms@plt>
xor    %edi,%edi
mov    $0x3f,%esi
xor    %edx,%edx
call   1050 <Glcd_Dot@plt>
mov    $0x7f,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1050 <Glcd_Dot@plt>
lea    0xe5e(%rip),%rdi
mov    $0xc,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1030 <Glcd_Write_Text@plt>
lea    0xe55(%rip),%rdi
mov    $0xc,%esi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1030 <Glcd_Write_Text@plt>
xor    %eax,%eax
call   1040 <TP_Calibrate_Upper_Right@plt>
mov    $0x3e8,%edi
pop    %rax
jmp    1070 <Delay_ms@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"TOUCH BOTTOM LEFT\00"
@.str.1 = [18 x i8] c" \00"
@.str.2 = [18 x i8] c"TOUCH UPPER RIGHT\00"
define void @Calibrate() {
%1 = call i32 @Glcd_Dot(i32 0, i32 63, i32 1)
%2 = call i32 @Glcd_Write_Text(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 12, i32 3, i32 1)
%3 = call i32 (...) @TP_Calibrate_Bottom_Left()
%4 = call i32 @Delay_ms(i32 1000)
%5 = call i32 @Glcd_Dot(i32 0, i32 63, i32 0)
%6 = call i32 @Glcd_Dot(i32 127, i32 0, i32 1)
%7 = call i32 @Glcd_Write_Text(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 12, i32 3, i32 1)
%8 = call i32 @Glcd_Write_Text(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 4, i32 1)
%9 = call i32 (...) @TP_Calibrate_Upper_Right()
%10 = call i32 @Delay_ms(i32 1000)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"TOUCH BOTTOM LEFT\00"
@.str.1 = [18 x i8] c" \00"
@.str.2 = [18 x i8] c"TOUCH UPPER RIGHT\00"
define void @Calibrate() {
%1 = tail call i32 @Glcd_Dot(i32 0, i32 63, i32 1)
%2 = tail call i32 @Glcd_Write_Text(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 12, i32 3, i32 1)
%3 = tail call i32 (...) @TP_Calibrate_Bottom_Left()
%4 = tail call i32 @Delay_ms(i32 1000)
%5 = tail call i32 @Glcd_Dot(i32 0, i32 63, i32 0)
%6 = tail call i32 @Glcd_Dot(i32 127, i32 0, i32 1)
%7 = tail call i32 @Glcd_Write_Text(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 12, i32 3, i32 1)
%8 = tail call i32 @Glcd_Write_Text(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 4, i32 1)
%9 = tail call i32 (...) @TP_Calibrate_Upper_Right()
%10 = tail call i32 @Delay_ms(i32 1000)
ret void
}