#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x;
  int y;
  float z;
  printf("\nEnter an integer value for x: ");
  scanf("%d", &x);
  printf("\nEnter an integer value for y: ");
  scanf("%d", &y);
  if (x > 0) {
    y = x - 1;
    z = 2 * x;
  } else {
    if (y > 0)
      z = y;
    else {
      z = x;
      y = z + 1;
    }
    z = z + 1;
  }
  printf("\n\nAfter Processing, x = %d, y = %d, z = %f", x, y, z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1192 <main+0x72>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11db <main+0xbb>
cmpl   $0x0,-0xc(%rbp)
jle    11ab <main+0x8b>
cvtsi2ssl -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11c9 <main+0xa9>
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe43(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
movss  0xe2f(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe56(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
test   %esi,%esi
jle    117a <main+0x5a>
lea    -0x1(%rsi),%edx
mov    %edx,0x8(%rsp)
lea    (%rsi,%rsi,1),%eax
cvtsi2ss %eax,%xmm0
jmp    11a4 <main+0x84>
mov    0x8(%rsp),%edx
test   %edx,%edx
jle    1190 <main+0x70>
cvtsi2ss %edx,%xmm0
addss  0xe72(%rip),%xmm0
jmp    11a4 <main+0x84>
cvtsi2ss %esi,%xmm0
addss  0xe64(%rip),%xmm0
cvttss2si %xmm0,%edx
mov    %edx,0x8(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xe98(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"\0AEnter an integer value for x: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"\0AEnter an integer value for y: \00"
@.str.3 = [43 x i8] c"\0A\0AAfter Processing, x = %d, y = %d, z = %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %0
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = mul nsw i32 2, %14
%16 = sitofp i32 %15 to float
store float %16, float* %4
br label %32
17: ; preds = %0
%18 = load i32, i32* %3
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %3
%22 = sitofp i32 %21 to float
store float %22, float* %4
br label %29
23: ; preds = %17
%24 = load i32, i32* %2
%25 = sitofp i32 %24 to float
store float %25, float* %4
%26 = load float, float* %4
%27 = fadd float %26, 1.000000e+00
%28 = fptosi float %27 to i32
store i32 %28, i32* %3
br label %29
29: ; preds = %23, %20
%30 = load float, float* %4
%31 = fadd float %30, 1.000000e+00
store float %31, float* %4
br label %32
32: ; preds = %29, %11
%33 = load i32, i32* %2
%34 = load i32, i32* %3
%35 = load float, float* %4
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 %33, i32 %34, double %36)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0AEnter an integer value for x: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"\0AEnter an integer value for y: \00"
@.str.3 = [43 x i8] c"\0A\0AAfter Processing, x = %d, y = %d, z = %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = add nsw i32 %9, -1
store i32 %12, i32* %2
%13 = shl nuw nsw i32 %9, 1
%14 = sitofp i32 %13 to float
br label %25
15: ; preds = %0
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = sitofp i32 %16 to float
%20 = fadd float %19, 1.000000e+00
br label %25
21: ; preds = %15
%22 = sitofp i32 %9 to float
%23 = fadd float %22, 1.000000e+00
%24 = fptosi float %23 to i32
store i32 %24, i32* %2
br label %25
25: ; preds = %18, %21, %11
%26 = phi i32 [ %12, %11 ], [ %24, %21 ], [ %16, %18 ]
%27 = phi float [ %14, %11 ], [ %23, %21 ], [ %20, %18 ]
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 %9, i32 %26, double %28)
ret i32 0
}