#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*/ blanks();
int /*<<< orphan*/ declare_local(int, int);
int get_type();
int /*<<< orphan*/ need_semicolon();
do_local_declares(int stclass) {
  int type = 0;
  blanks();
  if (type = get_type()) {
    declare_local(type, stclass);
  } else if (stclass == 5 || stclass == 6) {
    declare_local((2 << 2), stclass);
  } else {
    return (0);
  }
  need_semicolon();
  return (1);
}


x86 assembly (clang, -O0):
<do_local_declares>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <blanks@plt>
mov    $0x0,%al
call   1060 <get_type@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     117c <do_local_declares+0x3c>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <declare_local@plt>
jmp    11b3 <do_local_declares+0x73>
cmpl   $0x5,-0x8(%rbp)
je     1190 <do_local_declares+0x50>
cmpl   $0x6,-0x8(%rbp)
jne    11a2 <do_local_declares+0x62>
mov    -0x8(%rbp),%esi
mov    $0x8,%edi
call   1050 <declare_local@plt>
jmp    11ae <do_local_declares+0x6e>
movl   $0x0,-0x4(%rbp)
jmp    11c1 <do_local_declares+0x81>
jmp    11b3 <do_local_declares+0x73>
mov    $0x0,%al
call   1030 <need_semicolon@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_local_declares>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <blanks@plt>
xor    %eax,%eax
call   1060 <get_type@plt>
test   %eax,%eax
jne    1166 <do_local_declares+0x26>
lea    -0x5(%rbx),%ecx
mov    $0x8,%eax
cmp    $0x1,%ecx
ja     117b <do_local_declares+0x3b>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <declare_local@plt>
xor    %eax,%eax
call   1030 <need_semicolon@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @do_local_declares(i32 %0) {
%2 = tail call i32 (...) @blanks()
%3 = tail call i32 (...) @get_type()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = add i32 %0, -5
%7 = icmp ult i32 %6, 2
br i1 %7, label %8, label %12
8: ; preds = %5, %1
%9 = phi i32 [ %3, %1 ], [ 8, %5 ]
%10 = tail call i32 @declare_local(i32 %9, i32 %0)
%11 = tail call i32 (...) @need_semicolon()
br label %12
12: ; preds = %5, %8
%13 = phi i32 [ 1, %8 ], [ 0, %5 ]
ret i32 %13
}