// File: /workspace/github_c_makefile_star2_O2/kieselsteini[P]PiXL-old/lua53.c
// Function: os_date
static int os_date (lua_State *L) {
  size_t slen;
  const char *s = luaL_optlstring(L, 1, "%c", &slen);
  time_t t = luaL_opt(L, l_checktime, 2, time(NULL));
  const char *se = s + slen;  /* 's' end */
  struct tm tmr, *stm;
  if (*s == '!') {  /* UTC? */
    stm = l_gmtime(&t, &tmr);
    s++;  /* skip '!' */
  }
  else
    stm = l_localtime(&t, &tmr);
  if (stm == NULL)  /* invalid date? */
    luaL_error(L, "time result cannot be represented in this installation");
  if (strcmp(s, "*t") == 0) {
    lua_createtable(L, 0, 9);  /* 9 = number of fields */
    setallfields(L, stm);
  }
  else {
    char cc[4];  /* buffer for individual conversion specifiers */
    luaL_Buffer b;
    cc[0] = '%';
    luaL_buffinit(L, &b);
    while (s < se) {
      if (*s != '%')  /* not a conversion specifier? */
        luaL_addchar(&b, *s++);
      else {
        size_t reslen;
        char *buff = luaL_prepbuffsize(&b, SIZETIMEFMT);
        s++;  /* skip '%' */
        s = checkoption(L, s, se - s, cc + 1);  /* copy specifier to 'cc' */
        reslen = strftime(buff, SIZETIMEFMT, cc, stm);
        luaL_addsize(&b, reslen);
      }
    }
    luaL_pushresult(&b);
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2088, %rsp           # imm = 0x2088
movq %rdi, %rbx
leaq 0x11de7(%rip), %rdx     # 0x2b2a5
pushq $0x1
popq %rsi
leaq 0x28(%rsp), %rcx
callq 0xaf6c
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6d43
testl %eax, %eax
jle 0x194ea
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0xb0c0
jmp 0x194f1
xorl %edi, %edi
callq 0x6460
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %r13
addq %r14, %r13
cmpb $0x21, (%r14)
jne 0x1951b
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x68a0
movq %rax, %r15
incq %r14
jmp 0x1952d
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x62c0
movq %rax, %r15
testq %r15, %r15
je 0x196c9
cmpb $0x2a, (%r14)
jne 0x1954e
cmpb $0x74, 0x1(%r14)
jne 0x1954e
cmpb $0x0, 0x2(%r14)
je 0x19688
leaq 0x5(%rsp), %rax
movb $0x25, -0x1(%rax)
leaq 0x88(%rsp), %rax
movq %rbx, -0x8(%rax)
movq %rax, -0x20(%rax)
andq $0x0, -0x10(%rax)
movq $0x2000, -0x18(%rax)    # imm = 0x2000
movq %rbx, 0x10(%rsp)
movq %r13, 0x20(%rsp)
movq %r15, 0x18(%rsp)
cmpq %r13, %r14
jae 0x19669
movb (%r14), %al
cmpb $0x25, %al
jne 0x195f1
movl $0xfa, %esi
leaq 0x68(%rsp), %rdi
callq 0xb145
movq %rax, %rbp
incq %r14
subq %r14, %r13
leaq 0x11d51(%rip), %r12     # 0x2b303
pushq $0x1
popq %r15
movb (%r12), %al
testb %al, %al
je 0x196a2
movslq %r15d, %rbx
cmpq %rbx, %r13
jl 0x196a2
cmpb $0x7c, %al
jne 0x195da
incl %r15d
movslq %r15d, %rbx
jmp 0x195ec
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x64d0
testl %eax, %eax
je 0x1962b
addq %rbx, %r12
jmp 0x195b6
movq 0x78(%rsp), %rcx
cmpq 0x70(%rsp), %rcx
jb 0x19612
leaq 0x68(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0xb145
movb (%r14), %al
movq 0x78(%rsp), %rcx
incq %r14
movq 0x68(%rsp), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x78(%rsp)
movb %al, (%rdx,%rcx)
jmp 0x19583
leaq 0x5(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x63f0
movb $0x0, 0x5(%rsp,%rbx)
addq %rbx, %r14
movl $0xfa, %esi
movq %rbp, %rdi
leaq 0x4(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x63e0
addq %rax, 0x78(%rsp)
movq 0x20(%rsp), %r13
jmp 0x19583
leaq 0x68(%rsp), %rdi
callq 0xb312
pushq $0x1
popq %rax
addq $0x2088, %rsp           # imm = 0x2088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x9
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x881a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19a77
jmp 0x19673
leaq 0x11ca8(%rip), %rsi     # 0x2b351
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x822d
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa986
leaq 0x11bd8(%rip), %rsi     # 0x2b2a8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xaa53