#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 Continumax(char **, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *, int);
int main(void) {
  char *ret;
  int num;
  num = Continumax(&ret, "abcd12345ed125ss123058789");
  printf("%s : %d\n", ret, num);
  free(ret);
  num = Continumax(&ret, "abcd12345ss54761");
  printf("%s : %d\n", ret, num);
  free(ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <Continumax@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
lea    -0x10(%rbp),%rdi
lea    0xeaa(%rip),%rsi
call   1050 <Continumax@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <Continumax@plt>
mov    (%rsp),%rsi
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%edx
call   1040 <printf@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
lea    0xeb8(%rip),%rsi
mov    %r14,%rdi
call   1050 <Continumax@plt>
mov    (%rsp),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1040 <printf@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"abcd12345ed125ss123058789\00"
@.str.1 = [9 x i8] c"%s : %d\0A\00"
@.str.2 = [17 x i8] c"abcd12345ss54761\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @Continumax(i8** %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* %3
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
%10 = call i32 @Continumax(i8** %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
store i32 %10, i32* %3
%11 = load i8*, i8** %2
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %11, i32 %12)
%14 = load i8*, i8** %2
%15 = call i32 @free(i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"abcd12345ed125ss123058789\00"
@.str.1 = [9 x i8] c"%s : %d\0A\00"
@.str.2 = [17 x i8] c"abcd12345ss54761\00"
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = call i32 @Continumax(i8** %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32 %3)
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
%8 = call i32 @Continumax(i8** %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%9 = load i8*, i8** %1
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %9, i32 %8)
%11 = load i8*, i8** %1
%12 = call i32 @free(i8* %11)
ret i32 0
}