#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*/ usleep(int);
int /*<<< orphan*/ write_u8(int, int, int);
void STMPE610_init(int fd) {
  write_u8(fd, 0x03, 0x02);
  usleep(1000);
  write_u8(fd, 0x03, 0);
  write_u8(fd, 0x04, 0x0C);
  write_u8(fd, 0x40, 0x00);
  write_u8(fd, 0x40, 0x01);
  write_u8(fd, 0x0A, 0x01);
  write_u8(fd, 0x20, 0x60);
  write_u8(fd, 0x21, 0x02);
  write_u8(fd, 0x41, 0xA4);
  write_u8(fd, 0x4A, 0x01);
  write_u8(fd, 0x4B, 0x01);
  write_u8(fd, 0x4B, 0x00);
  write_u8(fd, 0x56, 0x04);
  write_u8(fd, 0x58, 0x01);
  write_u8(fd, 0x0B, 0xFF);
  write_u8(fd, 0x09, 0x05);
}


x86 assembly (clang, -O0):
<STMPE610_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <write_u8@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
mov    $0xc,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x40,%esi
xor    %edx,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x40,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x20,%esi
mov    $0x60,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x21,%esi
mov    $0x2,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x41,%esi
mov    $0xa4,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x4a,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x4b,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x4b,%esi
xor    %edx,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x56,%esi
mov    $0x4,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x58,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0xb,%esi
mov    $0xff,%edx
call   1030 <write_u8@plt>
mov    -0x4(%rbp),%edi
mov    $0x9,%esi
mov    $0x5,%edx
call   1030 <write_u8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STMPE610_init>:
push   %rbx
mov    %edi,%ebx
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <write_u8@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    %ebx,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x4,%esi
mov    $0xc,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x40,%esi
xor    %edx,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x40,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0xa,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x20,%esi
mov    $0x60,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x21,%esi
mov    $0x2,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x41,%esi
mov    $0xa4,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x4a,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x4b,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x4b,%esi
xor    %edx,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x56,%esi
mov    $0x4,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x58,%esi
mov    $0x1,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0xb,%esi
mov    $0xff,%edx
call   1030 <write_u8@plt>
mov    %ebx,%edi
mov    $0x9,%esi
mov    $0x5,%edx
pop    %rbx
jmp    1030 <write_u8@plt>

LLVM IR (-O0):
define void @STMPE610_init(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @write_u8(i32 %3, i32 3, i32 2)
%5 = call i32 @usleep(i32 1000)
%6 = load i32, i32* %2
%7 = call i32 @write_u8(i32 %6, i32 3, i32 0)
%8 = load i32, i32* %2
%9 = call i32 @write_u8(i32 %8, i32 4, i32 12)
%10 = load i32, i32* %2
%11 = call i32 @write_u8(i32 %10, i32 64, i32 0)
%12 = load i32, i32* %2
%13 = call i32 @write_u8(i32 %12, i32 64, i32 1)
%14 = load i32, i32* %2
%15 = call i32 @write_u8(i32 %14, i32 10, i32 1)
%16 = load i32, i32* %2
%17 = call i32 @write_u8(i32 %16, i32 32, i32 96)
%18 = load i32, i32* %2
%19 = call i32 @write_u8(i32 %18, i32 33, i32 2)
%20 = load i32, i32* %2
%21 = call i32 @write_u8(i32 %20, i32 65, i32 164)
%22 = load i32, i32* %2
%23 = call i32 @write_u8(i32 %22, i32 74, i32 1)
%24 = load i32, i32* %2
%25 = call i32 @write_u8(i32 %24, i32 75, i32 1)
%26 = load i32, i32* %2
%27 = call i32 @write_u8(i32 %26, i32 75, i32 0)
%28 = load i32, i32* %2
%29 = call i32 @write_u8(i32 %28, i32 86, i32 4)
%30 = load i32, i32* %2
%31 = call i32 @write_u8(i32 %30, i32 88, i32 1)
%32 = load i32, i32* %2
%33 = call i32 @write_u8(i32 %32, i32 11, i32 255)
%34 = load i32, i32* %2
%35 = call i32 @write_u8(i32 %34, i32 9, i32 5)
ret void
}

LLVM IR (-O2):
define void @STMPE610_init(i32 %0) {
%2 = tail call i32 @write_u8(i32 %0, i32 3, i32 2)
%3 = tail call i32 @usleep(i32 1000)
%4 = tail call i32 @write_u8(i32 %0, i32 3, i32 0)
%5 = tail call i32 @write_u8(i32 %0, i32 4, i32 12)
%6 = tail call i32 @write_u8(i32 %0, i32 64, i32 0)
%7 = tail call i32 @write_u8(i32 %0, i32 64, i32 1)
%8 = tail call i32 @write_u8(i32 %0, i32 10, i32 1)
%9 = tail call i32 @write_u8(i32 %0, i32 32, i32 96)
%10 = tail call i32 @write_u8(i32 %0, i32 33, i32 2)
%11 = tail call i32 @write_u8(i32 %0, i32 65, i32 164)
%12 = tail call i32 @write_u8(i32 %0, i32 74, i32 1)
%13 = tail call i32 @write_u8(i32 %0, i32 75, i32 1)
%14 = tail call i32 @write_u8(i32 %0, i32 75, i32 0)
%15 = tail call i32 @write_u8(i32 %0, i32 86, i32 4)
%16 = tail call i32 @write_u8(i32 %0, i32 88, i32 1)
%17 = tail call i32 @write_u8(i32 %0, i32 11, i32 255)
%18 = tail call i32 @write_u8(i32 %0, i32 9, i32 5)
ret void
}