// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/ch55x.c
// Function: cffi_f_decode
static PyObject *
_cffi_f_decode(PyObject *self, PyObject *args)
{
  struct em8051 * x0;
  int x1;
  char * x2;
  Py_ssize_t datasize;
  struct _cffi_freeme_s *large_args_free = NULL;
  int result;
  PyObject *pyresult;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "decode", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    x0 = ((size_t)datasize) <= 640 ? (struct em8051 *)alloca((size_t)datasize) : NULL;
    if (_cffi_convert_array_argument(_cffi_type(1), arg0, (char **)&x0,
            datasize, &large_args_free) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, int);
  if (x1 == (int)-1 && PyErr_Occurred())
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(5), arg2, (char **)&x2);
  if (datasize != 0) {
    x2 = ((size_t)datasize) <= 640 ? (char *)alloca((size_t)datasize) : NULL;
    if (_cffi_convert_array_argument(_cffi_type(5), arg2, (char **)&x2,
            datasize, &large_args_free) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = decode(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  pyresult = _cffi_from_c_int(result, int);
  if (large_args_free != NULL) _cffi_free_array_arguments(large_args_free);
  return pyresult;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x48(%rbp)
movq %rsi, -0x50(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x50(%rbp), %rdi
leaq 0xcfc6(%rip), %rsi      # 0x12759
movl $0x3, %ecx
leaq -0x28(%rbp), %r8
leaq -0x30(%rbp), %r9
leaq -0x38(%rbp), %rax
subq $0x10, %rsp
movq %rcx, %rdx
movq %rax, (%rsp)
movb $0x0, %al
callq 0x4110
addq $0x10, %rsp
cmpl $0x0, %eax
jne 0x57cc
movq $0x0, -0x40(%rbp)
jmp 0x5966
movq 0x15bf5(%rip), %rax     # 0x1b3c8
movq 0x158fe(%rip), %rdi     # 0x1b0d8
movq -0x28(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq *%rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x5854
cmpq $0x280, -0x60(%rbp)     # imm = 0x280
ja 0x5814
movq -0x60(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x80(%rbp)
jmp 0x581c
xorl %eax, %eax
movq %rax, -0x80(%rbp)
jmp 0x581c
movq -0x80(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x158ad(%rip), %rdi     # 0x1b0d8
movq -0x28(%rbp), %rsi
movq -0x60(%rbp), %rcx
leaq -0x10(%rbp), %rdx
leaq -0x20(%rbp), %r8
callq 0x6470
cmpl $0x0, %eax
jge 0x5852
movq $0x0, -0x40(%rbp)
jmp 0x5966
jmp 0x5854
movq 0x15add(%rip), %rax     # 0x1b338
movq -0x30(%rbp), %rdi
callq *%rax
movl %eax, -0x54(%rbp)
cmpl $-0x1, -0x54(%rbp)
jne 0x5882
callq 0x4120
cmpq $0x0, %rax
je 0x5882
movq $0x0, -0x40(%rbp)
jmp 0x5966
movq 0x15b3f(%rip), %rax     # 0x1b3c8
movq 0x15868(%rip), %rdi     # 0x1b0f8
movq -0x38(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq *%rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x5910
cmpq $0x280, -0x60(%rbp)     # imm = 0x280
ja 0x58cd
movq -0x60(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x88(%rbp)
jmp 0x58d8
xorl %eax, %eax
movq %rax, -0x88(%rbp)
jmp 0x58d8
movq -0x88(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x1580e(%rip), %rdi     # 0x1b0f8
movq -0x38(%rbp), %rsi
movq -0x60(%rbp), %rcx
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %r8
callq 0x6470
cmpl $0x0, %eax
jge 0x590e
movq $0x0, -0x40(%rbp)
jmp 0x5966
jmp 0x5910
callq 0x4150
movq %rax, -0x78(%rbp)
callq *0x15a59(%rip)          # 0x1b378
movq -0x10(%rbp), %rdi
movl -0x54(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x7000
movl %eax, -0x64(%rbp)
callq *0x15a48(%rip)          # 0x1b380
movq -0x78(%rbp), %rdi
callq 0x4050
movslq -0x64(%rbp), %rdi
callq 0x40d0
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x595e
movq -0x20(%rbp), %rdi
callq 0x6530
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x598f
movq -0x90(%rbp), %rax
movq %rbp, %rsp
popq %rbp
retq
callq 0x4080
nopw %cs:(%rax,%rax)