// File: /workspace/github_c_makefile_star2_O2/algorithm-archivists[P]GathVL/src/objects/tex_string.cpp
// Function: tex_string::tex_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, vec, vec, double, color)
tex_string::tex_string(const std::string& str, vec location, vec size,
                       double rotation, color clr)
    : location(location), size(size), rotation(rotation), clr(clr) {

    texfile = string_generator();

    if (tex_to_png(str, texfile)) {
        std::cout << "Failed to make Latex png file." << std::endl;
        return;
    }

    std::string tmp = texfile + "png";
    image_data = stbi_load(tmp.c_str(), &width, &height, NULL, 4);

    if (!image_data) {
        std::cout << "The image " << tmp << " can't be opened." << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2758, %rsp           # imm = 0x2758
movq %rsi, %r15
movq %rdi, %rbx
andq $0x0, 0x18(%rdi)
xorps %xmm5, %xmm5
movups %xmm5, 0x8(%rdi)
leaq 0xd47c(%rip), %rax      # 0x25c10
movq %rax, (%rdi)
movaps 0x2790(%rsp), %xmm5
movaps 0x27a0(%rsp), %xmm6
movups %xmm5, 0x20(%rdi)
movups %xmm6, 0x30(%rdi)
movsd %xmm0, 0x40(%rdi)
movsd %xmm1, 0x48(%rdi)
movsd %xmm2, 0x50(%rdi)
movsd %xmm3, 0x58(%rdi)
movsd %xmm4, 0x60(%rdi)
leaq 0x68(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x78(%rdi), %rax
movq %rax, 0x68(%rdi)
andq $0x0, 0x70(%rdi)
movb $0x0, 0x78(%rdi)
leaq 0x13d0(%rsp), %rdi
callq 0x18fc4
leaq 0x13d0(%rsp), %rdi
callq 0x51d0
movl %eax, %esi
leaq 0x48(%rsp), %rdi
callq 0x19032
movabsq $0x7a00000061, %rax     # imm = 0x7A00000061
leaq 0x30(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x48(%rsp), %rsi
callq 0x1901a
movl %eax, %ebp
leaq 0x526c(%rip), %rsi      # 0x1da99
leaq 0x10(%rsp), %rdi
leaq 0x1(%rsp), %rdx
callq 0x6888
pushq $0xa
popq %rcx
movl %ebp, %eax
cltd
idivl %ecx
cmpl $-0x4, %edx
pushq $-0x5
popq %r14
cmovgel %edx, %r14d
addl $0x5, %r14d
leaq 0x30(%rsp), %r12
leaq 0x48(%rsp), %r13
leaq 0x10(%rsp), %rbp
subl $0x1, %r14d
jb 0x18880
movq %r12, %rdi
movq %r13, %rsi
callq 0x1901a
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5830
jmp 0x18862
leaq 0x5223(%rip), %rsi      # 0x1daaa
leaq 0x10(%rsp), %rdi
callq 0x5510
leaq 0x13d0(%rsp), %rdi
callq 0x19022
leaq 0x10(%rsp), %r12
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x53e0
movq %r12, %rdi
callq 0x5550
leaq 0x520e(%rip), %rdx      # 0x1dad0
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x18f8b
leaq 0x13d0(%rsp), %rdi
leaq 0x48(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x5100
leaq 0x48(%rsp), %rdi
callq 0x5550
leaq 0x524b(%rip), %rsi      # 0x1db40
leaq 0x13d0(%rsp), %rdi
pushq $0x60
popq %rdx
callq 0x53d0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x13d0(%rsp), %rdi
callq 0x53d0
leaq 0x5195(%rip), %rsi      # 0x1dab5
leaq 0x13d0(%rsp), %rdi
pushq $0xf
popq %rdx
callq 0x53d0
leaq 0x13d0(%rsp), %rdi
callq 0x5710
leaq 0x518a(%rip), %rsi      # 0x1dace
leaq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x6888
leaq 0x68(%rsp), %r12
leaq 0x5171(%rip), %rdx      # 0x1dad0
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x18f8b
leaq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %r15
pushq $0x2
popq %rdx
leaq 0x1(%rsp), %rcx
movq %r15, %rsi
callq 0x192aa
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x48, %rdi
callq 0x5550
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x1898a
leaq 0x511d(%rip), %rdi      # 0x1dac5
leaq 0x10(%rsp), %rsi
callq 0x19ec0
testl %eax, %eax
je 0x189d2
leaq 0x10(%rsp), %rdi
callq 0x192e4
leaq 0x13d0(%rsp), %rdi
callq 0x55d0
jmp 0x18b11
leaq 0x511f(%rip), %rsi      # 0x1daf8
leaq 0x1(%rsp), %rdx
movq %r15, %rdi
callq 0x6888
leaq 0x50a0(%rip), %rdx      # 0x1da8d
movq %r12, %r15
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x18f8b
leaq 0x88(%rsp), %r15
leaq 0x50c8(%rip), %rsi      # 0x1dad4
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0x6888
leaq 0xa8(%rsp), %r15
leaq 0x50af(%rip), %rsi      # 0x1dad7
leaq 0x6(%rsp), %rdx
movq %r15, %rdi
callq 0x6888
leaq 0xc8(%rsp), %r15
leaq 0x5098(%rip), %rsi      # 0x1dadc
leaq 0x5(%rsp), %rdx
movq %r15, %rdi
callq 0x6888
leaq 0xe8(%rsp), %r15
leaq 0x5080(%rip), %rsi      # 0x1dae0
leaq 0x4(%rsp), %rdx
movq %r15, %rdi
callq 0x6888
leaq 0x108(%rsp), %r15
leaq 0x5070(%rip), %rsi      # 0x1daec
leaq 0x3(%rsp), %rdx
movq %r15, %rdi
callq 0x6888
leaq 0x128(%rsp), %r15
leaq 0x5110(%rip), %rdx      # 0x1dba8
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x18f8b
leaq 0x30(%rsp), %rdi
leaq 0x48(%rsp), %rsi
pushq $0x8
popq %rdx
leaq 0x2(%rsp), %rcx
callq 0x192aa
movl $0xe0, %r14d
leaq (%rsp,%r14), %rdi
addq $0x48, %rdi
callq 0x5550
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x18ac2
leaq 0x500f(%rip), %rdi      # 0x1daef
leaq 0x30(%rsp), %rsi
callq 0x19ec0
movl %eax, %ebp
leaq 0x30(%rsp), %rdi
callq 0x192e4
leaq 0x10(%rsp), %rdi
callq 0x192e4
leaq 0x13d0(%rsp), %rdi
callq 0x55d0
testl %ebp, %ebp
je 0x18b3e
movq 0xd4a8(%rip), %rdi      # 0x25fc0
leaq 0x4f1e(%rip), %rsi      # 0x1da3d
callq 0x5480
movq %rax, %rdi
callq 0x57b0
addq $0x2758, %rsp           # imm = 0x2758
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5063(%rip), %rdx      # 0x1dba8
leaq 0x13d0(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x18f8b
movq 0x13d0(%rsp), %rdi
leaq 0x90(%rbx), %rsi
leaq 0x94(%rbx), %rdx
pushq $0x4
popq %r8
xorl %ecx, %ecx
callq 0x9448
movq %rax, 0x88(%rbx)
testq %rax, %rax
jne 0x18bbe
movq 0xd435(%rip), %rdi      # 0x25fc0
leaq 0x373d(%rip), %rsi      # 0x1c2cf
callq 0x5480
leaq 0x13d0(%rsp), %rsi
movq %rax, %rdi
callq 0x5240
leaq 0x4eae(%rip), %rsi      # 0x1da5c
movq %rax, %rdi
callq 0x5480
movq %rax, %rdi
callq 0x57b0
leaq 0x13d0(%rsp), %rdi
callq 0x5550
jmp 0x18b2c
jmp 0x18ca9
movq %rax, %r12
leaq 0x13d0(%rsp), %rdi
jmp 0x18c95
movq %rax, %r12
leaq 0x30(%rsp), %rdi
callq 0x192e4
jmp 0x18c50
movq %rax, %r12
movl $0xe0, %r14d
leaq (%rsp,%r14), %rdi
addq $0x48, %rdi
callq 0x5550
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x18bfd
movb $0x1, %al
jmp 0x18c27
jmp 0x18c22
jmp 0x18c22
jmp 0x18c22
jmp 0x18c22
jmp 0x18c22
movq %rax, %r12
xorl %eax, %eax
leaq 0x48(%rsp), %r14
cmpq %r15, %r14
sete %cl
testb %al, %al
jne 0x18c50
testb %cl, %cl
jne 0x18c50
addq $-0x20, %r15
movq %r15, %rdi
callq 0x5550
cmpq %r14, %r15
jne 0x18c3a
jmp 0x18c50
movq %rax, %r12
leaq 0x10(%rsp), %rdi
callq 0x192e4
jmp 0x18cb1
movq %rax, %r12
pushq $0x20
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x48, %rdi
callq 0x5550
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x18c63
jmp 0x18cb1
movq %rax, %r12
leaq 0x48(%rsp), %rdi
callq 0x5550
jmp 0x18cb1
jmp 0x18cae
movq %rax, %r12
leaq 0x48(%rsp), %rdi
callq 0x5550
jmp 0x18cda
jmp 0x18cc0
jmp 0x18ca4
jmp 0x18ca4
jmp 0x18ca9
movq %rax, %r12
jmp 0x18ccd
movq %rax, %r12
jmp 0x18cda
movq %rax, %r12
leaq 0x13d0(%rsp), %rdi
callq 0x55d0
jmp 0x18cda
movq %rax, %r12
leaq 0x10(%rsp), %rdi
callq 0x5550
leaq 0x13d0(%rsp), %rdi
callq 0x19022
movq 0x8(%rsp), %rdi
callq 0x5550
movq %rbx, %rdi
callq 0x69e6
movq %r12, %rdi
callq 0x5500