#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 */
struct atm_blli {
  int dummy;
};

/* Variables and functions */
scalar_t__ l2_proto2text(char **, char **, int *, struct atm_blli const *);
int l3_proto2text(char **, char **, int *, struct atm_blli const *);
int /*<<< orphan*/ maybe(char **, char **, int *, char *);
int blli2text(char **pos, char **end, int *length,
              const struct atm_blli *blli) {
  maybe(pos, end, length, "blli:");
  if (l2_proto2text(pos, end, length, blli))
    return -1;
  return l3_proto2text(pos, end, length, blli);
}


x86 assembly (clang, -O0):
<blli2text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xea5(%rip),%rcx
call   1050 <maybe@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <l2_proto2text@plt>
cmp    $0x0,%rax
je     118b <blli2text+0x5b>
movl   $0xffffffff,-0x4(%rbp)
jmp    11a3 <blli2text+0x73>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <l3_proto2text@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blli2text>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xeb5(%rip),%rcx
call   1050 <maybe@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <l2_proto2text@plt>
test   %rax,%rax
je     1177 <blli2text+0x47>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <l3_proto2text@plt>

LLVM IR (-O0):
%struct.atm_blli = type { i32 }
@.str = [6 x i8] c"blli:\00"
define i32 @blli2text(i8** %0, i8** %1, i32* %2, %struct.atm_blli* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32*
%9 = alloca %struct.atm_blli*
store i8** %0, i8*** %6
store i8** %1, i8*** %7
store i32* %2, i32** %8
store %struct.atm_blli* %3, %struct.atm_blli** %9
%10 = load i8**, i8*** %6
%11 = load i8**, i8*** %7
%12 = load i32*, i32** %8
%13 = call i32 @maybe(i8** %10, i8** %11, i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%14 = load i8**, i8*** %6
%15 = load i8**, i8*** %7
%16 = load i32*, i32** %8
%17 = load %struct.atm_blli*, %struct.atm_blli** %9
%18 = call i64 @l2_proto2text(i8** %14, i8** %15, i32* %16, %struct.atm_blli* %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %4
store i32 -1, i32* %5
br label %27
21: ; preds = %4
%22 = load i8**, i8*** %6
%23 = load i8**, i8*** %7
%24 = load i32*, i32** %8
%25 = load %struct.atm_blli*, %struct.atm_blli** %9
%26 = call i32 @l3_proto2text(i8** %22, i8** %23, i32* %24, %struct.atm_blli* %25)
store i32 %26, i32* %5
br label %27
27: ; preds = %21, %20
%28 = load i32, i32* %5
ret i32 %28
}

LLVM IR (-O2):
%struct.atm_blli = type { i32 }
@.str = [6 x i8] c"blli:\00"
define i32 @blli2text(i8** %0, i8** %1, i32* %2, %struct.atm_blli* %3) {
%5 = tail call i32 @maybe(i8** %0, i8** %1, i32* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i64 @l2_proto2text(i8** %0, i8** %1, i32* %2, %struct.atm_blli* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @l3_proto2text(i8** %0, i8** %1, i32* %2, %struct.atm_blli* %3)
br label %10
10: ; preds = %4, %8
%11 = phi i32 [ %9, %8 ], [ -1, %4 ]
ret i32 %11
}