#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char const *, int, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
int strlen(char const *);
void __getopt_msg(const char *a, const char *b, const char *c, size_t l) {
  FILE *f = stderr;
  fputs(a, f);
  fwrite(b, strlen(b), 1, f);
  fwrite(c, 1, l, f);
  putc('\n', f);
}


x86 assembly (clang, -O0):
<__getopt_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
mov    -0x28(%rbp),%rcx
mov    $0x1,%edx
call   1060 <fwrite@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x1,%esi
call   1060 <fwrite@plt>
mov    -0x28(%rbp),%rsi
mov    $0xa,%edi
call   1050 <putc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getopt_msg>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    0x2e88(%rip),%rax
mov    (%rax),%rbx
mov    %rbx,%rsi
call   1040 <fputs@plt>
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    $0x1,%edx
mov    %r12,%rdi
mov    %eax,%esi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <putc@plt>

LLVM IR (-O0):
@stderr = global i32* null
define void @__getopt_msg(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%10 = load i32*, i32** @stderr
store i32* %10, i32** %9
%11 = load i8*, i8** %5
%12 = load i32*, i32** %9
%13 = call i32 @fputs(i8* %11, i32* %12)
%14 = load i8*, i8** %6
%15 = load i8*, i8** %6
%16 = call i32 @strlen(i8* %15)
%17 = load i32*, i32** %9
%18 = call i32 @fwrite(i8* %14, i32 %16, i64 1, i32* %17)
%19 = load i8*, i8** %7
%20 = load i64, i64* %8
%21 = load i32*, i32** %9
%22 = call i32 @fwrite(i8* %19, i32 1, i64 %20, i32* %21)
%23 = load i32*, i32** %9
%24 = call i32 @putc(i8 signext 10, i32* %23)
ret void
}

LLVM IR (-O2):
@stderr = global i32* null
define void @__getopt_msg(i8* nocapture %0, i8* %1, i8* nocapture %2, i64 %3) {
%5 = load i32*, i32** @stderr
%6 = tail call i32 @fputs(i8* %0, i32* %5)
%7 = tail call i32 @strlen(i8* %1)
%8 = tail call i32 @fwrite(i8* %1, i32 %7, i64 1, i32* %5)
%9 = tail call i32 @fwrite(i8* %2, i32 1, i64 %3, i32* %5)
%10 = tail call i32 @putc(i8 signext 10, i32* %5)
ret void
}