#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 */
struct tgl_state {
  int dummy;
};
struct connection {
  int dummy;
};

/* Variables and functions */
long long lrand48();
int /*<<< orphan*/ tglmp_encrypt_send_message(struct tgl_state *,
                                              struct connection *, int *, int,
                                              int /*<<< orphan*/);
void tgl_do_send_ping(struct tgl_state *TLS, struct connection *c) {
  int x[3];
  x[0] = 0x7abe77ec;
  *(long long *)(x + 1) = lrand48() * (1ll << 32) + lrand48();
  tglmp_encrypt_send_message(TLS, c, x, 3, 0);
}


x86 assembly (clang, -O0):
<tgl_do_send_ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x7abe77ec,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <lrand48@plt>
shl    $0x20,%rax
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <lrand48@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x3,%ecx
xor    %r8d,%r8d
call   1030 <tglmp_encrypt_send_message@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgl_do_send_ping>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
movl   $0x7abe77ec,0x4(%rsp)
7a
xor    %eax,%eax
call   1040 <lrand48@plt>
mov    %rax,%rbx
shl    $0x20,%rbx
xor    %eax,%eax
call   1040 <lrand48@plt>
add    %rbx,%rax
mov    %rax,0x8(%rsp)
lea    0x4(%rsp),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x3,%ecx
xor    %r8d,%r8d
call   1030 <tglmp_encrypt_send_message@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tgl_state = type { i32 }
%struct.connection = type { i32 }
define void @tgl_do_send_ping(%struct.tgl_state* %0, %struct.connection* %1) {
%3 = alloca %struct.tgl_state*
%4 = alloca %struct.connection*
%5 = alloca [3 x i32]
store %struct.tgl_state* %0, %struct.tgl_state** %3
store %struct.connection* %1, %struct.connection** %4
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 2059302892, i32* %6
%7 = call i64 (...) @lrand48()
%8 = mul nsw i64 %7, 4294967296
%9 = call i64 (...) @lrand48()
%10 = add nsw i64 %8, %9
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = bitcast i32* %12 to i64*
store i64 %10, i64* %13
%14 = load %struct.tgl_state*, %struct.tgl_state** %3
%15 = load %struct.connection*, %struct.connection** %4
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%17 = call i32 @tglmp_encrypt_send_message(%struct.tgl_state* %14, %struct.connection* %15, i32* %16, i32 3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.tgl_state = type { i32 }
%struct.connection = type { i32 }
define void @tgl_do_send_ping(%struct.tgl_state* %0, %struct.connection* %1) {
%3 = alloca [3 x i32]
%4 = bitcast [3 x i32]* %3 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 2059302892, i32* %5
%6 = tail call i64 (...) @lrand48()
%7 = shl nsw i64 %6, 32
%8 = tail call i64 (...) @lrand48()
%9 = add nsw i64 %7, %8
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%11 = bitcast i32* %10 to i64*
store i64 %9, i64* %11
%12 = call i32 @tglmp_encrypt_send_message(%struct.tgl_state* %0, %struct.connection* %1, i32* %5, i32 3, i32 0)
ret void
}