struct session *do_if(struct session *ses, char *arg) {
  char left[10000], true[10000], false[10000], temp[10000];
  arg = get_arg_in_braces(arg, left, 0);
  arg = get_arg_in_braces(arg, true, 1);
  arg = get_arg_in_braces(arg, false, 1);
  if (*left == 0 || *true == 0) {
    tintin_printf2(ses, "#SYNTAX: #IF {expression} {true} {false}");
  } else {
    substitute(ses, left, temp, (1 << 1) | (1 << 2));
    if (mathexp(ses, temp)) {
      ses = parse_input(ses, true);
    } else if (*false) {
      ses = parse_input(ses, false);
    }
  }
  return ses;
}


x86 assembly (clang, -O0):
<do_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x2720(%rbp),%rsi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <get_arg_in_braces@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x4e30(%rbp),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <get_arg_in_braces@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x7540(%rbp),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <get_arg_in_braces@plt>
cltq
mov    %rax,-0x10(%rbp)
movsbl -0x2720(%rbp),%eax
cmp    $0x0,%eax
je     11d7 <do_if+0x87>
movsbl -0x4e30(%rbp),%eax
cmp    $0x0,%eax
jne    11ee <do_if+0x9e>
mov    -0x8(%rbp),%rdi
lea    0xe1e(%rip),%rsi
mov    $0x0,%al
call   1050 <tintin_printf2@plt>
jmp    1273 <do_if+0x123>
mov    -0x8(%rbp),%rdi
lea    -0x2720(%rbp),%rsi
lea    -0x9c50(%rbp),%rdx
mov    $0x6,%ecx
mov    $0x0,%al
call   1070 <substitute@plt>
mov    -0x8(%rbp),%rdi
lea    -0x9c50(%rbp),%rsi
mov    $0x0,%al
call   1060 <mathexp@plt>
cmp    $0x0,%eax
je     1244 <do_if+0xf4>
mov    -0x8(%rbp),%rdi
lea    -0x4e30(%rbp),%rsi
mov    $0x0,%al
call   1040 <parse_input@plt>
cltq
mov    %rax,-0x8(%rbp)
jmp    126e <do_if+0x11e>
cmpb   $0x0,-0x7540(%rbp)
je     1269 <do_if+0x119>
mov    -0x8(%rbp),%rdi
lea    -0x7540(%rbp),%rsi
mov    $0x0,%al
call   1040 <parse_input@plt>
cltq
mov    %rax,-0x8(%rbp)
jmp    126e <do_if+0x11e>
jmp    1273 <do_if+0x123>
mov    -0x8(%rbp),%rax
add    $0x9c50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_if>:
push   %r14
push   %rbx
sub    $0x9c48,%rsp
mov    %rsi,%rax
mov    %rdi,%rbx
lea    0x4e20(%rsp),%rsi
mov    %rax,%rdi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <get_arg_in_braces@plt>
movslq %eax,%rdi
lea    0x2710(%rsp),%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <get_arg_in_braces@plt>
movslq %eax,%rdi
mov    %rsp,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <get_arg_in_braces@plt>
cmpb   $0x0,0x4e20(%rsp)
je     11ee <do_if+0x9e>
cmpb   $0x0,0x2710(%rsp)
je     11ee <do_if+0x9e>
lea    0x4e20(%rsp),%rsi
lea    0x7530(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x6,%ecx
xor    %eax,%eax
call   1070 <substitute@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <mathexp@plt>
test   %eax,%eax
je     1201 <do_if+0xb1>
lea    0x2710(%rsp),%rsi
jmp    120a <do_if+0xba>
lea    0xe0b(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <tintin_printf2@plt>
jmp    1217 <do_if+0xc7>
cmpb   $0x0,(%rsp)
je     1217 <do_if+0xc7>
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <parse_input@plt>
movslq %eax,%rbx
mov    %rbx,%rax
add    $0x9c48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.session = type opaque
@.str = [41 x i8] c"#SYNTAX: #IF {expression} {true} {false}\00"
define %struct.session* @do_if(%struct.session* %0, i8* %1) {
%3 = alloca %struct.session*
%4 = alloca i8*
%5 = alloca [10000 x i8]
%6 = alloca [10000 x i8]
%7 = alloca [10000 x i8]
%8 = alloca [10000 x i8]
store %struct.session* %0, %struct.session** %3
store i8* %1, i8** %4
%9 = load i8*, i8** %4
%10 = getelementptr inbounds [10000 x i8], [10000 x i8]* %5, i64 0, i64 0
%11 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @get_arg_in_braces to i32 (i8*, i8*, i32, ...)*)(i8* %9, i8* %10, i32 0)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = getelementptr inbounds [10000 x i8], [10000 x i8]* %6, i64 0, i64 0
%16 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @get_arg_in_braces to i32 (i8*, i8*, i32, ...)*)(i8* %14, i8* %15, i32 1)
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %4
%19 = load i8*, i8** %4
%20 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%21 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @get_arg_in_braces to i32 (i8*, i8*, i32, ...)*)(i8* %19, i8* %20, i32 1)
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i8*
store i8* %23, i8** %4
%24 = getelementptr inbounds [10000 x i8], [10000 x i8]* %5, i64 0, i64 0
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 0
br i1 %27, label %33, label %28
28: ; preds = %2
%29 = getelementptr inbounds [10000 x i8], [10000 x i8]* %6, i64 0, i64 0
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %28, %2
%34 = load %struct.session*, %struct.session** %3
%35 = call i32 (%struct.session*, i8*, ...) bitcast (i32 (...)* @tintin_printf2 to i32 (%struct.session*, i8*, ...)*)(%struct.session* %34, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %63
36: ; preds = %28
%37 = load %struct.session*, %struct.session** %3
%38 = getelementptr inbounds [10000 x i8], [10000 x i8]* %5, i64 0, i64 0
%39 = getelementptr inbounds [10000 x i8], [10000 x i8]* %8, i64 0, i64 0
%40 = call i32 (%struct.session*, i8*, i8*, i32, ...) bitcast (i32 (...)* @substitute to i32 (%struct.session*, i8*, i8*, i32, ...)*)(%struct.session* %37, i8* %38, i8* %39, i32 6)
%41 = load %struct.session*, %struct.session** %3
%42 = getelementptr inbounds [10000 x i8], [10000 x i8]* %8, i64 0, i64 0
%43 = call i32 (%struct.session*, i8*, ...) bitcast (i32 (...)* @mathexp to i32 (%struct.session*, i8*, ...)*)(%struct.session* %41, i8* %42)
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %51
45: ; preds = %36
%46 = load %struct.session*, %struct.session** %3
%47 = getelementptr inbounds [10000 x i8], [10000 x i8]* %6, i64 0, i64 0
%48 = call i32 (%struct.session*, i8*, ...) bitcast (i32 (...)* @parse_input to i32 (%struct.session*, i8*, ...)*)(%struct.session* %46, i8* %47)
%49 = sext i32 %48 to i64
%50 = inttoptr i64 %49 to %struct.session*
store %struct.session* %50, %struct.session** %3
br label %62
51: ; preds = %36
%52 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%53 = load i8, i8* %52
%54 = icmp ne i8 %53, 0
br i1 %54, label %55, label %61
55: ; preds = %51
%56 = load %struct.session*, %struct.session** %3
%57 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%58 = call i32 (%struct.session*, i8*, ...) bitcast (i32 (...)* @parse_input to i32 (%struct.session*, i8*, ...)*)(%struct.session* %56, i8* %57)
%59 = sext i32 %58 to i64
%60 = inttoptr i64 %59 to %struct.session*
store %struct.session* %60, %struct.session** %3
br label %61
61: ; preds = %55, %51
br label %62
62: ; preds = %61, %45
br label %63
63: ; preds = %62, %33
%64 = load %struct.session*, %struct.session** %3
ret %struct.session* %64
}

