#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*/ fputc(int, unsigned int);
unsigned int output(char *);
void main() {
  unsigned z = output("z");
  fputc(1, z);
  fputc(2, z);
  fputc(3, z);
  fputc(4, z);
  fputc(5, z);
  fputc(6, z);
  fputc(7, z);
  fputc(8, z);
  fputc(9, z);
  fputc(10, z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <output@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0x3,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0x4,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0x5,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0x6,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0x7,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0x8,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0x9,%edi
call   1040 <fputc@plt>
mov    -0x4(%rbp),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <output@plt>
mov    %eax,%ebx
mov    $0x1,%edi
mov    %eax,%esi
call   1040 <fputc@plt>
mov    $0x2,%edi
mov    %ebx,%esi
call   1040 <fputc@plt>
mov    $0x3,%edi
mov    %ebx,%esi
call   1040 <fputc@plt>
mov    $0x4,%edi
mov    %ebx,%esi
call   1040 <fputc@plt>
mov    $0x5,%edi
mov    %ebx,%esi
call   1040 <fputc@plt>
mov    $0x6,%edi
mov    %ebx,%esi
call   1040 <fputc@plt>
mov    $0x7,%edi
mov    %ebx,%esi
call   1040 <fputc@plt>
mov    $0x8,%edi
mov    %ebx,%esi
call   1040 <fputc@plt>
mov    $0x9,%edi
mov    %ebx,%esi
call   1040 <fputc@plt>
mov    $0xa,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <fputc@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"z\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @output(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @fputc(i32 1, i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @fputc(i32 2, i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @fputc(i32 3, i32 %7)
%9 = load i32, i32* %1
%10 = call i32 @fputc(i32 4, i32 %9)
%11 = load i32, i32* %1
%12 = call i32 @fputc(i32 5, i32 %11)
%13 = load i32, i32* %1
%14 = call i32 @fputc(i32 6, i32 %13)
%15 = load i32, i32* %1
%16 = call i32 @fputc(i32 7, i32 %15)
%17 = load i32, i32* %1
%18 = call i32 @fputc(i32 8, i32 %17)
%19 = load i32, i32* %1
%20 = call i32 @fputc(i32 9, i32 %19)
%21 = load i32, i32* %1
%22 = call i32 @fputc(i32 10, i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"z\00"
define void @main() {
%1 = tail call i32 @output(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @fputc(i32 1, i32 %1)
%3 = tail call i32 @fputc(i32 2, i32 %1)
%4 = tail call i32 @fputc(i32 3, i32 %1)
%5 = tail call i32 @fputc(i32 4, i32 %1)
%6 = tail call i32 @fputc(i32 5, i32 %1)
%7 = tail call i32 @fputc(i32 6, i32 %1)
%8 = tail call i32 @fputc(i32 7, i32 %1)
%9 = tail call i32 @fputc(i32 8, i32 %1)
%10 = tail call i32 @fputc(i32 9, i32 %1)
%11 = tail call i32 @fputc(i32 10, i32 %1)
ret void
}