#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*/ isdigit(int);
int /*<<< orphan*/ isspace(int);
int /*<<< orphan*/ printf(char *, char *, int);
int sscanf(char *, char *, float *, int *);
int main(int argc, char *argv[]) {
  int exc = 0;
  int retc;
  float f;
  int d;
  char str[] = "x 1";
  int c;
  for (c = 1; c < 127; ++c)
    if (!isdigit(c) && !isspace(c)) {
      str[0] = c;
      retc = sscanf(str, "%e %d", &f, &d);
      if (retc != 0) {
        printf("sscanf (\"%s\", \"%%e %%d\", ...) == %d, not 0\n", str, retc);
        exc = 1;
      }
    }
  return exc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    0xe9d(%rip),%eax
mov    %eax,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
cmpl   $0x7f,-0x28(%rbp)
jge    11f6 <main+0xb6>
mov    -0x28(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    11e3 <main+0xa3>
mov    -0x28(%rbp),%edi
call   1050 <isspace@plt>
cmp    $0x0,%eax
jne    11e3 <main+0xa3>
mov    -0x28(%rbp),%eax
mov    %al,-0x24(%rbp)
lea    -0x24(%rbp),%rdi
lea    0xe5a(%rip),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1060 <sscanf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     11de <main+0x9e>
lea    -0x24(%rbp),%rsi
mov    -0x18(%rbp),%edx
lea    0xe38(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x14(%rbp)
jmp    11e3 <main+0xa3>
jmp    11e8 <main+0xa8>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    116d <main+0x2d>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x312078,0xc(%rsp)
xor    %ebp,%ebp
mov    $0x1,%ebx
lea    0xeac(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x14(%rsp),%r12
lea    0x10(%rsp),%r13
jmp    1178 <main+0x48>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
cmp    $0x7f,%ebx
je     11bc <main+0x8c>
lea    -0x30(%rbx),%eax
cmp    $0xa,%eax
jb     1170 <main+0x40>
mov    %ebx,%edi
call   1040 <isspace@plt>
test   %eax,%eax
jne    1170 <main+0x40>
mov    %bl,0xc(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
call   1050 <sscanf@plt>
test   %eax,%eax
je     1170 <main+0x40>
lea    0xe5b(%rip),%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x1,%ebp
jmp    1170 <main+0x40>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.str = [4 x i8] c"x 1\00"
@.str = [6 x i8] c"%e %d\00"
@.str.1 = [44 x i8] c"sscanf (\22%s\22, \22%%e %%d\22, ...) == %d, not 0\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
%9 = alloca i32
%10 = alloca [4 x i8]
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%12 = bitcast [4 x i8]* %10 to i8*
store i32 1, i32* %11
br label %13
13: ; preds = %38, %2
%14 = load i32, i32* %11
%15 = icmp slt i32 %14, 127
br i1 %15, label %16, label %41
16: ; preds = %13
%17 = load i32, i32* %11
%18 = call i32 @isdigit(i32 %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %37, label %20
20: ; preds = %16
%21 = load i32, i32* %11
%22 = call i32 @isspace(i32 %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %37, label %24
24: ; preds = %20
%25 = load i32, i32* %11
%26 = trunc i32 %25 to i8
%27 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
store i8 %26, i8* %27
%28 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%29 = call i32 @sscanf(i8* %28, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %8, i32* %9)
store i32 %29, i32* %7
%30 = load i32, i32* %7
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %36
32: ; preds = %24
%33 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%34 = load i32, i32* %7
%35 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %33, i32 %34)
store i32 1, i32* %6
br label %36
36: ; preds = %32, %24
br label %37
37: ; preds = %36, %20, %16
br label %38
38: ; preds = %37
%39 = load i32, i32* %11
%40 = add nsw i32 %39, 1
store i32 %40, i32* %11
br label %13
41: ; preds = %13
%42 = load i32, i32* %6
ret i32 %42
}

LLVM IR (-O2):
@.str = [6 x i8] c"%e %d\00"
@.str.1 = [44 x i8] c"sscanf (\22%s\22, \22%%e %%d\22, ...) == %d, not 0\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = bitcast float* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
store i32 3219576, i32* %5
br label %9
9: ; preds = %2, %23
%10 = phi i32 [ 1, %2 ], [ %25, %23 ]
%11 = phi i32 [ 0, %2 ], [ %24, %23 ]
%12 = add nsw i32 %10, -48
%13 = icmp ult i32 %12, 10
br i1 %13, label %23, label %14
14: ; preds = %9
%15 = call i32 @isspace(i32 %10)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %14
%18 = trunc i32 %10 to i8
store i8 %18, i8* %8
%19 = call i32 @sscanf(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %3, i32* %4)
%20 = icmp eq i32 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %8, i32 %19)
br label %23
23: ; preds = %9, %14, %21, %17
%24 = phi i32 [ %11, %9 ], [ %11, %14 ], [ 1, %21 ], [ %11, %17 ]
%25 = add nuw nsw i32 %10, 1
%26 = icmp eq i32 %25, 127
br i1 %26, label %27, label %9
27: ; preds = %23
ret i32 %24
}