#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 *, ...);
void *printargs(void *args) {
  void **l;
  int *a;
  float *b;
  char *c;
  size_t i, na, nb;
  l = (void **)args;
  a = l[0];
  na = (size_t)(uintptr_t)l[1];
  b = l[2];
  nb = (size_t)(uintptr_t)l[3];
  c = l[4];
  printf("a: ");
  for (i = 0; i < na; i++)
    printf("%d ", a[i]);
  printf("\n");
  printf("b: ");
  for (i = 0; i < nb; i++)
    printf("%.2f ", b[i]);
  printf("\n");
  printf("c: %s\n", c);
  return NULL;
}


x86 assembly (clang, -O0):
<printargs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x28(%rbp)
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x38(%rbp),%rax
jae    11ad <printargs+0x9d>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1175 <printargs+0x65>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x40(%rbp),%rax
jae    120f <printargs+0xff>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe15(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11d1 <printargs+0xc1>
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printargs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    (%rdi),%rbx
mov    0x8(%rdi),%r13
mov    0x10(%rdi),%r15
mov    0x18(%rdi),%r12
mov    0x20(%rdi),%rax
mov    %rax,(%rsp)
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r13,%r13
je     1187 <printargs+0x67>
cmp    $0x2,%r13
mov    $0x1,%ebp
cmovae %r13,%rbp
lea    0xe9b(%rip),%r13
xor    %r14d,%r14d
nopl   0x0(%rax)
mov    (%rbx,%r14,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14
cmp    %r14,%rbp
jne    1170 <printargs+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r12,%r12
je     11dd <printargs+0xbd>
cmp    $0x2,%r12
mov    $0x1,%ebx
cmovae %r12,%rbx
xor    %ebp,%ebp
lea    0xe52(%rip),%r12
nopw   0x0(%rax,%rax,1)
movss  (%r15,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    11c0 <printargs+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe24(%rip),%rdi
mov    (%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"a: \00"
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [4 x i8] c"b: \00"
@.str.4 = [6 x i8] c"%.2f \00"
@.str.5 = [7 x i8] c"c: %s\0A\00"
define i8* @printargs(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
%4 = alloca i32*
%5 = alloca float*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i8* %0, i8** %2
%10 = load i8*, i8** %2
%11 = bitcast i8* %10 to i8**
store i8** %11, i8*** %3
%12 = load i8**, i8*** %3
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = bitcast i8* %14 to i32*
store i32* %15, i32** %4
%16 = load i8**, i8*** %3
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = ptrtoint i8* %18 to i64
store i64 %19, i64* %8
%20 = load i8**, i8*** %3
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
%23 = bitcast i8* %22 to float*
store float* %23, float** %5
%24 = load i8**, i8*** %3
%25 = getelementptr inbounds i8*, i8** %24, i64 3
%26 = load i8*, i8** %25
%27 = ptrtoint i8* %26 to i64
store i64 %27, i64* %9
%28 = load i8**, i8*** %3
%29 = getelementptr inbounds i8*, i8** %28, i64 4
%30 = load i8*, i8** %29
store i8* %30, i8** %6
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %7
br label %32
32: ; preds = %42, %1
%33 = load i64, i64* %7
%34 = load i64, i64* %8
%35 = icmp ult i64 %33, %34
br i1 %35, label %36, label %45
36: ; preds = %32
%37 = load i32*, i32** %4
%38 = load i64, i64* %7
%39 = getelementptr inbounds i32, i32* %37, i64 %38
%40 = load i32, i32* %39
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %40)
br label %42
42: ; preds = %36
%43 = load i64, i64* %7
%44 = add i64 %43, 1
store i64 %44, i64* %7
br label %32
45: ; preds = %32
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i64 0, i64* %7
br label %48
48: ; preds = %59, %45
%49 = load i64, i64* %7
%50 = load i64, i64* %9
%51 = icmp ult i64 %49, %50
br i1 %51, label %52, label %62
52: ; preds = %48
%53 = load float*, float** %5
%54 = load i64, i64* %7
%55 = getelementptr inbounds float, float* %53, i64 %54
%56 = load float, float* %55
%57 = fpext float %56 to double
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %57)
br label %59
59: ; preds = %52
%60 = load i64, i64* %7
%61 = add i64 %60, 1
store i64 %61, i64* %7
br label %48
62: ; preds = %48
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%64 = load i8*, i8** %6
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %64)
ret i8* null
}

LLVM IR (-O2):
@.str = [4 x i8] c"a: \00"
@.str.1 = [4 x i8] c"%d \00"
@.str.3 = [4 x i8] c"b: \00"
@.str.4 = [6 x i8] c"%.2f \00"
@.str.5 = [7 x i8] c"c: %s\0A\00"
define noalias i8* @printargs(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32**
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i8, i8* %0, i64 8
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %0, i64 16
%8 = bitcast i8* %7 to float**
%9 = load float*, float** %8
%10 = getelementptr inbounds i8, i8* %0, i64 24
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
%13 = ptrtoint i8* %12 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 32
%15 = bitcast i8* %14 to i8**
%16 = load i8*, i8** %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i8* %6, null
br i1 %18, label %29, label %19
19: ; preds = %1
%20 = ptrtoint i8* %6 to i64
%21 = call i64 @llvm.umax.i64(i64 %20, i64 1)
br label %22
22: ; preds = %19, %22
%23 = phi i64 [ %27, %22 ], [ 0, %19 ]
%24 = getelementptr inbounds i32, i32* %3, i64 %23
%25 = load i32, i32* %24
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %25)
%27 = add nuw i64 %23, 1
%28 = icmp eq i64 %27, %21
br i1 %28, label %29, label %22
29: ; preds = %22, %1
%30 = tail call i32 @putchar(i32 10)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%32 = icmp eq i8* %12, null
br i1 %32, label %43, label %33
33: ; preds = %29
%34 = call i64 @llvm.umax.i64(i64 %13, i64 1)
br label %35
35: ; preds = %33, %35
%36 = phi i64 [ %41, %35 ], [ 0, %33 ]
%37 = getelementptr inbounds float, float* %9, i64 %36
%38 = load float, float* %37
%39 = fpext float %38 to double
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %39)
%41 = add nuw i64 %36, 1
%42 = icmp eq i64 %41, %34
br i1 %42, label %43, label %35
43: ; preds = %35, %29
%44 = tail call i32 @putchar(i32 10)
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %16)
ret i8* null
}