#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*/ assert(int);
size_t indent_length(char const *);
int /*<<< orphan*/ strncmp(char const *, char const *, size_t);
size_t indents_match(const char *a_line, size_t a_indent, const char *b_line,
                     size_t b_indent) {
  assert(a_indent == indent_length(a_line));
  assert(b_indent == indent_length(b_line));
  return b_indent <= a_indent && !strncmp(a_line, b_line, b_indent);
}


x86 assembly (clang, -O0):
<indents_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <indent_length@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <indent_length@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x21(%rbp)
ja     11c7 <indents_match+0x97>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cltq
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indents_match>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
call   1050 <indent_length@plt>
xor    %edi,%edi
cmp    %r12,%rax
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
call   1050 <indent_length@plt>
xor    %edi,%edi
cmp    %rbx,%rax
sete   %dil
call   1040 <assert@plt>
cmp    %r12,%rbx
jbe    1176 <indents_match+0x46>
xor    %eax,%eax
jmp    118d <indents_match+0x5d>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @indents_match(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* %6
%10 = load i8*, i8** %5
%11 = call i64 @indent_length(i8* %10)
%12 = icmp eq i64 %9, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i64, i64* %8
%16 = load i8*, i8** %7
%17 = call i64 @indent_length(i8* %16)
%18 = icmp eq i64 %15, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = load i64, i64* %8
%22 = load i64, i64* %6
%23 = icmp ule i64 %21, %22
br i1 %23, label %24, label %31
24: ; preds = %4
%25 = load i8*, i8** %5
%26 = load i8*, i8** %7
%27 = load i64, i64* %8
%28 = call i32 @strncmp(i8* %25, i8* %26, i64 %27)
%29 = icmp ne i32 %28, 0
%30 = xor i1 %29, true
br label %31
31: ; preds = %24, %4
%32 = phi i1 [ false, %4 ], [ %30, %24 ]
%33 = zext i1 %32 to i32
%34 = sext i32 %33 to i64
ret i64 %34
}

LLVM IR (-O2):
define i64 @indents_match(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i64 @indent_length(i8* %0)
%6 = icmp eq i64 %5, %1
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i64 @indent_length(i8* %2)
%10 = icmp eq i64 %9, %3
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = icmp ugt i64 %3, %1
br i1 %13, label %18, label %14
14: ; preds = %4
%15 = tail call i32 @strncmp(i8* %0, i8* %2, i64 %3)
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i64
br label %18
18: ; preds = %14, %4
%19 = phi i64 [ 0, %4 ], [ %17, %14 ]
ret i64 %19
}