#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*/ fputd(int, int /*<<< orphan*/);
int /*<<< orphan*/ fputld(int, int /*<<< orphan*/);
int /*<<< orphan*/ fputlu(int, int /*<<< orphan*/);
int /*<<< orphan*/ fputlx(int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ fputu(int, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdout;
void test4(int argc, char **argv) {
  puts("test4: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
  fputs("int -123: ", stdout);
  fputd(-123, stdout);
  puts("");
  fputs("long int -123: ", stdout);
  fputld(-123, stdout);
  puts("");
  fputs("unsigned -123: ", stdout);
  fputu(-123, stdout);
  puts("");
  fputs("long unsigned -123: ", stdout);
  fputlu(-123, stdout);
  puts("");
  fputs("long unsigned -123 (base 16): ", stdout);
  fputlx(-123, stdout);
  puts("");
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe7a(%rip),%rdi
call   1050 <puts@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%esi
lea    0xe94(%rip),%rdi
call   1070 <fputs@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%esi
mov    $0xffffff85,%edi
call   1090 <fputd@plt>
lea    0xeb3(%rip),%rdi
call   1050 <puts@plt>
mov    0x2e1a(%rip),%rax
mov    (%rax),%esi
lea    0xe5b(%rip),%rdi
call   1070 <fputs@plt>
mov    0x2e05(%rip),%rax
mov    (%rax),%esi
mov    $0xffffff85,%edi
call   1060 <fputld@plt>
lea    0xe7f(%rip),%rdi
call   1050 <puts@plt>
mov    0x2de6(%rip),%rax
mov    (%rax),%esi
lea    0xe3c(%rip),%rdi
call   1070 <fputs@plt>
mov    0x2dd1(%rip),%rax
mov    (%rax),%esi
mov    $0xffffff85,%edi
call   1040 <fputu@plt>
lea    0xe4b(%rip),%rdi
call   1050 <puts@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%esi
lea    0xe03(%rip),%rdi
call   1070 <fputs@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%esi
mov    $0xffffff85,%edi
call   1030 <fputlu@plt>
lea    0xe17(%rip),%rdi
call   1050 <puts@plt>
mov    0x2d7e(%rip),%rax
mov    (%rax),%esi
lea    0xde4(%rip),%rdi
call   1070 <fputs@plt>
mov    0x2d69(%rip),%rax
mov    (%rax),%esi
mov    $0xffffff85,%edi
call   1080 <fputlx@plt>
lea    0xde3(%rip),%rdi
call   1050 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
push   %rbx
lea    0xe78(%rip),%rdi
call   1060 <puts@plt>
mov    0x2e4c(%rip),%rbx
mov    (%rbx),%esi
lea    0xe92(%rip),%rdi
call   1080 <fputs@plt>
mov    (%rbx),%esi
mov    $0xffffff85,%edi
call   10a0 <fputd@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
lea    0xe69(%rip),%rdi
call   1080 <fputs@plt>
mov    (%rbx),%esi
mov    $0xffffff85,%edi
call   1070 <fputld@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
lea    0xe5a(%rip),%rdi
call   1080 <fputs@plt>
mov    (%rbx),%esi
mov    $0xffffff85,%edi
call   1050 <fputu@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
lea    0xe31(%rip),%rdi
call   1080 <fputs@plt>
mov    (%rbx),%esi
mov    $0xffffff85,%edi
call   1040 <fputlu@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
lea    0xe22(%rip),%rdi
call   1080 <fputs@plt>
mov    (%rbx),%esi
mov    $0xffffff85,%edi
call   1090 <fputlx@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"test4: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\00"
@.str.1 = [11 x i8] c"int -123: \00"
@stdout = global i32 0
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [16 x i8] c"long int -123: \00"
@.str.4 = [16 x i8] c"unsigned -123: \00"
@.str.5 = [21 x i8] c"long unsigned -123: \00"
@.str.6 = [31 x i8] c"long unsigned -123 (base 16): \00"
define void @test4(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fputd(i32 -123, i32 %8)
%10 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = call i32 @fputs(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @stdout
%14 = call i32 @fputld(i32 -123, i32 %13)
%15 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = call i32 @fputs(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = load i32, i32* @stdout
%19 = call i32 @fputu(i32 -123, i32 %18)
%20 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @stdout
%24 = call i32 @fputlu(i32 -123, i32 %23)
%25 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%26 = load i32, i32* @stdout
%27 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %26)
%28 = load i32, i32* @stdout
%29 = call i32 @fputlx(i32 -123, i32 %28)
%30 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"test4: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\00"
@.str.1 = [11 x i8] c"int -123: \00"
@stdout = global i32 0
@.str.3 = [16 x i8] c"long int -123: \00"
@.str.4 = [16 x i8] c"unsigned -123: \00"
@.str.5 = [21 x i8] c"long unsigned -123: \00"
@.str.6 = [31 x i8] c"long unsigned -123 (base 16): \00"
define void @test4(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fputd(i32 -123, i32 %6)
%8 = tail call i32 @putchar(i32 10)
%9 = load i32, i32* @stdout
%10 = tail call i32 @fputs(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stdout
%12 = tail call i32 @fputld(i32 -123, i32 %11)
%13 = tail call i32 @putchar(i32 10)
%14 = load i32, i32* @stdout
%15 = tail call i32 @fputs(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = load i32, i32* @stdout
%17 = tail call i32 @fputu(i32 -123, i32 %16)
%18 = tail call i32 @putchar(i32 10)
%19 = load i32, i32* @stdout
%20 = tail call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @stdout
%22 = tail call i32 @fputlu(i32 -123, i32 %21)
%23 = tail call i32 @putchar(i32 10)
%24 = load i32, i32* @stdout
%25 = tail call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = load i32, i32* @stdout
%27 = tail call i32 @fputlx(i32 -123, i32 %26)
%28 = tail call i32 @putchar(i32 10)
ret void
}