#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 */
struct group {
  int /*<<< orphan*/ gr_gid;
  int /*<<< orphan*/ gr_passwd;
  int /*<<< orphan*/ gr_name;
  int /*<<< orphan*/ gr_mem;
};

/* Variables and functions */
int /*<<< orphan*/ printfmtstrings(int /*<<< orphan*/, char *, char *, char *,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
void groupprint(const struct group *gr) {
  printfmtstrings(gr->gr_mem, ":", ",", "%s:%s:%u", gr->gr_name, gr->gr_passwd,
                  gr->gr_gid);
}


x86 assembly (clang, -O0):
<groupprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r9d
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
lea    0xec0(%rip),%rsi
lea    0xebb(%rip),%rdx
lea    0xeb6(%rip),%rcx
mov    %eax,(%rsp)
call   1030 <printfmtstrings@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<groupprint>:
push   %rax
mov    0xc(%rdi),%eax
mov    0x8(%rdi),%r8d
mov    (%rdi),%ecx
mov    0x4(%rdi),%r9d
mov    %ecx,(%rsp)
lea    0xed8(%rip),%rsi
lea    0xed3(%rip),%rdx
lea    0xece(%rip),%rcx
mov    %eax,%edi
call   1030 <printfmtstrings@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.group = type { i32, i32, i32, i32 }
@.str = [2 x i8] c":\00"
@.str.1 = [2 x i8] c",\00"
@.str.2 = [9 x i8] c"%s:%s:%u\00"
define void @groupprint(%struct.group* %0) {
%2 = alloca %struct.group*
store %struct.group* %0, %struct.group** %2
%3 = load %struct.group*, %struct.group** %2
%4 = getelementptr inbounds %struct.group, %struct.group* %3, i32 0, i32 3
%5 = load i32, i32* %4
%6 = load %struct.group*, %struct.group** %2
%7 = getelementptr inbounds %struct.group, %struct.group* %6, i32 0, i32 2
%8 = load i32, i32* %7
%9 = load %struct.group*, %struct.group** %2
%10 = getelementptr inbounds %struct.group, %struct.group* %9, i32 0, i32 1
%11 = load i32, i32* %10
%12 = load %struct.group*, %struct.group** %2
%13 = getelementptr inbounds %struct.group, %struct.group* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @printfmtstrings(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %11, i32 %14)
ret void
}

LLVM IR (-O2):
%struct.group = type { i32, i32, i32, i32 }
@.str = [2 x i8] c":\00"
@.str.1 = [2 x i8] c",\00"
@.str.2 = [9 x i8] c"%s:%s:%u\00"
define void @groupprint(%struct.group* nocapture %0) {
%2 = getelementptr inbounds %struct.group, %struct.group* %0, i64 0, i32 3
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.group, %struct.group* %0, i64 0, i32 2
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.group, %struct.group* %0, i64 0, i32 1
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.group, %struct.group* %0, i64 0, i32 0
%9 = load i32, i32* %8
%10 = tail call i32 @printfmtstrings(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7, i32 %9)
ret void
}