#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*/ Inst_Printf(char *, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int Call_C_Arg_Foreign_D(int offset, int adr_of, int index) {
  char dest[8];
  if (adr_of) {
    switch (offset) {
    case 0:
      sprintf(dest, "%s", "$4");
      break;
    case 1:
      sprintf(dest, "%s", "$5");
      break;
    case 2:
      sprintf(dest, "%s", "$6");
      break;
    case 3:
      sprintf(dest, "%s", "$7");
      break;
    case 4:
      sprintf(dest, "%s", "$8");
      break;
    case 5:
      sprintf(dest, "%s", "$9");
      break;
    case 6:
      sprintf(dest, "%s", "$10");
      break;
    case 7:
      sprintf(dest, "%s", "$11");
      break;
    default:
      sprintf(dest, "%s", "$24");
      break;
    }
    Inst_Printf("la", "%s,pl_foreign_double", dest);
    Inst_Printf("addu", "%s,%s,%d", dest, dest, index * 8);
    if (offset > 7) {
      Inst_Printf("sw", "%s,%d($sp)", dest, (offset - 8) * 8);
    }
    return 1;
  } else {
    switch (offset) {
    case 0:
      sprintf(dest, "%s", "$f12");
      break;
    case 1:
      sprintf(dest, "%s", "$f13");
      break;
    case 2:
      sprintf(dest, "%s", "$f14");
      break;
    case 3:
      sprintf(dest, "%s", "$f15");
      break;
    case 4:
      sprintf(dest, "%s", "$f16");
      break;
    case 5:
      sprintf(dest, "%s", "$f17");
      break;
    case 6:
      sprintf(dest, "%s", "$f18");
      break;
    case 7:
      sprintf(dest, "%s", "$f19");
      break;
    default:
      sprintf(dest, "%s", "$f1");
      break;
    }
    Inst_Printf("la", "$25,pl_foreign_double");
    Inst_Printf("l.d", "%s,%d($25)", dest, index * 8);
    if (offset > 7) {
      Inst_Printf("s.d", "%s,%d($sp)", dest, (offset - 8) * 8);
    }
    return 1;
  }
}


