#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
void row(FILE *f, char x8, char x4, char x2, char x1) {
  int i;
  for (i = 0; i < 7; i++)
    fputc(0, f);
  fputc(x8, f);
  for (i = 0; i < 3; i++)
    fputc(0, f);
  fputc(x4, f);
  fputc(0, f);
  fputc(x2, f);
  fputc(x1, f);
  fputc(0, f);
}


x86 assembly (clang, -O0):
<row>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %sil,-0x9(%rbp)
mov    %dl,-0xa(%rbp)
mov    %cl,-0xb(%rbp)
mov    %al,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x7,-0x10(%rbp)
jge    1156 <row+0x46>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1133 <row+0x23>
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1030 <fputc@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    118f <row+0x7f>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116c <row+0x5c>
mov    -0xa(%rbp),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <fputc@plt>
mov    -0xb(%rbp),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1030 <fputc@plt>
mov    -0xc(%rbp),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<row>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    %r15d,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @row(i32* %0, i8 signext %1, i8 signext %2, i8 signext %3, i8 signext %4) {
%6 = alloca i32*
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
%11 = alloca i32
store i32* %0, i32** %6
store i8 %1, i8* %7
store i8 %2, i8* %8
store i8 %3, i8* %9
store i8 %4, i8* %10
store i32 0, i32* %11
br label %12
12: ; preds = %18, %5
%13 = load i32, i32* %11
%14 = icmp slt i32 %13, 7
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32*, i32** %6
%17 = call i32 @fputc(i8 signext 0, i32* %16)
br label %18
18: ; preds = %15
%19 = load i32, i32* %11
%20 = add nsw i32 %19, 1
store i32 %20, i32* %11
br label %12
21: ; preds = %12
%22 = load i8, i8* %7
%23 = load i32*, i32** %6
%24 = call i32 @fputc(i8 signext %22, i32* %23)
store i32 0, i32* %11
br label %25
25: ; preds = %31, %21
%26 = load i32, i32* %11
%27 = icmp slt i32 %26, 3
br i1 %27, label %28, label %34
28: ; preds = %25
%29 = load i32*, i32** %6
%30 = call i32 @fputc(i8 signext 0, i32* %29)
br label %31
31: ; preds = %28
%32 = load i32, i32* %11
%33 = add nsw i32 %32, 1
store i32 %33, i32* %11
br label %25
34: ; preds = %25
%35 = load i8, i8* %8
%36 = load i32*, i32** %6
%37 = call i32 @fputc(i8 signext %35, i32* %36)
%38 = load i32*, i32** %6
%39 = call i32 @fputc(i8 signext 0, i32* %38)
%40 = load i8, i8* %9
%41 = load i32*, i32** %6
%42 = call i32 @fputc(i8 signext %40, i32* %41)
%43 = load i8, i8* %10
%44 = load i32*, i32** %6
%45 = call i32 @fputc(i8 signext %43, i32* %44)
%46 = load i32*, i32** %6
%47 = call i32 @fputc(i8 signext 0, i32* %46)
ret void
}

LLVM IR (-O2):
define void @row(i32* nocapture %0, i8 signext %1, i8 signext %2, i8 signext %3, i8 signext %4) {
%6 = tail call i32 @fputc(i8 signext 0, i32* %0)
%7 = tail call i32 @fputc(i8 signext 0, i32* %0)
%8 = tail call i32 @fputc(i8 signext 0, i32* %0)
%9 = tail call i32 @fputc(i8 signext 0, i32* %0)
%10 = tail call i32 @fputc(i8 signext 0, i32* %0)
%11 = tail call i32 @fputc(i8 signext 0, i32* %0)
%12 = tail call i32 @fputc(i8 signext 0, i32* %0)
%13 = tail call i32 @fputc(i8 signext %1, i32* %0)
%14 = tail call i32 @fputc(i8 signext 0, i32* %0)
%15 = tail call i32 @fputc(i8 signext 0, i32* %0)
%16 = tail call i32 @fputc(i8 signext 0, i32* %0)
%17 = tail call i32 @fputc(i8 signext %2, i32* %0)
%18 = tail call i32 @fputc(i8 signext 0, i32* %0)
%19 = tail call i32 @fputc(i8 signext %3, i32* %0)
%20 = tail call i32 @fputc(i8 signext %4, i32* %0)
%21 = tail call i32 @fputc(i8 signext 0, i32* %0)
ret void
}