void util_print_indented(const char *str, int indent) {
  char *word, *line, *desc, *desc_ptr;
  int word_len, pos = indent;
  desc = desc_ptr =
      __util_strdup(__func__,
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/ibm-s390-tools/"
                    "s390-tools/refs/heads/master/libutil/util_base.c",
                    69, str);
  line = strsep(&desc, "\n");
  while (line) {
    word = strsep(&line, " ");
    pos = indent;
    while (word) {
      word_len = strlen(word);
      if (pos + word_len + 1 > 80) {
        printf("\n%*s", indent, "");
        pos = indent;
      }
      if (pos == indent)
        printf("%s", word);
      else
        printf(" %s", word);
      pos += word_len + 1;
      word = strsep(&line, " ");
    }
    if (desc)
      printf("\n%*s", indent, "");
    line = strsep(&desc, "\n");
  }
  printf("\n");
  free(desc_ptr);
}


x86 assembly (clang, -O0):
<util_print_indented>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xe90(%rip),%rdi
lea    0xe9d(%rip),%rsi
mov    $0x45,%edx
mov    $0x0,%al
call   1070 <__util_strdup@plt>
cltq
mov    %rax,-0x30(%rbp)
mov    %rax,-0x28(%rbp)
lea    -0x28(%rbp),%rdi
lea    0xf16(%rip),%rsi
mov    $0x0,%al
call   1060 <strsep@plt>
cltq
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     12b3 <util_print_indented+0x163>
lea    -0x20(%rbp),%rdi
lea    0xef5(%rip),%rsi
mov    $0x0,%al
call   1060 <strsep@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1273 <util_print_indented+0x123>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%eax
add    -0x34(%rbp),%eax
add    $0x1,%eax
cmp    $0x50,%eax
jle    1215 <util_print_indented+0xc5>
mov    -0xc(%rbp),%esi
lea    0xeb1(%rip),%rdi
lea    0xea7(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1238 <util_print_indented+0xe8>
mov    -0x18(%rbp),%rsi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    124a <util_print_indented+0xfa>
mov    -0x18(%rbp),%rsi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
lea    -0x20(%rbp),%rdi
lea    0xe4f(%rip),%rsi
mov    $0x0,%al
call   1060 <strsep@plt>
cltq
mov    %rax,-0x18(%rbp)
jmp    11ce <util_print_indented+0x7e>
cmpq   $0x0,-0x28(%rbp)
je     1296 <util_print_indented+0x146>
mov    -0xc(%rbp),%esi
lea    0xe2a(%rip),%rdi
lea    0xe20(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x28(%rbp),%rdi
lea    0xe0d(%rip),%rsi
mov    $0x0,%al
call   1060 <strsep@plt>
cltq
mov    %rax,-0x20(%rbp)
jmp    11a5 <util_print_indented+0x55>
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_print_indented>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %rdi,%rcx
lea    0xe86(%rip),%rdi
lea    0xe93(%rip),%rsi
mov    $0x45,%edx
xor    %eax,%eax
call   1080 <__util_strdup@plt>
cltq
mov    %rax,0x10(%rsp)
mov    %rax,(%rsp)
lea    0xf0f(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1070 <strsep@plt>
cltq
mov    %rax,0x8(%rsp)
test   %eax,%eax
je     12a7 <util_print_indented+0x147>
lea    0x8(%rsp),%r12
lea    0xef4(%rip),%r13
jmp    11f0 <util_print_indented+0x90>
cs nopw 0x0(%rax,%rax,1)
mov    %rsp,%rdi
lea    0xed4(%rip),%rsi
xor    %eax,%eax
call   1070 <strsep@plt>
cltq
mov    %rax,0x8(%rsp)
test   %eax,%eax
je     12a7 <util_print_indented+0x147>
mov    %r12,%rdi
lea    0xeb6(%rip),%rsi
xor    %eax,%eax
call   1070 <strsep@plt>
test   %eax,%eax
je     1280 <util_print_indented+0x120>
mov    %ebx,%r15d
jmp    1244 <util_print_indented+0xe4>
nopw   0x0(%rax,%rax,1)
cmp    %ebx,%r15d
lea    0xe9d(%rip),%rdi
cmove  %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    %ebp,%r15d
add    $0x1,%r15d
mov    %r12,%rdi
lea    0xe77(%rip),%rsi
xor    %eax,%eax
call   1070 <strsep@plt>
test   %eax,%eax
je     1280 <util_print_indented+0x120>
movslq %eax,%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %rax,%rbp
add    %r15d,%eax
cmp    $0x50,%eax
jl     1210 <util_print_indented+0xb0>
lea    0xe51(%rip),%rdi
mov    %ebx,%esi
lea    0xe45(%rip),%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    %ebx,%r15d
jmp    121e <util_print_indented+0xbe>
nopl   0x0(%rax)
cmpq   $0x0,(%rsp)
je     11d0 <util_print_indented+0x70>
lea    0xe20(%rip),%rdi
mov    %ebx,%esi
lea    0xe14(%rip),%rdx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    11d0 <util_print_indented+0x70>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__func__.util_print_indented = [20 x i8] c"util_print_indented\00"
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ibm-s390-tools/s390-tools/refs/heads/master/libutil/util_base.c\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [5 x i8] c"\0A%*s\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [4 x i8] c" %s\00"
define void @util_print_indented(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%11 = load i32, i32* %4
store i32 %11, i32* %10
%12 = load i8*, i8** %3
%13 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__util_strdup to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.util_print_indented, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 69, i8* %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %8
store i8* %15, i8** %7
%16 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @strsep to i32 (i8**, i8*, ...)*)(i8** %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %6
br label %19
19: ; preds = %67, %2
%20 = load i8*, i8** %6
%21 = icmp ne i8* %20, null
br i1 %21, label %22, label %71
22: ; preds = %19
%23 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @strsep to i32 (i8**, i8*, ...)*)(i8** %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i8*
store i8* %25, i8** %5
%26 = load i32, i32* %4
store i32 %26, i32* %10
br label %27
27: ; preds = %53, %22
%28 = load i8*, i8** %5
%29 = icmp ne i8* %28, null
br i1 %29, label %30, label %61
30: ; preds = %27
%31 = load i8*, i8** %5
%32 = call i64 @strlen(i8* %31)
%33 = trunc i64 %32 to i32
store i32 %33, i32* %9
%34 = load i32, i32* %10
%35 = load i32, i32* %9
%36 = add nsw i32 %34, %35
%37 = add nsw i32 %36, 1
%38 = icmp sgt i32 %37, 80
br i1 %38, label %39, label %43
39: ; preds = %30
%40 = load i32, i32* %4
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %40, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%42 = load i32, i32* %4
store i32 %42, i32* %10
br label %43
43: ; preds = %39, %30
%44 = load i32, i32* %10
%45 = load i32, i32* %4
%46 = icmp eq i32 %44, %45
br i1 %46, label %47, label %50
47: ; preds = %43
%48 = load i8*, i8** %5
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %48)
br label %53
50: ; preds = %43
%51 = load i8*, i8** %5
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %51)
br label %53
53: ; preds = %50, %47
%54 = load i32, i32* %9
%55 = add nsw i32 %54, 1
%56 = load i32, i32* %10
%57 = add nsw i32 %56, %55
store i32 %57, i32* %10
%58 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @strsep to i32 (i8**, i8*, ...)*)(i8** %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%59 = sext i32 %58 to i64
%60 = inttoptr i64 %59 to i8*
store i8* %60, i8** %5
br label %27
61: ; preds = %27
%62 = load i8*, i8** %7
%63 = icmp ne i8* %62, null
br i1 %63, label %64, label %67
64: ; preds = %61
%65 = load i32, i32* %4
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %65, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %67
67: ; preds = %64, %61
%68 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @strsep to i32 (i8**, i8*, ...)*)(i8** %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%69 = sext i32 %68 to i64
%70 = inttoptr i64 %69 to i8*
store i8* %70, i8** %6
br label %19
71: ; preds = %19
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%73 = load i8*, i8** %8
ret void
}

LLVM IR (-O2):
@__func__.util_print_indented = [20 x i8] c"util_print_indented\00"
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ibm-s390-tools/s390-tools/refs/heads/master/libutil/util_base.c\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [5 x i8] c"\0A%*s\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [4 x i8] c" %s\00"
define void @util_print_indented(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = bitcast i8** %3 to i8*
%6 = bitcast i8** %4 to i8*
%7 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__util_strdup to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.util_print_indented, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 69, i8* %0)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %4
%10 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @strsep to i32 (i8**, i8*, ...)*)(i8** %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %3
%13 = icmp eq i32 %10, 0
br i1 %13, label %49, label %14
14: ; preds = %2, %44
%15 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @strsep to i32 (i8**, i8*, ...)*)(i8** %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %39, label %17
17: ; preds = %14, %31
%18 = phi i32 [ %37, %31 ], [ %15, %14 ]
%19 = phi i32 [ %36, %31 ], [ %1, %14 ]
%20 = sext i32 %18 to i64
%21 = inttoptr i64 %20 to i8*
%22 = call i64 @strlen(i8* %21)
%23 = trunc i64 %22 to i32
%24 = add nsw i32 %19, %23
%25 = icmp sgt i32 %24, 79
br i1 %25, label %26, label %28
26: ; preds = %17
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %31
28: ; preds = %17
%29 = icmp eq i32 %19, %1
%30 = select i1 %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0)
br label %31
31: ; preds = %28, %26
%32 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), %26 ], [ %30, %28 ]
%33 = phi i32 [ %1, %26 ], [ %19, %28 ]
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %32, i8* %21)
%35 = add nsw i32 %23, 1
%36 = add nsw i32 %35, %33
%37 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @strsep to i32 (i8**, i8*, ...)*)(i8** %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %17
39: ; preds = %31, %14
%40 = load i8*, i8** %4
%41 = icmp eq i8* %40, null
br i1 %41, label %44, label %42
42: ; preds = %39
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %44
44: ; preds = %42, %39
%45 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @strsep to i32 (i8**, i8*, ...)*)(i8** %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%46 = sext i32 %45 to i64
%47 = inttoptr i64 %46 to i8*
store i8* %47, i8** %3
%48 = icmp eq i32 %45, 0
br i1 %48, label %49, label %14
49: ; preds = %44, %2
%50 = call i32 @putchar(i32 10)
ret void
}