#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, ...);
void showCookTimeForTurkey(int pounds) {
  int necessaryMinutes = 15 + 15 * pounds;
  if (necessaryMinutes > 120) {
    int halfway = necessaryMinutes / 2;
    printf("Rotate after cooking for %d minutes of the %d minutes.\n", halfway,
           necessaryMinutes);
  } else {
    printf("Cook for %d minutes.\n", necessaryMinutes);
  }
}


x86 assembly (clang, -O0):
<showCookTimeForTurkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0xf,-0x4(%rbp),%eax
add    $0xf,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x78,-0x8(%rbp)
jle    1156 <showCookTimeForTurkey+0x46>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1167 <showCookTimeForTurkey+0x57>
mov    -0x8(%rbp),%esi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showCookTimeForTurkey>:
lea    (%rdi,%rdi,4),%eax
lea    (%rax,%rax,2),%ecx
lea    (%rax,%rax,2),%edx
add    $0xf,%edx
cmp    $0x6a,%ecx
jl     1133 <showCookTimeForTurkey+0x23>
mov    %edx,%esi
shr    %esi
lea    0xed4(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xefe(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Rotate after cooking for %d minutes of the %d minutes.\0A\00"
@.str.1 = [22 x i8] c"Cook for %d minutes.\0A\00"
define void @showCookTimeForTurkey(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 15, %5
%7 = add nsw i32 15, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 120
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 2
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
br label %19
16: ; preds = %1
%17 = load i32, i32* %3
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %16, %10
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Rotate after cooking for %d minutes of the %d minutes.\0A\00"
@.str.1 = [22 x i8] c"Cook for %d minutes.\0A\00"
define void @showCookTimeForTurkey(i32 %0) {
%2 = mul nsw i32 %0, 15
%3 = add nsw i32 %2, 15
%4 = icmp sgt i32 %2, 105
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = lshr i32 %3, 1
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %3)
br label %10
8: ; preds = %1
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
br label %10
10: ; preds = %8, %5
ret void
}