#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 */
scalar_t__ strcmp(char *, char *);
const int get_scheduler(int argc, char *argv[]) {
  if (argc < 3) {
    return 1;
  } else if (strcmp(argv[2], "true") == 0) {
    return 1;
  } else if (strcmp(argv[2], "false") == 0) {
    return 0;
  }
}


x86 assembly (clang, -O0):
<get_scheduler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1135 <get_scheduler+0x25>
movl   $0x1,-0x4(%rbp)
jmp    1193 <get_scheduler+0x83>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xebc(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115f <get_scheduler+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1193 <get_scheduler+0x83>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe97(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1189 <get_scheduler+0x79>
movl   $0x0,-0x4(%rbp)
jmp    1193 <get_scheduler+0x83>
jmp    118e <get_scheduler+0x7e>
jmp    1193 <get_scheduler+0x83>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_scheduler>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
cmp    $0x3,%edi
jl     1148 <get_scheduler+0x38>
mov    %rsi,%r14
mov    0x10(%rsi),%rdi
lea    0xed4(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1148 <get_scheduler+0x38>
mov    0x10(%r14),%rdi
lea    0xec4(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i32 @get_scheduler(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %25
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 1, i32* %3
br label %25
16: ; preds = %9
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %16
store i32 0, i32* %3
br label %25
23: ; preds = %16
br label %24
24: ; preds = %23
br label %25
25: ; preds = %8, %15, %22, %24
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i32 @get_scheduler(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i8*, i8** %5
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %9, %4, %2
%13 = phi i32 [ 1, %2 ], [ 1, %4 ], [ 0, %9 ]
ret i32 %13
}