#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 */
double atof(char *);
double get_atom_tfactor(int);
int /*<<< orphan*/ include_member(int, int, int);
int init_for(int);
int next_for(int);
int real_relation(char *, double, double);
void tfactor_field(int from_set, int to_set, char *operator, char * value) {
  int o, t;
  double fvalue, tfactor;
  fvalue = atof(value);
  for (o = init_for(from_set); o != 0; o = next_for(from_set)) {
    tfactor = get_atom_tfactor(o);
    t = real_relation(operator, tfactor, fvalue);
    if (t)
      include_member(to_set, 6, o);
  }
}


x86 assembly (clang, -O0):
<tfactor_field>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <init_for@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     11eb <tfactor_field+0x8b>
mov    -0x1c(%rbp),%edi
call   1050 <get_atom_tfactor@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1060 <real_relation@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     11d6 <tfactor_field+0x76>
mov    -0x8(%rbp),%edi
mov    -0x1c(%rbp),%edx
mov    $0x6,%esi
call   1070 <include_member@plt>
jmp    11db <tfactor_field+0x7b>
mov    -0x4(%rbp),%edi
call   1080 <next_for@plt>
mov    %eax,-0x1c(%rbp)
jmp    118f <tfactor_field+0x2f>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tfactor_field>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %esi,%r14d
mov    %edi,%ebp
mov    %rcx,%rdi
call   1040 <atof@plt>
movsd  %xmm0,(%rsp)
mov    %ebp,%edi
call   1030 <init_for@plt>
test   %eax,%eax
je     11c6 <tfactor_field+0x66>
mov    %eax,%ebx
jmp    119d <tfactor_field+0x3d>
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1080 <next_for@plt>
mov    %eax,%ebx
test   %eax,%eax
je     11c6 <tfactor_field+0x66>
mov    %ebx,%edi
call   1050 <get_atom_tfactor@plt>
mov    %r15,%rdi
movsd  (%rsp),%xmm1
call   1060 <real_relation@plt>
test   %eax,%eax
je     1190 <tfactor_field+0x30>
mov    %r14d,%edi
mov    $0x6,%esi
mov    %ebx,%edx
call   1070 <include_member@plt>
jmp    1190 <tfactor_field+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @tfactor_field(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%13 = load i8*, i8** %8
%14 = call double @atof(i8* %13)
store double %14, double* %11
%15 = load i32, i32* %5
%16 = call i32 @init_for(i32 %15)
store i32 %16, i32* %9
br label %17
17: ; preds = %34, %4
%18 = load i32, i32* %9
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %37
20: ; preds = %17
%21 = load i32, i32* %9
%22 = call double @get_atom_tfactor(i32 %21)
store double %22, double* %12
%23 = load i8*, i8** %7
%24 = load double, double* %12
%25 = load double, double* %11
%26 = call i32 @real_relation(i8* %23, double %24, double %25)
store i32 %26, i32* %10
%27 = load i32, i32* %10
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %20
%30 = load i32, i32* %6
%31 = load i32, i32* %9
%32 = call i32 @include_member(i32 %30, i32 6, i32 %31)
br label %33
33: ; preds = %29, %20
br label %34
34: ; preds = %33
%35 = load i32, i32* %5
%36 = call i32 @next_for(i32 %35)
store i32 %36, i32* %9
br label %17
37: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @tfactor_field(i32 %0, i32 %1, i8* %2, i8* nocapture %3) {
%5 = tail call double @atof(i8* %3)
%6 = tail call i32 @init_for(i32 %0)
%7 = icmp eq i32 %6, 0
br i1 %7, label %18, label %8
8: ; preds = %4, %15
%9 = phi i32 [ %16, %15 ], [ %6, %4 ]
%10 = tail call double @get_atom_tfactor(i32 %9)
%11 = tail call i32 @real_relation(i8* %2, double %10, double %5)
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %8
%14 = tail call i32 @include_member(i32 %1, i32 6, i32 %9)
br label %15
15: ; preds = %8, %13
%16 = tail call i32 @next_for(i32 %0)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %8
18: ; preds = %15, %4
ret void
}