#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 uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned int, unsigned int,
                            unsigned int, int, unsigned long long);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  unsigned int a, b, c;
  uint64_t d;
  unsigned long long int e;
  char buf[256];
  a = 0;
  b = 1;
  c = 2;
  d = 4;
  e = 5;
  snprintf(buf, 256, "a=%llu b=%llu c=%llu d=%llu e=%llu\n", a, b, c, d, e);
  fprintf(stderr, "%s", buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
movq   $0x5,-0x28(%rbp)
lea    -0x130(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%r10d
mov    -0x28(%rbp),%rax
mov    $0x100,%esi
lea    0xe7d(%rip),%rdx
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <snprintf@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
lea    -0x130(%rbp),%rdx
lea    0xe7c(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x2,%r9d
push   $0x5
push   $0x4
call   1030 <snprintf@plt>
add    $0x10,%rsp
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"a=%llu b=%llu c=%llu d=%llu e=%llu\0A\00"
@stderr = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca [256 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
store i32 2, i32* %8
store i32 4, i32* %9
store i64 5, i64* %10
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i64, i64* %10
%18 = call i32 @snprintf(i8* %12, i32 256, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15, i32 %16, i64 %17)
%19 = load i32, i32* @stderr
%20 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%21 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"a=%llu b=%llu c=%llu d=%llu e=%llu\0A\00"
@stderr = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 256, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i32 2, i32 4, i64 5)
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}