#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 *, int, char *);
int sscanf(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int ret;
  char buf[1024] = "Ooops";
  ret = sscanf("static char Term_bits[] = {", "static char %s = {", buf);
  printf("ret: %d, name: %s\n", ret, buf);
  return strcmp(buf, "Term_bits[]") != 0 || ret != 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
movb   $0x4f,-0x420(%rbp)
movb   $0x6f,-0x41f(%rbp)
movb   $0x6f,-0x41e(%rbp)
movb   $0x70,-0x41d(%rbp)
movb   $0x73,-0x41c(%rbp)
lea    -0x420(%rbp),%rdx
lea    0xe63(%rip),%rdi
lea    0xe78(%rip),%rsi
call   1060 <sscanf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    -0x420(%rbp),%rdx
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
lea    -0x420(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   1050 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x421(%rbp)
jne    11f7 <main+0xb7>
cmpl   $0x1,-0x14(%rbp)
setne  %al
mov    %al,-0x421(%rbp)
mov    -0x421(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x408,%rsp
mov    %rsp,%rbx
mov    $0x400,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movl   $0x706f6f4f,(%rsp)
movb   $0x73,0x4(%rsp)
lea    0xe92(%rip),%rdi
lea    0xea7(%rip),%rsi
mov    %rbx,%rdx
call   1060 <sscanf@plt>
mov    %eax,%ebp
lea    0xea9(%rip),%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
lea    0xeab(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
setne  %al
cmp    $0x1,%ebp
setne  %cl
or     %al,%cl
movzbl %cl,%eax
add    $0x408,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"static char Term_bits[] = {\00"
@.str.1 = [19 x i8] c"static char %s = {\00"
@.str.2 = [19 x i8] c"ret: %d, name: %s\0A\00"
@.str.3 = [12 x i8] c"Term_bits[]\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [1024 x i8]* %7 to i8*
%9 = bitcast i8* %8 to [1024 x i8]*
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i32 0, i32 0
store i8 79, i8* %10
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i32 0, i32 1
store i8 111, i8* %11
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i32 0, i32 2
store i8 111, i8* %12
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i32 0, i32 3
store i8 112, i8* %13
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i32 0, i32 4
store i8 115, i8* %14
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%16 = call i32 @sscanf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %15)
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %17, i8* %18)
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%22 = icmp ne i64 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %2
%24 = load i32, i32* %6
%25 = icmp ne i32 %24, 1
br label %26
26: ; preds = %23, %2
%27 = phi i1 [ true, %2 ], [ %25, %23 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
@.str = [28 x i8] c"static char Term_bits[] = {\00"
@.str.1 = [19 x i8] c"static char %s = {\00"
@.str.2 = [19 x i8] c"ret: %d, name: %s\0A\00"
@.str.3 = [12 x i8] c"Term_bits[]\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
store i8 79, i8* %4
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 1
store i8 111, i8* %5
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 2
store i8 111, i8* %6
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 3
store i8 112, i8* %7
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 4
store i8 115, i8* %8
%9 = call i32 @sscanf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %9, i8* %4)
%11 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
%13 = icmp ne i32 %9, 1
%14 = or i1 %13, %12
%15 = zext i1 %14 to i32
ret i32 %15
}