#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*/ fexpect(char *, int, int, int);
void test_label() {
  int x = 0;
  if (1)
  L1:
    x++;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          223, 1, x);
  ;
  int y = 0;
  if (0)
  L2:
    y++;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          228, 0, y);
  ;
  int z = 0;
  switch (7) {
    if (1)
    case 5:
      z += 2;
    if (0)
    case 7:
      z += 3;
    if (1)
    case 6:
      z += 5;
  }
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          239, 8, z);
  ;
}


x86 assembly (clang, -O0):
<test_label>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xece(%rip),%rdi
mov    $0xdf,%esi
mov    $0x1,%edx
call   1030 <fexpect@plt>
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1157 <test_label+0x47>
jmp    1165 <test_label+0x55>
jmp    115c <test_label+0x4c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
lea    0xe91(%rip),%rdi
mov    $0xe4,%esi
xor    %edx,%edx
mov    %edx,-0x10(%rbp)
call   1030 <fexpect@plt>
mov    -0x10(%rbp),%eax
movl   $0x0,-0xc(%rbp)
test   %al,%al
jne    11b3 <test_label+0xa3>
jmp    1195 <test_label+0x85>
xor    %eax,%eax
test   %al,%al
jne    11de <test_label+0xce>
jmp    11a4 <test_label+0x94>
mov    $0x1,%al
test   %al,%al
jne    11d0 <test_label+0xc0>
jmp    11e7 <test_label+0xd7>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    11cb <test_label+0xbb>
jmp    11d9 <test_label+0xc9>
jmp    11d0 <test_label+0xc0>
mov    -0xc(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0xc(%rbp)
jmp    11de <test_label+0xce>
mov    -0xc(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xe0f(%rip),%rdi
mov    $0xef,%esi
mov    $0x8,%edx
call   1030 <fexpect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_label>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xdf,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xe4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xef,%esi
mov    $0x8,%edx
mov    $0x8,%ecx
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c\00"
define void @test_label() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 223, i32 1, i32 %7)
store i32 0, i32* %2
br i1 false, label %9, label %13
9: ; preds = %4
br label %10
10: ; preds = %9
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %4
%14 = load i32, i32* %2
%15 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 228, i32 0, i32 %14)
store i32 0, i32* %3
switch i32 7, label %28 [
i32 5, label %17
i32 7, label %21
i32 6, label %25
]
16: ; No predecessors!
br label %17
17: ; preds = %13, %16
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 2
store i32 %19, i32* %3
br i1 false, label %20, label %24
20: ; preds = %17
br label %21
21: ; preds = %13, %20
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 3
store i32 %23, i32* %3
br label %24
24: ; preds = %21, %17
br label %25
25: ; preds = %13, %24
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 5
store i32 %27, i32* %3
br label %28
28: ; preds = %25, %13
%29 = load i32, i32* %3
%30 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 239, i32 8, i32 %29)
ret void
}

LLVM IR (-O2):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c\00"
define void @test_label() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 223, i32 1, i32 1)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 228, i32 0, i32 0)
%3 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 239, i32 8, i32 8)
ret void
}