#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 enum smallchoices { ____Placeholder_smallchoices } smallchoices;
typedef enum medchoices { ____Placeholder_medchoices } medchoices;
typedef enum largechoices { ____Placeholder_largechoices } largechoices;

/* Variables and functions */
int /*<<< orphan*/ test_size_t_eq(char *, int, char *, char *, int, int);
int test_sanity_enum_size(void) {
  enum smallchoices { sa, sb, sc };
  enum medchoices { ma, mb, mc, md, me, mf, mg, mh, mi, mj, mk, ml };
  enum largechoices {
    a01,
    b01,
    c01,
    d01,
    e01,
    f01,
    g01,
    h01,
    i01,
    j01,
    a02,
    b02,
    c02,
    d02,
    e02,
    f02,
    g02,
    h02,
    i02,
    j02,
    a03,
    b03,
    c03,
    d03,
    e03,
    f03,
    g03,
    h03,
    i03,
    j03,
    a04,
    b04,
    c04,
    d04,
    e04,
    f04,
    g04,
    h04,
    i04,
    j04,
    a05,
    b05,
    c05,
    d05,
    e05,
    f05,
    g05,
    h05,
    i05,
    j05,
    a06,
    b06,
    c06,
    d06,
    e06,
    f06,
    g06,
    h06,
    i06,
    j06,
    a07,
    b07,
    c07,
    d07,
    e07,
    f07,
    g07,
    h07,
    i07,
    j07,
    a08,
    b08,
    c08,
    d08,
    e08,
    f08,
    g08,
    h08,
    i08,
    j08,
    a09,
    b09,
    c09,
    d09,
    e09,
    f09,
    g09,
    h09,
    i09,
    j09,
    a10,
    b10,
    c10,
    d10,
    e10,
    f10,
    g10,
    h10,
    i10,
    j10,
    xxx
  };
  if (!test_size_t_eq(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/sanitytest.c",
          42, "sizeof(enum smallchoices)", "sizeof(int)",
          sizeof(enum smallchoices), sizeof(int)) ||
      !test_size_t_eq(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/sanitytest.c",
          43, "sizeof(enum medchoices)", "sizeof(int)", sizeof(enum medchoices),
          sizeof(int)) ||
      !test_size_t_eq(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/sanitytest.c",
          44, "sizeof(enum largechoices)", "sizeof(int)",
          sizeof(enum largechoices), sizeof(int)))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<test_sanity_enum_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x2a,%esi
lea    0xf83(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x4,%r9d
mov    %r9d,%r8d
call   1030 <test_size_t_eq@plt>
cmp    $0x0,%eax
je     11ab <test_sanity_enum_size+0x9b>
lea    0xeb0(%rip),%rdi
mov    $0x2b,%esi
lea    0xf78(%rip),%rdx
lea    0xf65(%rip),%rcx
mov    $0x4,%r9d
mov    %r9d,%r8d
call   1030 <test_size_t_eq@plt>
cmp    $0x0,%eax
je     11ab <test_sanity_enum_size+0x9b>
lea    0xe7f(%rip),%rdi
mov    $0x2c,%esi
lea    0xf5f(%rip),%rdx
lea    0xf34(%rip),%rcx
mov    $0x4,%r9d
mov    %r9d,%r8d
call   1030 <test_size_t_eq@plt>
cmp    $0x0,%eax
jne    11b7 <test_sanity_enum_size+0xa7>
movl   $0x0,-0x4(%rbp)
jmp    11be <test_sanity_enum_size+0xae>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sanity_enum_size>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xf8f(%rip),%rdx
lea    0xfa2(%rip),%rcx
mov    $0x2a,%esi
mov    $0x4,%r8d
mov    $0x4,%r9d
call   1030 <test_size_t_eq@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     11a3 <test_sanity_enum_size+0x93>
lea    0xeb7(%rip),%rdi
lea    0xf84(%rip),%rdx
lea    0xf71(%rip),%rcx
mov    $0x2b,%esi
mov    $0x4,%r8d
mov    $0x4,%r9d
call   1030 <test_size_t_eq@plt>
test   %eax,%eax
je     11a3 <test_sanity_enum_size+0x93>
lea    0xe88(%rip),%rdi
lea    0xf6d(%rip),%rdx
lea    0xf42(%rip),%rcx
mov    $0x2c,%esi
mov    $0x4,%r8d
mov    $0x4,%r9d
call   1030 <test_size_t_eq@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [174 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/sanitytest.c\00"
@.str.1 = [26 x i8] c"sizeof(enum smallchoices)\00"
@.str.2 = [12 x i8] c"sizeof(int)\00"
@.str.3 = [24 x i8] c"sizeof(enum medchoices)\00"
@.str.4 = [26 x i8] c"sizeof(enum largechoices)\00"
define i32 @test_sanity_enum_size() {
%1 = alloca i32
%2 = call i32 @test_size_t_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 42, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 4)
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = call i32 @test_size_t_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 43, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = call i32 @test_size_t_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 44, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 4)
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %7, %4, %0
store i32 0, i32* %1
br label %12
11: ; preds = %7
store i32 1, i32* %1
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [174 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/sanitytest.c\00"
@.str.1 = [26 x i8] c"sizeof(enum smallchoices)\00"
@.str.2 = [12 x i8] c"sizeof(int)\00"
@.str.3 = [24 x i8] c"sizeof(enum medchoices)\00"
@.str.4 = [26 x i8] c"sizeof(enum largechoices)\00"
define i32 @test_sanity_enum_size() {
%1 = tail call i32 @test_size_t_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 42, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 4)
%2 = icmp eq i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i32 @test_size_t_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 43, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 4)
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 @test_size_t_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 44, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 4)
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %0, %3
%11 = phi i32 [ 0, %3 ], [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}