#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 */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fsl(int /*<<< orphan*/, int /*<<< orphan*/, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  uint32_t A = 0;
  printf("type your input here: ");
  scanf("%u", &A);
  fsl(0, 0, &A, &A);
  A = A ^ 1 << 16;
  fsl(0, 0, &A, &A);
  fsl(0, 0, &A, &A);
  A = A ^ 1 << 16;
  fsl(0, 0, &A, &A);
  printf("your output is : %d\n", A);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
xor    %esi,%esi
lea    -0x8(%rbp),%rcx
mov    %esi,%edi
mov    %rcx,%rdx
call   1040 <fsl@plt>
mov    -0x8(%rbp),%eax
xor    $0x10000,%eax
mov    %eax,-0x8(%rbp)
xor    %esi,%esi
lea    -0x8(%rbp),%rcx
mov    %esi,%edi
mov    %rcx,%rdx
call   1040 <fsl@plt>
xor    %esi,%esi
lea    -0x8(%rbp),%rcx
mov    %esi,%edi
mov    %rcx,%rdx
call   1040 <fsl@plt>
mov    -0x8(%rbp),%eax
xor    $0x10000,%eax
mov    %eax,-0x8(%rbp)
xor    %esi,%esi
lea    -0x8(%rbp),%rcx
mov    %esi,%edi
mov    %rcx,%rdx
call   1040 <fsl@plt>
mov    -0x8(%rbp),%esi
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %rbx,%rcx
call   1040 <fsl@plt>
xorb   $0x1,0xe(%rsp)
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %rbx,%rcx
call   1040 <fsl@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %rbx,%rcx
call   1040 <fsl@plt>
xorb   $0x1,0xe(%rsp)
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %rbx,%rcx
call   1040 <fsl@plt>
mov    0xc(%rsp),%esi
lea    0xe6a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"type your input here: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [21 x i8] c"your output is : %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = call i32 @fsl(i32 0, i32 0, i32* %2, i32* %2)
%6 = load i32, i32* %2
%7 = xor i32 %6, 65536
store i32 %7, i32* %2
%8 = call i32 @fsl(i32 0, i32 0, i32* %2, i32* %2)
%9 = call i32 @fsl(i32 0, i32 0, i32* %2, i32* %2)
%10 = load i32, i32* %2
%11 = xor i32 %10, 65536
store i32 %11, i32* %2
%12 = call i32 @fsl(i32 0, i32 0, i32* %2, i32* %2)
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"type your input here: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [21 x i8] c"your output is : %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @fsl(i32 0, i32 0, i32* %1, i32* %1)
%6 = load i32, i32* %1
%7 = xor i32 %6, 65536
store i32 %7, i32* %1
%8 = call i32 @fsl(i32 0, i32 0, i32* %1, i32* %1)
%9 = call i32 @fsl(i32 0, i32 0, i32* %1, i32* %1)
%10 = load i32, i32* %1
%11 = xor i32 %10, 65536
store i32 %11, i32* %1
%12 = call i32 @fsl(i32 0, i32 0, i32* %1, i32* %1)
%13 = load i32, i32* %1
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %13)
ret i32 0
}