#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*/ checkuse();
int /*<<< orphan*/ choochar();
int /*<<< orphan*/ error1(char *);
scalar_t__ getspec();
int /*<<< orphan*/ getstop();
scalar_t__ gettbl();
int /*<<< orphan*/ maktab();
int /*<<< orphan*/ multipg();
int /*<<< orphan*/ runout();
int do_table1(void) {
  if (getspec()) {
    error1("Errors in format section.");
    return 1;
  };
  if (gettbl()) {
    error1("Errors in data section.");
    return 1;
  };
  getstop();
  checkuse();
  choochar();
  multipg();
  maktab();
  runout();
  return 0;
}


x86 assembly (clang, -O0):
<do_table1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getspec@plt>
cmp    $0x0,%rax
je     11c1 <do_table1+0x31>
lea    0xe50(%rip),%rdi
call   10a0 <error1@plt>
movl   $0x1,-0x4(%rbp)
jmp    121b <do_table1+0x8b>
mov    $0x0,%al
call   1050 <gettbl@plt>
cmp    $0x0,%rax
je     11ea <do_table1+0x5a>
lea    0xe41(%rip),%rdi
call   10a0 <error1@plt>
movl   $0x1,-0x4(%rbp)
jmp    121b <do_table1+0x8b>
mov    $0x0,%al
call   10b0 <getstop@plt>
mov    $0x0,%al
call   1030 <checkuse@plt>
mov    $0x0,%al
call   1070 <choochar@plt>
mov    $0x0,%al
call   1060 <multipg@plt>
mov    $0x0,%al
call   1080 <maktab@plt>
mov    $0x0,%al
call   1090 <runout@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_table1>:
push   %rbx
xor    %eax,%eax
call   1040 <getspec@plt>
test   %rax,%rax
je     11a6 <do_table1+0x16>
lea    0xe5c(%rip),%rdi
jmp    11bb <do_table1+0x2b>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <gettbl@plt>
test   %rax,%rax
je     11c9 <do_table1+0x39>
lea    0xe5f(%rip),%rdi
call   10a0 <error1@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret
xor    %eax,%eax
call   10b0 <getstop@plt>
xor    %eax,%eax
call   1030 <checkuse@plt>
xor    %eax,%eax
call   1070 <choochar@plt>
xor    %eax,%eax
call   1060 <multipg@plt>
xor    %eax,%eax
call   1080 <maktab@plt>
xor    %eax,%eax
call   1090 <runout@plt>
jmp    11c5 <do_table1+0x35>

LLVM IR (-O0):
@.str = [26 x i8] c"Errors in format section.\00"
@.str.1 = [24 x i8] c"Errors in data section.\00"
define i32 @do_table1() {
%1 = alloca i32
%2 = call i64 (...) @getspec()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @error1(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %18
6: ; preds = %0
%7 = call i64 (...) @gettbl()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @error1(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %18
11: ; preds = %6
%12 = call i32 (...) @getstop()
%13 = call i32 (...) @checkuse()
%14 = call i32 (...) @choochar()
%15 = call i32 (...) @multipg()
%16 = call i32 (...) @maktab()
%17 = call i32 (...) @runout()
store i32 0, i32* %1
br label %18
18: ; preds = %11, %9, %4
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [26 x i8] c"Errors in format section.\00"
@.str.1 = [24 x i8] c"Errors in data section.\00"
define i32 @do_table1() {
%1 = tail call i64 (...) @getspec()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @error1(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %17
5: ; preds = %0
%6 = tail call i64 (...) @gettbl()
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @error1(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %17
10: ; preds = %5
%11 = tail call i32 (...) @getstop()
%12 = tail call i32 (...) @checkuse()
%13 = tail call i32 (...) @choochar()
%14 = tail call i32 (...) @multipg()
%15 = tail call i32 (...) @maktab()
%16 = tail call i32 (...) @runout()
br label %17
17: ; preds = %10, %8, %3
%18 = phi i32 [ 1, %3 ], [ 1, %8 ], [ 0, %10 ]
ret i32 %18
}