#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*/ get_datetime_of_day(int *, int *, int *, int *, int *, int *,
                                       int *, long *, long *);
int /*<<< orphan*/ rand();
int /*<<< orphan*/ snprintf(char *, size_t, char *, int, int, int, int, int,
                            int, long, int /*<<< orphan*/, int /*<<< orphan*/);
void get_unique_mime_boundary(char *boundary, size_t boundary_len) {
  int wday;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  long int usec;
  long int gmtoff;
  get_datetime_of_day(&wday, &year, &month, &day, &hour, &minute, &second,
                      &usec, &gmtoff);
  snprintf(boundary, boundary_len, "nm1_%04d%02d%02d%02d%02d%02d%06lu_%d_%d",
           year, month, day, hour, minute, second, usec, rand(), rand());
}


x86 assembly (clang, -O0):
<get_unique_mime_boundary>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xa8,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
lea    -0x2c(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x38(%rbp),%rcx
lea    -0x3c(%rbp),%r8
lea    -0x40(%rbp),%r9
lea    -0x44(%rbp),%r11
lea    -0x50(%rbp),%r10
lea    -0x58(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <get_datetime_of_day@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x3c(%rbp),%r15d
mov    -0x40(%rbp),%r14d
mov    -0x44(%rbp),%ebx
mov    -0x50(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,-0x5c(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
mov    -0x88(%rbp),%rdi
mov    -0x80(%rbp),%rsi
mov    -0x74(%rbp),%ecx
mov    -0x70(%rbp),%r8d
mov    -0x6c(%rbp),%r9d
mov    -0x68(%rbp),%r11
mov    -0x5c(%rbp),%r10d
lea    0xe13(%rip),%rdx
mov    %r15d,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
call   1040 <snprintf@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_unique_mime_boundary>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,0x38(%rsp)
mov    %rdi,0x30(%rsp)
sub    $0x8,%rsp
lea    0x58(%rsp),%rax
lea    0x48(%rsp),%rbp
lea    0x10(%rsp),%rbx
lea    0x54(%rsp),%rdi
lea    0x24(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x14(%rsp),%r9
push   %rax
push   %rbp
push   %rbx
call   1030 <get_datetime_of_day@plt>
add    $0x20,%rsp
mov    0x1c(%rsp),%ebp
mov    0x18(%rsp),%r13d
mov    0x14(%rsp),%r12d
mov    0x10(%rsp),%eax
mov    %rax,0x28(%rsp)
mov    0xc(%rsp),%eax
mov    %rax,0x20(%rsp)
mov    0x8(%rsp),%r14d
mov    0x40(%rsp),%r15
xor    %eax,%eax
call   1050 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <rand@plt>
lea    0xe3a(%rip),%rdx
mov    0x30(%rsp),%rdi
mov    0x38(%rsp),%rsi
mov    %ebp,%ecx
mov    %r13d,%r8d
mov    %r12d,%r9d
push   %rax
push   %rbx
push   %r15
push   %r14
push   0x40(%rsp)
push   0x50(%rsp)
call   1040 <snprintf@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"nm1_%04d%02d%02d%02d%02d%02d%06lu_%d_%d\00"
define void @get_unique_mime_boundary(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%14 = call i32 @get_datetime_of_day(i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i64* %12, i64* %13)
%15 = load i8*, i8** %3
%16 = load i64, i64* %4
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = load i32, i32* %11
%23 = load i64, i64* %12
%24 = call i32 (...) @rand()
%25 = call i32 (...) @rand()
%26 = call i32 @snprintf(i8* %15, i64 %16, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18, i32 %19, i32 %20, i32 %21, i32 %22, i64 %23, i32 %24, i32 %25)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"nm1_%04d%02d%02d%02d%02d%02d%06lu_%d_%d\00"
define void @get_unique_mime_boundary(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i64
%12 = bitcast i32* %3 to i8*
%13 = bitcast i32* %4 to i8*
%14 = bitcast i32* %5 to i8*
%15 = bitcast i32* %6 to i8*
%16 = bitcast i32* %7 to i8*
%17 = bitcast i32* %8 to i8*
%18 = bitcast i32* %9 to i8*
%19 = bitcast i64* %10 to i8*
%20 = bitcast i64* %11 to i8*
%21 = call i32 @get_datetime_of_day(i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i64* %10, i64* %11)
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = load i32, i32* %8
%27 = load i32, i32* %9
%28 = load i64, i64* %10
%29 = call i32 (...) @rand()
%30 = call i32 (...) @rand()
%31 = call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i64 %28, i32 %29, i32 %30)
ret void
}