#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 colprintLine {
  int dummy;
};

/* Variables and functions */
char *colprintLineGetColumn(struct colprintLine *, int);
int strcmp(char const *, char const *);
int roleColprintCompareLines(struct colprintLine *a, struct colprintLine *b) {
  int r;
  const char *a_parser, *b_parser;
  a_parser = colprintLineGetColumn(a, 0);
  b_parser = colprintLineGetColumn(b, 0);
  r = strcmp(a_parser, b_parser);
  if (r != 0)
    return r;
  const char *a_kindln, *b_kindln;
  a_kindln = colprintLineGetColumn(a, 1);
  b_kindln = colprintLineGetColumn(b, 1);
  r = strcmp(a_kindln, b_kindln);
  if (r != 0)
    return r;
  const char *a_role, *b_role;
  a_role = colprintLineGetColumn(a, 2);
  b_role = colprintLineGetColumn(b, 2);
  return strcmp(a_role, b_role);
}


x86 assembly (clang, -O0):
<roleColprintCompareLines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1173 <roleColprintCompareLines+0x53>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11f0 <roleColprintCompareLines+0xd0>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     11bc <roleColprintCompareLines+0x9c>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11f0 <roleColprintCompareLines+0xd0>
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roleColprintCompareLines>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %esi,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,%rbx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    117a <roleColprintCompareLines+0x5a>
mov    %r15,%rdi
mov    $0x1,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0x1,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1180 <roleColprintCompareLines+0x60>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %r15,%rdi
mov    $0x2,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0x2,%esi
call   1040 <colprintLineGetColumn@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
%struct.colprintLine = type { i32 }
define i32 @roleColprintCompareLines(%struct.colprintLine* %0, %struct.colprintLine* %1) {
%3 = tail call i8* @colprintLineGetColumn(%struct.colprintLine* %0, i32 0)
%4 = tail call i8* @colprintLineGetColumn(%struct.colprintLine* %1, i32 0)
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = tail call i8* @colprintLineGetColumn(%struct.colprintLine* %0, i32 1)
%9 = tail call i8* @colprintLineGetColumn(%struct.colprintLine* %1, i32 1)
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(1) %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = tail call i8* @colprintLineGetColumn(%struct.colprintLine* %0, i32 2)
%14 = tail call i8* @colprintLineGetColumn(%struct.colprintLine* %1, i32 2)
%15 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(1) %14)
br label %16
16: ; preds = %12, %7, %2
%17 = phi i32 [ %5, %2 ], [ %15, %12 ], [ %10, %7 ]
ret i32 %17
}