void MainWinDisp_gset(n) int n;
{
  char buf[50];
  int nn, cc;
  switch (n) {
  case 1:
    card_gset1(&nn);
    break;
  case 2:
    card_gset2(&nn);
    break;
  case 3:
    card_gset3(&nn);
    break;
  case 4:
    card_gset4(&nn);
    break;
  case 5:
    card_gset5(&nn);
    break;
  }
  while (nn) {
    switch (n) {
    case 1:
      valOrd_gset1(&cc, nn);
      break;
    case 2:
      valOrd_gset2(&cc, nn);
      break;
    case 3:
      valOrd_gset3(&cc, nn);
      break;
    case 4:
      valOrd_gset4(&cc, nn);
      break;
    case 5:
      valOrd_gset5(&cc, nn);
      break;
    }
    DisplayCurrWinText("      ");
    DisplayCurrWinText(GetName(cc));
    DisplayCurrWinText("\n");
    nn = nn - 1;
  }
}


x86 assembly (clang, -O0):
<MainWinDisp_gset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0x4,%eax
ja     123f <MainWinDisp_gset+0x7f>
mov    -0x50(%rbp),%rax
lea    0xe15(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x44(%rbp),%rdi
mov    $0x0,%al
call   10e0 <card_gset1@plt>
jmp    123f <MainWinDisp_gset+0x7f>
lea    -0x44(%rbp),%rdi
mov    $0x0,%al
call   1080 <card_gset2@plt>
jmp    123f <MainWinDisp_gset+0x7f>
lea    -0x44(%rbp),%rdi
mov    $0x0,%al
call   1030 <card_gset3@plt>
jmp    123f <MainWinDisp_gset+0x7f>
lea    -0x44(%rbp),%rdi
mov    $0x0,%al
call   1070 <card_gset4@plt>
jmp    123f <MainWinDisp_gset+0x7f>
lea    -0x44(%rbp),%rdi
mov    $0x0,%al
call   10d0 <card_gset5@plt>
jmp    1244 <MainWinDisp_gset+0x84>
cmpl   $0x0,-0x44(%rbp)
je     130e <MainWinDisp_gset+0x14e>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0x4,%eax
ja     12d1 <MainWinDisp_gset+0x111>
mov    -0x58(%rbp),%rax
lea    0xda6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x44(%rbp),%esi
lea    -0x48(%rbp),%rdi
mov    $0x0,%al
call   1090 <valOrd_gset1@plt>
jmp    12d1 <MainWinDisp_gset+0x111>
mov    -0x44(%rbp),%esi
lea    -0x48(%rbp),%rdi
mov    $0x0,%al
call   1040 <valOrd_gset2@plt>
jmp    12d1 <MainWinDisp_gset+0x111>
mov    -0x44(%rbp),%esi
lea    -0x48(%rbp),%rdi
mov    $0x0,%al
call   10a0 <valOrd_gset3@plt>
jmp    12d1 <MainWinDisp_gset+0x111>
mov    -0x44(%rbp),%esi
lea    -0x48(%rbp),%rdi
mov    $0x0,%al
call   1050 <valOrd_gset4@plt>
jmp    12d1 <MainWinDisp_gset+0x111>
mov    -0x44(%rbp),%esi
lea    -0x48(%rbp),%rdi
mov    $0x0,%al
call   10b0 <valOrd_gset5@plt>
lea    0xd50(%rip),%rdi
mov    $0x0,%al
call   10c0 <DisplayCurrWinText@plt>
mov    -0x48(%rbp),%edi
mov    $0x0,%al
call   1060 <GetName@plt>
mov    %eax,%edi
mov    $0x0,%al
call   10c0 <DisplayCurrWinText@plt>
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   10c0 <DisplayCurrWinText@plt>
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1244 <MainWinDisp_gset+0x84>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MainWinDisp_gset>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
add    $0xffffffff,%ebx
cmp    $0x4,%ebx
ja     122b <MainWinDisp_gset+0x6b>
lea    0xe22(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   10e0 <card_gset1@plt>
jmp    122b <MainWinDisp_gset+0x6b>
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1080 <card_gset2@plt>
jmp    122b <MainWinDisp_gset+0x6b>
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1030 <card_gset3@plt>
jmp    122b <MainWinDisp_gset+0x6b>
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1070 <card_gset4@plt>
jmp    122b <MainWinDisp_gset+0x6b>
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   10d0 <card_gset5@plt>
mov    0x8(%rsp),%esi
test   %esi,%esi
je     12d4 <MainWinDisp_gset+0x114>
lea    0xdea(%rip),%r14
lea    0xdea(%rip),%r15
lea    0xdc8(%rip),%r13
lea    0xc(%rsp),%r12
jmp    1295 <MainWinDisp_gset+0xd5>
mov    %r12,%rdi
xor    %eax,%eax
call   10b0 <valOrd_gset5@plt>
nopl   (%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   10c0 <DisplayCurrWinText@plt>
mov    0xc(%rsp),%edi
xor    %eax,%eax
call   1060 <GetName@plt>
mov    %eax,%edi
xor    %eax,%eax
call   10c0 <DisplayCurrWinText@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   10c0 <DisplayCurrWinText@plt>
mov    0x8(%rsp),%esi
add    $0xffffffff,%esi
mov    %esi,0x8(%rsp)
je     12d4 <MainWinDisp_gset+0x114>
cmp    $0x4,%ebx
ja     1260 <MainWinDisp_gset+0xa0>
movslq 0x0(%r13,%rbx,4),%rax
add    %r13,%rax
jmp    *%rax
mov    %r12,%rdi
xor    %eax,%eax
call   1090 <valOrd_gset1@plt>
jmp    1260 <MainWinDisp_gset+0xa0>
mov    %r12,%rdi
xor    %eax,%eax
call   10a0 <valOrd_gset3@plt>
jmp    1260 <MainWinDisp_gset+0xa0>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <valOrd_gset4@plt>
jmp    1260 <MainWinDisp_gset+0xa0>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <valOrd_gset2@plt>
jmp    1260 <MainWinDisp_gset+0xa0>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c" \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @MainWinDisp_gset(i32 %0) {
%2 = alloca i32
%3 = alloca [50 x i8]
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
switch i32 %6, label %17 [
i32 1, label %7
i32 2, label %9
i32 3, label %11
i32 4, label %13
i32 5, label %15
]
7: ; preds = %1
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset1 to i32 (i32*, ...)*)(i32* %4)
br label %17
9: ; preds = %1
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset2 to i32 (i32*, ...)*)(i32* %4)
br label %17
11: ; preds = %1
%12 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset3 to i32 (i32*, ...)*)(i32* %4)
br label %17
13: ; preds = %1
%14 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset4 to i32 (i32*, ...)*)(i32* %4)
br label %17
15: ; preds = %1
%16 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset5 to i32 (i32*, ...)*)(i32* %4)
br label %17
17: ; preds = %1, %15, %13, %11, %9, %7
br label %18
18: ; preds = %38, %17
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %46
21: ; preds = %18
%22 = load i32, i32* %2
switch i32 %22, label %38 [
i32 1, label %23
i32 2, label %26
i32 3, label %29
i32 4, label %32
i32 5, label %35
]
23: ; preds = %21
%24 = load i32, i32* %4
%25 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset1 to i32 (i32*, i32, ...)*)(i32* %5, i32 %24)
br label %38
26: ; preds = %21
%27 = load i32, i32* %4
%28 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset2 to i32 (i32*, i32, ...)*)(i32* %5, i32 %27)
br label %38
29: ; preds = %21
%30 = load i32, i32* %4
%31 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset3 to i32 (i32*, i32, ...)*)(i32* %5, i32 %30)
br label %38
32: ; preds = %21
%33 = load i32, i32* %4
%34 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset4 to i32 (i32*, i32, ...)*)(i32* %5, i32 %33)
br label %38
35: ; preds = %21
%36 = load i32, i32* %4
%37 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset5 to i32 (i32*, i32, ...)*)(i32* %5, i32 %36)
br label %38
38: ; preds = %21, %35, %32, %29, %26, %23
%39 = call i32 (i8*, ...) bitcast (i32 (...)* @DisplayCurrWinText to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%40 = load i32, i32* %5
%41 = call i32 (i32, ...) bitcast (i32 (...)* @GetName to i32 (i32, ...)*)(i32 %40)
%42 = call i32 (i32, ...) bitcast (i32 (...)* @DisplayCurrWinText to i32 (i32, ...)*)(i32 %41)
%43 = call i32 (i8*, ...) bitcast (i32 (...)* @DisplayCurrWinText to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%44 = load i32, i32* %4
%45 = sub nsw i32 %44, 1
store i32 %45, i32* %4
br label %18
46: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @MainWinDisp_gset(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
switch i32 %0, label %16 [
i32 1, label %6
i32 2, label %8
i32 3, label %10
i32 4, label %12
i32 5, label %14
]
6: ; preds = %1
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset1 to i32 (i32*, ...)*)(i32* %2)
br label %16
8: ; preds = %1
%9 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset2 to i32 (i32*, ...)*)(i32* %2)
br label %16
10: ; preds = %1
%11 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset3 to i32 (i32*, ...)*)(i32* %2)
br label %16
12: ; preds = %1
%13 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset4 to i32 (i32*, ...)*)(i32* %2)
br label %16
14: ; preds = %1
%15 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset5 to i32 (i32*, ...)*)(i32* %2)
br label %16
16: ; preds = %1, %14, %12, %10, %8, %6
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 0
br i1 %18, label %40, label %19
19: ; preds = %16, %31
%20 = phi i32 [ %38, %31 ], [ %17, %16 ]
switch i32 %0, label %31 [
i32 1, label %21
i32 2, label %23
i32 3, label %25
i32 4, label %27
i32 5, label %29
]
21: ; preds = %19
%22 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset1 to i32 (i32*, i32, ...)*)(i32* %3, i32 %20)
br label %31
23: ; preds = %19
%24 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset2 to i32 (i32*, i32, ...)*)(i32* %3, i32 %20)
br label %31
25: ; preds = %19
%26 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset3 to i32 (i32*, i32, ...)*)(i32* %3, i32 %20)
br label %31
27: ; preds = %19
%28 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset4 to i32 (i32*, i32, ...)*)(i32* %3, i32 %20)
br label %31
29: ; preds = %19
%30 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @valOrd_gset5 to i32 (i32*, i32, ...)*)(i32* %3, i32 %20)
br label %31
31: ; preds = %19, %29, %27, %25, %23, %21
%32 = call i32 (i8*, ...) bitcast (i32 (...)* @DisplayCurrWinText to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%33 = load i32, i32* %3
%34 = call i32 (i32, ...) bitcast (i32 (...)* @GetName to i32 (i32, ...)*)(i32 %33)
%35 = call i32 (i32, ...) bitcast (i32 (...)* @DisplayCurrWinText to i32 (i32, ...)*)(i32 %34)
%36 = call i32 (i8*, ...) bitcast (i32 (...)* @DisplayCurrWinText to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%37 = load i32, i32* %2
%38 = add nsw i32 %37, -1
store i32 %38, i32* %2
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %19
40: ; preds = %31, %16
ret void
}