#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 int_cmp(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int a, b, c, highest;
  printf("세 수를 입력해 주십시오. 쉼표(,)로 구분합니다.\n");
  scanf("%d, %d, %d", &a, &b, &c);
  highest = int_cmp(c, ((a) > (b) ? (a) : (b)));
  printf("입력받은 값 중 최대값은 %d입니다.", highest);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1182 <main+0x52>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1188 <main+0x58>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1030 <int_cmp@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xea9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1060 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%esi
cmp    %esi,%eax
cmovg  %eax,%esi
call   1040 <int_cmp@plt>
lea    0xe83(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [66 x i8] c"\EC\84\B8 \EC\88\98\EB\A5\BC \EC\9E\85\EB\A0\A5\ED\95\B4 \EC\A3\BC\EC\8B\AD\EC\8B\9C\EC\98\A4. \EC\89\BC\ED\91\9C(,)\EB\A1\9C \EA\B5\AC\EB\B6\84\ED\95\A9\EB\8B\88\EB\8B\A4.\0A\00"
@.str.1 = [11 x i8] c"%d, %d, %d\00"
@.str.2 = [47 x i8] c"\EC\9E\85\EB\A0\A5\EB\B0\9B\EC\9D\80 \EA\B0\92 \EC\A4\91 \EC\B5\9C\EB\8C\80\EA\B0\92\EC\9D\80 %d\EC\9E\85\EB\8B\88\EB\8B\A4.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%8 = load i32, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = load i32, i32* %2
br label %16
14: ; preds = %0
%15 = load i32, i32* %3
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
%18 = call i32 @int_cmp(i32 %8, i32 %17)
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"%d, %d, %d\00"
@.str.2 = [47 x i8] c"\EC\9E\85\EB\A0\A5\EB\B0\9B\EC\9D\80 \EA\B0\92 \EC\A4\91 \EC\B5\9C\EB\8C\80\EA\B0\92\EC\9D\80 %d\EC\9E\85\EB\8B\88\EB\8B\A4.\00"
@str = [65 x i8] c"\EC\84\B8 \EC\88\98\EB\A5\BC \EC\9E\85\EB\A0\A5\ED\95\B4 \EC\A3\BC\EC\8B\AD\EC\8B\9C\EC\98\A4. \EC\89\BC\ED\91\9C(,)\EB\A1\9C \EA\B5\AC\EB\B6\84\ED\95\A9\EB\8B\88\EB\8B\A4.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %3
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = icmp sgt i32 %10, %11
%13 = select i1 %12, i32 %10, i32 %11
%14 = call i32 @int_cmp(i32 %9, i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %14)
ret i32 0
}