#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*/ print_message(char *);
int /*<<< orphan*/ print_message_number(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int sweet_bread_main(char double_size, char manual_bake) {
  char temp_value = '\0';
  int temp_time = 35;
  if (double_size = 'y') {
    temp_time = 70;
  }
  print_message(
      "******************** Creating Sweet Bread ********************");
  if (double_size == 'n' && manual_bake == 'n') {
    print_message("Selected Options: N/A");
  } else if (double_size == 'y' && manual_bake == 'n') {
    print_message("Selected Options: Double Size");
  } else if (double_size == 'n' && manual_bake == 'y') {
    print_message("Selected Options: Manual Bake");
  } else if (double_size == 'y' && manual_bake == 'y') {
    print_message("Selected Options: Double Size, Manual Bake");
  }
  print_message(
      "******** Press Any Key Then Enter to go to Next Step ********");
  print_message("Kneading: 20 minutes");
  scanf(" %c", &temp_value);
  print_message("Rising: 60 minutes");
  scanf(" %c", &temp_value);
  print_message("Kneading: 33 minutes");
  scanf(" %c", &temp_value);
  print_message("Rising: 30 minutes");
  scanf(" %c", &temp_value);
  print_message("Shaping: 2 seconds");
  scanf(" %c", &temp_value);
  print_message("Rising: 75 minutes");
  scanf(" %c", &temp_value);
  if (manual_bake == 'n') {
    print_message_number("Bake for minutes: ", temp_time);
    scanf(" %c", &temp_value);
    print_message("Cool: 30 minutes");
    scanf(" %c", &temp_value);
  } else {
    print_message_number("User: Bake Bread for minutes = ", temp_time);
    scanf(" %c", &temp_value);
    print_message("User: Cool Bread for 30 minutes");
    scanf(" %c", &temp_value);
  }
  print_message("Sweet Bread Complete!");
  return 0;
}


x86 assembly (clang, -O0):
<sweet_bread_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movb   $0x0,-0x3(%rbp)
movl   $0x23,-0x8(%rbp)
movb   $0x79,-0x1(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1162 <sweet_bread_main+0x32>
jmp    1169 <sweet_bread_main+0x39>
movl   $0x46,-0x8(%rbp)
lea    0xe90(%rip),%rdi
call   1030 <print_message@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x6e,%eax
jne    11a0 <sweet_bread_main+0x70>
movsbl -0x2(%rbp),%eax
cmp    $0x6e,%eax
jne    11a0 <sweet_bread_main+0x70>
lea    0xea9(%rip),%rdi
call   1030 <print_message@plt>
jmp    122b <sweet_bread_main+0xfb>
movsbl -0x1(%rbp),%eax
cmp    $0x79,%eax
jne    11cb <sweet_bread_main+0x9b>
movsbl -0x2(%rbp),%eax
cmp    $0x6e,%eax
jne    11cb <sweet_bread_main+0x9b>
lea    0xe94(%rip),%rdi
call   1030 <print_message@plt>
jmp    1226 <sweet_bread_main+0xf6>
movsbl -0x1(%rbp),%eax
cmp    $0x6e,%eax
jne    11f6 <sweet_bread_main+0xc6>
movsbl -0x2(%rbp),%eax
cmp    $0x79,%eax
jne    11f6 <sweet_bread_main+0xc6>
lea    0xe87(%rip),%rdi
call   1030 <print_message@plt>
jmp    1221 <sweet_bread_main+0xf1>
movsbl -0x1(%rbp),%eax
cmp    $0x79,%eax
jne    121c <sweet_bread_main+0xec>
movsbl -0x2(%rbp),%eax
cmp    $0x79,%eax
jne    121c <sweet_bread_main+0xec>
lea    0xe7a(%rip),%rdi
call   1030 <print_message@plt>
jmp    1221 <sweet_bread_main+0xf1>
jmp    1226 <sweet_bread_main+0xf6>
jmp    122b <sweet_bread_main+0xfb>
lea    0xe8a(%rip),%rdi
call   1030 <print_message@plt>
lea    0xebc(%rip),%rdi
call   1030 <print_message@plt>
lea    0xec5(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb9(%rip),%rdi
call   1030 <print_message@plt>
lea    0xea9(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb0(%rip),%rdi
call   1030 <print_message@plt>
lea    0xe8d(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea9(%rip),%rdi
call   1030 <print_message@plt>
lea    0xe71(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea0(%rip),%rdi
call   1030 <print_message@plt>
lea    0xe55(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe97(%rip),%rdi
call   1030 <print_message@plt>
lea    0xe39(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x2(%rbp),%eax
cmp    $0x6e,%eax
jne    132c <sweet_bread_main+0x1fc>
mov    -0x8(%rbp),%esi
lea    0xe7e(%rip),%rdi
call   1050 <print_message_number@plt>
lea    0xe0d(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe75(%rip),%rdi
call   1030 <print_message@plt>
lea    0xdf1(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
jmp    1367 <sweet_bread_main+0x237>
mov    -0x8(%rbp),%esi
lea    0xe62(%rip),%rdi
call   1050 <print_message_number@plt>
lea    0xdcd(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe66(%rip),%rdi
call   1030 <print_message@plt>
lea    0xdb1(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe6a(%rip),%rdi
call   1030 <print_message@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweet_bread_main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
movb   $0x0,0x7(%rsp)
lea    0xeba(%rip),%rdi
call   1030 <print_message@plt>
cmp    $0x6e,%r14b
jne    115a <sweet_bread_main+0x2a>
lea    0xee7(%rip),%rdi
jmp    1167 <sweet_bread_main+0x37>
cmp    $0x79,%r14b
jne    116c <sweet_bread_main+0x3c>
lea    0xef6(%rip),%rdi
call   1030 <print_message@plt>
lea    0xf15(%rip),%rdi
call   1030 <print_message@plt>
lea    0xf47(%rip),%rdi
call   1030 <print_message@plt>
lea    0xf50(%rip),%r15
lea    0x7(%rsp),%rbp
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
lea    0xf3d(%rip),%rdi
call   1030 <print_message@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
lea    0xf39(%rip),%rdi
call   1030 <print_message@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
lea    0xf37(%rip),%rdi
call   1030 <print_message@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
lea    0xf33(%rip),%rdi
call   1030 <print_message@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
lea    0xf2f(%rip),%rdi
call   1030 <print_message@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
cmp    $0x6e,%r14b
lea    0xf27(%rip),%rax
lea    0xf44(%rip),%rdi
cmove  %rax,%rdi
lea    0xf28(%rip),%rax
lea    0xf52(%rip),%rbx
cmove  %rax,%rbx
mov    $0x46,%esi
call   1050 <print_message_number@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <print_message@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
lea    0xf3f(%rip),%rdi
call   1030 <print_message@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [63 x i8] c"******************** Creating Sweet Bread ********************\00"
@.str.1 = [22 x i8] c"Selected Options: N/A\00"
@.str.2 = [30 x i8] c"Selected Options: Double Size\00"
@.str.3 = [30 x i8] c"Selected Options: Manual Bake\00"
@.str.4 = [43 x i8] c"Selected Options: Double Size, Manual Bake\00"
@.str.5 = [62 x i8] c"******** Press Any Key Then Enter to go to Next Step ********\00"
@.str.6 = [21 x i8] c"Kneading: 20 minutes\00"
@.str.7 = [4 x i8] c" %c\00"
@.str.8 = [19 x i8] c"Rising: 60 minutes\00"
@.str.9 = [21 x i8] c"Kneading: 33 minutes\00"
@.str.10 = [19 x i8] c"Rising: 30 minutes\00"
@.str.11 = [19 x i8] c"Shaping: 2 seconds\00"
@.str.12 = [19 x i8] c"Rising: 75 minutes\00"
@.str.13 = [19 x i8] c"Bake for minutes: \00"
@.str.14 = [17 x i8] c"Cool: 30 minutes\00"
@.str.15 = [32 x i8] c"User: Bake Bread for minutes = \00"
@.str.16 = [32 x i8] c"User: Cool Bread for 30 minutes\00"
@.str.17 = [22 x i8] c"Sweet Bread Complete!\00"
define i32 @sweet_bread_main(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i8 0, i8* %5
store i32 35, i32* %6
store i8 121, i8* %3
br i1 true, label %7, label %8
7: ; preds = %2
store i32 70, i32* %6
br label %8
8: ; preds = %7, %2
%9 = call i32 @print_message(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 110
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 110
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 @print_message(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %52
19: ; preds = %13, %8
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 121
br i1 %22, label %23, label %29
23: ; preds = %19
%24 = load i8, i8* %4
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 110
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @print_message(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %51
29: ; preds = %23, %19
%30 = load i8, i8* %3
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 110
br i1 %32, label %33, label %39
33: ; preds = %29
%34 = load i8, i8* %4
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 121
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 @print_message(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %50
39: ; preds = %33, %29
%40 = load i8, i8* %3
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 121
br i1 %42, label %43, label %49
43: ; preds = %39
%44 = load i8, i8* %4
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 121
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @print_message(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
br label %49
49: ; preds = %47, %43, %39
br label %50
50: ; preds = %49, %37
br label %51
51: ; preds = %50, %27
br label %52
52: ; preds = %51, %17
%53 = call i32 @print_message(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0))
%54 = call i32 @print_message(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%55 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%56 = call i32 @print_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%57 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%58 = call i32 @print_message(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
%59 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%60 = call i32 @print_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%61 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%62 = call i32 @print_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0))
%63 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%64 = call i32 @print_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0))
%65 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%66 = load i8, i8* %4
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 110
br i1 %68, label %69, label %75
69: ; preds = %52
%70 = load i32, i32* %6
%71 = call i32 @print_message_number(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32 %70)
%72 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%73 = call i32 @print_message(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
%74 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
br label %81
75: ; preds = %52
%76 = load i32, i32* %6
%77 = call i32 @print_message_number(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i32 %76)
%78 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%79 = call i32 @print_message(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0))
%80 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %5)
br label %81
81: ; preds = %75, %69
%82 = call i32 @print_message(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [63 x i8] c"******************** Creating Sweet Bread ********************\00"
@.str.2 = [30 x i8] c"Selected Options: Double Size\00"
@.str.4 = [43 x i8] c"Selected Options: Double Size, Manual Bake\00"
@.str.5 = [62 x i8] c"******** Press Any Key Then Enter to go to Next Step ********\00"
@.str.6 = [21 x i8] c"Kneading: 20 minutes\00"
@.str.7 = [4 x i8] c" %c\00"
@.str.8 = [19 x i8] c"Rising: 60 minutes\00"
@.str.9 = [21 x i8] c"Kneading: 33 minutes\00"
@.str.10 = [19 x i8] c"Rising: 30 minutes\00"
@.str.11 = [19 x i8] c"Shaping: 2 seconds\00"
@.str.12 = [19 x i8] c"Rising: 75 minutes\00"
@.str.13 = [19 x i8] c"Bake for minutes: \00"
@.str.14 = [17 x i8] c"Cool: 30 minutes\00"
@.str.15 = [32 x i8] c"User: Bake Bread for minutes = \00"
@.str.16 = [32 x i8] c"User: Cool Bread for 30 minutes\00"
@.str.17 = [22 x i8] c"Sweet Bread Complete!\00"
define i32 @sweet_bread_main(i8 signext %0, i8 signext %1) {
%3 = alloca i8
store i8 0, i8* %3
%4 = tail call i32 @print_message(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8 %1, 110
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = icmp eq i8 %1, 121
br i1 %7, label %8, label %11
8: ; preds = %6, %2
%9 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), %2 ], [ getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), %6 ]
%10 = tail call i32 @print_message(i8* %9)
br label %11
11: ; preds = %8, %6
%12 = tail call i32 @print_message(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0))
%13 = tail call i32 @print_message(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%15 = call i32 @print_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%17 = call i32 @print_message(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%19 = call i32 @print_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%21 = call i32 @print_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%23 = call i32 @print_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%25 = select i1 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0)
%26 = select i1 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0)
%27 = call i32 @print_message_number(i8* %25, i32 70)
%28 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%29 = call i32 @print_message(i8* %26)
%30 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%31 = call i32 @print_message(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0))
ret i32 0
}