#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*/ gettoe();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int continueclipping() {
  int flag = 0;
  char continuechoice;
  do {
    printf("clip now?\n");
    printf("[y/n]: ");
    scanf(" %c", &continuechoice);
  } while ((continuechoice != 'y') && (continuechoice != 'n'));
  if (continuechoice == 'y') {
    gettoe();
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<continueclipping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
lea    -0x9(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x9(%rbp),%ecx
xor    %eax,%eax
cmp    $0x79,%ecx
mov    %al,-0xa(%rbp)
je     1186 <continueclipping+0x56>
movsbl -0x9(%rbp),%eax
cmp    $0x6e,%eax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    113f <continueclipping+0xf>
movsbl -0x9(%rbp),%eax
cmp    $0x79,%eax
jne    11b1 <continueclipping+0x81>
mov    $0x0,%al
call   1050 <gettoe@plt>
movl   $0x0,-0x4(%rbp)
jmp    11b8 <continueclipping+0x88>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<continueclipping>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xebd(%rip),%r14
lea    0xeaa(%rip),%r15
lea    0xeab(%rip),%r12
lea    0x7(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movzbl 0x7(%rsp),%eax
cmp    $0x6e,%al
je     11a3 <continueclipping+0x63>
cmp    $0x79,%al
jne    1170 <continueclipping+0x30>
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <gettoe@plt>
jmp    11a8 <continueclipping+0x68>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"clip now?\0A\00"
@.str.1 = [8 x i8] c"[y/n]: \00"
@.str.2 = [4 x i8] c" %c\00"
define i32 @continueclipping() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %2
br label %4
4: ; preds = %16, %0
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %3)
br label %8
8: ; preds = %4
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 121
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 110
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ false, %8 ], [ %15, %12 ]
br i1 %17, label %4, label %18
18: ; preds = %16
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 121
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 (...) @gettoe()
store i32 0, i32* %1
br label %25
24: ; preds = %18
store i32 1, i32* %1
br label %25
25: ; preds = %24, %22
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"[y/n]: \00"
@.str.2 = [4 x i8] c" %c\00"
@str = [10 x i8] c"clip now?\00"
define i32 @continueclipping() {
%1 = alloca i8
br label %2
2: ; preds = %2, %0
%3 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%6 = load i8, i8* %1
switch i8 %6, label %2 [
i8 121, label %7
i8 110, label %9
]
7: ; preds = %2
%8 = call i32 (...) @gettoe()
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %10
}