#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 */
int /*<<< orphan*/ cmockery_abort_at_missing_check();
int /*<<< orphan*/ cmockery_enable_generate_suppression();
int /*<<< orphan*/ cmockery_run_disabled_tests();
scalar_t__ strcmp(char *, char *);
void cmockery_parse_arguments(int argc, char **argv) {
  int i;
  for (i = 0; i < argc; i++) {
    if (strcmp(argv[i], "--cmockery_abort_at_missing_check") == 0) {
      cmockery_abort_at_missing_check();
    } else if (strcmp(argv[i], "--cmockery_generate_suppression") == 0) {
      cmockery_enable_generate_suppression();
    } else if (strcmp(argv[i], "--cmockery_run_disabled_tests") == 0) {
      cmockery_run_disabled_tests();
    }
  }
}


x86 assembly (clang, -O0):
<cmockery_parse_arguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1204 <cmockery_parse_arguments+0xc4>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe8b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1190 <cmockery_parse_arguments+0x50>
mov    $0x0,%al
call   1060 <cmockery_abort_at_missing_check@plt>
jmp    11f1 <cmockery_parse_arguments+0xb1>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe7f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11be <cmockery_parse_arguments+0x7e>
mov    $0x0,%al
call   1050 <cmockery_enable_generate_suppression@plt>
jmp    11ec <cmockery_parse_arguments+0xac>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe71(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11e7 <cmockery_parse_arguments+0xa7>
mov    $0x0,%al
call   1030 <cmockery_run_disabled_tests@plt>
jmp    11ec <cmockery_parse_arguments+0xac>
jmp    11f1 <cmockery_parse_arguments+0xb1>
jmp    11f6 <cmockery_parse_arguments+0xb6>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <cmockery_parse_arguments+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmockery_parse_arguments>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    11c9 <cmockery_parse_arguments+0x89>
mov    %rsi,%rbx
mov    %edi,%r13d
lea    0xea4(%rip),%r14
lea    0xebf(%rip),%r15
lea    0xed8(%rip),%r12
xor    %ebp,%ebp
jmp    1180 <cmockery_parse_arguments+0x40>
xchg   %ax,%ax
xor    %eax,%eax
call   1060 <cmockery_abort_at_missing_check@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
je     11c9 <cmockery_parse_arguments+0x89>
mov    (%rbx,%rbp,8),%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1170 <cmockery_parse_arguments+0x30>
mov    (%rbx,%rbp,8),%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11c0 <cmockery_parse_arguments+0x80>
mov    (%rbx,%rbp,8),%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    1177 <cmockery_parse_arguments+0x37>
xor    %eax,%eax
call   1030 <cmockery_run_disabled_tests@plt>
jmp    1177 <cmockery_parse_arguments+0x37>
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <cmockery_enable_generate_suppression@plt>
jmp    1177 <cmockery_parse_arguments+0x37>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"--cmockery_abort_at_missing_check\00"
@.str.1 = [32 x i8] c"--cmockery_generate_suppression\00"
@.str.2 = [30 x i8] c"--cmockery_run_disabled_tests\00"
define void @cmockery_parse_arguments(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %5
br label %6
6: ; preds = %43, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %46
10: ; preds = %6
%11 = load i8**, i8*** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
%15 = load i8*, i8** %14
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %10
%19 = call i32 (...) @cmockery_abort_at_missing_check()
br label %42
20: ; preds = %10
%21 = load i8**, i8*** %4
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %20
%29 = call i32 (...) @cmockery_enable_generate_suppression()
br label %41
30: ; preds = %20
%31 = load i8**, i8*** %4
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %30
%39 = call i32 (...) @cmockery_run_disabled_tests()
br label %40
40: ; preds = %38, %30
br label %41
41: ; preds = %40, %28
br label %42
42: ; preds = %41, %18
br label %43
43: ; preds = %42
%44 = load i32, i32* %5
%45 = add nsw i32 %44, 1
store i32 %45, i32* %5
br label %6
46: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"--cmockery_abort_at_missing_check\00"
@.str.1 = [32 x i8] c"--cmockery_generate_suppression\00"
@.str.2 = [30 x i8] c"--cmockery_run_disabled_tests\00"
define void @cmockery_parse_arguments(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %29
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %26
%7 = phi i64 [ 0, %4 ], [ %27, %26 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %6
%13 = tail call i32 (...) @cmockery_abort_at_missing_check()
br label %26
14: ; preds = %6
%15 = load i8*, i8** %8
%16 = tail call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = tail call i32 (...) @cmockery_enable_generate_suppression()
br label %26
20: ; preds = %14
%21 = load i8*, i8** %8
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = tail call i32 (...) @cmockery_run_disabled_tests()
br label %26
26: ; preds = %12, %20, %24, %18
%27 = add nuw nsw i64 %7, 1
%28 = icmp eq i64 %27, %5
br i1 %28, label %29, label %6
29: ; preds = %26, %2
ret void
}