LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/weaslepalace[P]FreeRTOS_Posix_Sim/AsyncIO/PosixMessageQueueIPC.c
// Function: prvPosixIPCInterruptHandler
void prvPosixIPCInterruptHandler( int signal, siginfo_t * data, void * pvParam )
{
union sigval xParameters = data->si_value;
xPipeAndFunction *pxPipes = ( xPipeAndFunction *)xParameters.sival_ptr;
mqd_t hPipeHandle = 0;
void (*vMessageInterruptHandler)(xMessageObject,void*) = NULL;
xMessageObject xRxMessage;
portLONG lMessagesReceived = 0;

	if ( NULL != pxPipes )
	{
		hPipeHandle = pxPipes->hPipe;
		vMessageInterruptHandler = pxPipes->pvFunction;

		memset( &xRxMessage, 0, sizeof( xMessageObject ) );

		if ( NULL != vMessageInterruptHandler )
		{
			while ( ( pdTRUE == lPosixIPCReceiveMessage( hPipeHandle, &xRxMessage ) ) && ( lMessagesReceived++ < MAX_NUMBER_OF_MESSAGES ) )
			{
				vMessageInterruptHandler( xRxMessage, pxPipes->pvContext );
			}
		}

		/* Re-register the notification. */
		if ( 0 != mq_notify( hPipeHandle, &xMessageEvent ) )
		{
			printf( "Failed to install Rx interrupt handler: %d.\n", errno );
		}
	}
	else
	{
		printf( "NULL parameter: Failed to install Rx interrupt handler: %d.\n", errno );
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x23c(%rbp)
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
je 0xa0bc
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x238(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x41f0
xorl %eax, %eax
cmpq -0x38(%rbp), %rax
je 0xa08e
jmp 0xa011
movl -0x2c(%rbp), %edi
leaq -0x238(%rbp), %rsi
callq 0x43a0
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl %edx, %ecx
movb %al, -0x23d(%rbp)
jne 0xa050
movl -0x23c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x23c(%rbp)
cmpl $0xa, %eax
setl %al
movb %al, -0x23d(%rbp)
movb -0x23d(%rbp), %al
testb $0x1, %al
jne 0xa05c
jmp 0xa08c
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, -0x248(%rbp)
movq %rsp, %rdi
movl $0x40, %ecx
leaq -0x238(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq -0x248(%rbp), %rdi
callq *%rax
jmp 0xa011
jmp 0xa08e
movl -0x2c(%rbp), %edi
leaq 0x4d08(%rip), %rsi      # 0xeda0
callq 0x4640
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0xa0ba
callq 0x40a0
movl (%rax), %esi
leaq 0x1255(%rip), %rdi      # 0xb308
movb $0x0, %al
callq 0x4180
jmp 0xa0d1
callq 0x40a0
movl (%rax), %esi
leaq 0x122e(%rip), %rdi      # 0xb2f8
movb $0x0, %al
callq 0x4180
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/weaslepalace[P]FreeRTOS_Posix_Sim/AsyncIO/PosixMessageQueueIPC.c
// Function: lPosixIPCSendMessage
portLONG lPosixIPCSendMessage( mqd_t hPipeHandle, xMessageObject xMessage )
{
portLONG lReturn = pdFALSE;

	if ( 0 != hPipeHandle )
	{
		if ( 0 == mq_send( hPipeHandle, (const char *)&xMessage, sizeof( xMessageObject ), 1 ) )
		{
			lReturn = pdTRUE;
		}
		else
		{
			printf( "Message Sending error.\n" );
		}
	}
	return lReturn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
xorl %eax, %eax
cmpl -0x4(%rbp), %eax
je 0xa168
movq -0x10(%rbp), %rsi
movl -0x4(%rbp), %edi
movl $0x200, %edx            # imm = 0x200
movl $0x1, %ecx
callq 0x4250
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0xa158
movl $0x1, -0x8(%rbp)
jmp 0xa166
leaq 0x1181(%rip), %rdi      # 0xb2e0
movb $0x0, %al
callq 0x4180
jmp 0xa168
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/weaslepalace[P]FreeRTOS_Posix_Sim/AsyncIO/PosixMessageQueueIPC.c
// Function: lPosixIPCReceiveMessage
portLONG lPosixIPCReceiveMessage( mqd_t hPipeHandle, xMessageObject *pxMessage )
{
static char pcBuffer[ MAX_MESSAGE_SIZE ];
unsigned int uiPriority;
portLONG lBytesReceived = 0;
portLONG lBytesToProcess;
portLONG lReturn = pdFALSE;

	lBytesReceived = mq_receive( hPipeHandle, pcBuffer, MAX_MESSAGE_SIZE, &uiPriority );
	for ( lBytesToProcess = 0; lBytesToProcess < lBytesReceived; lBytesToProcess += sizeof( xMessageObject ) )
	{
		memcpy( pxMessage, pcBuffer, sizeof( xMessageObject ) );
		lReturn = pdTRUE;

		/* Only receiving one message at the moment. */
		break;
	}
	return lReturn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x4(%rbp), %edi
leaq 0x4c39(%rip), %rsi      # 0xede0
movl $0x2000, %edx           # imm = 0x2000
leaq -0x14(%rbp), %rcx
callq 0x45c0
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0xa1e3
movq -0x10(%rbp), %rdi
leaq 0x4c0e(%rip), %rsi      # 0xede0
movl $0x200, %edx            # imm = 0x200
callq 0x4360
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: fatal
void fatal(const char *fmt, ...)
{
  va_list ap;
  va_start(ap, fmt);
  fprintf(stderr,"dosfs: ");
  vfprintf(stderr, fmt, ap);
  va_end(ap);
  exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x1365
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x14c41(%rip), %rax     # 0x15ff8
movq (%rax), %rdi
leaq 0xfcf3(%rip), %rsi      # 0x110b4
movb $0x0, %al
callq 0x1160
movq 0x14c29(%rip), %rax     # 0x15ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x11e0
leaq -0x20(%rbp), %rax
movl $0x1, %edi
callq 0x1200
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: fatal_code
void fatal_code(FRESULT code)
{
  switch(code)
    {
    case FR_OK: break;
    case FR_NO_FILESYSTEM: fatal("Cannot find fat or exfat filesystem\n");
    case FR_DISK_ERR: fatal("I/O error\n");
    case FR_NO_FILE: fatal("File not found\n");
    case FR_NO_PATH: fatal("Path not found\n");
    case FR_INVALID_NAME: fatal("Invalid file name\n");
    case FR_DENIED: fatal("Permission denied\n");
    case FR_WRITE_PROTECTED: fatal("Write protected\n");
    case FR_INVALID_PARAMETER: fatal("Invalid parameter\n");
    case FR_EXIST: fatal("File already exists\n");
    case FR_MKFS_ABORTED: fatal("Formatting failed\n");
    default: fatal("Internal error %d\n", (int)code);
    }
  exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq %rax, -0x10(%rbp)
subq $0x13, %rax
ja 0x1571
movq -0x10(%rbp), %rax
leaq 0xfb2d(%rip), %rcx      # 0x11004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x1582
leaq 0xfbe0(%rip), %rdi      # 0x110cc
movb $0x0, %al
callq 0x1330
leaq 0xfbf7(%rip), %rdi      # 0x110f1
movb $0x0, %al
callq 0x1330
leaq 0xfbf4(%rip), %rdi      # 0x110fc
movb $0x0, %al
callq 0x1330
leaq 0xfbf6(%rip), %rdi      # 0x1110c
movb $0x0, %al
callq 0x1330
leaq 0xfbf8(%rip), %rdi      # 0x1111c
movb $0x0, %al
callq 0x1330
leaq 0xfbfd(%rip), %rdi      # 0x1112f
movb $0x0, %al
callq 0x1330
leaq 0xfc02(%rip), %rdi      # 0x11142
movb $0x0, %al
callq 0x1330
leaq 0xfc05(%rip), %rdi      # 0x11153
movb $0x0, %al
callq 0x1330
leaq 0xfc0a(%rip), %rdi      # 0x11166
movb $0x0, %al
callq 0x1330
leaq 0xfc11(%rip), %rdi      # 0x1117b
movb $0x0, %al
callq 0x1330
movl -0x4(%rbp), %esi
leaq 0xfc13(%rip), %rdi      # 0x1118e
movb $0x0, %al
callq 0x1330
movl $0x1, %edi
callq 0x1200
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: disk_status
DSTATUS disk_status (BYTE pdrv)
{
  (void) pdrv;
  if (fd < 0)
    return STA_NOINIT;
  if (wp)
    return STA_PROTECT;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x2(%rbp)
cmpl $0x0, 0x1487f(%rip)     # 0x16130
jge 0x18b9
movb $0x1, -0x1(%rbp)
jmp 0x18cc
cmpl $0x0, 0x14970(%rip)     # 0x16230
je 0x18c8
movb $0x4, -0x1(%rbp)
jmp 0x18cc
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: disk_initialize
DSTATUS disk_initialize (BYTE pdrv)
{
  if ((fd = open(fn, O_RDWR)) < 0) {
    wp = 1;
    if ((fd = open(fn, O_RDONLY)) < 0) {
      fatal("Cannot open file \"%s\"\n", fn);
      return STA_NOINIT;
    }
  }
  return disk_status(pdrv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x2(%rbp)
movq 0x1492b(%rip), %rdi     # 0x16220
movl $0x2, %esi
movb $0x0, %al
callq 0x11d0
movl %eax, 0x14829(%rip)     # 0x16130
cmpl $0x0, %eax
jge 0x194e
movl $0x1, 0x1491a(%rip)     # 0x16230
movq 0x14903(%rip), %rdi     # 0x16220
xorl %esi, %esi
movb $0x0, %al
callq 0x11d0
movl %eax, 0x14804(%rip)     # 0x16130
cmpl $0x0, %eax
jge 0x194c
movq 0x148e8(%rip), %rsi     # 0x16220
leaq 0xf909(%rip), %rdi      # 0x11248
movb $0x0, %al
callq 0x1330
movb $0x1, -0x1(%rbp)
jmp 0x195a
jmp 0x194e
movzbl -0x2(%rbp), %edi
callq 0x18a0
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: disk_read
DRESULT disk_read (BYTE pdrv, BYTE *buff, LBA_t sector,	UINT count)
{
  (void) pdrv;
  size_t sz = (size_t)count * 512;
  ssize_t rsz;

  if (! fd)
    return RES_NOTRDY;
  if (lseek(fd, (off_t)(sector * 512), SEEK_SET)  == (off_t)(-1))
    return RES_PARERR;
  while (sz > 0) {
    rsz = read(fd, buff, sz);
    if (rsz < 0)
      return RES_ERROR;
    if (rsz == 0)
      return RES_PARERR;
    sz -= rsz;
    buff += rsz;
  }
  return RES_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shlq $0x9, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, 0x14795(%rip)     # 0x16130
jne 0x19a9
movl $0x3, -0x4(%rbp)
jmp 0x1a31
movl 0x14781(%rip), %edi     # 0x16130
movq -0x18(%rbp), %rsi
shlq $0x9, %rsi
xorl %edx, %edx
callq 0x10f0
cmpq $-0x1, %rax
jne 0x19cd
movl $0x4, -0x4(%rbp)
jmp 0x1a31
jmp 0x19cf
cmpq $0x0, -0x28(%rbp)
jbe 0x1a2a
movl 0x14754(%rip), %edi     # 0x16130
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1120
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jge 0x19fd
movl $0x1, -0x4(%rbp)
jmp 0x1a31
cmpq $0x0, -0x30(%rbp)
jne 0x1a0d
movl $0x4, -0x4(%rbp)
jmp 0x1a31
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x19cf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: disk_write
DRESULT disk_write (BYTE pdrv, const BYTE *buff, LBA_t sector, UINT count)
{
  (void) pdrv;
  size_t sz = (size_t)count * 512;
  ssize_t rsz;

  if (! fd)
    return RES_NOTRDY;
  if (wp)
    return RES_WRPRT;
  if (lseek(fd, (off_t)(sector * 512), SEEK_SET) == (off_t)(-1))
    return RES_PARERR;
  while (sz > 0) {
    rsz = write(fd, buff, sz);
    if (rsz < 0)
      return RES_ERROR;
    if (rsz == 0)
      return RES_PARERR;
    sz -= rsz;
    buff += rsz;
  }
  return RES_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shlq $0x9, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, 0x146c5(%rip)     # 0x16130
jne 0x1a79
movl $0x3, -0x4(%rbp)
jmp 0x1b16
cmpl $0x0, 0x147b0(%rip)     # 0x16230
je 0x1a8e
movl $0x2, -0x4(%rbp)
jmp 0x1b16
movl 0x1469c(%rip), %edi     # 0x16130
movq -0x18(%rbp), %rsi
shlq $0x9, %rsi
xorl %edx, %edx
callq 0x10f0
cmpq $-0x1, %rax
jne 0x1ab2
movl $0x4, -0x4(%rbp)
jmp 0x1b16
jmp 0x1ab4
cmpq $0x0, -0x28(%rbp)
jbe 0x1b0f
movl 0x1466f(%rip), %edi     # 0x16130
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x10b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jge 0x1ae2
movl $0x1, -0x4(%rbp)
jmp 0x1b16
cmpq $0x0, -0x30(%rbp)
jne 0x1af2
movl $0x4, -0x4(%rbp)
jmp 0x1b16
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x1ab4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: disk_ioctl
DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void *buff)
{
  (void) pdrv;
  switch(cmd)
    {
    case CTRL_TRIM:
    case CTRL_SYNC:
      {
        return RES_OK;
      }
    case GET_SECTOR_SIZE:
      {
        *(WORD*)buff = 512;
        return RES_OK;
      }
    case GET_SECTOR_COUNT:
      {
        off_t sz;
        if (fd < 0)
          return RES_NOTRDY;
        sz = lseek(fd, 0, SEEK_END);
        if (sz == (off_t)-1)
          return RES_ERROR;
        *(LBA_t*)buff = (LBA_t)sz / 512;
        return RES_OK;
      }
    default:
      {
        break;
      }
    }
  return RES_PARERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x5(%rbp)
movb %al, -0x6(%rbp)
movq %rdx, -0x10(%rbp)
movzbl -0x6(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x4, %rax
ja 0x1bcb
movq -0x20(%rbp), %rax
leaq 0xf4ff(%rip), %rcx      # 0x11054
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x1bd4
movq -0x10(%rbp), %rax
movw $0x200, (%rax)          # imm = 0x200
movl $0x0, -0x4(%rbp)
jmp 0x1bd4
cmpl $0x0, 0x145b0(%rip)     # 0x16130
jge 0x1b8b
movl $0x3, -0x4(%rbp)
jmp 0x1bd4
movl 0x1459f(%rip), %edi     # 0x16130
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x10f0
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
jne 0x1bb3
movl $0x1, -0x4(%rbp)
jmp 0x1bd4
movq -0x18(%rbp), %rcx
shrq $0x9, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1bd4
jmp 0x1bcd
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: get_fattime
DWORD get_fattime (void)
{
  DWORD res = 0;
  time_t tim = time(NULL);
  struct tm *tm = localtime(&tim);

  res |= ((tm->tm_year - 80) & 0x7f ) << 25;
  res |= ((tm->tm_mon + 1) & 0xf) << 21;
  res |= ((tm->tm_mday) & 0x1f) << 16;
  res |= ((tm->tm_hour) & 0x1f) << 11;
  res |= ((tm->tm_min) & 0x3f) << 5;
  res |= ((tm->tm_sec) & 0x3f) >> 1;
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1170
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x1050
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
subl $0x50, %eax
andl $0x7f, %eax
shll $0x19, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
andl $0xf, %eax
shll $0x15, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1f, %eax
shll $0x10, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1f, %eax
shll $0xb, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x3f, %eax
shll $0x5, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x3f, %eax
sarl %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: strconcat
char *strconcat(const char *str1, ...)
{
  va_list ap;
  const char *s;
  char *res, *d;
  int l = strlen(str1);

  va_start(ap, str1);
  while ((s = va_arg(ap, const char*)))
    l += strlen(s);
  va_end(ap);
  if (! (res = malloc(l + 1)))
    fatal("out of memory\n");
  strcpy(res, str1);
  d = res + strlen(res);
  va_start(ap, str1);
  while ((s = va_arg(ap, const char*))) {
    strcpy(d, s);
    d += strlen(d);
  }
  va_end(ap);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
testb %al, %al
je 0x1ccb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rsi, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10c0
movl %eax, -0x3c(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq -0x20(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x1d5d
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x1d7a
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1da9
movq -0x28(%rbp), %rdi
callq 0x10c0
movq %rax, %rcx
movslq -0x3c(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x3c(%rbp)
jmp 0x1d22
leaq -0x20(%rbp), %rax
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x1180
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x1dd3
leaq 0xf493(%rip), %rdi      # 0x1125f
movb $0x0, %al
callq 0x1330
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1080
movq -0x30(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x30(%rbp), %rdi
callq 0x10c0
movq %rax, %rcx
movq -0x110(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq -0x20(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x1e64
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x1e81
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1eb8
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1080
movq -0x38(%rbp), %rdi
callq 0x10c0
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x1e29
movq -0x30(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: fix_path
char *fix_path(const char *path)
{
  char *s, *np;

  while (*path == '/' || *path == '\\')
    path += 1;
  if (! (np = strdup(path)))
    fatal("out of memory\n");
  for (s = np; *s; s++)
    if (*s == '\\')
      *s = '/';
  while (s > np && s[-1] == '/')
    *--s = 0;
  return np;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2f, %ecx
movb %al, -0x19(%rbp)
je 0x1efd
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x1f06
jmp 0x1f14
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1edc
movq -0x8(%rbp), %rdi
callq 0x1220
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x1f35
leaq 0xf331(%rip), %rdi      # 0x1125f
movb $0x0, %al
callq 0x1330
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1f69
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x1f59
movq -0x10(%rbp), %rax
movb $0x2f, (%rax)
jmp 0x1f5b
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1f3d
jmp 0x1f6b
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x1a(%rbp)
jbe 0x1f8b
movq -0x10(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
sete %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0x1f94
jmp 0x1fa9
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x0, -0x1(%rax)
jmp 0x1f6b
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: file_p
int file_p(const char *path)
{
  FILINFO info;
  if (f_stat(path, &info) == FR_OK)
    if (! (info.fattrib & AM_DIR))
      return 1;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x9020
cmpl $0x0, %eax
jne 0x203e
movzbl -0x124(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x203c
movl $0x1, -0x4(%rbp)
jmp 0x2045
jmp 0x203e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: dir_p
int dir_p(const char *path)
{
  FILINFO info;

  if (path[0] == 0 || path[0] == '/' && path[1] == 0)
    return 1;
  if (f_stat(path, &info) == FR_OK)
    if (info.fattrib & AM_DIR)
      return 1;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x2094
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x209d
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x209d
movl $0x1, -0x4(%rbp)
jmp 0x20d3
movq -0x10(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x9020
cmpl $0x0, %eax
jne 0x20cc
movzbl -0x124(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x20ca
movl $0x1, -0x4(%rbp)
jmp 0x20d3
jmp 0x20cc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: rmkdir
FRESULT rmkdir(char *path, int qflag)
{
  if (qflag) {
    char *s = strrchr(path,'/');
    if (dir_p(path))
      return FR_OK;
    if (s) {
      *s = 0;
      rmkdir(path, qflag);
      *s = '/';
    }
  }
  return f_mkdir(path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x2141
movq -0x10(%rbp), %rdi
movl $0x2f, %esi
callq 0x10e0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2060
cmpl $0x0, %eax
je 0x211e
movl $0x0, -0x4(%rbp)
jmp 0x214d
cmpq $0x0, -0x20(%rbp)
je 0x213f
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x20e0
movq -0x20(%rbp), %rax
movb $0x2f, (%rax)
jmp 0x2141
movq -0x10(%rbp), %rdi
callq 0x9850
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: format_time
const char *format_time(WORD time)
{
  static char buffer[12];
  int hour = (time >> 11) & 0x1f;
  const char *ampm = (hour >= 12) ? "PM" : "AM";

  if (hour >= 12)
    hour -= 12;
  if (hour == 0)
    hour = 12;
  sprintf(buffer, "%02d:%02d %2s",
          hour, (time >> 5) & 0x3f, ampm);
  return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
sarl $0xb, %eax
andl $0x1f, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %edx
leaq 0xf09d(%rip), %rax      # 0x11283
leaq 0xf093(%rip), %rcx      # 0x11280
cmpl $0xc, %edx
cmovgeq %rcx, %rax
movq %rax, -0x10(%rbp)
cmpl $0xc, -0x8(%rbp)
jl 0x2207
movl -0x8(%rbp), %eax
subl $0xc, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x2214
movl $0xc, -0x8(%rbp)
movl -0x8(%rbp), %edx
movzwl -0x2(%rbp), %ecx
sarl $0x5, %ecx
andl $0x3f, %ecx
movq -0x10(%rbp), %r8
leaq 0x14014(%rip), %rdi     # 0x16240
leaq 0xf053(%rip), %rsi      # 0x11286
movb $0x0, %al
callq 0x11f0
leaq 0x13fff(%rip), %rax     # 0x16240
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: print_filinfo
void print_filinfo(FILINFO *inf, int xflag)
{
  printf("%s %s %8s %8lld ",
         format_date(inf->fdate), format_time(inf->ftime),
         (inf->fattrib & AM_DIR) ? "<DIR>" : "",
         (long long)(inf->fsize) );
#if FF_USE_LFN
  if (xflag)
    printf("%-12s ",
           (inf->altname[0] && strcasecmp(inf->fname, inf->altname))
           ? inf->altname : "");
  printf("%s\n", inf->fname);
#else
  printf("%s\n", inf->fname);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x8(%rax), %edi
callq 0x2160
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x21c0
movq -0x18(%rbp), %rsi
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl 0xc(%rax), %edi
andl $0x10, %edi
leaq 0xf255(%rip), %rcx      # 0x114eb
leaq 0xf008(%rip), %rax      # 0x112a5
cmpl $0x0, %edi
cmovneq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %r8
leaq 0xefe2(%rip), %rdi      # 0x11294
movb $0x0, %al
callq 0x10d0
cmpl $0x0, -0xc(%rbp)
je 0x2313
movq -0x8(%rbp), %rax
movsbl 0xd(%rax), %eax
cmpl $0x0, %eax
je 0x22f4
movq -0x8(%rbp), %rdi
addq $0x1a, %rdi
movq -0x8(%rbp), %rsi
addq $0xd, %rsi
callq 0x1040
cmpl $0x0, %eax
je 0x22f4
movq -0x8(%rbp), %rax
addq $0xd, %rax
movq %rax, -0x20(%rbp)
jmp 0x2301
leaq 0xf1f0(%rip), %rax      # 0x114eb
movq %rax, -0x20(%rbp)
jmp 0x2301
movq -0x20(%rbp), %rsi
leaq 0xef9f(%rip), %rdi      # 0x112ab
movb $0x0, %al
callq 0x10d0
movq -0x8(%rbp), %rsi
addq $0x1a, %rsi
leaq 0x1007e(%rip), %rdi     # 0x123a0
movb $0x0, %al
callq 0x10d0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: dosmkdir
FRESULT dosmkdir(int argc, const char **argv)
{
  FRESULT res;
  int qflag = 0;
  char *path = 0;
  int i;

  for (i=1; i<argc; i++)
    if (!strcmp(argv[i], "-q"))
      qflag = 1;
    else if (argv[i][0] == '-')
      goto usage;
    else if (!path)
      path = fix_path(argv[i]);
    else
      goto usage;
  if (!path) {
  usage:
    dosmkdirhelp();
    exit(EXIT_FAILURE);
  }
  return rmkdir(path, qflag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2f6a
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xe89e(%rip), %rsi      # 0x117ae
callq 0x1140
cmpl $0x0, %eax
jne 0x2f23
movl $0x1, -0x18(%rbp)
jmp 0x2f5d
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2f39
jmp 0x2f73
cmpq $0x0, -0x20(%rbp)
jne 0x2f57
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1ed0
movq %rax, -0x20(%rbp)
jmp 0x2f59
jmp 0x2f73
jmp 0x2f5b
jmp 0x2f5d
jmp 0x2f5f
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2ef5
cmpq $0x0, -0x20(%rbp)
jne 0x2f82
jmp 0x2f73
callq 0x2e90
movl $0x1, %edi
callq 0x1200
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x20e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: rdelmany
FRESULT rdelmany(char *path, int verbose)
{
  DIR dir;
  FILINFO info;
  FRESULT res;
  char *pattern;

  if (! pattern_p(path))
    return rdelone(path, verbose);
  else if (! verbose)
    verbose += 1;
  pattern = strrchr(path,'/');    
  if (pattern) {
    *pattern = 0;
    pattern += 1;
  } else {
    pattern = path;
    path = "";
  }
  res = f_findfirst(&dir, &info, path, pattern);
  if (res != FR_OK && res != FR_NO_FILE)
    return res;
  while (res == FR_OK && info.fname[0])
    {
      char *npath = strconcat(path, "/", info.fname, 0);
      res = rdelone(npath, verbose);
      if (res != FR_OK) {
        fprintf(stderr, "dosfs: error while processing %s\n", npath);
        free(npath);
        return res;
      }
      free(npath);
      res = f_findnext(&dir, &info);
    }
  f_closedir(&dir);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1fc0
cmpl $0x0, %eax
jne 0x3014
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x31b0
movl %eax, -0x4(%rbp)
jmp 0x31a1
cmpl $0x0, -0x14(%rbp)
jne 0x3023
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3025
movq -0x10(%rbp), %rdi
movl $0x2f, %esi
callq 0x10e0
movq %rax, -0x1a8(%rbp)
cmpq $0x0, -0x1a8(%rbp)
je 0x3062
movq -0x1a8(%rbp), %rax
movb $0x0, (%rax)
movq -0x1a8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a8(%rbp)
jmp 0x3078
movq -0x10(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq 0xe477(%rip), %rax      # 0x114eb
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdx
movq -0x1a8(%rbp), %rcx
leaq -0x78(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x8fc0
movl %eax, -0x19c(%rbp)
cmpl $0x0, -0x19c(%rbp)
je 0x30b9
cmpl $0x4, -0x19c(%rbp)
je 0x30b9
movl -0x19c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x31a1
jmp 0x30bb
xorl %eax, %eax
cmpl $0x0, -0x19c(%rbp)
movb %al, -0x1b1(%rbp)
jne 0x30df
movsbl -0x17e(%rbp), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1b1(%rbp)
movb -0x1b1(%rbp), %al
testb $0x1, %al
jne 0x30ee
jmp 0x318f
movq -0x10(%rbp), %rdi
leaq -0x198(%rbp), %rdx
addq $0x1a, %rdx
leaq 0xe3e8(%rip), %rsi      # 0x114ec
xorl %ecx, %ecx
movb $0x0, %al
callq 0x1c90
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x31b0
movl %eax, -0x19c(%rbp)
cmpl $0x0, -0x19c(%rbp)
je 0x3168
movq 0x12ebf(%rip), %rax     # 0x15ff8
movq (%rax), %rdi
movq -0x1b0(%rbp), %rdx
leaq 0xe9c3(%rip), %rsi      # 0x11b0d
movb $0x0, %al
callq 0x1160
movq -0x1b0(%rbp), %rdi
callq 0x1030
movl -0x19c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x31a1
movq -0x1b0(%rbp), %rdi
callq 0x1030
leaq -0x78(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x8da0
movl %eax, -0x19c(%rbp)
jmp 0x30bb
leaq -0x78(%rbp), %rdi
callq 0x8450
movl -0x19c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: rdelone
FRESULT rdelone(char *path, int verbose)
{
  if (dir_p(path)) {
    char *npath;
    if (verbose >= 0 && !prompt("[%s]:%s, Delete entire subtree", sfn, path))
      return FR_OK;
    npath = strconcat(path, "/", "*", 0);
    rdelmany(npath, -1);
    free(npath);
  } else if (verbose > 0 && ! prompt("[%s]:%s, Delete", sfn, path))
    return FR_OK;
  return f_unlink(path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2060
cmpl $0x0, %eax
je 0x3232
cmpl $0x0, -0x14(%rbp)
jl 0x31fa
movq 0x1304e(%rip), %rsi     # 0x16228
movq -0x10(%rbp), %rdx
leaq 0xe94a(%rip), %rdi      # 0x11b2f
movb $0x0, %al
callq 0x15b0
cmpl $0x0, %eax
jne 0x31fa
movl $0x0, -0x4(%rbp)
jmp 0x326d
movq -0x10(%rbp), %rdi
leaq 0xe2e7(%rip), %rsi      # 0x114ec
leaq 0xe2e2(%rip), %rdx      # 0x114ee
xorl %ecx, %ecx
movb $0x0, %al
callq 0x1c90
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x2fe0
movq -0x20(%rbp), %rdi
callq 0x1030
jmp 0x3261
cmpl $0x0, -0x14(%rbp)
jle 0x325f
movq 0x12fe9(%rip), %rsi     # 0x16228
movq -0x10(%rbp), %rdx
leaq 0xe904(%rip), %rdi      # 0x11b4e
movb $0x0, %al
callq 0x15b0
cmpl $0x0, %eax
jne 0x325f
movl $0x0, -0x4(%rbp)
jmp 0x326d
jmp 0x3261
movq -0x10(%rbp), %rdi
callq 0x9560
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: dosdel
FRESULT dosdel(int argc, const char **argv)
{
  int i;
  int verbose = 0;
  FRESULT res = FR_EXIST;
  
  for (i=1; i<argc; i++)
    if (!strcmp(argv[i], "-i"))
      verbose = +1;
    else if (!strcmp(argv[i], "-q"))
      verbose = -1;
    else if (argv[i][0] == '-')
      goto usage;
    else if ((res = rdelmany(fix_path(argv[i]), verbose)) != FR_OK) {
      fprintf(stderr, "dosfs: error while processing '%s'\n", argv[i]);
      return res;
    }
  if (res != FR_OK) {
  usage:
    dosdelhelp();
    exit(EXIT_FAILURE);
  }
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x8, -0x1c(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x337b
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xe4ee(%rip), %rsi      # 0x117b1
callq 0x1140
cmpl $0x0, %eax
jne 0x32d9
movl $0x1, -0x18(%rbp)
jmp 0x336b
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xe4c2(%rip), %rsi      # 0x117ae
callq 0x1140
cmpl $0x0, %eax
jne 0x32ff
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
jmp 0x3369
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x3315
jmp 0x3383
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1ed0
movq %rax, %rdi
movl -0x18(%rbp), %esi
callq 0x2fe0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x3365
movq 0x12cb8(%rip), %rax     # 0x15ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0xe808(%rip), %rsi      # 0x11b5e
movb $0x0, %al
callq 0x1160
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3398
jmp 0x3367
jmp 0x3369
jmp 0x336b
jmp 0x336d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x32a4
cmpl $0x0, -0x1c(%rbp)
je 0x3392
jmp 0x3383
callq 0x2fa0
movl $0x1, %edi
callq 0x1200
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: search_cmd
int search_cmd(const char *cmd)
{
  int i;

  for (i=0; commands[i].cmd; i++)
    if (! strcmp(cmd, commands[i].cmd))
      return i;
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x11f42(%rip), %rax     # 0x16140
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x4243
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rcx
leaq 0x11f26(%rip), %rax     # 0x16140
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x1140
cmpl $0x0, %eax
jne 0x4236
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x424a
jmp 0x4238
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x41f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/dosfs.c
// Function: common_usage
void common_usage()
{
  int i;

  fprintf(stderr,
          "Usage: dosfs --<subcmd> <options> <..args..>\n"
          "Usage: dos<subcmd> <options> <..args..>\n"
          "Valid subcommands are:");
  for (i=0; commands[i].cmd; i++)
    fprintf(stderr, " %s", commands[i].cmd);
  fprintf(stderr, "\n");
  fprintf(stderr,
          "Common options:\n");
  common_options();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x11d89(%rip), %rax     # 0x15ff8
movq (%rax), %rdi
leaq 0xe006(%rip), %rsi      # 0x1227f
movb $0x0, %al
callq 0x1160
movl $0x0, -0x4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x11eae(%rip), %rax     # 0x16140
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x42d7
movq 0x11d52(%rip), %rax     # 0x15ff8
movq (%rax), %rdi
movslq -0x4(%rbp), %rcx
leaq 0x11e8c(%rip), %rax     # 0x16140
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
leaq 0xe026(%rip), %rsi      # 0x122eb
movb $0x0, %al
callq 0x1160
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x4287
movq 0x11d1a(%rip), %rax     # 0x15ff8
movq (%rax), %rdi
leaq 0xd202(%rip), %rsi      # 0x114ea
movb $0x0, %al
callq 0x1160
movq 0x11d02(%rip), %rax     # 0x15ff8
movq (%rax), %rdi
leaq 0xdfef(%rip), %rsi      # 0x122ef
movb $0x0, %al
callq 0x1160
callq 0x1590
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/ff.c
// Function: f_mount
FRESULT f_mount (
	FATFS* fs,			/* Pointer to the filesystem object (NULL:unmount)*/
	const TCHAR* path,	/* Logical drive number to be mounted/unmounted */
	BYTE opt			/* Mode option 0:Do not mount (delayed mount), 1:Mount immediately */
)
{
	FATFS *cfs;
	int vol;
	FRESULT res;
	const TCHAR *rp = path;


	/* Get logical drive number */
	vol = get_ldnumber(&rp);
	if (vol < 0) return FR_INVALID_DRIVE;
	cfs = FatFs[vol];					/* Pointer to fs object */

	if (cfs) {
#if FF_FS_LOCK != 0
		clear_lock(cfs);
#endif
#if FF_FS_REENTRANT						/* Discard sync object of the current volume */
		if (!ff_del_syncobj(cfs->sobj)) return FR_INT_ERR;
#endif
		cfs->fs_type = 0;				/* Clear old fs object */
	}

	if (fs) {
		fs->fs_type = 0;				/* Clear new fs object */
#if FF_FS_REENTRANT						/* Create sync object for the new volume */
		if (!ff_cre_syncobj((BYTE)vol, &fs->sobj)) return FR_INT_ERR;
#endif
	}
	FatFs[vol] = fs;					/* Register new fs object */

	if (opt == 0) return FR_OK;			/* Do not mount now, it will be mounted later */

	res = mount_volume(&path, &fs, 0);	/* Force mounted the volume */
	LEAVE_FF(fs, res);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4860
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x47e8
movl $0xb, -0x4(%rbp)
jmp 0x4854
movslq -0x2c(%rbp), %rcx
leaq 0x11cbd(%rip), %rax     # 0x164b0
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4809
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x4817
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdx
movslq -0x2c(%rbp), %rcx
leaq 0x11c8a(%rip), %rax     # 0x164b0
movq %rdx, (%rax,%rcx,8)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x483c
movl $0x0, -0x4(%rbp)
jmp 0x4854
leaq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x4940
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/ff.c
// Function: init_alloc_info
static void init_alloc_info (
	FATFS* fs,		/* Filesystem object */
	FFOBJID* obj	/* Object allocation information to be initialized */
)
{
	obj->sclust = ld_dword(fs->dirbuf + XDIR_FstClus);		/* Start cluster */
	obj->objsize = ld_qword(fs->dirbuf + XDIR_FileSize);	/* Size */
	obj->stat = fs->dirbuf[XDIR_GenFlags] & 2;				/* Allocation status */
	obj->n_frag = 0;										/* No last fragment info */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x34, %rdi
callq 0x6510
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x38, %rdi
callq 0xd380
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movzbl 0x21(%rax), %eax
andl $0x2, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0xb(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/ff.c
// Function: st_dword
static void st_dword (BYTE* ptr, DWORD val)	/* Store a 4-byte word in little-endian */
{
	*ptr++ = (BYTE)val; val >>= 8;
	*ptr++ = (BYTE)val; val >>= 8;
	*ptr++ = (BYTE)val; val >>= 8;
	*ptr++ = (BYTE)val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movl -0xc(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movl -0xc(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movl -0xc(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/ff.c
// Function: store_xdir
static FRESULT store_xdir (
	DIR* dp				/* Pointer to the direcotry object */
)
{
	FRESULT res;
	UINT nent;
	BYTE* dirb = dp->obj.fs->dirbuf;	/* Pointer to the direcotry entry block 85+C0+C1s */

	/* Create set sum */
	st_word(dirb + XDIR_SetSum, xdir_sum(dirb));
	nent = dirb[XDIR_NumSec] + 1;

	/* Store the direcotry entry block to the directory */
	res = dir_sdi(dp, dp->blk_ofs);
	while (res == FR_OK) {
		res = move_window(dp->obj.fs, dp->sect);
		if (res != FR_OK) break;
		mem_cpy(dp->dir, dirb, SZDIRE);
		dp->obj.fs->wflag = 1;
		if (--nent == 0) break;
		dirb += SZDIRE;
		res = dir_next(dp, 0);
	}
	return (res == FR_OK || res == FR_DISK_ERR) ? res : FR_INT_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf100
movq -0x20(%rbp), %rdi
movzwl %ax, %esi
callq 0x7c50
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x54(%rax), %esi
callq 0x82b0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x610f
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x6480
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x60c2
jmp 0x610f
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0x20, %edx
callq 0x6d20
movq -0x8(%rbp), %rax
movq (%rax), %rax
movb $0x1, 0x3(%rax)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, %eax
jne 0x60f3
jmp 0x610f
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x8b90
movl %eax, -0xc(%rbp)
jmp 0x609d
cmpl $0x0, -0xc(%rbp)
je 0x611b
cmpl $0x1, -0xc(%rbp)
jne 0x6123
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x612d
movl $0x2, %eax
movl %eax, -0x24(%rbp)
jmp 0x612d
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/ff.c
// Function: move_window
static FRESULT move_window (	/* Returns FR_OK or FR_DISK_ERR */
	FATFS* fs,		/* Filesystem object */
	LBA_t sect		/* Sector LBA to make appearance in the fs->win[] */
)
{
	FRESULT res = FR_OK;


	if (sect != fs->winsect) {	/* Window offset changed? */
#if !FF_FS_READONLY
		res = sync_window(fs);		/* Flush the window */
#endif
		if (res == FR_OK) {			/* Fill sector window with new data */
			if (disk_read(fs->pdrv, fs->win, sect, 1) != RES_OK) {
				sect = (LBA_t)0 - 1;	/* Invalidate window if read data is not valid */
				res = FR_DISK_ERR;
			}
			fs->winsect = sect;
		}
	}
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x58(%rcx), %rax
je 0x64f9
movq -0x8(%rbp), %rdi
callq 0xf540
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x64f7
movq -0x8(%rbp), %rax
movb 0x1(%rax), %al
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
movq -0x10(%rbp), %rdx
movl $0x1, %ecx
movzbl %al, %edi
callq 0x1970
cmpl $0x0, %eax
je 0x64eb
movq $-0x1, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
jmp 0x64f9
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/ff.c
// Function: ld_dword
static DWORD ld_dword (const BYTE* ptr)	/* Load a 4-byte little-endian word */
{
	DWORD rv;

	rv = ptr[3];
	rv = rv << 8 | ptr[2];
	rv = rv << 8 | ptr[1];
	rv = rv << 8 | ptr[0];
	return rv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/ff.c
// Function: mem_cpy
static void mem_cpy (void* dst, const void* src, UINT cnt)
{
	BYTE *d = (BYTE*)dst;
	const BYTE *s = (const BYTE*)src;

	if (cnt != 0) {
		do {
			*d++ = *s++;
		} while (--cnt);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x6d79
jmp 0x6d47
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jne 0x6d47
jmp 0x6d79
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lb3361[P]dosfs/ff.c
// Function: fill_first_frag
static FRESULT fill_first_frag (
	FFOBJID* obj	/* Pointer to the corresponding object */
)
{
	FRESULT res;
	DWORD cl, n;


	if (obj->stat == 3) {	/* Has the object been changed 'fragmented' in this session? */
		for (cl = obj->sclust, n = obj->n_cont; n; cl++, n--) {	/* Create cluster chain on the FAT */
			res = put_fat(obj->fs, cl, cl + 1);
			if (res != FR_OK) return res;
		}
		obj->stat = 0;	/* Change status 'FAT chain is valid' */
	}
	return FR_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xb(%rax), %eax
cmpl $0x3, %eax
jne 0x7897
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x788f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x18(%rbp), %esi
movl -0x18(%rbp), %edx
addl $0x1, %edx
callq 0xf180
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x7879
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x789e
jmp 0x787b
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x784d
movq -0x10(%rbp), %rax
movb $0x0, 0xb(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)