#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 */
typedef int uint32_t;
typedef scalar_t__ time_t;
typedef int /*<<< orphan*/ out_msg;

/* Variables and functions */
scalar_t__ _xmit(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ snprintf(char *, int, char *, int, char *);
scalar_t__ time(int /*<<< orphan*/ *);
void _single_msg(void) {
  time_t now = time(NULL);
  char out_msg[1024];
  snprintf(out_msg, sizeof(out_msg), "TS=%u AUTH=root DT=CMD=%s", (uint32_t)now,
           "JOBWILLRUN ARG=JOBID=65537,bgl[000x733] "
           "JOBID=65539,bgl[000x733] JOBID=65538,bgl[000x733]");
  if (_xmit(out_msg))
    exit(1);
}


x86 assembly (clang, -O0):
<_single_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %rax,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    %eax,%ecx
mov    $0x400,%esi
lea    0xe8f(%rip),%rdx
lea    0xea2(%rip),%r8
call   1030 <snprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <_xmit@plt>
cmp    $0x0,%rax
je     119d <_single_msg+0x5d>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_single_msg>:
push   %rbx
sub    $0x400,%rsp
xor    %edi,%edi
call   1050 <time@plt>
lea    0xeaa(%rip),%rdx
lea    0xebd(%rip),%r8
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
mov    %eax,%ecx
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <_xmit@plt>
test   %rax,%rax
jne    1185 <_single_msg+0x45>
add    $0x400,%rsp
pop    %rbx
ret
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"TS=%u AUTH=root DT=CMD=%s\00"
@.str.1 = [90 x i8] c"JOBWILLRUN ARG=JOBID=65537,bgl[000x733] JOBID=65539,bgl[000x733] JOBID=65538,bgl[000x733]\00"
define void @_single_msg() {
%1 = alloca i64
%2 = alloca [1024 x i8]
%3 = call i64 @time(i32* null)
store i64 %3, i64* %1
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = load i64, i64* %1
%6 = trunc i64 %5 to i32
%7 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %6, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%9 = call i64 @_xmit(i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"TS=%u AUTH=root DT=CMD=%s\00"
@.str.1 = [90 x i8] c"JOBWILLRUN ARG=JOBID=65537,bgl[000x733] JOBID=65539,bgl[000x733] JOBID=65538,bgl[000x733]\00"
define void @_single_msg() {
%1 = alloca [1024 x i8]
%2 = tail call i64 @time(i32* null)
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = trunc i64 %2 to i32
%5 = call i32 @snprintf(i8* %3, i32 1024, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %4, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0))
%6 = call i64 @_xmit(i8* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %0
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %0
ret void
}