#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*/ printf(char *);
int /*<<< orphan*/ putc(char const, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_indent(const char *prefix, const char *multiline_str) {
  printf("  ");
  while (*multiline_str != '\0') {
    putc(*multiline_str, stdout);
    if (*multiline_str == '\n') {
      printf("  ");
    }
    multiline_str++;
  }
  putc('\n', stdout);
}


x86 assembly (clang, -O0):
<print_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1190 <print_indent+0x70>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    0x2e87(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1040 <putc@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    117f <print_indent+0x5f>
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113c <print_indent+0x1c>
mov    0x2e49(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_indent>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    (%rbx),%al
test   %al,%al
je     1176 <print_indent+0x56>
add    $0x1,%rbx
mov    0x2e9b(%rip),%r15
lea    0xeb4(%rip),%r14
jmp    115b <print_indent+0x3b>
xchg   %ax,%ax
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1176 <print_indent+0x56>
mov    (%r15),%esi
movsbl %al,%edi
call   1040 <putc@plt>
cmpb   $0xa,-0x1(%rbx)
jne    1150 <print_indent+0x30>
mov    %r14,%rdi
call   1030 <printf@plt>
jmp    1150 <print_indent+0x30>
mov    0x2e63(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <putc@plt>

LLVM IR (-O0):
@.str = [3 x i8] c" \00"
@stdout = global i32 0
define void @print_indent(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %22, %2
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %25
11: ; preds = %6
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = load i32, i32* @stdout
%15 = call i32 @putc(i8 signext %13, i32 %14)
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 10
br i1 %19, label %20, label %22
20: ; preds = %11
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %22
22: ; preds = %20, %11
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %4
br label %6
25: ; preds = %6
%26 = load i32, i32* @stdout
%27 = call i32 @putc(i8 signext 10, i32 %26)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
@stdout = global i32 0
define void @print_indent(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %19, label %6
6: ; preds = %2, %15
%7 = phi i8 [ %17, %15 ], [ %4, %2 ]
%8 = phi i8* [ %16, %15 ], [ %1, %2 ]
%9 = load i32, i32* @stdout
%10 = tail call i32 @putc(i8 signext %7, i32 %9)
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 10
br i1 %12, label %13, label %15
13: ; preds = %6
%14 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %6
%16 = getelementptr inbounds i8, i8* %8, i64 1
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %6
19: ; preds = %15, %2
%20 = load i32, i32* @stdout
%21 = tail call i32 @putc(i8 signext 10, i32 %20)
ret void
}