#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 canRead(int);
int /*<<< orphan*/ canSend(int, int, char *);
int init();
int /*<<< orphan*/ sleep(int);
int main(void) {
  int skt = init();
  while (1) {
    if (canRead(skt) == 1) {
      canSend(skt, 0x18EEFF0C, "01008020098604A1");
      canSend(skt, 0x18EEFF1A, "6790091f004e1aa1");
      canSend(skt, 0x18EEFF26, "f41fd412a41234a1");
      sleep(1);
    }
    canSend(skt, 0x1CEC260C, "13090002FF00E600");
    canSend(skt, 0x1CFE411A, "C2FFFFFF48484006");
    canSend(skt, 0x18EB0C26, "023031FFFFFFFFFF");
    canSend(skt, 0x1CE6D826, "C3FFFFFFFFFFFFFF");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <canRead@plt>
cmp    $0x1,%eax
jne    11b0 <main+0x70>
mov    -0x8(%rbp),%edi
mov    $0x18eeff0c,%esi
lea    0xe87(%rip),%rdx
call   1040 <canSend@plt>
mov    -0x8(%rbp),%edi
mov    $0x18eeff1a,%esi
lea    0xe84(%rip),%rdx
call   1040 <canSend@plt>
mov    -0x8(%rbp),%edi
mov    $0x18eeff26,%esi
lea    0xe81(%rip),%rdx
call   1040 <canSend@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    -0x8(%rbp),%edi
mov    $0x1cec260c,%esi
lea    0xe74(%rip),%rdx
call   1040 <canSend@plt>
mov    -0x8(%rbp),%edi
mov    $0x1cfe411a,%esi
lea    0xe71(%rip),%rdx
call   1040 <canSend@plt>
mov    -0x8(%rbp),%edi
mov    $0x18eb0c26,%esi
lea    0xe6e(%rip),%rdx
call   1040 <canSend@plt>
mov    -0x8(%rbp),%edi
mov    $0x1ce6d826,%esi
lea    0xe6b(%rip),%rdx
call   1040 <canSend@plt>
jmp    1159 <main+0x19>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <init@plt>
mov    %eax,%ebx
lea    0xec7(%rip),%r12
lea    0xed1(%rip),%r13
lea    0xedb(%rip),%rbp
lea    0xee5(%rip),%r14
lea    0xeef(%rip),%r15
jmp    11bc <main+0x7c>
nopl   0x0(%rax)
mov    %ebx,%edi
mov    $0x1cec260c,%esi
mov    %r13,%rdx
call   1040 <canSend@plt>
mov    %ebx,%edi
mov    $0x1cfe411a,%esi
mov    %rbp,%rdx
call   1040 <canSend@plt>
mov    %ebx,%edi
mov    $0x18eb0c26,%esi
mov    %r14,%rdx
call   1040 <canSend@plt>
mov    %ebx,%edi
mov    $0x1ce6d826,%esi
mov    %r15,%rdx
call   1040 <canSend@plt>
mov    %ebx,%edi
call   1030 <canRead@plt>
cmp    $0x1,%eax
jne    1180 <main+0x40>
mov    %ebx,%edi
mov    $0x18eeff0c,%esi
lea    0xe2a(%rip),%rdx
call   1040 <canSend@plt>
mov    %ebx,%edi
mov    $0x18eeff1a,%esi
lea    0xe28(%rip),%rdx
call   1040 <canSend@plt>
mov    %ebx,%edi
mov    $0x18eeff26,%esi
mov    %r12,%rdx
call   1040 <canSend@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    1180 <main+0x40>

LLVM IR (-O0):
@.str = [17 x i8] c"01008020098604A1\00"
@.str.1 = [17 x i8] c"6790091f004e1aa1\00"
@.str.2 = [17 x i8] c"f41fd412a41234a1\00"
@.str.3 = [17 x i8] c"13090002FF00E600\00"
@.str.4 = [17 x i8] c"C2FFFFFF48484006\00"
@.str.5 = [17 x i8] c"023031FFFFFFFFFF\00"
@.str.6 = [17 x i8] c"C3FFFFFFFFFFFFFF\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @init()
store i32 %3, i32* %2
br label %4
4: ; preds = %0, %16
%5 = load i32, i32* %2
%6 = call i32 @canRead(i32 %5)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i32, i32* %2
%10 = call i32 @canSend(i32 %9, i32 418316044, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = call i32 @canSend(i32 %11, i32 418316058, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* %2
%14 = call i32 @canSend(i32 %13, i32 418316070, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @sleep(i32 1)
br label %16
16: ; preds = %8, %4
%17 = load i32, i32* %2
%18 = call i32 @canSend(i32 %17, i32 485238284, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32, i32* %2
%20 = call i32 @canSend(i32 %19, i32 486424858, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%21 = load i32, i32* %2
%22 = call i32 @canSend(i32 %21, i32 418057254, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%23 = load i32, i32* %2
%24 = call i32 @canSend(i32 %23, i32 484890662, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %4
}

LLVM IR (-O2):
@.str = [17 x i8] c"01008020098604A1\00"
@.str.1 = [17 x i8] c"6790091f004e1aa1\00"
@.str.2 = [17 x i8] c"f41fd412a41234a1\00"
@.str.3 = [17 x i8] c"13090002FF00E600\00"
@.str.4 = [17 x i8] c"C2FFFFFF48484006\00"
@.str.5 = [17 x i8] c"023031FFFFFFFFFF\00"
@.str.6 = [17 x i8] c"C3FFFFFFFFFFFFFF\00"
define i32 @main() {
%1 = tail call i32 (...) @init()
br label %2
2: ; preds = %10, %0
%3 = tail call i32 @canRead(i32 %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 @canSend(i32 %1, i32 418316044, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @canSend(i32 %1, i32 418316058, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @canSend(i32 %1, i32 418316070, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @sleep(i32 1)
br label %10
10: ; preds = %5, %2
%11 = tail call i32 @canSend(i32 %1, i32 485238284, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @canSend(i32 %1, i32 486424858, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%13 = tail call i32 @canSend(i32 %1, i32 418057254, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%14 = tail call i32 @canSend(i32 %1, i32 484890662, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %2
}