__attribute__((no)) int g(int t, int k) {
  int b;
  switch (t) {
  case 0:
    abrt("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/AlissonLinhares/NativeKit/refs/heads/4.9.0/"
         "cross/gcc/gcc/testsuite/gcc.dg/pr33676.c",
         __FUNCTION__);
  case 1:
    b = f(k);
    break;
  case 2:
    b = f(k);
    break;
  case 3:
    b = f(k);
    break;
  case 4:
    b = f(k);
    break;
  default:
    abrt("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/AlissonLinhares/NativeKit/refs/heads/4.9.0/"
         "cross/gcc/gcc/testsuite/gcc.dg/pr33676.c",
         __FUNCTION__);
  }
  return b;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x4,%rax
ja     11b0 <g+0x90>
mov    -0x18(%rbp),%rax
lea    0xeb6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeba(%rip),%rdi
lea    0xf61(%rip),%rsi
mov    $0x0,%al
call   1030 <abrt@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <f@plt>
mov    %eax,-0xc(%rbp)
jmp    11c5 <g+0xa5>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <f@plt>
mov    %eax,-0xc(%rbp)
jmp    11c5 <g+0xa5>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <f@plt>
mov    %eax,-0xc(%rbp)
jmp    11c5 <g+0xa5>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <f@plt>
mov    %eax,-0xc(%rbp)
jmp    11c5 <g+0xa5>
lea    0xe5d(%rip),%rdi
lea    0xf04(%rip),%rsi
mov    $0x0,%al
call   1030 <abrt@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rbx
cmp    $0x4,%edi
ja     1159 <g+0x39>
mov    %esi,%ebx
mov    %edi,%eax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xed3(%rip),%rdi
lea    0xf7a(%rip),%rsi
xor    %eax,%eax
call   1030 <abrt@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <f@plt>
lea    0xeb4(%rip),%rdi
lea    0xf5b(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <abrt@plt>

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/AlissonLinhares/NativeKit/refs/heads/4.9.0/cross/gcc/gcc/testsuite/gcc.dg/pr33676.c\00"
@__FUNCTION__.g = [2 x i8] c"g\00"
define i32 @g(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
switch i32 %6, label %21 [
i32 0, label %7
i32 1, label %9
i32 2, label %12
i32 3, label %15
i32 4, label %18
]
7: ; preds = %2
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @abrt to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.g, i64 0, i64 0))
br label %9
9: ; preds = %2, %7
%10 = load i32, i32* %4
%11 = call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 %10)
store i32 %11, i32* %5
br label %23
12: ; preds = %2
%13 = load i32, i32* %4
%14 = call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 %13)
store i32 %14, i32* %5
br label %23
15: ; preds = %2
%16 = load i32, i32* %4
%17 = call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 %16)
store i32 %17, i32* %5
br label %23
18: ; preds = %2
%19 = load i32, i32* %4
%20 = call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 %19)
store i32 %20, i32* %5
br label %23
21: ; preds = %2
%22 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @abrt to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.g, i64 0, i64 0))
br label %23
23: ; preds = %21, %18, %15, %12, %9
%24 = load i32, i32* %5
ret i32 %24
}

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/AlissonLinhares/NativeKit/refs/heads/4.9.0/cross/gcc/gcc/testsuite/gcc.dg/pr33676.c\00"
@__FUNCTION__.g = [2 x i8] c"g\00"
define i32 @g(i32 %0, i32 %1) {
switch i32 %0, label %13 [
i32 0, label %3
i32 1, label %5
i32 2, label %7
i32 3, label %9
i32 4, label %11
]
3: ; preds = %2
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @abrt to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.g, i64 0, i64 0))
br label %5
5: ; preds = %2, %3
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 %1)
br label %15
7: ; preds = %2
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 %1)
br label %15
9: ; preds = %2
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 %1)
br label %15
11: ; preds = %2
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @f to i32 (i32, ...)*)(i32 %1)
br label %15
13: ; preds = %2
%14 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @abrt to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.g, i64 0, i64 0))
br label %15
15: ; preds = %13, %11, %9, %7, %5
%16 = phi i32 [ undef, %13 ], [ %12, %11 ], [ %10, %9 ], [ %8, %7 ], [ %6, %5 ]
ret i32 %16
}