#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 next_standard_solution(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int write_standard_solution(int);
int call_standard_path_tracker(int index) {
  int fail;
  char answer;
  fail = write_standard_solution(index);
  do {
    fail = next_standard_solution(index);
    fail = write_standard_solution(index);
    printf("Continue to next step ? (y/n) ");
    scanf("%c", &answer);
    scanf("%c", &answer);
  } while (answer == 'y');
  return fail;
}


x86 assembly (clang, -O0):
<call_standard_path_tracker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <write_standard_solution@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <next_standard_solution@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <write_standard_solution@plt>
mov    %eax,-0x8(%rbp)
lea    0xe8d(%rip),%rdi
call   1050 <printf@plt>
lea    0xea0(%rip),%rdi
lea    -0x9(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xe90(%rip),%rdi
lea    -0x9(%rbp),%rsi
call   1060 <scanf@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x79,%eax
je     1156 <call_standard_path_tracker+0x16>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_standard_path_tracker>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
call   1030 <write_standard_solution@plt>
lea    0xea6(%rip),%r14
lea    0xebe(%rip),%r15
lea    0xf(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <next_standard_solution@plt>
mov    %ebx,%edi
call   1030 <write_standard_solution@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
cmpb   $0x79,0xf(%rsp)
je     1170 <call_standard_path_tracker+0x30>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Continue to next step ? (y/n) \00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @call_standard_path_tracker(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @write_standard_solution(i32 %5)
store i32 %6, i32* %3
br label %7
7: ; preds = %15, %1
%8 = load i32, i32* %2
%9 = call i32 @next_standard_solution(i32 %8)
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = call i32 @write_standard_solution(i32 %10)
store i32 %11, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
br label %15
15: ; preds = %7
%16 = load i8, i8* %4
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 121
br i1 %18, label %7, label %19
19: ; preds = %15
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [31 x i8] c"Continue to next step ? (y/n) \00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @call_standard_path_tracker(i32 %0) {
%2 = alloca i8
%3 = tail call i32 @write_standard_solution(i32 %0)
br label %4
4: ; preds = %4, %1
%5 = call i32 @next_standard_solution(i32 %0)
%6 = call i32 @write_standard_solution(i32 %0)
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%10 = load i8, i8* %2
%11 = icmp eq i8 %10, 121
br i1 %11, label %4, label %12
12: ; preds = %4
ret i32 %6
}