#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*/ printf(char *, int, ...);
int /*<<< orphan*/ tcob_init(int, char **);
int /*<<< orphan*/ tcob_stop_run();
int test15a(char *, char *, unsigned int *, char *);
int main(int ac, char *av[]) {
  int r = 0;
  unsigned int c3;
  char c1[6], c2[2], c4[3];
  c1[0] = '=';
  c1[1] = '=';
  c1[2] = '=';
  c1[3] = '=';
  c1[4] = '=';
  c1[5] = '=';
  c2[0] = '0';
  c2[1] = '6';
  c3 = 84;
  c4[0] = '1';
  c4[1] = '4';
  c4[2] = '4';
  tcob_init(ac, av);
  printf("main (test15d) C   input  :%c%c%c%c%c%c:%c%c:%02d:%c%c%c:\n", c1[0],
         c1[1], c1[2], c1[3], c1[4], c1[5], c2[0], c2[1], c3, c4[0], c4[1],
         c4[2]);
  r = test15a(c1, c2, &c3, c4);
  printf("main (test15d) C   return :%c%c%c%c%c%c:%c%c:%02d:%c%c%c:\n", c1[0],
         c1[1], c1[2], c1[3], c1[4], c1[5], c2[0], c2[1], c3, c4[0], c4[1],
         c4[2]);
  tcob_stop_run();
  printf("program return code: %d\n", r);
  return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x60,%rsp
movl   $0x0,-0x24(%rbp)
mov    %edi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movb   $0x3d,-0x3e(%rbp)
movb   $0x3d,-0x3d(%rbp)
movb   $0x3d,-0x3c(%rbp)
movb   $0x3d,-0x3b(%rbp)
movb   $0x3d,-0x3a(%rbp)
movb   $0x3d,-0x39(%rbp)
movb   $0x30,-0x40(%rbp)
movb   $0x36,-0x3f(%rbp)
movl   $0x54,-0x38(%rbp)
movb   $0x31,-0x43(%rbp)
movb   $0x34,-0x42(%rbp)
movb   $0x34,-0x41(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   1060 <tcob_init@plt>
movsbl -0x3e(%rbp),%esi
movsbl -0x3d(%rbp),%edx
movsbl -0x3c(%rbp),%ecx
movsbl -0x3b(%rbp),%r8d
movsbl -0x3a(%rbp),%r9d
movsbl -0x39(%rbp),%r12d
movsbl -0x40(%rbp),%r15d
movsbl -0x3f(%rbp),%r14d
mov    -0x38(%rbp),%ebx
movsbl -0x43(%rbp),%r11d
movsbl -0x42(%rbp),%r10d
movsbl -0x41(%rbp),%eax
lea    0xe20(%rip),%rdi
mov    %r12d,(%rsp)
mov    %r15d,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %ebx,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10d,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x3e(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x43(%rbp),%rcx
lea    -0x38(%rbp),%rdx
call   1050 <test15a@plt>
mov    %eax,-0x34(%rbp)
movsbl -0x3e(%rbp),%esi
movsbl -0x3d(%rbp),%edx
movsbl -0x3c(%rbp),%ecx
movsbl -0x3b(%rbp),%r8d
movsbl -0x3a(%rbp),%r9d
movsbl -0x39(%rbp),%r12d
movsbl -0x40(%rbp),%r15d
movsbl -0x3f(%rbp),%r14d
mov    -0x38(%rbp),%ebx
movsbl -0x43(%rbp),%r11d
movsbl -0x42(%rbp),%r10d
movsbl -0x41(%rbp),%eax
lea    0xddf(%rip),%rdi
mov    %r12d,(%rsp)
mov    %r15d,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %ebx,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10d,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <tcob_stop_run@plt>
mov    -0x34(%rbp),%esi
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x60,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x3d3d3d3d,0xc(%rsp)
3d
movw   $0x3d3d,0x10(%rsp)
movw   $0x3630,0xa(%rsp)
movl   $0x54,0x14(%rsp)
movw   $0x3431,0x7(%rsp)
movb   $0x34,0x9(%rsp)
call   1060 <tcob_init@plt>
sub    $0x8,%rsp
lea    0xe78(%rip),%rdi
mov    $0x3d,%esi
mov    $0x3d,%edx
mov    $0x3d,%ecx
mov    $0x3d,%r8d
mov    $0x3d,%r9d
xor    %eax,%eax
push   $0x34
push   $0x34
push   $0x31
push   $0x54
push   $0x36
push   $0x30
push   $0x3d
call   1030 <printf@plt>
add    $0x40,%rsp
lea    0xc(%rsp),%rdi
lea    0xa(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x7(%rsp),%rcx
call   1050 <test15a@plt>
mov    %eax,%r14d
movsbl 0xc(%rsp),%esi
movsbl 0xd(%rsp),%edx
movsbl 0xe(%rsp),%ecx
movsbl 0xf(%rsp),%r8d
movsbl 0x10(%rsp),%r9d
movsbl 0x11(%rsp),%r10d
movsbl 0xa(%rsp),%r11d
movsbl 0xb(%rsp),%r15d
mov    0x14(%rsp),%r12d
movsbl 0x7(%rsp),%r13d
movsbl 0x8(%rsp),%ebp
movsbl 0x9(%rsp),%ebx
sub    $0x8,%rsp
lea    0xe16(%rip),%rdi
xor    %eax,%eax
push   %rbx
push   %rbp
push   %r13
push   %r12
push   %r15
push   %r11
push   %r10
call   1030 <printf@plt>
add    $0x40,%rsp
xor    %eax,%eax
call   1040 <tcob_stop_run@plt>
lea    0xe2c(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [59 x i8] c"main (test15d) C input :%c%c%c%c%c%c:%c%c:%02d:%c%c%c:\0A\00"
@.str.1 = [59 x i8] c"main (test15d) C return :%c%c%c%c%c%c:%c%c:%02d:%c%c%c:\0A\00"
@.str.2 = [25 x i8] c"program return code: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [6 x i8]
%9 = alloca [2 x i8]
%10 = alloca [3 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
store i8 61, i8* %11
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 1
store i8 61, i8* %12
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 2
store i8 61, i8* %13
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 3
store i8 61, i8* %14
%15 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 4
store i8 61, i8* %15
%16 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 5
store i8 61, i8* %16
%17 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
store i8 48, i8* %17
%18 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 1
store i8 54, i8* %18
store i32 84, i32* %7
%19 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
store i8 49, i8* %19
%20 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 1
store i8 52, i8* %20
%21 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 2
store i8 52, i8* %21
%22 = load i32, i32* %4
%23 = load i8**, i8*** %5
%24 = call i32 @tcob_init(i32 %22, i8** %23)
%25 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 1
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 2
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 3
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 4
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 5
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 1
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = load i32, i32* %7
%50 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 1
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 2
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %27, i32 %30, i32 %33, i32 %36, i32 %39, i32 %42, i32 %45, i32 %48, i32 %49, i32 %52, i32 %55, i32 %58)
%60 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%61 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%62 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%63 = call i32 @test15a(i8* %60, i8* %61, i32* %7, i8* %62)
store i32 %63, i32* %6
%64 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 1
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 2
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 3
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 4
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 5
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 1
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = load i32, i32* %7
%89 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 1
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 2
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 %66, i32 %69, i32 %72, i32 %75, i32 %78, i32 %81, i32 %84, i32 %87, i32 %88, i32 %91, i32 %94, i32 %97)
%99 = call i32 (...) @tcob_stop_run()
%100 = load i32, i32* %6
%101 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %100)
%102 = load i32, i32* %6
ret i32 %102
}

LLVM IR (-O2):
@.str = [59 x i8] c"main (test15d) C input :%c%c%c%c%c%c:%c%c:%02d:%c%c%c:\0A\00"
@.str.1 = [59 x i8] c"main (test15d) C return :%c%c%c%c%c%c:%c%c:%02d:%c%c%c:\0A\00"
@.str.2 = [25 x i8] c"program return code: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca [6 x i8]
%5 = alloca [2 x i8]
%6 = alloca [3 x i8]
%7 = bitcast i32* %3 to i8*
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 1
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 2
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 3
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 4
%15 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 5
store i8 48, i8* %9
%16 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 54, i8* %16
store i32 84, i32* %3
store i8 49, i8* %10
%17 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 1
store i8 52, i8* %17
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 2
store i8 52, i8* %18
%19 = tail call i32 @tcob_init(i32 %0, i8** %1)
%20 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 61, i32 61, i32 61, i32 61, i32 61, i32 61, i32 48, i32 54, i32 84, i32 49, i32 52, i32 52)
%21 = call i32 @test15a(i8* %8, i8* %9, i32* %3, i8* %10)
%22 = load i8, i8* %8
%23 = sext i8 %22 to i32
%24 = load i8, i8* %11
%25 = sext i8 %24 to i32
%26 = load i8, i8* %12
%27 = sext i8 %26 to i32
%28 = load i8, i8* %13
%29 = sext i8 %28 to i32
%30 = load i8, i8* %14
%31 = sext i8 %30 to i32
%32 = load i8, i8* %15
%33 = sext i8 %32 to i32
%34 = load i8, i8* %9
%35 = sext i8 %34 to i32
%36 = load i8, i8* %16
%37 = sext i8 %36 to i32
%38 = load i32, i32* %3
%39 = load i8, i8* %10
%40 = sext i8 %39 to i32
%41 = load i8, i8* %17
%42 = sext i8 %41 to i32
%43 = load i8, i8* %18
%44 = sext i8 %43 to i32
%45 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 %23, i32 %25, i32 %27, i32 %29, i32 %31, i32 %33, i32 %35, i32 %37, i32 %38, i32 %40, i32 %42, i32 %44)
%46 = call i32 (...) @tcob_stop_run()
%47 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %21)
ret i32 %21
}