#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 /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  int umur;
  printf("Masukkan umur anda = ");
  scanf("%i", &umur);
  if (umur >= 17) {
    printf("Anda layak mendapatkan SIM\n");
    printf("Anda layak mendapatkan KTP");
  } else {
    printf("Anda belum layak mendapatkan SIM\n");
    printf("Anda belum layak mendapatkan KTP");
  }
  printf("\n\n");
  system("PAUSE");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x11,-0x14(%rbp)
jl     1189 <main+0x59>
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
jmp    11a1 <main+0x71>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
call   1040 <printf@plt>
lea    0xeeb(%rip),%rdi
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
call   1050 <printf@plt>
lea    0xebe(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x11,0xc(%rsp)
lea    0xf10(%rip),%rax
lea    0xee6(%rip),%rdi
cmovge %rax,%rdi
lea    0xe99(%rip),%rax
lea    0xead(%rip),%rbx
cmovge %rax,%rbx
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaa(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Masukkan umur anda = \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [28 x i8] c"Anda layak mendapatkan SIM\0A\00"
@.str.3 = [27 x i8] c"Anda layak mendapatkan KTP\00"
@.str.4 = [34 x i8] c"Anda belum layak mendapatkan SIM\0A\00"
@.str.5 = [33 x i8] c"Anda belum layak mendapatkan KTP\00"
@.str.6 = [3 x i8] c"\0A\0A\00"
@.str.7 = [6 x i8] c"PAUSE\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%9 = load i32, i32* %6
%10 = icmp sge i32 %9, 17
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %17
14: ; preds = %2
%15 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
br label %17
17: ; preds = %14, %11
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%19 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Masukkan umur anda = \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.3 = [27 x i8] c"Anda layak mendapatkan KTP\00"
@.str.5 = [33 x i8] c"Anda belum layak mendapatkan KTP\00"
@.str.7 = [6 x i8] c"PAUSE\00"
@str = [33 x i8] c"Anda belum layak mendapatkan SIM\00"
@str.8 = [2 x i8] c"\0A\00"
@str.9 = [27 x i8] c"Anda layak mendapatkan SIM\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 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* %3)
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 16
%9 = select i1 %8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0)
%10 = select i1 %8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0)
%11 = call i32 @puts(i8* dereferenceable(1) %9)
%12 = call i32 @printf(i8* dereferenceable(1) %10)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0))
%14 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}