#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*/ assert(int);
int /*<<< orphan*/ printf(char *, char, int, char *, float);
int scanf(char *, char *, int *, char *, float *);
void main(void) {
  char c;
  int i;
  char string[10];
  float f;
  int res = scanf("%c %d %s %f", &c, &i, string, &f);
  assert(res == 4);
  printf("char value : %c\n"
         "integer value : %i\n"
         "string value : %s\n"
         "float value : %f\n",
         c, i, string, f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x12(%rbp),%rcx
lea    0xebd(%rip),%rdi
lea    -0x1(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0x18(%rbp),%r8
call   1050 <scanf@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
lea    -0x12(%rbp),%rcx
movss  -0x18(%rbp),%xmm0
lea    0xe8e(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
lea    0xb(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x16(%rsp),%rbx
lea    0xc(%rsp),%r8
mov    %rbx,%rcx
call   1050 <scanf@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
call   1040 <assert@plt>
movsbl 0xb(%rsp),%esi
mov    0x10(%rsp),%edx
movss  0xc(%rsp),%xmm0
lea    0xe90(%rip),%rdi
mov    %rbx,%rcx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%c %d %s %f\00"
@.str.1 = [71 x i8] c"char value : %c\0Ainteger value : %i\0Astring value : %s\0Afloat value : %f\0A\00"
define void @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca [10 x i8]
%4 = alloca float
%5 = alloca i32
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %2, i8* %6, float* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 4
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i8, i8* %1
%13 = load i32, i32* %2
%14 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%15 = load float, float* %4
%16 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.1, i64 0, i64 0), i8 signext %12, i32 %13, i8* %14, float %15)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%c %d %s %f\00"
@.str.1 = [71 x i8] c"char value : %c\0Ainteger value : %i\0Astring value : %s\0Afloat value : %f\0A\00"
define void @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca [10 x i8]
%4 = alloca float
%5 = bitcast i32* %2 to i8*
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = bitcast float* %4 to i8*
%8 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %2, i8* %6, float* %4)
%9 = icmp eq i32 %8, 4
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i8, i8* %1
%13 = load i32, i32* %2
%14 = load float, float* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.1, i64 0, i64 0), i8 signext %12, i32 %13, i8* %6, float %14)
ret void
}