// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixSetSystemCall
static int unixSetSystemCall(
  sqlite3_vfs *pNotUsed,        /* The VFS pointer.  Not used */
  const char *zName,            /* Name of system call to override */
  sqlite3_syscall_ptr pNewFunc  /* Pointer to new system call value */
){
  unsigned int i;
  int rc = SQLITE_NOTFOUND;

  UNUSED_PARAMETER(pNotUsed);
  if( zName==0 ){
    /* If no zName is given, restore all system calls to their default
    ** settings and return NULL
    */
    rc = SQLITE_OK;
    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){
      if( aSyscall[i].pDefault ){
        aSyscall[i].pCurrent = aSyscall[i].pDefault;
      }
    }
  }else{
    /* If zName is specified, operate on only the one system call
    ** specified.
    */
    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){
      if( strcmp(zName, aSyscall[i].zName)==0 ){
        if( aSyscall[i].pDefault==0 ){
          aSyscall[i].pDefault = aSyscall[i].pCurrent;
        }
        rc = SQLITE_OK;
        if( pNewFunc==0 ) pNewFunc = aSyscall[i].pDefault;
        aSyscall[i].pCurrent = pNewFunc;
        break;
      }
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0xc, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xd373
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x18, %rax
jae 0xd36e
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xc35bb(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0xd361
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xc35a1(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
movl -0x1c(%rbp), %eax
movl %eax, %edx
leaq 0xc358a(%rip), %rax     # 0xd08e0
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0xd363
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xd310
jmp 0xd44f
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x18, %rax
jae 0xd44d
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xc3549(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x85d0
cmpl $0x0, %eax
jne 0xd43d
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xc3525(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
jne 0xd3f7
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xc350b(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movl -0x1c(%rbp), %eax
movl %eax, %edx
leaq 0xc34f4(%rip), %rax     # 0xd08e0
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xd420
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xc34cf(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %eax
movl %eax, %edx
leaq 0xc34b0(%rip), %rax     # 0xd08e0
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0xd44d
jmp 0xd43f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xd37a
jmp 0xd44f
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)