#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int strlonger(char *, char *);
int /*<<< orphan*/ test_unsigned_and_signed();
int main(void) {
  test_unsigned_and_signed();
  printf("\n\n\n\n");
  printf("strlonger(\"123\", \"12\") = %d\n", strlonger("123", "12"));
  printf("strlonger(\"123\", \"123456\") = %d\n", strlonger("123", "123456"));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_unsigned_and_signed@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1030 <strlonger@plt>
mov    %eax,%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea4(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1030 <strlonger@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <test_unsigned_and_signed@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xec2(%rip),%rbx
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strlonger@plt>
lea    0xe8f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strlonger@plt>
lea    0xe94(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\0A\0A\0A\0A\00"
@.str.1 = [29 x i8] c"strlonger(\22123\22, \2212\22) = %d\0A\00"
@.str.2 = [4 x i8] c"123\00"
@.str.3 = [3 x i8] c"12\00"
@.str.4 = [33 x i8] c"strlonger(\22123\22, \22123456\22) = %d\0A\00"
@.str.5 = [7 x i8] c"123456\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_unsigned_and_signed()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @strlonger(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @strlonger(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c"strlonger(\22123\22, \2212\22) = %d\0A\00"
@.str.2 = [4 x i8] c"123\00"
@.str.3 = [3 x i8] c"12\00"
@.str.4 = [33 x i8] c"strlonger(\22123\22, \22123456\22) = %d\0A\00"
@.str.5 = [7 x i8] c"123456\00"
@EXIT_SUCCESS = global i32 0
@str = [4 x i8] c"\0A\0A\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @test_unsigned_and_signed()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @strlonger(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @strlonger(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}