#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*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int sscanf(char *, char *, ...);
int /*<<< orphan*/ stdin;
int main(void) {
  int i;
  char *s = malloc(500);
  float f, ff, fff, ffff, fffff;
  printf("Suppressed match:\n");
  for (i = 1; i <= 5 && (fgets(s, 500, stdin) != NULL); ++i)
    printf("%d/5: Number of float matches = [%d]\n", i,
           sscanf(s, "%*f %*f %*f %*f %*f"));
  printf("\nAssigned match:\n");
  for (i = 1; i <= 5 && (fgets(s, 500, stdin) != NULL); ++i)
    printf("%d/5: Number of float matches = [%d]\n", i,
           sscanf(s, "%f %f %f %f %f", &f, &ff, &fff, &ffff, &fffff));
  free(s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1f4,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x5,-0x8(%rbp)
mov    %al,-0x25(%rbp)
jg     11b2 <main+0x62>
mov    -0x10(%rbp),%rdi
mov    0x2e4c(%rip),%rax
mov    (%rax),%edx
mov    $0x1f4,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
test   $0x1,%al
jne    11c2 <main+0x72>
jmp    11fb <main+0xab>
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe66(%rip),%rsi
mov    $0x0,%al
call   1070 <sscanf@plt>
mov    -0x2c(%rbp),%esi
mov    %eax,%edx
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1182 <main+0x32>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x5,-0x8(%rbp)
mov    %al,-0x2d(%rbp)
jg     1240 <main+0xf0>
mov    -0x10(%rbp),%rdi
mov    0x2dbe(%rip),%rax
mov    (%rax),%edx
mov    $0x1f4,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2d(%rbp)
mov    -0x2d(%rbp),%al
test   $0x1,%al
jne    1250 <main+0x100>
jmp    12a1 <main+0x151>
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xdfe(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
lea    -0x20(%rbp),%r9
lea    -0x24(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1070 <sscanf@plt>
mov    -0x34(%rbp),%esi
mov    %eax,%edx
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1210 <main+0xc0>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    $0x1f4,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
lea    0xecc(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e5f(%rip),%r14
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     12bc <main+0x15c>
lea    0xe7d(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xe46(%rip),%rdi
mov    $0x1,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     12bc <main+0x15c>
lea    0xe3e(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xe07(%rip),%rdi
mov    $0x2,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     12bc <main+0x15c>
lea    0xdff(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xdc8(%rip),%rdi
mov    $0x3,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     12bc <main+0x15c>
lea    0xdc4(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xd8d(%rip),%rdi
mov    $0x4,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     12bc <main+0x15c>
lea    0xd89(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xd52(%rip),%rdi
mov    $0x5,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd98(%rip),%rdi
call   1040 <puts@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     147c <main+0x31c>
lea    0x1c(%rsp),%r15
mov    %r15,(%rsp)
lea    0xd49(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xcea(%rip),%rdi
mov    $0x1,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     147c <main+0x31c>
mov    %r15,(%rsp)
lea    0xcf2(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xc93(%rip),%rdi
mov    $0x2,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     147c <main+0x31c>
mov    %r15,(%rsp)
lea    0xc9b(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xc3c(%rip),%rdi
mov    $0x3,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     147c <main+0x31c>
mov    %r15,(%rsp)
lea    0xc44(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xbe5(%rip),%rdi
mov    $0x4,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     147c <main+0x31c>
mov    %r15,(%rsp)
lea    0xbf1(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
lea    0xb92(%rip),%rdi
mov    $0x5,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Suppressed match:\0A\00"
@stdin = global i32 0
@.str.1 = [38 x i8] c"%d/5: Number of float matches = [%d]\0A\00"
@.str.2 = [20 x i8] c"%*f %*f %*f %*f %*f\00"
@.str.3 = [18 x i8] c"\0AAssigned match:\0A\00"
@.str.4 = [15 x i8] c"%f %f %f %f %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
%9 = call i8* @malloc(i32 500)
store i8* %9, i8** %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %11
11: ; preds = %26, %0
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 5
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load i8*, i8** %3
%16 = load i32, i32* @stdin
%17 = call i32* @fgets(i8* %15, i32 500, i32 %16)
%18 = icmp ne i32* %17, null
br label %19
19: ; preds = %14, %11
%20 = phi i1 [ false, %11 ], [ %18, %14 ]
br i1 %20, label %21, label %29
21: ; preds = %19
%22 = load i32, i32* %2
%23 = load i8*, i8** %3
%24 = call i32 (i8*, i8*, ...) @sscanf(i8* %23, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %24)
br label %26
26: ; preds = %21
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %11
29: ; preds = %19
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %2
br label %31
31: ; preds = %46, %29
%32 = load i32, i32* %2
%33 = icmp sle i32 %32, 5
br i1 %33, label %34, label %39
34: ; preds = %31
%35 = load i8*, i8** %3
%36 = load i32, i32* @stdin
%37 = call i32* @fgets(i8* %35, i32 500, i32 %36)
%38 = icmp ne i32* %37, null
br label %39
39: ; preds = %34, %31
%40 = phi i1 [ false, %31 ], [ %38, %34 ]
br i1 %40, label %41, label %49
41: ; preds = %39
%42 = load i32, i32* %2
%43 = load i8*, i8** %3
%44 = call i32 (i8*, i8*, ...) @sscanf(i8* %43, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), float* %4, float* %5, float* %6, float* %7, float* %8)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %42, i32 %44)
br label %46
46: ; preds = %41
%47 = load i32, i32* %2
%48 = add nsw i32 %47, 1
store i32 %48, i32* %2
br label %31
49: ; preds = %39
%50 = load i8*, i8** %3
%51 = call i32 @free(i8* %50)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str.1 = [38 x i8] c"%d/5: Number of float matches = [%d]\0A\00"
@.str.2 = [20 x i8] c"%*f %*f %*f %*f %*f\00"
@.str.4 = [15 x i8] c"%f %f %f %f %f\00"
@str = [18 x i8] c"Suppressed match:\00"
@str.5 = [17 x i8] c"\0AAssigned match:\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = tail call dereferenceable_or_null(500) i8* @malloc(i32 500)
%7 = bitcast float* %1 to i8*
%8 = bitcast float* %2 to i8*
%9 = bitcast float* %3 to i8*
%10 = bitcast float* %4 to i8*
%11 = bitcast float* %5 to i8*
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%13 = load i32, i32* @stdin
%14 = tail call i32* @fgets(i8* %6, i32 500, i32 %13)
%15 = icmp eq i32* %14, null
br i1 %15, label %43, label %16
16: ; preds = %0
%17 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 %17)
%19 = load i32, i32* @stdin
%20 = tail call i32* @fgets(i8* %6, i32 500, i32 %19)
%21 = icmp eq i32* %20, null
br i1 %21, label %43, label %22
22: ; preds = %16
%23 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %23)
%25 = load i32, i32* @stdin
%26 = tail call i32* @fgets(i8* %6, i32 500, i32 %25)
%27 = icmp eq i32* %26, null
br i1 %27, label %43, label %28
28: ; preds = %22
%29 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 %29)
%31 = load i32, i32* @stdin
%32 = tail call i32* @fgets(i8* %6, i32 500, i32 %31)
%33 = icmp eq i32* %32, null
br i1 %33, label %43, label %34
34: ; preds = %28
%35 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %35)
%37 = load i32, i32* @stdin
%38 = tail call i32* @fgets(i8* %6, i32 500, i32 %37)
%39 = icmp eq i32* %38, null
br i1 %39, label %43, label %40
40: ; preds = %34
%41 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %41)
br label %43
43: ; preds = %40, %34, %28, %22, %16, %0
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.5, i64 0, i64 0))
%45 = load i32, i32* @stdin
%46 = call i32* @fgets(i8* %6, i32 500, i32 %45)
%47 = icmp eq i32* %46, null
br i1 %47, label %75, label %48
48: ; preds = %43
%49 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5)
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 %49)
%51 = load i32, i32* @stdin
%52 = call i32* @fgets(i8* %6, i32 500, i32 %51)
%53 = icmp eq i32* %52, null
br i1 %53, label %75, label %54
54: ; preds = %48
%55 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5)
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %55)
%57 = load i32, i32* @stdin
%58 = call i32* @fgets(i8* %6, i32 500, i32 %57)
%59 = icmp eq i32* %58, null
br i1 %59, label %75, label %60
60: ; preds = %54
%61 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5)
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 %61)
%63 = load i32, i32* @stdin
%64 = call i32* @fgets(i8* %6, i32 500, i32 %63)
%65 = icmp eq i32* %64, null
br i1 %65, label %75, label %66
66: ; preds = %60
%67 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5)
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %67)
%69 = load i32, i32* @stdin
%70 = call i32* @fgets(i8* %6, i32 500, i32 %69)
%71 = icmp eq i32* %70, null
br i1 %71, label %75, label %72
72: ; preds = %66
%73 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %73)
br label %75
75: ; preds = %72, %66, %60, %54, %48, %43
%76 = call i32 @free(i8* %6)
ret i32 0
}