#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*/ indigoFree(int);
int indigoLoadMoleculeFromString(char *);
int indigoLoadReactionSmartsFromString(char *);
char *indigoSmiles(int);
int /*<<< orphan*/ indigoTransform(int, int);
int /*<<< orphan*/ printf(char *, char *);
void testTransform() {
  int molecule = indigoLoadMoleculeFromString("[O-][C+]1CCCC1[N+]([O-])=O");
  int transformation =
      indigoLoadReactionSmartsFromString("[*;+:1]-[*;-:2]>>[*:1]=[*:2]");
  printf("Input: %s\n", indigoSmiles(molecule));
  indigoTransform(transformation, molecule);
  printf("Output: %s\n", indigoSmiles(molecule));
  indigoFree(molecule);
  indigoFree(transformation);
}


x86 assembly (clang, -O0):
<testTransform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rdi
call   1040 <indigoLoadMoleculeFromString@plt>
mov    %eax,-0x4(%rbp)
lea    0xe9d(%rip),%rdi
call   1080 <indigoLoadReactionSmartsFromString@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1070 <indigoSmiles@plt>
mov    %rax,%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <indigoTransform@plt>
mov    -0x4(%rbp),%edi
call   1070 <indigoSmiles@plt>
mov    %rax,%rsi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1060 <indigoFree@plt>
mov    -0x8(%rbp),%edi
call   1060 <indigoFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTransform>:
push   %rbp
push   %rbx
push   %rax
lea    0xe96(%rip),%rdi
call   1040 <indigoLoadMoleculeFromString@plt>
mov    %eax,%ebx
lea    0xea3(%rip),%rdi
call   1080 <indigoLoadReactionSmartsFromString@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1070 <indigoSmiles@plt>
lea    0xeab(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <indigoTransform@plt>
mov    %ebx,%edi
call   1070 <indigoSmiles@plt>
lea    0xe97(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1060 <indigoFree@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <indigoFree@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"[O-][C+]1CCCC1[N+]([O-])=O\00"
@.str.1 = [29 x i8] c"[*;+:1]-[*;-:2]>>[*:1]=[*:2]\00"
@.str.2 = [11 x i8] c"Input: %s\0A\00"
@.str.3 = [12 x i8] c"Output: %s\0A\00"
define void @testTransform() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @indigoLoadMoleculeFromString(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %1
%4 = call i32 @indigoLoadReactionSmartsFromString(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = call i8* @indigoSmiles(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = call i32 @indigoTransform(i32 %8, i32 %9)
%11 = load i32, i32* %1
%12 = call i8* @indigoSmiles(i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %12)
%14 = load i32, i32* %1
%15 = call i32 @indigoFree(i32 %14)
%16 = load i32, i32* %2
%17 = call i32 @indigoFree(i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"[O-][C+]1CCCC1[N+]([O-])=O\00"
@.str.1 = [29 x i8] c"[*;+:1]-[*;-:2]>>[*:1]=[*:2]\00"
@.str.2 = [11 x i8] c"Input: %s\0A\00"
@.str.3 = [12 x i8] c"Output: %s\0A\00"
define void @testTransform() {
%1 = tail call i32 @indigoLoadMoleculeFromString(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @indigoLoadReactionSmartsFromString(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i8* @indigoSmiles(i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%5 = tail call i32 @indigoTransform(i32 %2, i32 %1)
%6 = tail call i8* @indigoSmiles(i32 %1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%8 = tail call i32 @indigoFree(i32 %1)
%9 = tail call i32 @indigoFree(i32 %2)
ret void
}