#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*/ chk_egg(int);
int /*<<< orphan*/ curse(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int a_wrapper(void) {
  int length;
  printf("Automated Adpadfs System Version %s\n", "3.2.1");
  printf("Input Curse Length: ");
  scanf("%d", &length);
  curse(length);
  printf("\n");
  chk_egg(length);
  return 0;
}


x86 assembly (clang, -O0):
<a_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1060 <curse@plt>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <chk_egg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_wrapper>:
push   %rax
lea    0xea8(%rip),%rdi
lea    0xec6(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1070 <curse@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%edi
call   1060 <chk_egg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Automated Adpadfs System Version %s\0A\00"
@.str.1 = [6 x i8] c"3.2.1\00"
@.str.2 = [21 x i8] c"Input Curse Length: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @a_wrapper() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @curse(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%8 = load i32, i32* %1
%9 = call i32 @chk_egg(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Automated Adpadfs System Version %s\0A\00"
@.str.1 = [6 x i8] c"3.2.1\00"
@.str.2 = [21 x i8] c"Input Curse Length: \00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @a_wrapper() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @curse(i32 %6)
%8 = call i32 @putchar(i32 10)
%9 = load i32, i32* %1
%10 = call i32 @chk_egg(i32 %9)
ret i32 0
}