#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 wycc_type_down(int);
int wycc_type_next(int);
int wycc_type_subsume_tokens(int, int);
int wycc_type_subsume_tuples(int itok, int atok) {
  int istp;
  int astp;
  int end;
  istp = wycc_type_down(itok);
  astp = wycc_type_down(atok);
  end = wycc_type_subsume_tokens(istp, astp);
  if (end == 0) {
    return 0;
  };
  istp = wycc_type_next(itok);
  astp = wycc_type_next(atok);
  return wycc_type_subsume_tokens(istp, astp);
}


x86 assembly (clang, -O0):
<wycc_type_subsume_tuples>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <wycc_type_down@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <wycc_type_down@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <wycc_type_subsume_tokens@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1178 <wycc_type_subsume_tuples+0x48>
movl   $0x0,-0x4(%rbp)
jmp    119c <wycc_type_subsume_tuples+0x6c>
mov    -0x8(%rbp),%edi
call   1050 <wycc_type_next@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <wycc_type_next@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <wycc_type_subsume_tokens@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wycc_type_subsume_tuples>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
call   1030 <wycc_type_down@plt>
mov    %eax,%ebx
mov    %r14d,%edi
call   1030 <wycc_type_down@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <wycc_type_subsume_tokens@plt>
test   %eax,%eax
je     1173 <wycc_type_subsume_tuples+0x43>
mov    %ebp,%edi
call   1050 <wycc_type_next@plt>
mov    %eax,%ebx
mov    %r14d,%edi
call   1050 <wycc_type_next@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <wycc_type_subsume_tokens@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wycc_type_subsume_tuples(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @wycc_type_down(i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = call i32 @wycc_type_down(i32 %11)
store i32 %12, i32* %7
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = call i32 @wycc_type_subsume_tokens(i32 %13, i32 %14)
store i32 %15, i32* %8
%16 = load i32, i32* %8
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %2
store i32 0, i32* %3
br label %27
19: ; preds = %2
%20 = load i32, i32* %4
%21 = call i32 @wycc_type_next(i32 %20)
store i32 %21, i32* %6
%22 = load i32, i32* %5
%23 = call i32 @wycc_type_next(i32 %22)
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = call i32 @wycc_type_subsume_tokens(i32 %24, i32 %25)
store i32 %26, i32* %3
br label %27
27: ; preds = %19, %18
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @wycc_type_subsume_tuples(i32 %0, i32 %1) {
%3 = tail call i32 @wycc_type_down(i32 %0)
%4 = tail call i32 @wycc_type_down(i32 %1)
%5 = tail call i32 @wycc_type_subsume_tokens(i32 %3, i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = tail call i32 @wycc_type_next(i32 %0)
%9 = tail call i32 @wycc_type_next(i32 %1)
%10 = tail call i32 @wycc_type_subsume_tokens(i32 %8, i32 %9)
br label %11
11: ; preds = %2, %7
%12 = phi i32 [ %10, %7 ], [ 0, %2 ]
ret i32 %12
}