// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/display.c
// Function: panel_border
void
panel_putc(panel_t *p, int x, int y, font_t font, uint16_t c)
{
    x += p->x;
    y += p->y;
    if (x >= 0 && x < p->x + p->w && y >= 0 && y < p->y + p->h) {
        p->tiles[x][y].transparent = false;
        p->tiles[x][y].c = c;
        p->tiles[x][y].font = font;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl (%rdi), %edx
movl 0x8(%rdi), %ecx
leal -0x1(%rcx), %eax
cmpl $0x3, %ecx
jl 0x423d
movslq %edx, %rdx
movl 0x4(%rdi), %r8d
leal -0x1(%r8), %r9d
movl %eax, %r10d
movq %rdx, %r11
shlq $0x6, %r11
leaq (%r11,%r11,2), %r11
leaq (%r11,%r8,8), %rbx
addq $0xd3, %rbx
incq %rdx
decq %r10
movl $0xc0, %r14d
testq %rdx, %rdx
js 0x422d
testl %r8d, %r8d
setns %r15b
movl 0xc(%rdi), %ebp
testl %ebp, %ebp
setg %r12b
andb %r15b, %r12b
cmpb $0x1, %r12b
jne 0x4205
movb $0x0, -0x1(%rdi,%rbx)
movw $0x2500, -0x3(%rdi,%rbx) # imm = 0x2500
movl %esi, (%rdi,%rbx)
movl 0xc(%rdi), %ebp
addl %r9d, %ebp
js 0x422d
movl %ebp, %r15d
leaq (%rdi,%r15,8), %r15
movb $0x0, 0xd2(%r11,%r15)
movw $0x2500, 0xd0(%r11,%r15) # imm = 0x2500
movl %esi, 0xd3(%r11,%r15)
addq %r14, %r11
addq %r14, %rbx
incq %rdx
decq %r10
jne 0x41d5
movl (%rdi), %edx
movl 0xc(%rdi), %r9d
leal -0x1(%r9), %r8d
cmpl $0x3, %r9d
jl 0x42d7
movslq 0x4(%rdi), %r10
testl %edx, %edx
setns %bpl
testl %ecx, %ecx
setg %r11b
movl %edx, %r15d
addl %eax, %edx
movl %r8d, %ebx
andb %bpl, %r11b
incq %r10
leaq (%rdx,%rdx,2), %r14
shlq $0x6, %r14
addq %rdi, %r14
addq $0x18, %r14
leaq (%r15,%r15,2), %r15
shlq $0x6, %r15
addq %rdi, %r15
addq $0x18, %r15
decq %rbx
testq %r10, %r10
setns %bpl
andb %r11b, %bpl
cmpb $0x1, %bpl
jne 0x42b1
movb $0x0, -0x6(%r15,%r10,8)
movw $0x2502, -0x8(%r15,%r10,8) # imm = 0x2502
movl %esi, -0x5(%r15,%r10,8)
testl %edx, %edx
js 0x42cd
testq %r10, %r10
js 0x42cd
movb $0x0, -0x6(%r14,%r10,8)
movw $0x2502, -0x8(%r14,%r10,8) # imm = 0x2502
movl %esi, -0x5(%r14,%r10,8)
incq %r10
decq %rbx
jne 0x428e
movl (%rdi), %edx
movl 0x4(%rdi), %r10d
testl %edx, %edx
js 0x430e
testl %r9d, %r9d
jle 0x430e
testl %ecx, %ecx
jle 0x430e
testl %r10d, %r10d
js 0x430e
movl %edx, %r11d
leaq (%r11,%r11,2), %r11
shlq $0x6, %r11
addq %rdi, %r11
movb $0x0, 0x12(%r11,%r10,8)
movw $0x250c, 0x10(%r11,%r10,8) # imm = 0x250C
movl %esi, 0x13(%r11,%r10,8)
addl %edx, %eax
movl %eax, %r11d
testl %r9d, %r9d
jle 0x433f
testl %eax, %eax
js 0x433f
testl %r10d, %r10d
js 0x433f
leaq (%r11,%r11,2), %r9
shlq $0x6, %r9
addq %rdi, %r9
movb $0x0, 0x12(%r9,%r10,8)
movw $0x2510, 0x10(%r9,%r10,8) # imm = 0x2510
movl %esi, 0x13(%r9,%r10,8)
addl %r8d, %r10d
testl %edx, %edx
js 0x436f
testl %ecx, %ecx
jle 0x436f
testl %r10d, %r10d
js 0x436f
movl %edx, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x6, %rcx
addq %rdi, %rcx
movl %r10d, %edx
movb $0x0, 0x12(%rcx,%rdx,8)
movw $0x2514, 0x10(%rcx,%rdx,8) # imm = 0x2514
movl %esi, 0x13(%rcx,%rdx,8)
testl %eax, %eax
js 0x4396
testl %r10d, %r10d
js 0x4396
leaq (%r11,%r11,2), %rax
shlq $0x6, %rax
addq %rax, %rdi
movl %r10d, %eax
movb $0x0, 0x12(%rdi,%rax,8)
movw $0x2518, 0x10(%rdi,%rax,8) # imm = 0x2518
movl %esi, 0x13(%rdi,%rax,8)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq