#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float const, float const, float const,
                          float const, char const *, float);
void svg_line(const char *color, const float *p1, const float *p2,
              float thick) {
  printf("<line x1=\"%fpx\" y1=\"%fpx\" x2=\"%fpx\" y2=\"%fpx\" "
         "style=\"stroke:%s;stroke-width=%.1f;fill:none\"/>\n",
         p1[0], -p1[1], p2[0], -p2[1], color, thick);
}


x86 assembly (clang, -O0):
<svg_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm3
movd   %xmm3,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm3
mov    -0x8(%rbp),%rsi
movss  -0x1c(%rbp),%xmm4
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svg_line>:
movaps %xmm0,%xmm4
mov    %rdi,%rax
movss  (%rsi),%xmm0
movss  0x4(%rsi),%xmm1
movaps 0xeda(%rip),%xmm5
xorps  %xmm5,%xmm1
movss  (%rdx),%xmm2
movss  0x4(%rdx),%xmm3
xorps  %xmm5,%xmm3
lea    0xed4(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [95 x i8] c"<line x1=\22%fpx\22 y1=\22%fpx\22 x2=\22%fpx\22 y2=\22%fpx\22 style=\22stroke:%s;stroke-width=%.1f;fill:none\22/>\0A\00"
define void @svg_line(i8* %0, float* %1, float* %2, float %3) {
%5 = alloca i8*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float
store i8* %0, i8** %5
store float* %1, float** %6
store float* %2, float** %7
store float %3, float* %8
%9 = load float*, float** %6
%10 = getelementptr inbounds float, float* %9, i64 0
%11 = load float, float* %10
%12 = load float*, float** %6
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fneg float %14
%16 = load float*, float** %7
%17 = getelementptr inbounds float, float* %16, i64 0
%18 = load float, float* %17
%19 = load float*, float** %7
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fneg float %21
%23 = load i8*, i8** %5
%24 = load float, float* %8
%25 = call i32 @printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), float %11, float %15, float %18, float %22, i8* %23, float %24)
ret void
}

LLVM IR (-O2):
@.str = [95 x i8] c"<line x1=\22%fpx\22 y1=\22%fpx\22 x2=\22%fpx\22 y2=\22%fpx\22 style=\22stroke:%s;stroke-width=%.1f;fill:none\22/>\0A\00"
define void @svg_line(i8* %0, float* nocapture %1, float* nocapture %2, float %3) {
%5 = load float, float* %1
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = fneg float %7
%9 = load float, float* %2
%10 = getelementptr inbounds float, float* %2, i64 1
%11 = load float, float* %10
%12 = fneg float %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), float %5, float %8, float %9, float %12, i8* %0, float %3)
ret void
}