// File: /workspace/github_c_makefile_star2_O0/yui0[P]img2vec/./potracelib.h
// Function: majority
static int majority(potrace_bitmap_t *bm, int x, int y) {
  int i, a, ct;
  for (i=2; i<5; i++) { /* check at "radius" i */
    ct = 0;
    for (a=-i+1; a<=i-1; a++) {
      ct += BM_GET(bm, x+a, y+i-1) ? 1 : -1;
      ct += BM_GET(bm, x+i-1, y+a-1) ? 1 : -1;
      ct += BM_GET(bm, x+a-1, y-i) ? 1 : -1;
      ct += BM_GET(bm, x-i, y+a) ? 1 : -1;
    }
    if (ct>0) {
      return 1;
    } else if (ct<0) {
      return 0;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl $0x2, -0x1c(%rbp)
cmpl $0x5, -0x1c(%rbp)
jge 0x2f21e
movl $0x0, -0x24(%rbp)
xorl %eax, %eax
subl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x2f1ee
movl -0x14(%rbp), %eax
addl -0x20(%rbp), %eax
cmpl $0x0, %eax
jl 0x2ef2c
movl -0x14(%rbp), %eax
addl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2ef2c
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jl 0x2ef2c
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
subl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x2ef2c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq -0x10(%rbp), %rdx
movslq 0x8(%rdx), %rdx
imulq %rdx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
addl -0x20(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
addl -0x20(%rbp), %ecx
andl $0x3f, %ecx
movl %ecx, %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
jmp 0x2ef33
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x2ef33
movl -0x28(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
addl -0x1c(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jl 0x2f012
movl -0x14(%rbp), %eax
addl -0x1c(%rbp), %eax
subl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2f012
movl -0x18(%rbp), %eax
addl -0x20(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jl 0x2f012
movl -0x18(%rbp), %eax
addl -0x20(%rbp), %eax
subl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x2f012
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
addl -0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq -0x10(%rbp), %rdx
movslq 0x8(%rdx), %rdx
imulq %rdx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
addl -0x1c(%rbp), %eax
subl $0x1, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
addl -0x1c(%rbp), %ecx
subl $0x1, %ecx
andl $0x3f, %ecx
movl %ecx, %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x34(%rbp)
jmp 0x2f019
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x2f019
movl -0x34(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
addl -0x20(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jl 0x2f0ef
movl -0x14(%rbp), %eax
addl -0x20(%rbp), %eax
subl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2f0ef
movl -0x18(%rbp), %eax
subl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jl 0x2f0ef
movl -0x18(%rbp), %eax
subl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x2f0ef
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movq -0x10(%rbp), %rdx
movslq 0x8(%rdx), %rdx
imulq %rdx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x14(%rbp), %eax
addl -0x20(%rbp), %eax
subl $0x1, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x50(%rbp), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
addl -0x20(%rbp), %ecx
subl $0x1, %ecx
andl $0x3f, %ecx
movl %ecx, %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x44(%rbp)
jmp 0x2f0f6
xorl %eax, %eax
movl %eax, -0x44(%rbp)
jmp 0x2f0f6
movl -0x44(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
subl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jl 0x2f1c0
movl -0x14(%rbp), %eax
subl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2f1c0
movl -0x18(%rbp), %eax
addl -0x20(%rbp), %eax
cmpl $0x0, %eax
jl 0x2f1c0
movl -0x18(%rbp), %eax
addl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x2f1c0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movq -0x10(%rbp), %rdx
movslq 0x8(%rdx), %rdx
imulq %rdx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl -0x14(%rbp), %eax
subl -0x1c(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x60(%rbp), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
subl -0x1c(%rbp), %ecx
andl $0x3f, %ecx
movl %ecx, %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x54(%rbp)
jmp 0x2f1c7
xorl %eax, %eax
movl %eax, -0x54(%rbp)
jmp 0x2f1c7
movl -0x54(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2ee61
cmpl $0x0, -0x24(%rbp)
jle 0x2f1fd
movl $0x1, -0x4(%rbp)
jmp 0x2f225
cmpl $0x0, -0x24(%rbp)
jge 0x2f20c
movl $0x0, -0x4(%rbp)
jmp 0x2f225
jmp 0x2f20e
jmp 0x2f210
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2ee45
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)