#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ getline(char **, int *, int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int dropper(int placeholder) {
  fprintf(stdout, "send ACK y/n?\n");
  int nbytes = 100;
  char *my_string;
  my_string = (char *)malloc(nbytes + 1);
  getline(&my_string, &nbytes, stdin);
  if (my_string[0] == 'Y' || my_string[0] == 'y') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<dropper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x64,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%edx
lea    -0x18(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <getline@plt>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x59,%eax
je     119c <dropper+0x6c>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x79,%eax
jne    11a8 <dropper+0x78>
movl   $0x1,-0x4(%rbp)
jmp    11af <dropper+0x7f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dropper>:
sub    $0x18,%rsp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x64,0xc(%rsp)
mov    $0x65,%edi
call   1040 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edx
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1050 <getline@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%cl
and    $0xdf,%cl
xor    %eax,%eax
cmp    $0x59,%cl
sete   %al
add    $0x18,%rsp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [15 x i8] c"send ACK y/n?\0A\00"
@stdin = global i32 0
define i32 @dropper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 100, i32* %4
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load i32, i32* @stdin
%13 = call i32 @getline(i8** %5, i32* %4, i32 %12)
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 89
br i1 %18, label %25, label %19
19: ; preds = %1
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i64 0
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 121
br i1 %24, label %25, label %26
25: ; preds = %19, %1
store i32 1, i32* %2
br label %27
26: ; preds = %19
store i32 0, i32* %2
br label %27
27: ; preds = %26, %25
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [15 x i8] c"send ACK y/n?\0A\00"
@stdin = global i32 0
define i32 @dropper(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = bitcast i32* %2 to i8*
store i32 100, i32* %2
%7 = bitcast i8** %3 to i8*
%8 = tail call i64 @malloc(i32 101)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i32, i32* @stdin
%11 = call i32 @getline(i8** %3, i32* %2, i32 %10)
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = and i8 %13, -33
%15 = icmp eq i8 %14, 89
%16 = zext i1 %15 to i32
ret i32 %16
}