struct Value *handle_localecho_command(args)
char *args;
{
  if (!*args)
    return newint_fl(local_echo(-1),
                     "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                     "outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/"
                     "heads/master/src/command.c",
                     260);
  else if (strcasecmp(args, "on") == 0)
    local_echo(1);
  else if (strcasecmp(args, "off") == 0)
    local_echo(0);
  return newint_fl(1,
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/"
                   "heads/master/src/command.c",
                   263);
}


x86 assembly (clang, -O0):
<handle_localecho_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1175 <handle_localecho_command+0x45>
mov    $0xffffffff,%edi
mov    $0x0,%al
call   1050 <local_echo@plt>
mov    %eax,%edi
lea    0xea2(%rip),%rsi
mov    $0x104,%edx
mov    $0x0,%al
call   1040 <newint_fl@plt>
cltq
mov    %rax,-0x8(%rbp)
jmp    11e9 <handle_localecho_command+0xb9>
mov    -0x10(%rbp),%rdi
lea    0xf0a(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    119f <handle_localecho_command+0x6f>
mov    $0x1,%edi
mov    $0x0,%al
call   1050 <local_echo@plt>
jmp    11c6 <handle_localecho_command+0x96>
mov    -0x10(%rbp),%rdi
lea    0xee3(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11c1 <handle_localecho_command+0x91>
xor    %edi,%edi
mov    $0x0,%al
call   1050 <local_echo@plt>
jmp    11c6 <handle_localecho_command+0x96>
jmp    11cb <handle_localecho_command+0x9b>
mov    $0x1,%edi
lea    0xe29(%rip),%rsi
mov    $0x107,%edx
mov    $0x0,%al
call   1040 <newint_fl@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_localecho_command>:
push   %rbx
cmpb   $0x0,(%rdi)
je     1160 <handle_localecho_command+0x30>
mov    %rdi,%rbx
lea    0xf4a(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     117c <handle_localecho_command+0x4c>
lea    0xf3d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
jne    1188 <handle_localecho_command+0x58>
xor    %edi,%edi
jmp    1181 <handle_localecho_command+0x51>
mov    $0xffffffff,%edi
xor    %eax,%eax
call   1050 <local_echo@plt>
lea    0xe8d(%rip),%rsi
mov    %eax,%edi
mov    $0x104,%edx
jmp    1199 <handle_localecho_command+0x69>
mov    $0x1,%edi
xor    %eax,%eax
call   1050 <local_echo@plt>
lea    0xe71(%rip),%rsi
mov    $0x1,%edi
mov    $0x107,%edx
xor    %eax,%eax
call   1040 <newint_fl@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
%struct.Value = type opaque
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/heads/master/src/command.c\00"
@.str.1 = [3 x i8] c"on\00"
@.str.2 = [4 x i8] c"off\00"
define %struct.Value* @handle_localecho_command(i8* %0) {
%2 = alloca %struct.Value*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @local_echo to i32 (i32, ...)*)(i32 -1)
%9 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 %8, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 260)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to %struct.Value*
store %struct.Value* %11, %struct.Value** %2
br label %30
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = call i32 @strcasecmp(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (i32, ...) bitcast (i32 (...)* @local_echo to i32 (i32, ...)*)(i32 1)
br label %25
18: ; preds = %12
%19 = load i8*, i8** %3
%20 = call i32 @strcasecmp(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 (i32, ...) bitcast (i32 (...)* @local_echo to i32 (i32, ...)*)(i32 0)
br label %24
24: ; preds = %22, %18
br label %25
25: ; preds = %24, %16
br label %26
26: ; preds = %25
%27 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 263)
%28 = sext i32 %27 to i64
%29 = inttoptr i64 %28 to %struct.Value*
store %struct.Value* %29, %struct.Value** %2
br label %30
30: ; preds = %26, %7
%31 = load %struct.Value*, %struct.Value** %2
ret %struct.Value* %31
}

LLVM IR (-O2):
%struct.Value = type opaque
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/heads/master/src/command.c\00"
@.str.1 = [3 x i8] c"on\00"
@.str.2 = [4 x i8] c"off\00"
define %struct.Value* @handle_localecho_command(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @local_echo to i32 (i32, ...)*)(i32 -1)
%6 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 %5, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 260)
br label %18
7: ; preds = %1
%8 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10, %7
%14 = phi i32 [ 1, %7 ], [ 0, %10 ]
%15 = tail call i32 (i32, ...) bitcast (i32 (...)* @local_echo to i32 (i32, ...)*)(i32 %14)
br label %16
16: ; preds = %13, %10
%17 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 263)
br label %18
18: ; preds = %16, %4
%19 = phi i32 [ %17, %16 ], [ %6, %4 ]
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to %struct.Value*
ret %struct.Value* %21
}