#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 *, int *);
int main() {
  int a, b, c;
  float oran;
  printf("Sirasiyla AP, BP ve CP oylarini giriniz...\n");
  scanf("%d%d%d", &a, &b, &c);
  float toplam = a + b + c;
  oran = 100 / toplam;
  if (a > b && a > c) {
    printf("Birinci parti = AP. Oy sayisi = %d\n", a);
    printf("Oylarin yuzde olarak hesabi: %.3f\n", oran * a);
    if (b > c) {
      printf("En yakin rakibine attigi fark: %d\n", a - b);
      printf("Ikinci parti = BP. Oy sayisi = %d\n", b);
      printf("Ucuncu parti = CP. Oy sayisi = %d\n", c);
    } else {
      printf("En yakin rakibine attigi fark: %d\n", a - c);
      printf("Ikinci parti = CP. Oy sayisi = %d\n", c);
      printf("Ucuncu parti = BP. Oy sayisi = %d\n", b);
    }
  } else if (b > a && b > c) {
    printf("Birinci parti = BP. Oy sayisi = %d\n", b);
    printf("Oylarin yuzde olarak hesabi: %.3f\n", oran * b);
    if (a > c) {
      printf("En yakin rakibine attigi fark: %d\n", b - a);
      printf("Ikinci parti = AP. Oy sayisi = %d\n", a);
      printf("Ucuncu parti = CP. Oy sayisi = %d\n", c);
    } else {
      printf("En yakin rakibine attigi fark: %d\n", b - c);
      printf("Ikinci parti = CP. Oy sayisi = %d\n", c);
      printf("Ucuncu parti = AP. Oy sayisi = %d\n", a);
    }
  } else if (c > a && c > b) {
    printf("Birinci parti = CP. Oy sayisi = %d\n", c);
    printf("Oylarin yuzde olarak hesabi: %.3f\n", oran * c);
    if (a > b) {
      printf("En yakin rakibine attigi fark: %d\n", c - a);
      printf("Ikinci parti = AP. Oy sayisi = %d\n", a);
      printf("Ucuncu parti = BP. Oy sayisi = %d\n", b);
    } else {
      printf("En yakin rakibine attigi fark: %d\n", c - b);
      printf("Ikinci parti = BP. Oy sayisi = %d\n", b);
      printf("Ucuncu parti = AP. Oy sayisi = %d\n", a);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe91(%rip),%xmm0
divss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1244 <main+0x124>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1244 <main+0x124>
mov    -0x8(%rbp),%esi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1209 <main+0xe9>
mov    -0x8(%rbp),%esi
sub    -0xc(%rbp),%esi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123f <main+0x11f>
mov    -0x8(%rbp),%esi
sub    -0x10(%rbp),%esi
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13e4 <main+0x2c4>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    130f <main+0x1ef>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    130f <main+0x1ef>
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    12d4 <main+0x1b4>
mov    -0xc(%rbp),%esi
sub    -0x8(%rbp),%esi
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    130a <main+0x1ea>
mov    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xdf5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13df <main+0x2bf>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    13da <main+0x2ba>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    13da <main+0x2ba>
mov    -0x10(%rbp),%esi
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd0a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    139f <main+0x27f>
mov    -0x10(%rbp),%esi
sub    -0x8(%rbp),%esi
lea    0xd0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xd77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13d5 <main+0x2b5>
mov    -0x10(%rbp),%esi
sub    -0xc(%rbp),%esi
lea    0xcd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13da <main+0x2ba>
jmp    13df <main+0x2bf>
jmp    13e4 <main+0x2c4>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x1054(%rip),%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%esi
lea    (%rsi,%rcx,1),%edx
mov    0x8(%rsp),%eax
add    %eax,%edx
cvtsi2ss %edx,%xmm0
movss  0xe88(%rip),%xmm1
divss  %xmm0,%xmm1
cmp    %esi,%ecx
jle    11f3 <main+0xc3>
cmp    %eax,%ecx
jle    11f3 <main+0xc3>
lea    0xe80(%rip),%rdi
mov    %ecx,%esi
xor    %eax,%eax
movss  %xmm1,0x14(%rsp)
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
mulss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe74(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
mov    0x10(%rsp),%esi
cmp    %ecx,%eax
jle    1300 <main+0x1d0>
sub    %eax,%esi
lea    0xe73(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xe84(%rip),%rdi
jmp    126e <main+0x13e>
cmp    %ecx,%esi
jle    1285 <main+0x155>
cmp    %eax,%esi
jle    1285 <main+0x155>
lea    0xef7(%rip),%rdi
xor    %eax,%eax
movss  %xmm1,0x14(%rsp)
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0xc(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
mulss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xdf7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x10(%rsp),%eax
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%esi
cmp    %ecx,%eax
jle    132f <main+0x1ff>
sub    %eax,%esi
lea    0xdf6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xe18(%rip),%rdi
jmp    1379 <main+0x249>
cmp    %ecx,%eax
jle    1380 <main+0x250>
cmp    %esi,%eax
jle    1380 <main+0x250>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
movss  %xmm1,0x14(%rsp)
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x8(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
mulss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xd63(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%esi
cmp    %ecx,%eax
jle    134c <main+0x21c>
sub    %eax,%esi
lea    0xd66(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xe27(%rip),%rdi
jmp    131b <main+0x1eb>
sub    %ecx,%esi
lea    0xd49(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xda0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xdb1(%rip),%rdi
jmp    1379 <main+0x249>
sub    %ecx,%esi
lea    0xd1a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xd71(%rip),%rdi
jmp    1367 <main+0x237>
sub    %ecx,%esi
lea    0xcfd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xd0e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xdcf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Sirasiyla AP, BP ve CP oylarini giriniz...\0A\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [36 x i8] c"Birinci parti = AP. Oy sayisi = %d\0A\00"
@.str.3 = [35 x i8] c"Oylarin yuzde olarak hesabi: %.3f\0A\00"
@.str.4 = [35 x i8] c"En yakin rakibine attigi fark: %d\0A\00"
@.str.5 = [35 x i8] c"Ikinci parti = BP. Oy sayisi = %d\0A\00"
@.str.6 = [35 x i8] c"Ucuncu parti = CP. Oy sayisi = %d\0A\00"
@.str.7 = [35 x i8] c"Ikinci parti = CP. Oy sayisi = %d\0A\00"
@.str.8 = [35 x i8] c"Ucuncu parti = BP. Oy sayisi = %d\0A\00"
@.str.9 = [36 x i8] c"Birinci parti = BP. Oy sayisi = %d\0A\00"
@.str.10 = [35 x i8] c"Ikinci parti = AP. Oy sayisi = %d\0A\00"
@.str.11 = [35 x i8] c"Ucuncu parti = AP. Oy sayisi = %d\0A\00"
@.str.12 = [36 x i8] c"Birinci parti = CP. Oy sayisi = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
%14 = sitofp i32 %13 to float
store float %14, float* %6
%15 = load float, float* %6
%16 = fdiv float 1.000000e+02, %15
store float %16, float* %5
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %55
20: ; preds = %0
%21 = load i32, i32* %2
%22 = load i32, i32* %4
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %55
24: ; preds = %20
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = load float, float* %5
%28 = load i32, i32* %2
%29 = sitofp i32 %28 to float
%30 = fmul float %27, %29
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %31)
%33 = load i32, i32* %3
%34 = load i32, i32* %4
%35 = icmp sgt i32 %33, %34
br i1 %35, label %36, label %45
36: ; preds = %24
%37 = load i32, i32* %2
%38 = load i32, i32* %3
%39 = sub nsw i32 %37, %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %3
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %41)
%43 = load i32, i32* %4
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %43)
br label %54
45: ; preds = %24
%46 = load i32, i32* %2
%47 = load i32, i32* %4
%48 = sub nsw i32 %46, %47
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %4
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %3
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %45, %36
br label %135
55: ; preds = %20, %0
%56 = load i32, i32* %3
%57 = load i32, i32* %2
%58 = icmp sgt i32 %56, %57
br i1 %58, label %59, label %94
59: ; preds = %55
%60 = load i32, i32* %3
%61 = load i32, i32* %4
%62 = icmp sgt i32 %60, %61
br i1 %62, label %63, label %94
63: ; preds = %59
%64 = load i32, i32* %3
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 %64)
%66 = load float, float* %5
%67 = load i32, i32* %3
%68 = sitofp i32 %67 to float
%69 = fmul float %66, %68
%70 = fpext float %69 to double
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %70)
%72 = load i32, i32* %2
%73 = load i32, i32* %4
%74 = icmp sgt i32 %72, %73
br i1 %74, label %75, label %84
75: ; preds = %63
%76 = load i32, i32* %3
%77 = load i32, i32* %2
%78 = sub nsw i32 %76, %77
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %78)
%80 = load i32, i32* %2
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i32 %80)
%82 = load i32, i32* %4
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %82)
br label %93
84: ; preds = %63
%85 = load i32, i32* %3
%86 = load i32, i32* %4
%87 = sub nsw i32 %85, %86
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %87)
%89 = load i32, i32* %4
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i32 %89)
%91 = load i32, i32* %2
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %91)
br label %93
93: ; preds = %84, %75
br label %134
94: ; preds = %59, %55
%95 = load i32, i32* %4
%96 = load i32, i32* %2
%97 = icmp sgt i32 %95, %96
br i1 %97, label %98, label %133
98: ; preds = %94
%99 = load i32, i32* %4
%100 = load i32, i32* %3
%101 = icmp sgt i32 %99, %100
br i1 %101, label %102, label %133
102: ; preds = %98
%103 = load i32, i32* %4
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), i32 %103)
%105 = load float, float* %5
%106 = load i32, i32* %4
%107 = sitofp i32 %106 to float
%108 = fmul float %105, %107
%109 = fpext float %108 to double
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %109)
%111 = load i32, i32* %2
%112 = load i32, i32* %3
%113 = icmp sgt i32 %111, %112
br i1 %113, label %114, label %123
114: ; preds = %102
%115 = load i32, i32* %4
%116 = load i32, i32* %2
%117 = sub nsw i32 %115, %116
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %117)
%119 = load i32, i32* %2
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i32 %119)
%121 = load i32, i32* %3
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %121)
br label %132
123: ; preds = %102
%124 = load i32, i32* %4
%125 = load i32, i32* %3
%126 = sub nsw i32 %124, %125
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %126)
%128 = load i32, i32* %3
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %128)
%130 = load i32, i32* %2
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %130)
br label %132
132: ; preds = %123, %114
br label %133
133: ; preds = %132, %98, %94
br label %134
134: ; preds = %133, %93
br label %135
135: ; preds = %134, %54
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [36 x i8] c"Birinci parti = AP. Oy sayisi = %d\0A\00"
@.str.3 = [35 x i8] c"Oylarin yuzde olarak hesabi: %.3f\0A\00"
@.str.4 = [35 x i8] c"En yakin rakibine attigi fark: %d\0A\00"
@.str.5 = [35 x i8] c"Ikinci parti = BP. Oy sayisi = %d\0A\00"
@.str.6 = [35 x i8] c"Ucuncu parti = CP. Oy sayisi = %d\0A\00"
@.str.7 = [35 x i8] c"Ikinci parti = CP. Oy sayisi = %d\0A\00"
@.str.8 = [35 x i8] c"Ucuncu parti = BP. Oy sayisi = %d\0A\00"
@.str.9 = [36 x i8] c"Birinci parti = BP. Oy sayisi = %d\0A\00"
@.str.10 = [35 x i8] c"Ikinci parti = AP. Oy sayisi = %d\0A\00"
@.str.11 = [35 x i8] c"Ucuncu parti = AP. Oy sayisi = %d\0A\00"
@.str.12 = [36 x i8] c"Birinci parti = CP. Oy sayisi = %d\0A\00"
@str = [43 x i8] c"Sirasiyla AP, BP ve CP oylarini giriniz...\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 ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, %9
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = sitofp i32 %13 to float
%15 = fdiv float 1.000000e+02, %14
%16 = icmp sgt i32 %9, %10
%17 = icmp sgt i32 %9, %12
%18 = select i1 %16, i1 %17, i1 false
br i1 %18, label %19, label %44
19: ; preds = %0
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%21 = load i32, i32* %1
%22 = sitofp i32 %21 to float
%23 = fmul float %15, %22
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %24)
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = icmp sgt i32 %26, %27
%29 = load i32, i32* %1
br i1 %28, label %30, label %37
30: ; preds = %19
%31 = sub nsw i32 %29, %26
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %31)
%33 = load i32, i32* %2
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %3
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %35)
br label %102
37: ; preds = %19
%38 = sub nsw i32 %29, %27
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %38)
%40 = load i32, i32* %3
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %2
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %42)
br label %102
44: ; preds = %0
%45 = icmp sgt i32 %10, %9
%46 = icmp sgt i32 %10, %12
%47 = select i1 %45, i1 %46, i1 false
br i1 %47, label %48, label %73
48: ; preds = %44
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 %10)
%50 = load i32, i32* %2
%51 = sitofp i32 %50 to float
%52 = fmul float %15, %51
%53 = fpext float %52 to double
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %53)
%55 = load i32, i32* %1
%56 = load i32, i32* %3
%57 = icmp sgt i32 %55, %56
%58 = load i32, i32* %2
br i1 %57, label %59, label %66
59: ; preds = %48
%60 = sub nsw i32 %58, %55
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %60)
%62 = load i32, i32* %1
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i32 %62)
%64 = load i32, i32* %3
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %64)
br label %102
66: ; preds = %48
%67 = sub nsw i32 %58, %56
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %67)
%69 = load i32, i32* %3
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i32 %69)
%71 = load i32, i32* %1
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %71)
br label %102
73: ; preds = %44
%74 = icmp sgt i32 %12, %9
%75 = icmp sgt i32 %12, %10
%76 = select i1 %74, i1 %75, i1 false
br i1 %76, label %77, label %102
77: ; preds = %73
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), i32 %12)
%79 = load i32, i32* %3
%80 = sitofp i32 %79 to float
%81 = fmul float %15, %80
%82 = fpext float %81 to double
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %82)
%84 = load i32, i32* %1
%85 = load i32, i32* %2
%86 = icmp sgt i32 %84, %85
%87 = load i32, i32* %3
br i1 %86, label %88, label %95
88: ; preds = %77
%89 = sub nsw i32 %87, %84
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %89)
%91 = load i32, i32* %1
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i32 %91)
%93 = load i32, i32* %2
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %93)
br label %102
95: ; preds = %77
%96 = sub nsw i32 %87, %85
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %96)
%98 = load i32, i32* %2
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %98)
%100 = load i32, i32* %1
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %100)
br label %102
102: ; preds = %66, %59, %88, %95, %73, %30, %37
ret i32 0
}