#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 *, char *, int);
int /*<<< orphan*/ remove_filename(char *);
int strlen(char *);
int main(int argc, char *argv[]) {
  char str[] = "http://github.com/index.html";
  printf("%s %d\n", str, strlen(str));
  remove_filename(str);
  printf("%s %d\n", str, strlen(str));
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeab(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xea6(%rip),%al
mov    %al,-0x14(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x40(%rbp),%rsi
mov    %eax,%edx
lea    0xe86(%rip),%rdi
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <remove_filename@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x38(%rbp),%rsi
mov    %eax,%edx
lea    0xe5a(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movups 0xecf(%rip),%xmm0
movups %xmm0,0xd(%rsp)
movaps 0xeb6(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xebd(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <remove_filename@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <printf@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.str = [29 x i8] c"http://github.com/index.html\00"
@.str = [7 x i8] c"%s %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [29 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [29 x i8]* %6 to i8*
%8 = getelementptr inbounds [29 x i8], [29 x i8]* %6, i64 0, i64 0
%9 = getelementptr inbounds [29 x i8], [29 x i8]* %6, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %10)
%12 = getelementptr inbounds [29 x i8], [29 x i8]* %6, i64 0, i64 0
%13 = call i32 @remove_filename(i8* %12)
%14 = getelementptr inbounds [29 x i8], [29 x i8]* %6, i64 0, i64 0
%15 = getelementptr inbounds [29 x i8], [29 x i8]* %6, i64 0, i64 0
%16 = call i32 @strlen(i8* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %14, i32 %16)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}

LLVM IR (-O2):
@__const.main.str = [29 x i8] c"http://github.com/index.html\00"
@.str = [7 x i8] c"%s %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [29 x i8]
%4 = getelementptr inbounds [29 x i8], [29 x i8]* %3, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5)
%7 = call i32 @remove_filename(i8* %4)
%8 = call i32 @strlen(i8* %4)
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}