// File: /workspace/github_c_makefile_star2_O0/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_compare
int8_t obstring_compare(const obj *a, const obj *b){

  uint32_t i;
  const obstring *comp_a = (obstring *)a;
  const obstring *comp_b = (obstring *)b;

  assert(a);
  assert(b);
  assert(ob_has_class(a, "obstring"));
  assert(ob_has_class(b, "obstring"));

  /* compare string contents where both have characters */
  for(i=0; i<comp_a->length && i<comp_b->length; i++){
    if(comp_a->str[i] < comp_b->str[i]) return OB_LESS_THAN;
    else if(comp_b->str[i] < comp_a->str[i]) return OB_GREATER_THAN;
  }

  /* if characters matched check lengths for final equality */
  if(comp_a->length < comp_b->length) return OB_LESS_THAN;
  else if(comp_b->length < comp_a->length) return OB_GREATER_THAN;
  return OB_EQUAL_TO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4f29
jmp 0x4f48
leaq 0x28d8(%rip), %rdi      # 0x7808
leaq 0x29fb(%rip), %rsi      # 0x7932
movl $0x10c, %edx            # imm = 0x10C
leaq 0x2d09(%rip), %rcx      # 0x7c4c
callq 0x10a0
cmpq $0x0, -0x18(%rbp)
je 0x4f51
jmp 0x4f70
leaq 0x21b6(%rip), %rdi      # 0x710e
leaq 0x29d3(%rip), %rsi      # 0x7932
movl $0x10d, %edx            # imm = 0x10D
leaq 0x2ce1(%rip), %rcx      # 0x7c4c
callq 0x10a0
movq -0x10(%rbp), %rdi
leaq 0x2ca6(%rip), %rsi      # 0x7c21
callq 0x65a0
cmpb $0x0, %al
je 0x4f86
jmp 0x4fa5
leaq 0x2cf1(%rip), %rdi      # 0x7c7e
leaq 0x299e(%rip), %rsi      # 0x7932
movl $0x10e, %edx            # imm = 0x10E
leaq 0x2cac(%rip), %rcx      # 0x7c4c
callq 0x10a0
movq -0x18(%rbp), %rdi
leaq 0x2c71(%rip), %rsi      # 0x7c21
callq 0x65a0
cmpb $0x0, %al
je 0x4fbb
jmp 0x4fda
leaq 0x2cd8(%rip), %rdi      # 0x7c9a
leaq 0x2969(%rip), %rsi      # 0x7932
movl $0x10f, %edx            # imm = 0x10F
leaq 0x2c77(%rip), %rcx      # 0x7c4c
callq 0x10a0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rdx
xorl %eax, %eax
cmpl 0x10(%rdx), %ecx
movb %al, -0x31(%rbp)
jae 0x5002
movl -0x1c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x10(%rcx), %eax
setb %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x500b
jmp 0x506d
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x1c(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jge 0x5033
movb $-0x1, -0x1(%rbp)
jmp 0x509f
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x1c(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jge 0x505b
movb $0x1, -0x1(%rbp)
jmp 0x509f
jmp 0x505d
jmp 0x505f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4fe1
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x5083
movb $-0x1, -0x1(%rbp)
jmp 0x509f
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x5099
movb $0x1, -0x1(%rbp)
jmp 0x509f
jmp 0x509b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)