#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 main() {
  int a, b;
  char c;
  for (;;) {
    printf("밑변의 길이 = ");
    scanf("%d", &a);
    printf("높이 = ");
    scanf("%d", &b);
    printf("입력한 삼각형의 넓이는 %.1lf입니다.\n계속하시겠습니까? ",
           a * b / 2.0);
    scanf(" %c", &c);
    if (c != 'y' && c != 'Y')
      return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe7e(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xe9c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    -0xd(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0xd(%rbp),%eax
cmp    $0x79,%eax
je     11c8 <main+0xa8>
movsbl -0xd(%rbp),%eax
cmp    $0x59,%eax
je     11c8 <main+0xa8>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xee7(%rip),%rbx
lea    0xee3(%rip),%r12
lea    0x10(%rsp),%r13
lea    0xee1(%rip),%rbp
lea    0xf26(%rip),%r14
lea    0xf(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xea1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
imul   0x14(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe54(%rip),%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movzbl 0xf(%rsp),%eax
and    $0xdf,%al
cmp    $0x59,%al
je     1160 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\EB\B0\91\EB\B3\80\EC\9D\98 \EA\B8\B8\EC\9D\B4 = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"\EB\86\92\EC\9D\B4 = \00"
@.str.3 = [76 x i8] c"\EC\9E\85\EB\A0\A5\ED\95\9C \EC\82\BC\EA\B0\81\ED\98\95\EC\9D\98 \EB\84\93\EC\9D\B4\EB\8A\94 %.1lf\EC\9E\85\EB\8B\88\EB\8B\A4.\0A\EA\B3\84\EC\86\8D\ED\95\98\EC\8B\9C\EA\B2\A0\EC\8A\B5\EB\8B\88\EA\B9\8C? \00"
@.str.4 = [4 x i8] c" %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 0, i32* %1
br label %5
5: ; preds = %25, %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = mul nsw i32 %10, %11
%13 = sitofp i32 %12 to double
%14 = fdiv double %13, 2.000000e+00
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.3, i64 0, i64 0), double %14)
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %4)
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 121
br i1 %19, label %20, label %25
20: ; preds = %5
%21 = load i8, i8* %4
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 89
br i1 %23, label %24, label %25
24: ; preds = %20
ret i32 0
25: ; preds = %20, %5
br label %5
}

LLVM IR (-O2):
@.str = [20 x i8] c"\EB\B0\91\EB\B3\80\EC\9D\98 \EA\B8\B8\EC\9D\B4 = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"\EB\86\92\EC\9D\B4 = \00"
@.str.3 = [76 x i8] c"\EC\9E\85\EB\A0\A5\ED\95\9C \EC\82\BC\EA\B0\81\ED\98\95\EC\9D\98 \EB\84\93\EC\9D\B4\EB\8A\94 %.1lf\EC\9E\85\EB\8B\88\EB\8B\A4.\0A\EA\B3\84\EC\86\8D\ED\95\98\EC\8B\9C\EA\B2\A0\EC\8A\B5\EB\8B\88\EA\B9\8C? \00"
@.str.4 = [4 x i8] c" %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
br label %6
6: ; preds = %6, %0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = mul nsw i32 %12, %11
%14 = sitofp i32 %13 to double
%15 = fmul double %14, 5.000000e-01
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.3, i64 0, i64 0), double %15)
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %3)
%18 = load i8, i8* %3
%19 = and i8 %18, -33
%20 = icmp eq i8 %19, 89
br i1 %20, label %6, label %21
21: ; preds = %6
ret i32 0
}