#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*/ get_check(char *);
int /*<<< orphan*/ msg_print(char *);
int /*<<< orphan*/ option_set_defaults();
int /*<<< orphan*/ prt(char *, int, int /*<<< orphan*/);
void do_cmd_reset_options(int dummy, const char *dummy2) {
  (void)dummy;
  (void)dummy2;
  prt("Command: Reset all options to defaults", 22, 0);
  if (!get_check("Do you really want to reset all options? "))
    return;
  option_set_defaults();
  msg_print("Done.");
}


x86 assembly (clang, -O0):
<do_cmd_reset_options>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x16,%esi
xor    %edx,%edx
call   1030 <prt@plt>
lea    0xebe(%rip),%rdi
call   1060 <get_check@plt>
cmp    $0x0,%eax
jne    117c <do_cmd_reset_options+0x3c>
jmp    118f <do_cmd_reset_options+0x4f>
mov    $0x0,%al
call   1050 <option_set_defaults@plt>
lea    0xec7(%rip),%rdi
call   1040 <msg_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_cmd_reset_options>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    $0x16,%esi
xor    %edx,%edx
call   1030 <prt@plt>
lea    0xecc(%rip),%rdi
call   1060 <get_check@plt>
test   %eax,%eax
je     1178 <do_cmd_reset_options+0x38>
xor    %eax,%eax
call   1050 <option_set_defaults@plt>
lea    0xedf(%rip),%rdi
pop    %rax
jmp    1040 <msg_print@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Command: Reset all options to defaults\00"
@.str.1 = [42 x i8] c"Do you really want to reset all options? \00"
@.str.2 = [6 x i8] c"Done.\00"
define void @do_cmd_reset_options(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @prt(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 22, i32 0)
%8 = call i32 @get_check(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
br label %14
11: ; preds = %2
%12 = call i32 (...) @option_set_defaults()
%13 = call i32 @msg_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %11, %10
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Command: Reset all options to defaults\00"
@.str.1 = [42 x i8] c"Do you really want to reset all options? \00"
@.str.2 = [6 x i8] c"Done.\00"
define void @do_cmd_reset_options(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @prt(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 22, i32 0)
%4 = tail call i32 @get_check(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 (...) @option_set_defaults()
%8 = tail call i32 @msg_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %2, %6
ret void
}