#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ consume_next_c_on_match_or_err(int /*<<< orphan*/ *, char,
                                                  char *);
scalar_t__ next_c_matches(int /*<<< orphan*/ *, char);
int /*<<< orphan*/ report_error(char *);
int /*<<< orphan*/ skip_ws(int /*<<< orphan*/ *);
void ensure_non_empty_object_list(FILE *scene_file) {
  ((void)0);
  skip_ws(scene_file);
  consume_next_c_on_match_or_err(
      scene_file, '[', "Expected opening of object list (missing '[')");
  skip_ws(scene_file);
  if (next_c_matches(scene_file, ']'))
    report_error("This scene file is empty; expected object definitions");
}


x86 assembly (clang, -O0):
<ensure_non_empty_object_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <skip_ws@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5b,%esi
lea    0xe9b(%rip),%rdx
call   1050 <consume_next_c_on_match_or_err@plt>
mov    -0x8(%rbp),%rdi
call   1030 <skip_ws@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5d,%esi
call   1060 <next_c_matches@plt>
cmp    $0x0,%rax
je     1197 <ensure_non_empty_object_list+0x57>
lea    0xe9c(%rip),%rdi
call   1040 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ensure_non_empty_object_list>:
push   %rbx
mov    %rdi,%rbx
call   1030 <skip_ws@plt>
lea    0xeb0(%rip),%rdx
mov    %rbx,%rdi
mov    $0x5b,%esi
call   1050 <consume_next_c_on_match_or_err@plt>
mov    %rbx,%rdi
call   1030 <skip_ws@plt>
mov    %rbx,%rdi
mov    $0x5d,%esi
call   1060 <next_c_matches@plt>
test   %rax,%rax
je     1184 <ensure_non_empty_object_list+0x44>
lea    0xeb0(%rip),%rdi
pop    %rbx
jmp    1040 <report_error@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"Expected opening of object list (missing '[')\00"
@.str.1 = [54 x i8] c"This scene file is empty; expected object definitions\00"
define void @ensure_non_empty_object_list(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @skip_ws(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @consume_next_c_on_match_or_err(i32* %5, i8 signext 91, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @skip_ws(i32* %7)
%9 = load i32*, i32** %2
%10 = call i64 @next_c_matches(i32* %9, i8 signext 93)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 @report_error(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %1
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"Expected opening of object list (missing '[')\00"
@.str.1 = [54 x i8] c"This scene file is empty; expected object definitions\00"
define void @ensure_non_empty_object_list(i32* %0) {
%2 = tail call i32 @skip_ws(i32* %0)
%3 = tail call i32 @consume_next_c_on_match_or_err(i32* %0, i8 signext 91, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @skip_ws(i32* %0)
%5 = tail call i64 @next_c_matches(i32* %0, i8 signext 93)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @report_error(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}