#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 Token {
  int dummy;
};
struct BayesSignature {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_Token(struct BayesSignature *, struct Token *);
int /*<<< orphan*/ add_threshold(struct BayesSignature *, double);
struct BayesSignature *new_Signature_i(int, char *);
struct Token *new_Token(char *, double, int);
int /*<<< orphan*/ print_signature(struct BayesSignature *);
void test3() {
  struct BayesSignature *signature;
  signature = new_Signature_i(2, "6f0c36d455f86922ae69808d00bcbadd");
  struct Token *t1, *t2;
  t1 = new_Token("test", 0.7, 4);
  t2 = new_Token("tada", 0.6, 4);
  add_Token(signature, t1);
  add_Token(signature, t2);
  add_threshold(signature, 2.04);
  print_signature(signature);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x2,%edi
lea    0xeb4(%rip),%rsi
call   1030 <new_Signature_i@plt>
mov    %rax,-0x8(%rbp)
lea    0xec5(%rip),%rdi
movsd  0xe94(%rip),%xmm0
mov    $0x4,%esi
call   1040 <new_Token@plt>
mov    %rax,-0x10(%rbp)
lea    0xead(%rip),%rdi
movsd  0xe6f(%rip),%xmm0
mov    $0x4,%esi
call   1040 <new_Token@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <add_Token@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <add_Token@plt>
mov    -0x8(%rbp),%rdi
movsd  0xe33(%rip),%xmm0
call   1050 <add_threshold@plt>
mov    -0x8(%rbp),%rdi
call   1060 <print_signature@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %r15
push   %r14
push   %rbx
lea    0xebc(%rip),%rsi
mov    $0x2,%edi
call   1030 <new_Signature_i@plt>
mov    %rax,%rbx
lea    0xec9(%rip),%rdi
movsd  0xe88(%rip),%xmm0
mov    $0x4,%esi
call   1040 <new_Token@plt>
mov    %rax,%r14
lea    0xeb2(%rip),%rdi
movsd  0xe74(%rip),%xmm0
mov    $0x4,%esi
call   1040 <new_Token@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <add_Token@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <add_Token@plt>
movsd  0xe51(%rip),%xmm0
mov    %rbx,%rdi
call   1050 <add_threshold@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <print_signature@plt>

LLVM IR (-O0):
%struct.BayesSignature = type { i32 }
%struct.Token = type { i32 }
@.str = [33 x i8] c"6f0c36d455f86922ae69808d00bcbadd\00"
@.str.1 = [5 x i8] c"test\00"
@.str.2 = [5 x i8] c"tada\00"
define void @test3() {
%1 = alloca %struct.BayesSignature*
%2 = alloca %struct.Token*
%3 = alloca %struct.Token*
%4 = call %struct.BayesSignature* @new_Signature_i(i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
store %struct.BayesSignature* %4, %struct.BayesSignature** %1
%5 = call %struct.Token* @new_Token(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double 0x3FE6666666666666, i32 4)
store %struct.Token* %5, %struct.Token** %2
%6 = call %struct.Token* @new_Token(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double 6.000000e-01, i32 4)
store %struct.Token* %6, %struct.Token** %3
%7 = load %struct.BayesSignature*, %struct.BayesSignature** %1
%8 = load %struct.Token*, %struct.Token** %2
%9 = call i32 @add_Token(%struct.BayesSignature* %7, %struct.Token* %8)
%10 = load %struct.BayesSignature*, %struct.BayesSignature** %1
%11 = load %struct.Token*, %struct.Token** %3
%12 = call i32 @add_Token(%struct.BayesSignature* %10, %struct.Token* %11)
%13 = load %struct.BayesSignature*, %struct.BayesSignature** %1
%14 = call i32 @add_threshold(%struct.BayesSignature* %13, double 2.040000e+00)
%15 = load %struct.BayesSignature*, %struct.BayesSignature** %1
%16 = call i32 @print_signature(%struct.BayesSignature* %15)
ret void
}

LLVM IR (-O2):
%struct.BayesSignature = type { i32 }
%struct.Token = type { i32 }
@.str = [33 x i8] c"6f0c36d455f86922ae69808d00bcbadd\00"
@.str.1 = [5 x i8] c"test\00"
@.str.2 = [5 x i8] c"tada\00"
define void @test3() {
%1 = tail call %struct.BayesSignature* @new_Signature_i(i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call %struct.Token* @new_Token(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double 0x3FE6666666666666, i32 4)
%3 = tail call %struct.Token* @new_Token(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double 6.000000e-01, i32 4)
%4 = tail call i32 @add_Token(%struct.BayesSignature* %1, %struct.Token* %2)
%5 = tail call i32 @add_Token(%struct.BayesSignature* %1, %struct.Token* %3)
%6 = tail call i32 @add_threshold(%struct.BayesSignature* %1, double 2.040000e+00)
%7 = tail call i32 @print_signature(%struct.BayesSignature* %1)
ret void
}