#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*/ findMaxNumBurger(int, int, int, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *, int *, int *);
int main(void) {
  int totalTime, timeTypeOne, timeTypeTwo, drinkTime, maxNumBurger;
  while (scanf("%d %d %d", &timeTypeOne, &timeTypeTwo, &totalTime) > 0) {
    findMaxNumBurger(totalTime, timeTypeOne, timeTypeTwo, &maxNumBurger,
                     &drinkTime);
    printf("%d", maxNumBurger);
    if (drinkTime)
      printf(" %d", drinkTime);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x8(%rbp),%rcx
call   1050 <scanf@plt>
cmp    $0x0,%rax
jle    11b6 <main+0x86>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x18(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <findMaxNumBurger@plt>
mov    -0x18(%rbp),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
je     11a3 <main+0x73>
mov    -0x14(%rbp),%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1060 <scanf@plt>
test   %rax,%rax
jle    11ff <main+0xbf>
lea    0x14(%rsp),%r15
lea    0xe88(%rip),%r12
lea    0xe7b(%rip),%r13
lea    0x8(%rsp),%rbx
lea    0x4(%rsp),%rbp
lea    0xc(%rsp),%r14
jmp    11c0 <main+0x80>
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r14,%rcx
call   1060 <scanf@plt>
test   %rax,%rax
jle    11ff <main+0xbf>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
lea    0x10(%rsp),%rcx
mov    %r15,%r8
call   1040 <findMaxNumBurger@plt>
mov    0x10(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%esi
test   %esi,%esi
je     11a0 <main+0x60>
lea    0xe0f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11a0 <main+0x60>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c" %d\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
br label %7
7: ; preds = %22, %0
%8 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %2)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @findMaxNumBurger(i32 %11, i32 %12, i32 %13, i32* %6, i32* %5)
%15 = load i32, i32* %6
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %10
%20 = load i32, i32* %5
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %19, %10
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %7
24: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %1)
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %28
13: ; preds = %0, %24
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = call i32 @findMaxNumBurger(i32 %14, i32 %15, i32 %16, i32* %5, i32* %4)
%18 = load i32, i32* %5
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %13
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %20)
br label %24
24: ; preds = %22, %13
%25 = call i32 @putchar(i32 10)
%26 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %1)
%27 = icmp sgt i64 %26, 0
br i1 %27, label %13, label %28
28: ; preds = %24, %0
ret i32 0
}