#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, ...);
int /*<<< orphan*/ puts(char *);
int main() {
  int total, fine, speeding;
  puts("Speeding tickets:\n");
  speeding = 85 - 65;
  fine = speeding * 26;
  total = total + fine;
  printf("For going %d in a %d zone your ticket is $%d.\n", 85, 65, fine);
  speeding = 95 - 65;
  fine = speeding * 26;
  total = total + fine;
  printf("For going %d in a %d zone your ticket is $%d.\n", 95, 65, fine);
  speeding = 110 - 65;
  fine = speeding * 26;
  total = total + fine;
  printf("For going %d in a %d zone your ticket is $%d.\n", 110, 65, fine);
  printf("\n\tTotal in fines: \n\t\t$%d", total);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
movl   $0x14,-0x10(%rbp)
imul   $0x1a,-0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xeb7(%rip),%rdi
mov    $0x55,%esi
mov    $0x41,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1e,-0x10(%rbp)
imul   $0x1a,-0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xe85(%rip),%rdi
mov    $0x5f,%esi
mov    $0x41,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x2d,-0x10(%rbp)
imul   $0x1a,-0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xe53(%rip),%rdi
mov    $0x6e,%esi
mov    $0x41,%edx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rbx
mov    %rbx,%rdi
mov    $0x55,%esi
mov    $0x41,%edx
mov    $0x208,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5f,%esi
mov    $0x41,%edx
mov    $0x30c,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6e,%esi
mov    $0x41,%edx
mov    $0x492,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Speeding tickets:\0A\00"
@.str.1 = [47 x i8] c"For going %d in a %d zone your ticket is $%d.\0A\00"
@.str.2 = [25 x i8] c"\0A\09Total in fines: \0A\09\09$%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 20, i32* %4
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 26
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
store i32 %10, i32* %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 85, i32 65, i32 %11)
store i32 30, i32* %4
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 26
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 95, i32 65, i32 %18)
store i32 45, i32* %4
%20 = load i32, i32* %4
%21 = mul nsw i32 %20, 26
store i32 %21, i32* %3
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = add nsw i32 %22, %23
store i32 %24, i32* %2
%25 = load i32, i32* %3
%26 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 110, i32 65, i32 %25)
%27 = load i32, i32* %2
%28 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Speeding tickets:\0A\00"
@.str.1 = [47 x i8] c"For going %d in a %d zone your ticket is $%d.\0A\00"
@.str.2 = [25 x i8] c"\0A\09Total in fines: \0A\09\09$%d\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 85, i32 65, i32 520)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 95, i32 65, i32 780)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 110, i32 65, i32 1170)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 undef)
ret i32 0
}