x86 assembly (clang, -O0):
<Call_C_Arg_Foreign_D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     12cd <Call_C_Arg_Foreign_D+0x1ad>
mov    -0x8(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0x7,%rax
ja     1240 <Call_C_Arg_Foreign_D+0x120>
mov    -0x20(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x18(%rbp),%rdi
lea    0xed5(%rip),%rsi
lea    0xed1(%rip),%rdx
call   1040 <sprintf@plt>
jmp    1257 <Call_C_Arg_Foreign_D+0x137>
lea    -0x18(%rbp),%rdi
lea    0xeb9(%rip),%rsi
lea    0xeb8(%rip),%rdx
call   1040 <sprintf@plt>
jmp    1257 <Call_C_Arg_Foreign_D+0x137>
lea    -0x18(%rbp),%rdi
lea    0xe9d(%rip),%rsi
lea    0xe9f(%rip),%rdx
call   1040 <sprintf@plt>
jmp    1257 <Call_C_Arg_Foreign_D+0x137>
lea    -0x18(%rbp),%rdi
lea    0xe81(%rip),%rsi
lea    0xe86(%rip),%rdx
call   1040 <sprintf@plt>
jmp    1257 <Call_C_Arg_Foreign_D+0x137>
lea    -0x18(%rbp),%rdi
lea    0xe65(%rip),%rsi
lea    0xe6d(%rip),%rdx
call   1040 <sprintf@plt>
jmp    1257 <Call_C_Arg_Foreign_D+0x137>
lea    -0x18(%rbp),%rdi
lea    0xe49(%rip),%rsi
lea    0xe54(%rip),%rdx
call   1040 <sprintf@plt>
jmp    1257 <Call_C_Arg_Foreign_D+0x137>
lea    -0x18(%rbp),%rdi
lea    0xe2d(%rip),%rsi
lea    0xe3b(%rip),%rdx
call   1040 <sprintf@plt>
jmp    1257 <Call_C_Arg_Foreign_D+0x137>
lea    -0x18(%rbp),%rdi
lea    0xe11(%rip),%rsi
lea    0xe23(%rip),%rdx
call   1040 <sprintf@plt>
jmp    1257 <Call_C_Arg_Foreign_D+0x137>
lea    -0x18(%rbp),%rdi
lea    0xdf5(%rip),%rsi
lea    0xe0b(%rip),%rdx
call   1040 <sprintf@plt>
lea    -0x18(%rbp),%rdx
lea    0xdff(%rip),%rdi
lea    0xdfb(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
lea    -0x18(%rbp),%rdx
lea    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r8d
shl    $0x3,%r8d
lea    0xdf2(%rip),%rdi
lea    0xdf0(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
cmpl   $0x7,-0x8(%rbp)
jle    12c1 <Call_C_Arg_Foreign_D+0x1a1>
lea    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%ecx
sub    $0x8,%ecx
shl    $0x3,%ecx
lea    0xdd4(%rip),%rdi
lea    0xdd0(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1450 <Call_C_Arg_Foreign_D+0x330>
mov    -0x8(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0x7,%rax
ja     13d2 <Call_C_Arg_Foreign_D+0x2b2>
mov    -0x28(%rbp),%rax
lea    0xd17(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x18(%rbp),%rdi
lea    0xd43(%rip),%rsi
lea    0xd91(%rip),%rdx
call   1040 <sprintf@plt>
jmp    13e9 <Call_C_Arg_Foreign_D+0x2c9>
lea    -0x18(%rbp),%rdi
lea    0xd27(%rip),%rsi
lea    0xd7a(%rip),%rdx
call   1040 <sprintf@plt>
jmp    13e9 <Call_C_Arg_Foreign_D+0x2c9>
lea    -0x18(%rbp),%rdi
lea    0xd0b(%rip),%rsi
lea    0xd63(%rip),%rdx
call   1040 <sprintf@plt>
jmp    13e9 <Call_C_Arg_Foreign_D+0x2c9>
lea    -0x18(%rbp),%rdi
lea    0xcef(%rip),%rsi
lea    0xd4c(%rip),%rdx
call   1040 <sprintf@plt>
jmp    13e9 <Call_C_Arg_Foreign_D+0x2c9>
lea    -0x18(%rbp),%rdi
lea    0xcd3(%rip),%rsi
lea    0xd35(%rip),%rdx
call   1040 <sprintf@plt>
jmp    13e9 <Call_C_Arg_Foreign_D+0x2c9>
lea    -0x18(%rbp),%rdi
lea    0xcb7(%rip),%rsi
lea    0xd1e(%rip),%rdx
call   1040 <sprintf@plt>
jmp    13e9 <Call_C_Arg_Foreign_D+0x2c9>
lea    -0x18(%rbp),%rdi
lea    0xc9b(%rip),%rsi
lea    0xd07(%rip),%rdx
call   1040 <sprintf@plt>
jmp    13e9 <Call_C_Arg_Foreign_D+0x2c9>
lea    -0x18(%rbp),%rdi
lea    0xc7f(%rip),%rsi
lea    0xcf0(%rip),%rdx
call   1040 <sprintf@plt>
jmp    13e9 <Call_C_Arg_Foreign_D+0x2c9>
lea    -0x18(%rbp),%rdi
lea    0xc63(%rip),%rsi
lea    0xcd9(%rip),%rdx
call   1040 <sprintf@plt>
lea    0xc71(%rip),%rdi
lea    0xcca(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
lea    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
lea    0xcc8(%rip),%rdi
lea    0xcc5(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
cmpl   $0x7,-0x8(%rbp)
jle    1449 <Call_C_Arg_Foreign_D+0x329>
lea    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%ecx
sub    $0x8,%ecx
shl    $0x3,%ecx
lea    0xcab(%rip),%rdi
lea    0xc48(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Call_C_Arg_Foreign_D>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %edi,%r14d
test   %esi,%esi
je     114b <Call_C_Arg_Foreign_D+0x3b>
cmp    $0x7,%r14d
ja     117a <Call_C_Arg_Foreign_D+0x6a>
mov    %r14d,%eax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x0,0xa(%rsp)
movw   $0x3424,0x8(%rsp)
jmp    11dc <Call_C_Arg_Foreign_D+0xcc>
cmp    $0x7,%r14d
ja     1230 <Call_C_Arg_Foreign_D+0x120>
mov    %r14d,%eax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x0,0xc(%rsp)
movl   $0x32316624,0x8(%rsp)
32
jmp    12a1 <Call_C_Arg_Foreign_D+0x191>
movl   $0x343224,0x8(%rsp)
jmp    11dc <Call_C_Arg_Foreign_D+0xcc>
movb   $0x0,0xa(%rsp)
movw   $0x3524,0x8(%rsp)
jmp    11dc <Call_C_Arg_Foreign_D+0xcc>
movb   $0x0,0xa(%rsp)
movw   $0x3624,0x8(%rsp)
jmp    11dc <Call_C_Arg_Foreign_D+0xcc>
movb   $0x0,0xa(%rsp)
movw   $0x3724,0x8(%rsp)
jmp    11dc <Call_C_Arg_Foreign_D+0xcc>
movb   $0x0,0xa(%rsp)
movw   $0x3824,0x8(%rsp)
jmp    11dc <Call_C_Arg_Foreign_D+0xcc>
movb   $0x0,0xa(%rsp)
movw   $0x3924,0x8(%rsp)
jmp    11dc <Call_C_Arg_Foreign_D+0xcc>
movl   $0x303124,0x8(%rsp)
jmp    11dc <Call_C_Arg_Foreign_D+0xcc>
movl   $0x313124,0x8(%rsp)
lea    0xe6f(%rip),%rdi
lea    0xe6b(%rip),%rsi
lea    0x8(%rsp),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
shl    $0x3,%ebp
lea    0xe67(%rip),%rdi
lea    0xe65(%rip),%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %ebp,%r8d
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
cmp    $0x7,%r14d
jle    12fd <Call_C_Arg_Foreign_D+0x1ed>
lea    0xe4d(%rip),%rdi
jmp    12e2 <Call_C_Arg_Foreign_D+0x1d2>
movl   $0x316624,0x8(%rsp)
jmp    12a1 <Call_C_Arg_Foreign_D+0x191>
movb   $0x0,0xc(%rsp)
movl   $0x33316624,0x8(%rsp)
33
jmp    12a1 <Call_C_Arg_Foreign_D+0x191>
movb   $0x0,0xc(%rsp)
movl   $0x34316624,0x8(%rsp)
34
jmp    12a1 <Call_C_Arg_Foreign_D+0x191>
movb   $0x0,0xc(%rsp)
movl   $0x35316624,0x8(%rsp)
35
jmp    12a1 <Call_C_Arg_Foreign_D+0x191>
movb   $0x0,0xc(%rsp)
movl   $0x36316624,0x8(%rsp)
36
jmp    12a1 <Call_C_Arg_Foreign_D+0x191>
movb   $0x0,0xc(%rsp)
movl   $0x37316624,0x8(%rsp)
37
jmp    12a1 <Call_C_Arg_Foreign_D+0x191>
movb   $0x0,0xc(%rsp)
movl   $0x38316624,0x8(%rsp)
38
jmp    12a1 <Call_C_Arg_Foreign_D+0x191>
movb   $0x0,0xc(%rsp)
movl   $0x39316624,0x8(%rsp)
39
lea    0xdaa(%rip),%rdi
lea    0xdff(%rip),%rsi
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
shl    $0x3,%ebp
lea    0xe04(%rip),%rdi
lea    0xe01(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
cmp    $0x8,%r14d
jl     12fd <Call_C_Arg_Foreign_D+0x1ed>
lea    0xdf1(%rip),%rdi
lea    -0x40(,%r14,8),%ecx
ff
lea    0xd8a(%rip),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"$4\00"
@.str.2 = [3 x i8] c"$5\00"
@.str.3 = [3 x i8] c"$6\00"
@.str.4 = [3 x i8] c"$7\00"
@.str.5 = [3 x i8] c"$8\00"
@.str.6 = [3 x i8] c"$9\00"
@.str.7 = [4 x i8] c"$10\00"
@.str.8 = [4 x i8] c"$11\00"
@.str.9 = [4 x i8] c"$24\00"
@.str.10 = [3 x i8] c"la\00"
@.str.11 = [21 x i8] c"%s,pl_foreign_double\00"
@.str.12 = [5 x i8] c"addu\00"
@.str.13 = [9 x i8] c"%s,%s,%d\00"
@.str.14 = [3 x i8] c"sw\00"
@.str.15 = [11 x i8] c"%s,%d($sp)\00"
@.str.16 = [5 x i8] c"$f12\00"
@.str.17 = [5 x i8] c"$f13\00"
@.str.18 = [5 x i8] c"$f14\00"
@.str.19 = [5 x i8] c"$f15\00"
@.str.20 = [5 x i8] c"$f16\00"
@.str.21 = [5 x i8] c"$f17\00"
@.str.22 = [5 x i8] c"$f18\00"
@.str.23 = [5 x i8] c"$f19\00"
@.str.24 = [4 x i8] c"$f1\00"
@.str.25 = [22 x i8] c"$25,pl_foreign_double\00"
@.str.26 = [4 x i8] c"l.d\00"
@.str.27 = [11 x i8] c"%s,%d($25)\00"
@.str.28 = [4 x i8] c"s.d\00"
define i32 @Call_C_Arg_Foreign_D(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [8 x i8]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %57
11: ; preds = %3
%12 = load i32, i32* %5
switch i32 %12, label %37 [
i32 0, label %13
i32 1, label %16
i32 2, label %19
i32 3, label %22
i32 4, label %25
i32 5, label %28
i32 6, label %31
i32 7, label %34
]
13: ; preds = %11
%14 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%15 = call i32 @sprintf(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %40
16: ; preds = %11
%17 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%18 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %40
19: ; preds = %11
%20 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%21 = call i32 @sprintf(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %40
22: ; preds = %11
%23 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%24 = call i32 @sprintf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %40
25: ; preds = %11
%26 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%27 = call i32 @sprintf(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %40
28: ; preds = %11
%29 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%30 = call i32 @sprintf(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %40
31: ; preds = %11
%32 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%33 = call i32 @sprintf(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %40
34: ; preds = %11
%35 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%36 = call i32 @sprintf(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %40
37: ; preds = %11
%38 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%39 = call i32 @sprintf(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
br label %40
40: ; preds = %37, %34, %31, %28, %25, %22, %19, %16, %13
%41 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%42 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i8* %41)
%43 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%44 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%45 = load i32, i32* %7
%46 = mul nsw i32 %45, 8
%47 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i8* %43, i8* %44, i32 %46)
%48 = load i32, i32* %5
%49 = icmp sgt i32 %48, 7
br i1 %49, label %50, label %56
50: ; preds = %40
%51 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%52 = load i32, i32* %5
%53 = sub nsw i32 %52, 8
%54 = mul nsw i32 %53, 8
%55 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* %51, i32 %54)
br label %56
56: ; preds = %50, %40
store i32 1, i32* %4
br label %101
57: ; preds = %3
%58 = load i32, i32* %5
switch i32 %58, label %83 [
i32 0, label %59
i32 1, label %62
i32 2, label %65
i32 3, label %68
i32 4, label %71
i32 5, label %74
i32 6, label %77
i32 7, label %80
]
59: ; preds = %57
%60 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%61 = call i32 @sprintf(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
br label %86
62: ; preds = %57
%63 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%64 = call i32 @sprintf(i8* %63, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
br label %86
65: ; preds = %57
%66 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%67 = call i32 @sprintf(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
br label %86
68: ; preds = %57
%69 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%70 = call i32 @sprintf(i8* %69, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
br label %86
71: ; preds = %57
%72 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%73 = call i32 @sprintf(i8* %72, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0))
br label %86
74: ; preds = %57
%75 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%76 = call i32 @sprintf(i8* %75, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0))
br label %86
77: ; preds = %57
%78 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%79 = call i32 @sprintf(i8* %78, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0))
br label %86
80: ; preds = %57
%81 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%82 = call i32 @sprintf(i8* %81, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i64 0, i64 0))
br label %86
83: ; preds = %57
%84 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%85 = call i32 @sprintf(i8* %84, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
br label %86
86: ; preds = %83, %80, %77, %74, %71, %68, %65, %62, %59
%87 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.25, i64 0, i64 0))
%88 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%89 = load i32, i32* %7
%90 = mul nsw i32 %89, 8
%91 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.27, i64 0, i64 0), i8* %88, i32 %90)
%92 = load i32, i32* %5
%93 = icmp sgt i32 %92, 7
br i1 %93, label %94, label %100
94: ; preds = %86
%95 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%96 = load i32, i32* %5
%97 = sub nsw i32 %96, 8
%98 = mul nsw i32 %97, 8
%99 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* %95, i32 %98)
br label %100
100: ; preds = %94, %86
store i32 1, i32* %4
br label %101
101: ; preds = %100, %56
%102 = load i32, i32* %4
ret i32 %102
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"$4\00"
@.str.2 = [3 x i8] c"$5\00"
@.str.3 = [3 x i8] c"$6\00"
@.str.4 = [3 x i8] c"$7\00"
@.str.5 = [3 x i8] c"$8\00"
@.str.6 = [3 x i8] c"$9\00"
@.str.10 = [3 x i8] c"la\00"
@.str.11 = [21 x i8] c"%s,pl_foreign_double\00"
@.str.12 = [5 x i8] c"addu\00"
@.str.13 = [9 x i8] c"%s,%s,%d\00"
@.str.14 = [3 x i8] c"sw\00"
@.str.15 = [11 x i8] c"%s,%d($sp)\00"
@.str.16 = [5 x i8] c"$f12\00"
@.str.17 = [5 x i8] c"$f13\00"
@.str.18 = [5 x i8] c"$f14\00"
@.str.19 = [5 x i8] c"$f15\00"
@.str.20 = [5 x i8] c"$f16\00"
@.str.21 = [5 x i8] c"$f17\00"
@.str.22 = [5 x i8] c"$f18\00"
@.str.23 = [5 x i8] c"$f19\00"
@.str.25 = [22 x i8] c"$25,pl_foreign_double\00"
@.str.26 = [4 x i8] c"l.d\00"
@.str.27 = [11 x i8] c"%s,%d($25)\00"
@.str.28 = [4 x i8] c"s.d\00"
define i32 @Call_C_Arg_Foreign_D(i32 %0, i32 %1, i32 %2) {
%4 = alloca [8 x i8]
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%6 = icmp eq i32 %1, 0
br i1 %6, label %25, label %7
7: ; preds = %3
switch i32 %0, label %18 [
i32 0, label %8
i32 1, label %9
i32 2, label %10
i32 3, label %11
i32 4, label %12
i32 5, label %13
i32 6, label %14
i32 7, label %16
]
8: ; preds = %7
br label %20
9: ; preds = %7
br label %20
10: ; preds = %7
br label %20
11: ; preds = %7
br label %20
12: ; preds = %7
br label %20
13: ; preds = %7
br label %20
14: ; preds = %7
%15 = bitcast [8 x i8]* %4 to i32*
store i32 3158308, i32* %15
br label %20
16: ; preds = %7
%17 = bitcast [8 x i8]* %4 to i32*
store i32 3223844, i32* %17
br label %20
18: ; preds = %7
%19 = bitcast [8 x i8]* %4 to i32*
store i32 3420708, i32* %19
br label %20
20: ; preds = %18, %16, %14, %13, %12, %11, %10, %9, %8
%21 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i8* %5)
%22 = shl nsw i32 %2, 3
%23 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i8* %5, i8* %5, i32 %22)
%24 = icmp sgt i32 %0, 7
br i1 %24, label %41, label %46
25: ; preds = %3
switch i32 %0, label %34 [
i32 0, label %26
i32 1, label %27
i32 2, label %28
i32 3, label %29
i32 4, label %30
i32 5, label %31
i32 6, label %32
i32 7, label %33
]
26: ; preds = %25
br label %36
27: ; preds = %25
br label %36
28: ; preds = %25
br label %36
29: ; preds = %25
br label %36
30: ; preds = %25
br label %36
31: ; preds = %25
br label %36
32: ; preds = %25
br label %36
33: ; preds = %25
br label %36
34: ; preds = %25
%35 = bitcast [8 x i8]* %4 to i32*
store i32 3237412, i32* %35
br label %36
36: ; preds = %34, %33, %32, %31, %30, %29, %28, %27, %26
%37 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.25, i64 0, i64 0))
%38 = shl nsw i32 %2, 3
%39 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.27, i64 0, i64 0), i8* %5, i32 %38)
%40 = icmp sgt i32 %0, 7
br i1 %40, label %41, label %46
41: ; preds = %36, %20
%42 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), %20 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), %36 ]
%43 = shl i32 %0, 3
%44 = add i32 %43, -64
%45 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* %42, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* %5, i32 %44)
br label %46
46: ; preds = %41, %36, %20
ret i32 1
}