LLVM IR (-O2):
%struct.session = type opaque
@.str = [41 x i8] c"#SYNTAX: #IF {expression} {true} {false}\00"
define %struct.session* @do_if(%struct.session* %0, i8* %1) {
%3 = alloca [10000 x i8]
%4 = alloca [10000 x i8]
%5 = alloca [10000 x i8]
%6 = alloca [10000 x i8]
%7 = getelementptr inbounds [10000 x i8], [10000 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [10000 x i8], [10000 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [10000 x i8], [10000 x i8]* %6, i64 0, i64 0
%11 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @get_arg_in_braces to i32 (i8*, i8*, i32, ...)*)(i8* %1, i8* %7, i32 0)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
%14 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @get_arg_in_braces to i32 (i8*, i8*, i32, ...)*)(i8* %13, i8* %8, i32 1)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
%17 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @get_arg_in_braces to i32 (i8*, i8*, i32, ...)*)(i8* %16, i8* %9, i32 1)
%18 = load i8, i8* %7
%19 = icmp eq i8 %18, 0
%20 = load i8, i8* %8
%21 = icmp eq i8 %20, 0
%22 = select i1 %19, i1 true, i1 %21
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 (%struct.session*, i8*, ...) bitcast (i32 (...)* @tintin_printf2 to i32 (%struct.session*, i8*, ...)*)(%struct.session* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %40
25: ; preds = %2
%26 = call i32 (%struct.session*, i8*, i8*, i32, ...) bitcast (i32 (...)* @substitute to i32 (%struct.session*, i8*, i8*, i32, ...)*)(%struct.session* %0, i8* %7, i8* %10, i32 6)
%27 = call i32 (%struct.session*, i8*, ...) bitcast (i32 (...)* @mathexp to i32 (%struct.session*, i8*, ...)*)(%struct.session* %0, i8* %10)
%28 = icmp eq i32 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %25
%30 = call i32 (%struct.session*, i8*, ...) bitcast (i32 (...)* @parse_input to i32 (%struct.session*, i8*, ...)*)(%struct.session* %0, i8* %8)
%31 = sext i32 %30 to i64
%32 = inttoptr i64 %31 to %struct.session*
br label %40
33: ; preds = %25
%34 = load i8, i8* %9
%35 = icmp eq i8 %34, 0
br i1 %35, label %40, label %36
36: ; preds = %33
%37 = call i32 (%struct.session*, i8*, ...) bitcast (i32 (...)* @parse_input to i32 (%struct.session*, i8*, ...)*)(%struct.session* %0, i8* %9)
%38 = sext i32 %37 to i64
%39 = inttoptr i64 %38 to %struct.session*
br label %40
40: ; preds = %29, %36, %33, %23
%41 = phi %struct.session* [ %0, %23 ], [ %32, %29 ], [ %39, %36 ], [ %0, %33 ]
ret %struct.session* %41
}