#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 printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a[3], i;
  printf("세 터널의 높이를 차례대로 입력하세요:");
  for (i = 0; i < 3; i++) {
    scanf("%d", &a[i]);
    if (a[i] <= 170)
      return 0 * printf("충돌 %d", a[i]);
  }
  return 0 * printf("무사 통과");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    11af <main+0x8f>
movslq -0x14(%rbp),%rax
lea    -0x10(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xed9(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x14(%rbp),%rax
cmpl   $0xaa,-0x10(%rbp,%rax,4)
jg     119c <main+0x7c>
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp,%rax,4),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
mov    %eax,-0x4(%rbp)
jmp    11c3 <main+0xa3>
jmp    11a1 <main+0x81>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x24>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cmp    $0xab,%esi
jl     1189 <main+0x69>
lea    0x10(%rsp),%rsi
lea    0xee2(%rip),%rdi
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
cmp    $0xab,%esi
jl     1189 <main+0x69>
lea    0x14(%rsp),%rsi
lea    0xec5(%rip),%rdi
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
cmp    $0xab,%esi
jge    119e <main+0x7e>
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1197 <main+0x77>

LLVM IR (-O0):
@.str = [54 x i8] c"\EC\84\B8 \ED\84\B0\EB\84\90\EC\9D\98 \EB\86\92\EC\9D\B4\EB\A5\BC \EC\B0\A8\EB\A1\80\EB\8C\80\EB\A1\9C \EC\9E\85\EB\A0\A5\ED\95\98\EC\84\B8\EC\9A\94:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"\EC\B6\A9\EB\8F\8C %d\00"
@.str.3 = [14 x i8] c"\EB\AC\B4\EC\82\AC \ED\86\B5\EA\B3\BC\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %5
5: ; preds = %26, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %29
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %10
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = icmp sle i32 %16, 170
br i1 %17, label %18, label %25
18: ; preds = %8
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %20
%22 = load i32, i32* %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %22)
%24 = mul nsw i32 0, %23
store i32 %24, i32* %1
br label %32
25: ; preds = %8
br label %26
26: ; preds = %25
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %5
29: ; preds = %5
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%31 = mul nsw i32 0, %30
store i32 %31, i32* %1
br label %32
32: ; preds = %29, %18
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@.str = [54 x i8] c"\EC\84\B8 \ED\84\B0\EB\84\90\EC\9D\98 \EB\86\92\EC\9D\B4\EB\A5\BC \EC\B0\A8\EB\A1\80\EB\8C\80\EB\A1\9C \EC\9E\85\EB\A0\A5\ED\95\98\EC\84\B8\EC\9A\94:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"\EC\B6\A9\EB\8F\8C %d\00"
@.str.3 = [14 x i8] c"\EB\AC\B4\EC\82\AC \ED\86\B5\EA\B3\BC\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 171
br i1 %7, label %20, label %8
8: ; preds = %0
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%11 = load i32, i32* %9
%12 = icmp slt i32 %11, 171
br i1 %12, label %20, label %13
13: ; preds = %8
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %14)
%16 = load i32, i32* %14
%17 = icmp slt i32 %16, 171
br i1 %17, label %20, label %18
18: ; preds = %13
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %23
20: ; preds = %13, %8, %0
%21 = phi i32 [ %6, %0 ], [ %11, %8 ], [ %16, %13 ]
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %18, %20
ret i32 0
}