#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 */
float atof(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcmp(char *, char *);
int BASM_PP_ExpandBinary(char *larg, char *op, char *rarg, char *dst) {
  float f, g, h;
  int i, j, k;
  f = atof(larg);
  g = atof(rarg);
  i = 0;
  if (!strcmp(op, "+")) {
    h = f + g;
    i = 1;
  }
  if (!strcmp(op, "-")) {
    h = f - g;
    i = 1;
  }
  if (!strcmp(op, "*")) {
    h = f * g;
    i = 1;
  }
  if (!strcmp(op, "/")) {
    if (g == 0)
      return (-1);
    h = f / g;
    i = 1;
  }
  if (i) {
    if (((int)h) == h) {
      sprintf(dst, "%d", (int)h);
      return (0);
    }
    sprintf(dst, "%f", h);
    return (0);
  }
  i = f;
  j = g;
  if (i != f)
    return (-1);
  if (j != g)
    return (-1);
  if (!strcmp(op, "&")) {
    sprintf(dst, "%d", i & j);
    return (0);
  }
  if (!strcmp(op, "|")) {
    sprintf(dst, "%d", i | j);
    return (0);
  }
  if (!strcmp(op, "^")) {
    sprintf(dst, "%d", i ^ j);
    return (0);
  }
  if (!strcmp(op, "&&")) {
    sprintf(dst, "%d", i && j);
    return (0);
  }
  if (!strcmp(op, "||")) {
    sprintf(dst, "%d", i || j);
    return (0);
  }
  return (-1);
}


x86 assembly (clang, -O0):
<BASM_PP_ExpandBinary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    119a <BASM_PP_ExpandBinary+0x6a>
movss  -0x2c(%rbp),%xmm0
addss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe5d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11c9 <BASM_PP_ExpandBinary+0x99>
movss  -0x2c(%rbp),%xmm0
subss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe30(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11f8 <BASM_PP_ExpandBinary+0xc8>
movss  -0x2c(%rbp),%xmm0
mulss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe03(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    124a <BASM_PP_ExpandBinary+0x11a>
movss  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1234 <BASM_PP_ExpandBinary+0x104>
jp     1234 <BASM_PP_ExpandBinary+0x104>
movl   $0xffffffff,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
movss  -0x2c(%rbp),%xmm0
divss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
je     12af <BASM_PP_ExpandBinary+0x17f>
cvttss2si -0x34(%rbp),%eax
cvtsi2ss %eax,%xmm0
ucomiss -0x34(%rbp),%xmm0
jne    128e <BASM_PP_ExpandBinary+0x15e>
jp     128e <BASM_PP_ExpandBinary+0x15e>
mov    -0x28(%rbp),%rdi
cvttss2si -0x34(%rbp),%edx
lea    0xd8b(%rip),%rsi
call   1050 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
mov    -0x28(%rbp),%rdi
cvttss2si -0x34(%rbp),%edx
lea    0xd6d(%rip),%rsi
call   1050 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
cvttss2si -0x2c(%rbp),%eax
mov    %eax,-0x38(%rbp)
cvttss2si -0x30(%rbp),%eax
mov    %eax,-0x3c(%rbp)
cvtsi2ssl -0x38(%rbp),%xmm0
ucomiss -0x2c(%rbp),%xmm0
jne    12d9 <BASM_PP_ExpandBinary+0x1a9>
jp     12d9 <BASM_PP_ExpandBinary+0x1a9>
jmp    12e5 <BASM_PP_ExpandBinary+0x1b5>
movl   $0xffffffff,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
cvtsi2ssl -0x3c(%rbp),%xmm0
ucomiss -0x30(%rbp),%xmm0
jne    12ff <BASM_PP_ExpandBinary+0x1cf>
jp     12ff <BASM_PP_ExpandBinary+0x1cf>
jmp    130b <BASM_PP_ExpandBinary+0x1db>
movl   $0xffffffff,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
mov    -0x18(%rbp),%rdi
lea    0xcfb(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1346 <BASM_PP_ExpandBinary+0x216>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%edx
and    -0x3c(%rbp),%edx
lea    0xcd3(%rip),%rsi
call   1050 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
mov    -0x18(%rbp),%rdi
lea    0xcc3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1381 <BASM_PP_ExpandBinary+0x251>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%edx
or     -0x3c(%rbp),%edx
lea    0xc98(%rip),%rsi
call   1050 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
mov    -0x18(%rbp),%rdi
lea    0xc82(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    13bc <BASM_PP_ExpandBinary+0x28c>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%edx
xor    -0x3c(%rbp),%edx
lea    0xc5d(%rip),%rsi
call   1050 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
mov    -0x18(%rbp),%rdi
lea    0xc49(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    141a <BASM_PP_ExpandBinary+0x2ea>
mov    -0x28(%rbp),%rax
mov    %rax,-0x50(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x38(%rbp)
mov    %al,-0x41(%rbp)
je     13f6 <BASM_PP_ExpandBinary+0x2c6>
cmpl   $0x0,-0x3c(%rbp)
setne  %al
mov    %al,-0x41(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x41(%rbp),%al
and    $0x1,%al
movzbl %al,%edx
lea    0xbff(%rip),%rsi
call   1050 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
mov    -0x18(%rbp),%rdi
lea    0xbee(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1478 <BASM_PP_ExpandBinary+0x348>
mov    -0x28(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x38(%rbp)
mov    %al,-0x51(%rbp)
jne    1454 <BASM_PP_ExpandBinary+0x324>
cmpl   $0x0,-0x3c(%rbp)
setne  %al
mov    %al,-0x51(%rbp)
mov    -0x60(%rbp),%rdi
mov    -0x51(%rbp),%al
and    $0x1,%al
movzbl %al,%edx
lea    0xba1(%rip),%rsi
call   1050 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147f <BASM_PP_ExpandBinary+0x34f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BASM_PP_ExpandBinary>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %rcx,%r14
mov    %rdx,%rbp
mov    %rsi,%rbx
call   1030 <atof@plt>
movaps %xmm0,(%rsp)
mov    %rbp,%rdi
call   1030 <atof@plt>
movaps %xmm0,0x10(%rsp)
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    %eax,%r15d
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    %eax,%r12d
lea    0xe7e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    %eax,%ebp
lea    0xe6f(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11be <BASM_PP_ExpandBinary+0x8e>
movaps 0x10(%rsp),%xmm2
test   %r12d,%r12d
je     11e3 <BASM_PP_ExpandBinary+0xb3>
movaps (%rsp),%xmm1
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
test   %ebp,%ebp
je     11f2 <BASM_PP_ExpandBinary+0xc2>
jmp    11f9 <BASM_PP_ExpandBinary+0xc9>
mov    $0xffffffff,%ebp
xorps  %xmm0,%xmm0
movaps 0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    11d6 <BASM_PP_ExpandBinary+0xa6>
jnp    12e9 <BASM_PP_ExpandBinary+0x1b9>
movaps (%rsp),%xmm0
divss  %xmm1,%xmm0
jmp    12bd <BASM_PP_ExpandBinary+0x18d>
movaps (%rsp),%xmm1
movaps %xmm1,%xmm0
subss  %xmm2,%xmm0
test   %ebp,%ebp
jne    11f9 <BASM_PP_ExpandBinary+0xc9>
movaps %xmm1,%xmm0
mulss  %xmm2,%xmm0
je     12bd <BASM_PP_ExpandBinary+0x18d>
test   %r12d,%r12d
je     12bd <BASM_PP_ExpandBinary+0x18d>
test   %r15d,%r15d
je     12bd <BASM_PP_ExpandBinary+0x18d>
cvttps2dq %xmm1,%xmm0
cvtdq2ps %xmm0,%xmm0
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%ebp
jne    12e9 <BASM_PP_ExpandBinary+0x1b9>
jp     12e9 <BASM_PP_ExpandBinary+0x1b9>
cvttps2dq %xmm2,%xmm0
cvtdq2ps %xmm0,%xmm0
ucomiss %xmm0,%xmm2
jne    12e9 <BASM_PP_ExpandBinary+0x1b9>
jp     12e9 <BASM_PP_ExpandBinary+0x1b9>
cvttss2si %xmm1,%r12d
cvttss2si %xmm2,%r15d
lea    0xdbe(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     12f8 <BASM_PP_ExpandBinary+0x1c8>
lea    0xdaa(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     12fd <BASM_PP_ExpandBinary+0x1cd>
lea    0xd8d(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1302 <BASM_PP_ExpandBinary+0x1d2>
lea    0xd7c(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1314 <BASM_PP_ExpandBinary+0x1e4>
lea    0xd6c(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    12e9 <BASM_PP_ExpandBinary+0x1b9>
xor    %edx,%edx
or     %r15d,%r12d
setne  %dl
jmp    12cf <BASM_PP_ExpandBinary+0x19f>
cvttss2si %xmm0,%edx
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    12d8 <BASM_PP_ExpandBinary+0x1a8>
jp     12d8 <BASM_PP_ExpandBinary+0x1a8>
lea    0xd32(%rip),%rsi
jmp    12df <BASM_PP_ExpandBinary+0x1af>
lea    0xd2c(%rip),%rsi
mov    %r14,%rdi
call   1050 <sprintf@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
and    %r12d,%r15d
jmp    1305 <BASM_PP_ExpandBinary+0x1d5>
or     %r12d,%r15d
jmp    1305 <BASM_PP_ExpandBinary+0x1d5>
xor    %r12d,%r15d
lea    0xcfc(%rip),%rsi
mov    %r14,%rdi
mov    %r15d,%edx
jmp    12e2 <BASM_PP_ExpandBinary+0x1b2>
test   %r12d,%r12d
setne  %al
test   %r15d,%r15d
setne  %cl
and    %al,%cl
movzbl %cl,%edx
jmp    12cf <BASM_PP_ExpandBinary+0x19f>

LLVM IR (-O0):
@.str = [2 x i8] c"+\00"
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [2 x i8] c"*\00"
@.str.3 = [2 x i8] c"/\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [2 x i8] c"&\00"
@.str.7 = [2 x i8] c"|\00"
@.str.8 = [2 x i8] c"^\00"
@.str.9 = [3 x i8] c"&&\00"
@.str.10 = [3 x i8] c"||\00"
define i32 @BASM_PP_ExpandBinary(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%16 = load i8*, i8** %6
%17 = call float @atof(i8* %16)
store float %17, float* %10
%18 = load i8*, i8** %8
%19 = call float @atof(i8* %18)
store float %19, float* %11
store i32 0, i32* %13
%20 = load i8*, i8** %7
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %27, label %23
23: ; preds = %4
%24 = load float, float* %10
%25 = load float, float* %11
%26 = fadd float %24, %25
store float %26, float* %12
store i32 1, i32* %13
br label %27
27: ; preds = %23, %4
%28 = load i8*, i8** %7
%29 = call i32 @strcmp(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp ne i32 %29, 0
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = load float, float* %10
%33 = load float, float* %11
%34 = fsub float %32, %33
store float %34, float* %12
store i32 1, i32* %13
br label %35
35: ; preds = %31, %27
%36 = load i8*, i8** %7
%37 = call i32 @strcmp(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp ne i32 %37, 0
br i1 %38, label %43, label %39
39: ; preds = %35
%40 = load float, float* %10
%41 = load float, float* %11
%42 = fmul float %40, %41
store float %42, float* %12
store i32 1, i32* %13
br label %43
43: ; preds = %39, %35
%44 = load i8*, i8** %7
%45 = call i32 @strcmp(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%46 = icmp ne i32 %45, 0
br i1 %46, label %55, label %47
47: ; preds = %43
%48 = load float, float* %11
%49 = fcmp oeq float %48, 0.000000e+00
br i1 %49, label %50, label %51
50: ; preds = %47
store i32 -1, i32* %5
br label %151
51: ; preds = %47
%52 = load float, float* %10
%53 = load float, float* %11
%54 = fdiv float %52, %53
store float %54, float* %12
store i32 1, i32* %13
br label %55
55: ; preds = %51, %43
%56 = load i32, i32* %13
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %74
58: ; preds = %55
%59 = load float, float* %12
%60 = fptosi float %59 to i32
%61 = sitofp i32 %60 to float
%62 = load float, float* %12
%63 = fcmp oeq float %61, %62
br i1 %63, label %64, label %69
64: ; preds = %58
%65 = load i8*, i8** %9
%66 = load float, float* %12
%67 = fptosi float %66 to i32
%68 = call i32 @sprintf(i8* %65, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %67)
store i32 0, i32* %5
br label %151
69: ; preds = %58
%70 = load i8*, i8** %9
%71 = load float, float* %12
%72 = fptosi float %71 to i32
%73 = call i32 @sprintf(i8* %70, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %72)
store i32 0, i32* %5
br label %151
74: ; preds = %55
%75 = load float, float* %10
%76 = fptosi float %75 to i32
store i32 %76, i32* %13
%77 = load float, float* %11
%78 = fptosi float %77 to i32
store i32 %78, i32* %14
%79 = load i32, i32* %13
%80 = sitofp i32 %79 to float
%81 = load float, float* %10
%82 = fcmp une float %80, %81
br i1 %82, label %83, label %84
83: ; preds = %74
store i32 -1, i32* %5
br label %151
84: ; preds = %74
%85 = load i32, i32* %14
%86 = sitofp i32 %85 to float
%87 = load float, float* %11
%88 = fcmp une float %86, %87
br i1 %88, label %89, label %90
89: ; preds = %84
store i32 -1, i32* %5
br label %151
90: ; preds = %84
%91 = load i8*, i8** %7
%92 = call i32 @strcmp(i8* %91, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%93 = icmp ne i32 %92, 0
br i1 %93, label %100, label %94
94: ; preds = %90
%95 = load i8*, i8** %9
%96 = load i32, i32* %13
%97 = load i32, i32* %14
%98 = and i32 %96, %97
%99 = call i32 @sprintf(i8* %95, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %98)
store i32 0, i32* %5
br label %151
100: ; preds = %90
%101 = load i8*, i8** %7
%102 = call i32 @strcmp(i8* %101, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%103 = icmp ne i32 %102, 0
br i1 %103, label %110, label %104
104: ; preds = %100
%105 = load i8*, i8** %9
%106 = load i32, i32* %13
%107 = load i32, i32* %14
%108 = or i32 %106, %107
%109 = call i32 @sprintf(i8* %105, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %108)
store i32 0, i32* %5
br label %151
110: ; preds = %100
%111 = load i8*, i8** %7
%112 = call i32 @strcmp(i8* %111, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%113 = icmp ne i32 %112, 0
br i1 %113, label %120, label %114
114: ; preds = %110
%115 = load i8*, i8** %9
%116 = load i32, i32* %13
%117 = load i32, i32* %14
%118 = xor i32 %116, %117
%119 = call i32 @sprintf(i8* %115, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %118)
store i32 0, i32* %5
br label %151
120: ; preds = %110
%121 = load i8*, i8** %7
%122 = call i32 @strcmp(i8* %121, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%123 = icmp ne i32 %122, 0
br i1 %123, label %135, label %124
124: ; preds = %120
%125 = load i8*, i8** %9
%126 = load i32, i32* %13
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %131
128: ; preds = %124
%129 = load i32, i32* %14
%130 = icmp ne i32 %129, 0
br label %131
131: ; preds = %128, %124
%132 = phi i1 [ false, %124 ], [ %130, %128 ]
%133 = zext i1 %132 to i32
%134 = call i32 @sprintf(i8* %125, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %133)
store i32 0, i32* %5
br label %151
135: ; preds = %120
%136 = load i8*, i8** %7
%137 = call i32 @strcmp(i8* %136, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%138 = icmp ne i32 %137, 0
br i1 %138, label %150, label %139
139: ; preds = %135
%140 = load i8*, i8** %9
%141 = load i32, i32* %13
%142 = icmp ne i32 %141, 0
br i1 %142, label %146, label %143
143: ; preds = %139
%144 = load i32, i32* %14
%145 = icmp ne i32 %144, 0
br label %146
146: ; preds = %143, %139
%147 = phi i1 [ true, %139 ], [ %145, %143 ]
%148 = zext i1 %147 to i32
%149 = call i32 @sprintf(i8* %140, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %148)
store i32 0, i32* %5
br label %151
150: ; preds = %135
store i32 -1, i32* %5
br label %151
151: ; preds = %150, %146, %131, %114, %104, %94, %89, %83, %69, %64, %50
%152 = load i32, i32* %5
ret i32 %152
}

LLVM IR (-O2):
@.str = [2 x i8] c"+\00"
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [2 x i8] c"*\00"
@.str.3 = [2 x i8] c"/\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [2 x i8] c"&\00"
@.str.7 = [2 x i8] c"|\00"
@.str.8 = [2 x i8] c"^\00"
@.str.9 = [3 x i8] c"&&\00"
@.str.10 = [3 x i8] c"||\00"
define i32 @BASM_PP_ExpandBinary(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture writeonly %3) {
%5 = tail call float @atof(i8* %0)
%6 = tail call float @atof(i8* %2)
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %4
%16 = fcmp oeq float %6, 0.000000e+00
br i1 %16, label %81, label %17
17: ; preds = %15
%18 = fdiv float %5, %6
br label %28
19: ; preds = %4
%20 = fmul float %5, %6
%21 = fsub float %5, %6
%22 = fadd float %5, %6
%23 = select i1 %8, float %22, float undef
%24 = select i1 %10, float %21, float %23
%25 = select i1 %12, float %20, float %24
%26 = select i1 %12, i1 true, i1 %10
%27 = select i1 %26, i1 true, i1 %8
br i1 %27, label %28, label %37
28: ; preds = %17, %19
%29 = phi float [ %18, %17 ], [ %25, %19 ]
%30 = fptosi float %29 to i32
%31 = sitofp i32 %30 to float
%32 = fcmp oeq float %29, %31
br i1 %32, label %33, label %35
33: ; preds = %28
%34 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %30)
br label %81
35: ; preds = %28
%36 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %30)
br label %81
37: ; preds = %19
%38 = fptosi float %5 to i32
%39 = fptosi float %6 to i32
%40 = sitofp i32 %38 to float
%41 = fcmp une float %5, %40
%42 = sitofp i32 %39 to float
%43 = fcmp une float %6, %42
%44 = select i1 %41, i1 true, i1 %43
br i1 %44, label %81, label %45
45: ; preds = %37
%46 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %45
%49 = and i32 %39, %38
%50 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %49)
br label %81
51: ; preds = %45
%52 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = or i32 %39, %38
%56 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %55)
br label %81
57: ; preds = %51
%58 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %57
%61 = xor i32 %39, %38
%62 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %61)
br label %81
63: ; preds = %57
%64 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %72
66: ; preds = %63
%67 = icmp ne i32 %38, 0
%68 = icmp ne i32 %39, 0
%69 = select i1 %67, i1 %68, i1 false
%70 = zext i1 %69 to i32
%71 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %70)
br label %81
72: ; preds = %63
%73 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %81
75: ; preds = %72
%76 = icmp ne i32 %38, 0
%77 = icmp ne i32 %39, 0
%78 = select i1 %76, i1 true, i1 %77
%79 = zext i1 %78 to i32
%80 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %79)
br label %81
81: ; preds = %72, %37, %15, %75, %66, %60, %54, %48, %35, %33
%82 = phi i32 [ 0, %33 ], [ 0, %35 ], [ 0, %75 ], [ 0, %66 ], [ 0, %60 ], [ 0, %54 ], [ 0, %48 ], [ -1, %15 ], [ -1, %37 ], [ -1, %72 ]
ret i32 %82
}