#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 pbc_wmessage {
  int dummy;
};
struct pbc_env {
  int dummy;
};

/* Variables and functions */
struct pbc_wmessage *pbc_wmessage_new(struct pbc_env *, char *);
int /*<<< orphan*/ pbc_wmessage_real(struct pbc_wmessage *, char *, double);
struct pbc_wmessage *test_wmessage(struct pbc_env *env) {
  struct pbc_wmessage *msg = pbc_wmessage_new(env, "real");
  pbc_wmessage_real(msg, "f", 1.0);
  pbc_wmessage_real(msg, "d", 4.0);
  return msg;
}


x86 assembly (clang, -O0):
<test_wmessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <pbc_wmessage_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeca(%rip),%rsi
movsd  0xeb5(%rip),%xmm0
call   1040 <pbc_wmessage_real@plt>
mov    -0x10(%rbp),%rdi
lea    0xeb4(%rip),%rsi
movsd  0xe95(%rip),%xmm0
call   1040 <pbc_wmessage_real@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_wmessage>:
push   %rbx
lea    0xee8(%rip),%rsi
call   1030 <pbc_wmessage_new@plt>
mov    %rax,%rbx
lea    0xede(%rip),%rsi
movsd  0xec1(%rip),%xmm0
mov    %rax,%rdi
call   1040 <pbc_wmessage_real@plt>
lea    0xec9(%rip),%rsi
movsd  0xeb2(%rip),%xmm0
mov    %rbx,%rdi
call   1040 <pbc_wmessage_real@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.pbc_wmessage = type { i32 }
%struct.pbc_env = type { i32 }
@.str = [5 x i8] c"real\00"
@.str.1 = [2 x i8] c"f\00"
@.str.2 = [2 x i8] c"d\00"
define %struct.pbc_wmessage* @test_wmessage(%struct.pbc_env* %0) {
%2 = alloca %struct.pbc_env*
%3 = alloca %struct.pbc_wmessage*
store %struct.pbc_env* %0, %struct.pbc_env** %2
%4 = load %struct.pbc_env*, %struct.pbc_env** %2
%5 = call %struct.pbc_wmessage* @pbc_wmessage_new(%struct.pbc_env* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store %struct.pbc_wmessage* %5, %struct.pbc_wmessage** %3
%6 = load %struct.pbc_wmessage*, %struct.pbc_wmessage** %3
%7 = call i32 @pbc_wmessage_real(%struct.pbc_wmessage* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00)
%8 = load %struct.pbc_wmessage*, %struct.pbc_wmessage** %3
%9 = call i32 @pbc_wmessage_real(%struct.pbc_wmessage* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), double 4.000000e+00)
%10 = load %struct.pbc_wmessage*, %struct.pbc_wmessage** %3
ret %struct.pbc_wmessage* %10
}

LLVM IR (-O2):
%struct.pbc_wmessage = type { i32 }
%struct.pbc_env = type { i32 }
@.str = [5 x i8] c"real\00"
@.str.1 = [2 x i8] c"f\00"
@.str.2 = [2 x i8] c"d\00"
define %struct.pbc_wmessage* @test_wmessage(%struct.pbc_env* %0) {
%2 = tail call %struct.pbc_wmessage* @pbc_wmessage_new(%struct.pbc_env* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @pbc_wmessage_real(%struct.pbc_wmessage* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00)
%4 = tail call i32 @pbc_wmessage_real(%struct.pbc_wmessage* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), double 4.000000e+00)
ret %struct.pbc_wmessage* %2
}