#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 NetMes {
  int dummy;
};
struct NetBucket {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ NetBucket_get_net_socket(struct NetBucket *);
int /*<<< orphan*/ NetBucket_get_new_id(struct NetBucket *);
int /*<<< orphan*/ NetMes_set_base_timestamp(struct NetMes *);
int /*<<< orphan*/ NetMes_set_id(struct NetMes *, int /*<<< orphan*/);
int /*<<< orphan*/ write_udpSocket(int /*<<< orphan*/, struct NetMes *);
void NetBucket_write_again(struct NetBucket *nbucket, struct NetMes *nmes) {
  NetMes_set_id(nmes, NetBucket_get_new_id(nbucket));
  NetMes_set_base_timestamp(nmes);
  write_udpSocket(NetBucket_get_net_socket(nbucket), nmes);
}


x86 assembly (clang, -O0):
<NetBucket_write_again>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <NetBucket_get_new_id@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <NetMes_set_id@plt>
mov    -0x10(%rbp),%rdi
call   1050 <NetMes_set_base_timestamp@plt>
mov    -0x8(%rbp),%rdi
call   1040 <NetBucket_get_net_socket@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1070 <write_udpSocket@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NetBucket_write_again>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1060 <NetBucket_get_new_id@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <NetMes_set_id@plt>
mov    %rbx,%rdi
call   1050 <NetMes_set_base_timestamp@plt>
mov    %r14,%rdi
call   1040 <NetBucket_get_net_socket@plt>
mov    %eax,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1070 <write_udpSocket@plt>

LLVM IR (-O0):
%struct.NetBucket = type { i32 }
%struct.NetMes = type { i32 }
define void @NetBucket_write_again(%struct.NetBucket* %0, %struct.NetMes* %1) {
%3 = alloca %struct.NetBucket*
%4 = alloca %struct.NetMes*
store %struct.NetBucket* %0, %struct.NetBucket** %3
store %struct.NetMes* %1, %struct.NetMes** %4
%5 = load %struct.NetMes*, %struct.NetMes** %4
%6 = load %struct.NetBucket*, %struct.NetBucket** %3
%7 = call i32 @NetBucket_get_new_id(%struct.NetBucket* %6)
%8 = call i32 @NetMes_set_id(%struct.NetMes* %5, i32 %7)
%9 = load %struct.NetMes*, %struct.NetMes** %4
%10 = call i32 @NetMes_set_base_timestamp(%struct.NetMes* %9)
%11 = load %struct.NetBucket*, %struct.NetBucket** %3
%12 = call i32 @NetBucket_get_net_socket(%struct.NetBucket* %11)
%13 = load %struct.NetMes*, %struct.NetMes** %4
%14 = call i32 @write_udpSocket(i32 %12, %struct.NetMes* %13)
ret void
}

LLVM IR (-O2):
%struct.NetBucket = type { i32 }
%struct.NetMes = type { i32 }
define void @NetBucket_write_again(%struct.NetBucket* %0, %struct.NetMes* %1) {
%3 = tail call i32 @NetBucket_get_new_id(%struct.NetBucket* %0)
%4 = tail call i32 @NetMes_set_id(%struct.NetMes* %1, i32 %3)
%5 = tail call i32 @NetMes_set_base_timestamp(%struct.NetMes* %1)
%6 = tail call i32 @NetBucket_get_net_socket(%struct.NetBucket* %0)
%7 = tail call i32 @write_udpSocket(i32 %6, %struct.NetMes* %1)
ret void
}