#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*/ uint8_t;
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ addch(char);
int /*<<< orphan*/ draw_u8(int /*<<< orphan*/ const);
int /*<<< orphan*/ rep(char, int);
void draw_tile_contents_row(const uint8_t row[4], int lspace) {
  rep(' ', lspace);
  for (int8_t i = 0; i < 4; ++i) {
    addch('|');
    draw_u8(row[i]);
  }
  addch('|');
  addch('\n');
}


x86 assembly (clang, -O0):
<draw_tile_contents_row>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    $0x20,%edi
call   1030 <rep@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1185 <draw_tile_contents_row+0x55>
mov    $0x7c,%edi
call   1050 <addch@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <draw_u8@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1153 <draw_tile_contents_row+0x23>
mov    $0x7c,%edi
call   1050 <addch@plt>
mov    $0xa,%edi
call   1050 <addch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_tile_contents_row>:
push   %rbx
mov    %rdi,%rbx
mov    $0x20,%edi
call   1030 <rep@plt>
mov    $0x7c,%edi
call   1050 <addch@plt>
mov    (%rbx),%edi
call   1040 <draw_u8@plt>
mov    $0x7c,%edi
call   1050 <addch@plt>
mov    0x4(%rbx),%edi
call   1040 <draw_u8@plt>
mov    $0x7c,%edi
call   1050 <addch@plt>
mov    0x8(%rbx),%edi
call   1040 <draw_u8@plt>
mov    $0x7c,%edi
call   1050 <addch@plt>
mov    0xc(%rbx),%edi
call   1040 <draw_u8@plt>
mov    $0x7c,%edi
call   1050 <addch@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1050 <addch@plt>

LLVM IR (-O0):
define void @draw_tile_contents_row(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @rep(i8 signext 32, i32 %6)
store i32 0, i32* %5
br label %8
8: ; preds = %19, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = call i32 @addch(i8 signext 124)
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = call i32 @draw_u8(i32 %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %8
22: ; preds = %8
%23 = call i32 @addch(i8 signext 124)
%24 = call i32 @addch(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @draw_tile_contents_row(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @rep(i8 signext 32, i32 %1)
%4 = tail call i32 @addch(i8 signext 124)
%5 = load i32, i32* %0
%6 = tail call i32 @draw_u8(i32 %5)
%7 = tail call i32 @addch(i8 signext 124)
%8 = getelementptr inbounds i32, i32* %0, i64 1
%9 = load i32, i32* %8
%10 = tail call i32 @draw_u8(i32 %9)
%11 = tail call i32 @addch(i8 signext 124)
%12 = getelementptr inbounds i32, i32* %0, i64 2
%13 = load i32, i32* %12
%14 = tail call i32 @draw_u8(i32 %13)
%15 = tail call i32 @addch(i8 signext 124)
%16 = getelementptr inbounds i32, i32* %0, i64 3
%17 = load i32, i32* %16
%18 = tail call i32 @draw_u8(i32 %17)
%19 = tail call i32 @addch(i8 signext 124)
%20 = tail call i32 @addch(i8 signext 10)
ret void
}