#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 *, char *);
int /*<<< orphan*/ sscanf(char *, char *, char *, char *);
int main() {
  char *p_time = "2006:03:18 -2006:04:18";
  char sz_time1[100] = {0};
  char sz_time2[100] = {0};
  sscanf(p_time, "%[0-9,:] - %[0-9,:]", sz_time1, sz_time2);
  sscanf(p_time, "%[0-9,:]-%[0-9,:]", sz_time1, sz_time2);
  printf("%s\n", sz_time1);
  printf("%s\n", sz_time2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
mov    -0x10(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    -0xf0(%rbp),%rcx
lea    0xe91(%rip),%rsi
call   1050 <sscanf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    -0xf0(%rbp),%rcx
lea    0xe8a(%rip),%rsi
call   1050 <sscanf@plt>
lea    -0x80(%rbp),%rsi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
lea    -0xf0(%rbp),%rsi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xd8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movl   $0x0,0xd0(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xe6b(%rip),%r14
lea    0xe7b(%rip),%rsi
lea    0x70(%rsp),%r12
mov    %rsp,%r15
mov    %r14,%rdi
mov    %r12,%rdx
mov    %r15,%rcx
call   1040 <sscanf@plt>
lea    0xe72(%rip),%rsi
mov    %r14,%rdi
mov    %r12,%rdx
mov    %r15,%rcx
call   1040 <sscanf@plt>
lea    0xe6f(%rip),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [23 x i8] c"2006:03:18 -2006:04:18\00"
@.str.1 = [20 x i8] c"%[0-9,:] - %[0-9,:]\00"
@.str.2 = [18 x i8] c"%[0-9,:]-%[0-9,:]\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
store i32 0, i32* %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = bitcast [100 x i8]* %3 to i8*
%6 = bitcast [100 x i8]* %4 to i8*
%7 = load i8*, i8** %2
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%10 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%14 = call i32 @sscanf(i8* %11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %12, i8* %13)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"2006:03:18 -2006:04:18\00"
@.str.1 = [20 x i8] c"%[0-9,:] - %[0-9,:]\00"
@.str.2 = [18 x i8] c"%[0-9,:]-%[0-9,:]\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @sscanf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* %4)
%6 = call i32 @sscanf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %3, i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %4)
ret i32 0
}