#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 *, long, char *);
int /*<<< orphan*/ sscanf(char *, char *, long *, char *);
void main() {
  char str[150] = "43488257----chenvay13";
  int long qid;
  char passwd[32];
  sscanf(str, "%ld----%s", &qid, passwd);
  printf("passwd of QQ %ld is %s\n", qid, passwd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
lea    -0xa0(%rbp),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x96,%edx
call   1040 <memcpy@plt>
lea    -0xa0(%rbp),%rdi
lea    -0xd0(%rbp),%rcx
lea    0xf2e(%rip),%rsi
lea    -0xa8(%rbp),%rdx
call   1050 <sscanf@plt>
mov    -0xa8(%rbp),%rsi
lea    -0xd0(%rbp),%rdx
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
lea    0xebf(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    $0x96,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
lea    0xf3c(%rip),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rcx
call   1050 <sscanf@plt>
mov    0x8(%rsp),%rsi
lea    0xf25(%rip),%rdi
mov    %r14,%rdx
call   1030 <printf@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.str = [150 x i8] c"43488257----chenvay13\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [10 x i8] c"%ld----%s\00"
@.str.1 = [24 x i8] c"passwd of QQ %ld is %s\0A\00"
define void @main() {
%1 = alloca [150 x i8]
%2 = alloca i64
%3 = alloca [32 x i8]
%4 = bitcast [150 x i8]* %1 to i8*
%5 = getelementptr inbounds [150 x i8], [150 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %2, i8* %6)
%8 = load i64, i64* %2
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i64 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@__const.main.str = [150 x i8] c"43488257----chenvay13\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [10 x i8] c"%ld----%s\00"
@.str.1 = [24 x i8] c"passwd of QQ %ld is %s\0A\00"
define void @main() {
%1 = alloca [150 x i8]
%2 = alloca i64
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [150 x i8], [150 x i8]* %1, i64 0, i64 0
%5 = bitcast i64* %2 to i8*
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %2, i8* %6)
%8 = load i64, i64* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i64 %8, i8* %6)
ret void
}