#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 Printfloat4(char *, float);
scalar_t__ sprintf(char *, char *);
int Print3dnow(char *s, char *f) {
  int n;
  n = Printfloat4(s, *(float *)(f + 4));
  n += sprintf(s + n, ", ");
  n += Printfloat4(s + n, *(float *)f);
  return n;
}


x86 assembly (clang, -O0):
<Print3dnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1030 <Printfloat4@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
lea    0xea9(%rip),%rsi
call   1040 <sprintf@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <Printfloat4@plt>
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print3dnow>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
movss  0x4(%rsi),%xmm0
call   1030 <Printfloat4@plt>
movslq %eax,%rbx
lea    (%r15,%rbx,1),%rdi
lea    0xebd(%rip),%rsi
call   1040 <sprintf@plt>
add    %eax,%ebx
movslq %ebx,%rbx
add    %rbx,%r15
movss  (%r14),%xmm0
mov    %r15,%rdi
call   1030 <Printfloat4@plt>
add    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c", \00"
define i32 @Print3dnow(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
%11 = call i32 @Printfloat4(i8* %6, float %10)
store i32 %11, i32* %5
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = call i64 @sprintf(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = add nsw i64 %18, %16
%20 = trunc i64 %19 to i32
store i32 %20, i32* %5
%21 = load i8*, i8** %3
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8*, i8** %4
%26 = bitcast i8* %25 to float*
%27 = load float, float* %26
%28 = call i32 @Printfloat4(i8* %24, float %27)
%29 = load i32, i32* %5
%30 = add nsw i32 %29, %28
store i32 %30, i32* %5
%31 = load i32, i32* %5
ret i32 %31
}

LLVM IR (-O2):
@.str = [3 x i8] c", \00"
define i32 @Print3dnow(i8* %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 4
%4 = bitcast i8* %3 to float*
%5 = load float, float* %4
%6 = tail call i32 @Printfloat4(i8* %0, float %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = tail call i64 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = trunc i64 %9 to i32
%11 = add i32 %6, %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = bitcast i8* %1 to float*
%15 = load float, float* %14
%16 = tail call i32 @Printfloat4(i8* %13, float %15)
%17 = add nsw i32 %11, %16
ret i32 %17
}