LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/extracters/dbtap/dos11.c
// Function: dos11Date
static void dos11Date(
  uint16 value,
  char *buf
)
{
  unsigned short year, doyr, leapyr;
  unsigned short *table;

  /*
   * The DOS/BATCH-11 date format covers a range of 1970 - 2035.
   */
  year = 1970 + value / 1000;
  doyr = value % 1000;
  leapyr = ((year % 4) == 0) && (year != 2000);

  table = leapyr ? mnthl : mnth;

  /*
   * Check for valid day of year.
   */
  if (doyr < (leapyr ? 366 : 365)) {
    int i = 0;

    while (doyr > table[i])
      doyr -= table[i++];

    sprintf(buf, "%2d-%s-%4d", doyr, month[i], year);
  } else strcpy(buf, "xx-yyy-xxxx");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movq %rsi, -0x10(%rbp)
movzwl -0x2(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
addl $0x7b2, %eax            # imm = 0x7B2
movw %ax, -0x12(%rbp)
movzwl -0x2(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movw %dx, %ax
movw %ax, -0x14(%rbp)
movzwl -0x12(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x25(%rbp)
jne 0x31c0
movzwl -0x12(%rbp), %eax
cmpl $0x7d0, %eax            # imm = 0x7D0
setne %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movw %ax, -0x16(%rbp)
movzwl -0x16(%rbp), %edx
leaq 0x2f79(%rip), %rax      # 0x6150
leaq 0x2f92(%rip), %rcx      # 0x6170
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x20(%rbp)
movzwl -0x14(%rbp), %eax
movzwl -0x16(%rbp), %esi
movl $0x16d, %ecx            # imm = 0x16D
movl $0x16e, %edx            # imm = 0x16E
cmpl $0x0, %esi
cmovnel %edx, %ecx
cmpl %ecx, %eax
jge 0x326e
movl $0x0, -0x24(%rbp)
movzwl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movzwl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jle 0x3242
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
movzwl -0x14(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x14(%rbp)
jmp 0x320c
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %edx
movslq -0x24(%rbp), %rcx
leaq 0x2f3b(%rip), %rax      # 0x6190
movq (%rax,%rcx,8), %rcx
movzwl -0x12(%rbp), %r8d
leaq 0x13ef(%rip), %rsi      # 0x4654
movb $0x0, %al
callq 0x11b0
jmp 0x327e
movq -0x10(%rbp), %rdi
leaq 0x13e6(%rip), %rsi      # 0x465f
callq 0x1050
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/pyk[P]simple-nn/deps/pcg/src/../include/pcg_variants.h
// Function: pcg_oneseq_8_srandom_r
inline void pcg_oneseq_8_srandom_r(struct pcg_state_8* rng, uint8_t initstate)
{
    rng->state = 0U;
    pcg_oneseq_8_step_r(rng);
    rng->state += initstate;
    pcg_oneseq_8_step_r(rng);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x16c0
movzbl -0x9(%rbp), %edx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
addl %edx, %ecx
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
callq 0x16c0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/pyk[P]simple-nn/deps/pcg/src/../include/pcg_variants.h
// Function: pcg_unique_8_srandom_r
inline void pcg_unique_8_srandom_r(struct pcg_state_8* rng, uint8_t initstate)
{
    rng->state = 0U;
    pcg_unique_8_step_r(rng);
    rng->state += initstate;
    pcg_unique_8_step_r(rng);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x1790
movzbl -0x9(%rbp), %edx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
addl %edx, %ecx
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
callq 0x1790
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/pyk[P]simple-nn/deps/pcg/src/../include/pcg_variants.h
// Function: pcg_setseq_8_srandom_r
inline void pcg_setseq_8_srandom_r(struct pcg_state_setseq_8* rng,
                                   uint8_t initstate, uint8_t initseq)
{
    rng->state = 0U;
    rng->inc = (initseq << 1u) | 1u;
    pcg_setseq_8_step_r(rng);
    rng->state += initstate;
    pcg_setseq_8_step_r(rng);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movzbl -0xa(%rbp), %eax
shll %eax
orl $0x1, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rdi
callq 0x1810
movzbl -0x9(%rbp), %edx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
addl %edx, %ecx
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
callq 0x1810
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pyk[P]simple-nn/deps/pcg/src/../include/pcg_variants.h
// Function: pcg_oneseq_8_rxs_m_xs_8_boundedrand_r
inline uint8_t pcg_oneseq_8_rxs_m_xs_8_boundedrand_r(struct pcg_state_8* rng,
                                                     uint8_t bound)
{
    uint8_t threshold = ((uint8_t)(-bound)) % bound;
    for (;;) {
        uint8_t r = pcg_oneseq_8_rxs_m_xs_8_random_r(rng);
        if (r >= threshold)
            return r % bound;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %ecx
xorl %eax, %eax
subl %ecx, %eax
movzbl %al, %eax
movzbl -0x9(%rbp), %ecx
cltd
idivl %ecx
movb %dl, %al
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1990
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
movzbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jl 0x1a14
movzbl -0xb(%rbp), %eax
movzbl -0x9(%rbp), %ecx
cltd
idivl %ecx
movb %dl, %al
addq $0x10, %rsp
popq %rbp
retq
jmp 0x19e9
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pyk[P]simple-nn/deps/pcg/src/../include/pcg_variants.h
// Function: pcg_setseq_8_rxs_m_xs_8_boundedrand_r
inline uint8_t
pcg_setseq_8_rxs_m_xs_8_boundedrand_r(struct pcg_state_setseq_8* rng,
                                      uint8_t bound)
{
    uint8_t threshold = ((uint8_t)(-bound)) % bound;
    for (;;) {
        uint8_t r = pcg_setseq_8_rxs_m_xs_8_random_r(rng);
        if (r >= threshold)
            return r % bound;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %ecx
xorl %eax, %eax
subl %ecx, %eax
movzbl %al, %eax
movzbl -0x9(%rbp), %ecx
cltd
idivl %ecx
movb %dl, %al
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a20
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
movzbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jl 0x1aa4
movzbl -0xb(%rbp), %eax
movzbl -0x9(%rbp), %ecx
cltd
idivl %ecx
movb %dl, %al
addq $0x10, %rsp
popq %rbp
retq
jmp 0x1a79
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pyk[P]simple-nn/deps/pcg/src/pcg-advance-8.c
// Function: pcg_advance_lcg_8
uint8_t pcg_advance_lcg_8(uint8_t state, uint8_t delta, uint8_t cur_mult,
                          uint8_t cur_plus)
{
    uint8_t acc_mult = 1u;
    uint8_t acc_plus = 0u;
    while (delta > 0) {
        if (delta & 1) {
            acc_mult *= cur_mult;
            acc_plus = acc_plus * cur_mult + cur_plus;
        }
        cur_plus = (cur_mult + 1) * cur_plus;
        cur_mult *= cur_mult;
        delta /= 2;
    }
    return acc_mult * state + acc_plus;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movb %dil, %sil
movb %sil, -0x1(%rbp)
movb %dl, -0x2(%rbp)
movb %cl, -0x3(%rbp)
movb %al, -0x4(%rbp)
movb $0x1, -0x5(%rbp)
movb $0x0, -0x6(%rbp)
movzbl -0x2(%rbp), %eax
cmpl $0x0, %eax
jle 0x274a
movzbl -0x2(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x271a
movzbl -0x3(%rbp), %ecx
movzbl -0x5(%rbp), %eax
imull %ecx, %eax
movb %al, -0x5(%rbp)
movzbl -0x6(%rbp), %eax
movzbl -0x3(%rbp), %ecx
imull %ecx, %eax
movzbl -0x4(%rbp), %ecx
addl %ecx, %eax
movb %al, -0x6(%rbp)
movzbl -0x3(%rbp), %eax
addl $0x1, %eax
movzbl -0x4(%rbp), %ecx
imull %ecx, %eax
movb %al, -0x4(%rbp)
movzbl -0x3(%rbp), %ecx
movzbl -0x3(%rbp), %eax
imull %ecx, %eax
movb %al, -0x3(%rbp)
movzbl -0x2(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movb %al, -0x2(%rbp)
jmp 0x26e3
movzbl -0x5(%rbp), %eax
movzbl -0x1(%rbp), %ecx
imull %ecx, %eax
movzbl -0x6(%rbp), %ecx
addl %ecx, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mflatt[P]gc-demo/2space/2space.c
// Function: collect_garbage
void collect_garbage()
{
  /* Set up new space */
  size_t new_size = (space_end - space_start + sizeof(struct gc_node));
  if (new_size < (prev_size * 2))
    new_size = prev_size * 2;
  
  void *new_space = raw_malloc(new_size);
  struct gc_node *alloc_pos = new_space;

  /* Copy into new space */
  copy_from_roots(&alloc_pos);

  /* Clean up old space */
  if (space_start != 0)
    raw_free((void *)space_start, space_end - space_start);

  /* Continue allocating into new space */
  space_start = (uintptr_t)new_space;
  space_end = space_start + new_size;
  space_next = (uintptr_t)alloc_pos;

  /* Remember size after collection to be used as a guide for the next
     space's size: */
  prev_size = space_next - space_start;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x2b49(%rip), %rax      # 0x4078
movq (%rax), %rax
leaq 0x2f57(%rip), %rcx      # 0x4490
subq (%rcx), %rax
addq $0x18, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x2af1(%rip), %rcx      # 0x4040
shlq %rcx
cmpq %rcx, %rax
jae 0x1565
movq 0x2ae2(%rip), %rax      # 0x4040
shlq %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1490
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x16b0
leaq 0x2f06(%rip), %rax      # 0x4490
cmpq $0x0, (%rax)
je 0x15b3
leaq 0x2ef9(%rip), %rax      # 0x4490
movq (%rax), %rdi
leaq 0x2ad7(%rip), %rax      # 0x4078
movq (%rax), %rsi
leaq 0x2ee5(%rip), %rax      # 0x4490
subq (%rax), %rsi
callq 0x14e0
movq -0x10(%rbp), %rcx
leaq 0x2ed2(%rip), %rax      # 0x4490
movq %rcx, (%rax)
leaq 0x2ec8(%rip), %rax      # 0x4490
movq (%rax), %rcx
addq -0x8(%rbp), %rcx
leaq 0x2aa2(%rip), %rax      # 0x4078
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
leaq 0x2a8c(%rip), %rax      # 0x4070
movq %rcx, (%rax)
leaq 0x2a82(%rip), %rax      # 0x4070
movq (%rax), %rax
leaq 0x2e98(%rip), %rcx      # 0x4490
subq (%rcx), %rax
movq %rax, 0x2a3e(%rip)      # 0x4040
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mflatt[P]gc-demo/2space/2space.c
// Function: is_allocated
int is_allocated(void *p)
{
  /* The pointer `p` refers to an allocated object
     if it's in the allocation range: */
  return ((uintptr_t)p >= space_start
          && (uintptr_t)p < space_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
leaq 0x2e6b(%rip), %rdx      # 0x4490
cmpq (%rdx), %rcx
movb %al, -0x9(%rbp)
jb 0x1641
movq -0x8(%rbp), %rax
leaq 0x2a40(%rip), %rcx      # 0x4078
cmpq (%rcx), %rax
setb %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mflatt[P]gc-demo/2space/copy.c
// Function: allocate
struct node *allocate()
{
  if (space_next + sizeof(struct gc_node) > space_end)
    collect_garbage();

  struct gc_node *p = (struct gc_node *)space_next;
  space_next += sizeof(struct gc_node);

  p->forwarded = 0;

  return &p->n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x2a11(%rip), %rax      # 0x4070
addq $0x18, %rax
cmpq 0x2a0e(%rip), %rax      # 0x4078
jbe 0x1673
movb $0x0, %al
callq 0x1520
movq 0x29f6(%rip), %rax      # 0x4070
movq %rax, -0x8(%rbp)
movq 0x29eb(%rip), %rax      # 0x4070
addq $0x18, %rax
movq %rax, 0x29e0(%rip)      # 0x4070
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mflatt[P]gc-demo/2space/copy.c
// Function: copy_from_roots
void copy_from_roots(struct gc_node **alloc_pos_ptr)
{
  struct gc_node *init_ptr = *alloc_pos_ptr;
  
  for (int i = 0; i < num_roots; i++) {
    copy_or_forward(root_addrs[i], alloc_pos_ptr);
  }

  traverse_copied(init_ptr, alloc_pos_ptr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x29a9(%rip), %eax      # 0x4080
jge 0x16fc
movslq -0x14(%rbp), %rcx
leaq 0x29ac(%rip), %rax      # 0x4090
movq (%rax,%rcx,8), %rdi
movq -0x8(%rbp), %rsi
callq 0x1710
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x16ce
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x17d0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mflatt[P]gc-demo/2space/copy.c
// Function: copy_or_forward
static void copy_or_forward(struct node **addr,
                            struct gc_node **alloc_pos_ptr)
{
  if (is_allocated(*addr)) {
    struct gc_node *nh;
    nh = NODE_TO_GC(*addr);
    
    if (nh->forwarded) {
      /* Object already copied */
      *addr = nh->forward_to;
    } else {
      /* Allocate a copy: */
      struct gc_node *nh2;
      nh2 = *alloc_pos_ptr;
      (*alloc_pos_ptr)++;
      memcpy(nh2, nh, sizeof(struct gc_node));

      /* Mark old location as copied and set forwarding pointer */
      nh->forwarded = 1;
      nh->forward_to = &nh2->n;
      *addr = &nh2->n;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1610
cmpl $0x0, %eax
je 0x17c0
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x175e
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x17be
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x18, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rcx
addq $0x8, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
addq $0x8, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x17c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mflatt[P]gc-demo/2space/copy.c
// Function: traverse_copied
static void traverse_copied(struct gc_node *traverse_ptr,
                            struct gc_node **alloc_pos_ptr)
{
  /* Iterate through new space to copy : */
  while (traverse_ptr < *alloc_pos_ptr) {
    copy_or_forward(&traverse_ptr->n.left, alloc_pos_ptr);
    copy_or_forward(&traverse_ptr->n.right, alloc_pos_ptr);
    traverse_ptr++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1821
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x1710
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x1710
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x8(%rbp)
jmp 0x17e0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/accre[P]Cprogramming/functions.c
// Function: mySimpleFuncByValue
float mySimpleFuncByValue(int iloc,float xloc)
{

   iloc += 101;
   xloc *= 14.6;

   float yloc = (float)iloc * xloc;
   
   return yloc;   

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movss %xmm0, -0x8(%rbp)
movl -0x4(%rbp), %eax
addl $0x65, %eax
movl %eax, -0x4(%rbp)
movss -0x8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xe92(%rip), %xmm1      # 0x2008
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x8(%rbp)
cvtsi2ssl -0x4(%rbp), %xmm0
mulss -0x8(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/accre[P]Cprogramming/functions.c
// Function: mySimpleFuncByReference
float mySimpleFuncByReference(int * iPtr,float * xPtr)
{

   // dereference the pointer and modify the value it points to
   *iPtr += 101;
   *xPtr *= 14.6;

   // make copies to the values that each pointer points to
   int iloc = *iPtr;
   float xloc = *xPtr;

   float yloc = (float)iloc * xloc;
   
   return yloc;   

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $0x65, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xe3d(%rip), %xmm1      # 0x2008
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rax)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x18(%rbp)
cvtsi2ssl -0x14(%rbp), %xmm0
mulss -0x18(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/accre[P]Cprogramming/functions.c
// Function: main
int main()
{

   int i = 22;
   float x = 234.23;

   // i and x are both passed by value,
   // meaning a copy of each of these variables
   // is passed to mySimpleFunc
   float y = mySimpleFuncByValue(i,x);
   printf("i: %d x: %10.5f y: %10.5f\n",i,x,y);
   // Now i and x are both being passed by reference
   // (Notice the & symbol)
   // This means that the actual memory location of 
   // i and x are being passed, so any modifications
   // to the values i and x within the function will
   // propogate to main() 
   y = mySimpleFuncByReference(&i,&x);
   printf("i: %d x: %10.5f y: %10.5f\n",i,x,y);

   int myArray[2] = { 0, 0 };
   printf("Before function call, myArray[0]: %d myArray[1]: %d\n",myArray[0],myArray[1]);
   modifyArray(myArray);
   printf("After function call, myArray[0]: %d myArray[1]: %d\n",myArray[0],myArray[1]);

   return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl $0x16, -0x8(%rbp)
movss 0xdc2(%rip), %xmm0      # 0x2010
movss %xmm0, -0xc(%rbp)
movl -0x8(%rbp), %edi
movss -0xc(%rbp), %xmm0
callq 0x1150
movss %xmm0, -0x10(%rbp)
movl -0x8(%rbp), %esi
movss -0xc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x10(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0xd93(%rip), %rdi       # 0x2014
movb $0x2, %al
callq 0x1030
leaq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x11a0
movss %xmm0, -0x10(%rbp)
movl -0x8(%rbp), %esi
movss -0xc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x10(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0xd5e(%rip), %rdi       # 0x2014
movb $0x2, %al
callq 0x1030
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x1040
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
leaq 0xd55(%rip), %rdi       # 0x202f
movb $0x0, %al
callq 0x1030
leaq -0x18(%rbp), %rdi
callq 0x1210
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
leaq 0xd6d(%rip), %rdi       # 0x2064
movb $0x0, %al
callq 0x1030
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg__vsprintf
static int scg__vsprintf(char *buf, const char *fmt, va_list args) {
    va_list tmpa;
    va_copy(tmpa, args);

    int size = vsnprintf(NULL, 0, fmt, tmpa);

    va_end(tmpa);

    if (size < 0) {
        return -1;
    }

    size = vsnprintf(buf, size + 1, fmt, args);
    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x2140
movl %eax, -0x44(%rbp)
leaq -0x40(%rbp), %rax
cmpl $0x0, -0x44(%rbp)
jge 0x2894
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x28b7
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x2140
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg__vasprintf
static int scg__vasprintf(char **buf, const char *fmt, va_list args) {
    va_list tmpa;
    va_copy(tmpa, args);

    int size = vsnprintf(NULL, 0, fmt, tmpa);

    va_end(tmpa);

    if (size < 0) {
        return -1;
    }

    *buf = malloc(size + 1);
    if (*buf == NULL) {
        return -1;
    }

    size = vsnprintf(*buf, size + 1, fmt, args);
    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x2140
movl %eax, -0x44(%rbp)
leaq -0x40(%rbp), %rax
cmpl $0x0, -0x44(%rbp)
jge 0x29b4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2a05
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x22f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x29df
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2a05
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x2140
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_pixel_lerp_rgb
scg_pixel_t scg_pixel_lerp_rgb(scg_pixel_t start, scg_pixel_t end,
                               float32_t t) {
    t = scg_clamp_float32(t, 0.0f, 1.0f);

    float32_t r = (1.0f - t) * start.data.r + t * end.data.r;
    float32_t g = (1.0f - t) * start.data.g + t * end.data.g;
    float32_t b = (1.0f - t) * start.data.b + t * end.data.b;

    return scg_pixel_new_rgb((uint8_t)r, (uint8_t)g, (uint8_t)b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movss -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
movss 0x45d5(%rip), %xmm2     # 0x7008
movss %xmm2, -0x20(%rbp)
callq 0x25f0
movaps %xmm0, %xmm1
movss -0x20(%rbp), %xmm0
movss %xmm1, -0x10(%rbp)
movss -0x10(%rbp), %xmm2
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
movzbl -0x6(%rbp), %eax
cvtsi2ss %eax, %xmm3
movzbl -0xa(%rbp), %eax
cvtsi2ss %eax, %xmm4
mulss %xmm4, %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movss %xmm1, -0x14(%rbp)
movss -0x10(%rbp), %xmm2
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
movzbl -0x7(%rbp), %eax
cvtsi2ss %eax, %xmm3
movzbl -0xb(%rbp), %eax
cvtsi2ss %eax, %xmm4
mulss %xmm4, %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movss %xmm1, -0x18(%rbp)
movss -0x10(%rbp), %xmm1
subss %xmm1, %xmm0
movzbl -0x8(%rbp), %eax
cvtsi2ss %eax, %xmm2
movzbl -0xc(%rbp), %eax
cvtsi2ss %eax, %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x1c(%rbp)
cvttss2si -0x1c(%rbp), %eax
movb %al, -0x4(%rbp)
cvttss2si -0x18(%rbp), %eax
movb %al, -0x3(%rbp)
cvttss2si -0x14(%rbp), %eax
movb %al, -0x2(%rbp)
movb $-0x1, -0x1(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_new
scg_image_t *scg_image_new(int width, int height) {
    uint32_t *pixels = calloc(width * height, sizeof(*pixels));
    if (pixels == NULL) {
        scg_log_error("Failed to allocate memory for pixels");

        return NULL;
    }

    scg_image_t *image = malloc(sizeof(*image));
    if (image == NULL) {
        scg_log_error("Failed to allocate memory for image");

        free(pixels);
        return NULL;
    }

    image->width = width;
    image->height = height;
    image->pitch = width * sizeof(*pixels);
    image->pixels = pixels;
    image->blend_mode = SCG_BLEND_MODE_NONE;

    return image;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2150
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2b65
xorl %edi, %edi
leaq 0x455a(%rip), %rsi      # 0x7090
leaq 0x456b(%rip), %rdx      # 0x70a8
leaq 0x4572(%rip), %rcx      # 0x70b6
movl $0x262, %r8d            # imm = 0x262
leaq 0x4577(%rip), %r9       # 0x70c8
movb $0x0, %al
callq 0x22e0
movq $0x0, -0x8(%rbp)
jmp 0x2bfb
movl $0x20, %edi
callq 0x22f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2bb8
xorl %edi, %edi
leaq 0x450d(%rip), %rsi      # 0x7090
leaq 0x451e(%rip), %rdx      # 0x70a8
leaq 0x4525(%rip), %rcx      # 0x70b6
movl $0x269, %r8d            # imm = 0x269
leaq 0x454f(%rip), %r9       # 0x70ed
movb $0x0, %al
callq 0x22e0
movq -0x18(%rbp), %rdi
callq 0x2290
movq $0x0, -0x8(%rbp)
jmp 0x2bfb
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movslq -0xc(%rbp), %rax
shlq $0x2, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_get_pixel
scg_pixel_t scg_image_get_pixel(scg_image_t *image, int x, int y) {
    int w = image->width;
    int h = image->height;

    if (x < 0 || x >= w || y < 0 || y >= h) {
        return SCG_COLOR_MAGENTA;
    }

    int i = scg_pixel_index_from_xy(x, y, w);
    return scg_pixel_new_uint32(image->pixels[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x2f1d
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2f1d
cmpl $0x0, -0x18(%rbp)
jl 0x2f1d
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jl 0x2f2f
movb $-0x1, -0x4(%rbp)
movb $0x0, -0x3(%rbp)
movb $-0x1, -0x2(%rbp)
movb $-0x1, -0x1(%rbp)
jmp 0x2f4e
movl -0x18(%rbp), %eax
imull -0x1c(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_clear
void scg_image_clear(scg_image_t *image, scg_pixel_t color) {
    int num_pixels = image->width * image->height;
    uint32_t pixel = color.packed;

    for (int i = 0; i < num_pixels; i++) {
        image->pixels[i] = pixel;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x4(%rcx), %eax
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x314e
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3129
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_draw_image
void scg_image_draw_image(scg_image_t *dest, scg_image_t *src, int x, int y) {
    int src_w = src->width;
    int src_h = src->height;

    for (int i = 0; i < src_h; i++) {
        for (int j = 0; j < src_w; j++) {
            scg_pixel_t color = scg_image_get_pixel(src, j, i);
            scg_image_set_pixel(dest, x + j, y + i, color);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x31d9
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x31cc
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x24(%rbp), %edx
callq 0x2ee0
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
addl -0x28(%rbp), %esi
movl -0x18(%rbp), %edx
addl -0x24(%rbp), %edx
movl -0x2c(%rbp), %ecx
callq 0x2f60
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x318f
jmp 0x31ce
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3180
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_draw_rect
void scg_image_draw_rect(scg_image_t *image, int x, int y, int w, int h,
                         scg_pixel_t color) {
    int minx = x;
    int miny = y;
    int maxx = minx + w;
    int maxy = miny + h;

    scg_image_draw_line(image, minx, miny, maxx, miny, color);
    scg_image_draw_line(image, maxx, miny, maxx, maxy, color);
    scg_image_draw_line(image, maxx, maxy, minx, maxy, color);
    scg_image_draw_line(image, minx, maxy, minx, miny, color);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %r9d, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x28(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movl -0x24(%rbp), %ecx
movl -0x30(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x30(%rbp), %edx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_draw_char
void scg_image_draw_char(scg_image_t *image, char ch, int x, int y,
                         scg_pixel_t color) {
    uint8_t char_code = (uint8_t)ch;
    if (char_code > SCG__FONT_CHAR_CODE_END) {
        char_code = SCG__FONT_CHAR_CODE_QUESTION_MARK;
    }

    char bitmap[SCG_FONT_SIZE];
    int index = char_code * SCG_FONT_SIZE;
    memcpy(bitmap, scg__font8x8 + index, SCG_FONT_SIZE);

    scg__draw_char_bitmap(image, bitmap, x, y, color);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movl %r8d, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movb -0x11(%rbp), %al
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %eax
cmpl $0x7f, %eax
jle 0x40bf
movb $0x3f, -0x1d(%rbp)
movzbl -0x1d(%rbp), %eax
shll $0x3, %eax
movl %eax, -0x2c(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x715c(%rip), %rax      # 0xb230
movq (%rax,%rcx), %rax
movq %rax, -0x25(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x25(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x4(%rbp), %r8d
callq 0x4100
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg__draw_char_bitmap
static void scg__draw_char_bitmap(scg_image_t *image, const char *bitmap, int x,
                                  int y, scg_pixel_t color) {
    for (int i = 0; i < SCG_FONT_SIZE; i++) {
        for (int j = 0; j < SCG_FONT_SIZE; j++) {
            int set = bitmap[i] & 1 << j;

            if (set) {
                scg_image_set_pixel(image, x + j, y + i, color);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %r8d, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x8, -0x24(%rbp)
jge 0x4189
movl $0x0, -0x28(%rbp)
cmpl $0x8, -0x28(%rbp)
jge 0x417c
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl -0x28(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x416f
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
addl -0x28(%rbp), %esi
movl -0x20(%rbp), %edx
addl -0x24(%rbp), %edx
movl -0x4(%rbp), %ecx
callq 0x2f60
jmp 0x4171
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x412e
jmp 0x417e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4121
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_draw_string
void scg_image_draw_string(scg_image_t *image, const char *str, int x, int y,
                           bool anchor_to_center, scg_pixel_t color) {
    int current_x = x;
    int current_y = y;

    if (anchor_to_center) {
        int width = strlen(str) * SCG_FONT_SIZE;
        current_x = x - width / 2;
        current_y -= SCG_FONT_SIZE / 2;
    }

    for (int i = 0; str[i] != '\0'; i++) {
        if (str[i] != SCG__FONT_CHAR_CODE_SPACE) {
            scg_image_draw_char(image, str[i], current_x, current_y, color);
        }

        current_x += SCG_FONT_SIZE;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r8b, %al
movl %r9d, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
testb $0x1, -0x21(%rbp)
je 0x41f8
movq -0x18(%rbp), %rdi
callq 0x20f0
shlq $0x3, %rax
movl %eax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x38(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x4256
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x4242
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb (%rax,%rcx), %al
movl -0x28(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x4(%rbp), %r8d
movsbl %al, %esi
callq 0x4090
movl -0x28(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x28(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x41ff
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_draw_wchar
void scg_image_draw_wchar(scg_image_t *image, wchar_t ch, int x, int y,
                          scg_pixel_t color) {
    char bitmap[SCG_FONT_SIZE];

    if (ch <= SCG__FONT_CHAR_CODE_END) {
        int index = ch * SCG_FONT_SIZE;
        memcpy(bitmap, scg__font8x8 + index, SCG_FONT_SIZE);
    } else if (ch >= SCG__FONT_HIRAGANA_CHAR_CODE_START &&
               ch <= SCG__FONT_HIRAGANA_CHAR_CODE_END) {
        int mapped_code = SCG__FONT_HIRAGANA_NUM_CHARS -
                          (SCG__FONT_HIRAGANA_CHAR_CODE_END - ch);

        int index = mapped_code * SCG_FONT_SIZE;
        memcpy(bitmap, scg__font8x8_hiragana + index, SCG_FONT_SIZE);
    } else {
        int index = SCG__FONT_CHAR_CODE_QUESTION_MARK * SCG_FONT_SIZE;
        memcpy(bitmap, scg__font8x8 + index, SCG_FONT_SIZE);
    }

    scg__draw_char_bitmap(image, bitmap, x, y, color);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %r8d, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x7f, -0x14(%rbp)
jg 0x429d
movl -0x14(%rbp), %eax
shll $0x3, %eax
movl %eax, -0x28(%rbp)
movslq -0x28(%rbp), %rcx
leaq 0x6f9d(%rip), %rax      # 0xb230
movq (%rax,%rcx), %rax
movq %rax, -0x24(%rbp)
jmp 0x42fb
cmpl $0x3040, -0x14(%rbp)    # imm = 0x3040
jl 0x42df
cmpl $0x309f, -0x14(%rbp)    # imm = 0x309F
jg 0x42df
movl $0x309f, %ecx           # imm = 0x309F
subl -0x14(%rbp), %ecx
movl $0x60, %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
shll $0x3, %eax
movl %eax, -0x30(%rbp)
movslq -0x30(%rbp), %rcx
leaq 0x735b(%rip), %rax      # 0xb630
movq (%rax,%rcx), %rax
movq %rax, -0x24(%rbp)
jmp 0x42f9
movl $0x1f8, -0x34(%rbp)     # imm = 0x1F8
movslq -0x34(%rbp), %rcx
leaq 0x6f3f(%rip), %rax      # 0xb230
movq (%rax,%rcx), %rax
movq %rax, -0x24(%rbp)
jmp 0x42fb
movq -0x10(%rbp), %rdi
leaq -0x24(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x4(%rbp), %r8d
callq 0x4100
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_draw_wstring
void scg_image_draw_wstring(scg_image_t *image, const wchar_t *str, int x,
                            int y, bool anchor_to_center, scg_pixel_t color) {
    int current_x = x;
    int current_y = y;

    if (anchor_to_center) {
        int width = wcslen(str) * SCG_FONT_SIZE;
        current_x = x - width / 2;
        current_y -= SCG_FONT_SIZE / 2;
    }

    for (int i = 0; str[i] != '\0'; i++) {
        if (str[i] != SCG__FONT_CHAR_CODE_SPACE) {
            scg_image_draw_wchar(image, str[i], current_x, current_y, color);
        }

        current_x += SCG_FONT_SIZE;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r8b, %al
movl %r9d, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
testb $0x1, -0x21(%rbp)
je 0x4388
movq -0x18(%rbp), %rdi
callq 0x21e0
shlq $0x3, %rax
movl %eax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x38(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x43dd
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpl $0x20, (%rax,%rcx,4)
je 0x43c9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movl -0x28(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x4(%rbp), %r8d
callq 0x4260
movl -0x28(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x28(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x438f
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_draw_frame_metrics
void scg_image_draw_frame_metrics(scg_image_t *image,
                                  scg_frame_metrics_t frame_metrics) {
    int fps = frame_metrics.fps;
    float32_t frame_time_ms = frame_metrics.frame_time_millisecs;
    const char *fmt = "fps:%d ms/f:%.4f";

    ssize_t bsize = snprintf(NULL, 0, fmt, fps, frame_time_ms);
    char buffer[bsize];
    snprintf(buffer, bsize + 1, fmt, fps, frame_time_ms);

    scg_pixel_t color = SCG_COLOR_GREEN;
    float32_t target_fps = (float32_t)frame_metrics.target_fps;
    if (fps < target_fps * 0.95) {
        color = SCG_COLOR_YELLOW;
    }
    if (fps < target_fps * 0.5) {
        color = SCG_COLOR_RED;
    }

    // Draw the metrics with no alpha blending.
    scg_blend_mode_t blend_mode = image->blend_mode;
    scg_image_set_blend_mode(image, SCG_BLEND_MODE_NONE);
    scg_image_draw_string(image, buffer, 10, 10, 0, color);
    scg_image_set_blend_mode(image, blend_mode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movl 0x18(%rax), %ecx
movl %ecx, -0xc(%rbp)
movsd 0x10(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
leaq 0x2e1f(%rip), %rax      # 0x723e
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movl -0xc(%rbp), %ecx
movss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
xorl %eax, %eax
movl %eax, %esi
movb $0x1, %al
movq %rsi, %rdi
callq 0x2350
cltq
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
movq %rax, %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x58(%rbp)
movq %rdi, %rsp
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
movq -0x18(%rbp), %rdx
movl -0xc(%rbp), %ecx
movss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movb $0x1, %al
callq 0x2350
movq -0x50(%rbp), %rax
movl 0x2ba1(%rip), %ecx      # 0x7038
movl %ecx, -0x34(%rbp)
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x38(%rbp)
cvtsi2sdl -0xc(%rbp), %xmm1
movss -0x38(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2ba7(%rip), %xmm2     # 0x7060
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x44d9
movb $0x0, -0x3c(%rbp)
movb $-0x1, -0x3b(%rbp)
movb $-0x1, -0x3a(%rbp)
movb $-0x1, -0x39(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x34(%rbp)
cvtsi2sdl -0xc(%rbp), %xmm1
movss -0x38(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2b79(%rip), %xmm2     # 0x7068
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x450f
movb $0x0, -0x40(%rbp)
movb $0x0, -0x3f(%rbp)
movb $-0x1, -0x3e(%rbp)
movb $-0x1, -0x3d(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x2ec0
movq -0x58(%rbp), %rsi
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %r9d
movl $0xa, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
callq 0x4190
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x2ec0
movq -0x28(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_save_to_bmp
bool scg_image_save_to_bmp(scg_image_t *image, const char *filepath) {
    SDL_Surface *surface = SDL_CreateRGBSurfaceWithFormatFrom(
        (void *)image->pixels, image->width, image->height, 32, image->pitch,
        SCG__IMAGE_PIXEL_FORMAT);
    if (surface == NULL) {
        scg_log_errorf("Failed to create SDL surface from image. %s",
                       SDL_GetError());

        return false;
    }

    if (SDL_SaveBMP(surface, filepath) != 0) {
        scg_log_errorf("Failed to save image to %s. %s", filepath,
                       SDL_GetError());

        SDL_FreeSurface(surface);
        return false;
    }

    SDL_FreeSurface(surface);

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %r8d
movl $0x20, %ecx
movl $0x16362004, %r9d       # imm = 0x16362004
callq 0x22c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x45dd
callq 0x2190
movq %rax, %r9
xorl %edi, %edi
leaq 0x2c96(%rip), %rsi      # 0x724f
leaq 0x2cd0(%rip), %rdx      # 0x7290
leaq 0x2aef(%rip), %rcx      # 0x70b6
movl $0x4ce, %r8d            # imm = 0x4CE
movb $0x0, %al
callq 0x22e0
movb $0x0, -0x1(%rbp)
jmp 0x4660
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2cb6(%rip), %rsi      # 0x72a6
callq 0x20e0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x2110
cmpl $0x0, %eax
je 0x4653
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x2190
movq -0x30(%rbp), %r9
xorl %edi, %edi
leaq 0x2c84(%rip), %rsi      # 0x72a9
leaq 0x2c64(%rip), %rdx      # 0x7290
leaq 0x2a83(%rip), %rcx      # 0x70b6
movl $0x4d5, %r8d            # imm = 0x4D5
movq %rax, (%rsp)
movb $0x0, %al
callq 0x22e0
movq -0x20(%rbp), %rdi
callq 0x2230
movb $0x0, -0x1(%rbp)
jmp 0x4660
movq -0x20(%rbp), %rdi
callq 0x2230
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_config_new_default
scg_config_t scg_config_new_default(void) {
    return (scg_config_t){
        .video = {.width = 640,
                  .height = 480,
                  .title = "SCG Application",
                  .scale = 1,
                  .fullscreen = false,
                  .vsync = true,
                  .lock_fps = true,
                  .show_frame_metrics = true},
        .input = {.hide_mouse_cursor = true},
        .audio = {.enabled = false, .volume = SCG__MAX_VOLUME / 2}};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movl $0x280, (%rdi)          # imm = 0x280
movl $0x1e0, 0x4(%rdi)       # imm = 0x1E0
leaq 0x296b(%rip), %rcx      # 0x7366
movq %rcx, 0x8(%rdi)
movl $0x1, 0x10(%rdi)
movb $0x0, 0x14(%rdi)
movb $0x1, 0x15(%rdi)
movb $0x1, 0x16(%rdi)
movb $0x1, 0x17(%rdi)
movb $0x1, 0x18(%rdi)
movb $0x0, 0x1c(%rdi)
movl $0x40, 0x20(%rdi)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg__keyboard_new
static scg_keyboard_t *scg__keyboard_new(void) {
    scg_keyboard_t *keyboard = malloc(sizeof(*keyboard));
    if (keyboard == NULL) {
        scg_log_error("Failed to allocate memory for keyboard");

        return NULL;
    }

    memset(keyboard->current_key_states, 0, sizeof(bool) * SDL_NUM_SCANCODES);
    memset(keyboard->last_frame_key_states, 0,
           sizeof(bool) * SDL_NUM_SCANCODES);

    return keyboard;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x400, %edi            # imm = 0x400
callq 0x22f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x53e2
xorl %edi, %edi
leaq 0x1cda(%rip), %rsi      # 0x7090
leaq 0x23a9(%rip), %rdx      # 0x7766
leaq 0x1cf2(%rip), %rcx      # 0x70b6
movl $0x7f1, %r8d            # imm = 0x7F1
leaq 0x23a7(%rip), %r9       # 0x7778
movb $0x0, %al
callq 0x22e0
movq $0x0, -0x8(%rbp)
jmp 0x5411
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x2100
movq -0x10(%rbp), %rdi
addq $0x200, %rdi            # imm = 0x200
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x2100
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg__screen_free
static void scg__screen_free(scg__screen_t *screen) {
    SDL_DestroyTexture(screen->sdl_texture);
    SDL_DestroyRenderer(screen->sdl_renderer);
    SDL_DestroyWindow(screen->sdl_window);

    free(screen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x2160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x20c0
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2030
movq -0x8(%rbp), %rdi
callq 0x2290
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg__mouse_new
static scg_mouse_t *scg__mouse_new(void) {
    scg_mouse_t *mouse = malloc(sizeof(*mouse));
    if (mouse == NULL) {
        scg_log_error("Failed to allocate memory for mouse");

        return NULL;
    }

    return mouse;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x14, %edi
callq 0x22f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x54c2
xorl %edi, %edi
leaq 0x1bfa(%rip), %rsi      # 0x7090
leaq 0x2302(%rip), %rdx      # 0x779f
leaq 0x1c12(%rip), %rcx      # 0x70b6
movl $0x805, %r8d            # imm = 0x805
leaq 0x22fd(%rip), %r9       # 0x77ae
movb $0x0, %al
callq 0x22e0
movq $0x0, -0x8(%rbp)
jmp 0x54ca
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)