#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 scanf(char *, ...);
int main() {
  int rv, i, i2, i3;
  unsigned int x, x2, x3;
  char c, c2, c3;
  char str[16] = {0}, str2[16] = {0};
  printf("* * * * * Scanf Test * * * * *\n\n");
  printf("Testing %%s\n");
  printf("rv  = scanf(\"%%s\", str): ");
  rv = scanf("%s", str);
  printf("rv  = %d\n", rv);
  printf("str = \"%s\"\n", str);
  printf("rv  = scanf(\"%%s %%s\", str1, str2): ");
  rv = scanf("%s %s", str, str2);
  printf("rv  = %d\n", rv);
  printf("str = \"%s\"\n", str);
  printf("str2= \"%s\"\n\n", str2);
  printf("Testing %%c\n");
  printf("rv  = scanf(\"%%c\", &c): ");
  rv = scanf("%c", &c);
  printf("rv  = %d\n", rv);
  printf("c   = \'%c\'\n", c);
  printf("rv  = scanf(\"%%c\", &c): ");
  rv = scanf("%c", &c);
  printf("rv  = %d\n", rv);
  printf("c   = \'%c\'\n", c);
  printf("rv  = scanf(\"%%c %%c %%c\", &c1, &c2, &c3): ");
  rv = scanf("%c %c %c", &c, &c2, &c3);
  printf("rv  = %d\n", rv);
  printf("c1  = \'%c\'\n", c);
  printf("c2  = \'%c\'\n", c2);
  printf("c3  = \'%c\'\n\n", c3);
  printf("Testing %%d\n");
  printf("rv  = scanf(\"%%d\", &i): ");
  rv = scanf("%d", &i);
  printf("rv  = %d\n", rv);
  printf("i   = %d\n", i);
  printf("rv  = scanf(\"%%d %%d %%d\", &i1, &i2, &i3): ");
  rv = scanf("%d %d %d", &i, &i2, &i3);
  printf("rv  = %d\n", rv);
  printf("i1  = %d\n", i);
  printf("i2  = %d\n", i2);
  printf("i3  = %d\n\n", i3);
  printf("Testing %%x\n");
  printf("rv  = scanf(\"%%x\", &x): ");
  rv = scanf("%x", &x);
  printf("rv  = %d\n", rv);
  printf("x   = %x\n", x);
  printf("rv  = scanf(\"%%x %%x %%x\", &x1, &x2, &x3): ");
  rv = scanf("%x %x %x", &x, &x2, &x3);
  printf("rv  = %d\n", rv);
  printf("x1  = %x\n", x);
  printf("x2  = %x\n", x2);
  printf("x3  = %x\n\n", x3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x50(%rbp),%rsi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
lea    -0x21(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x21(%rbp),%esi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe74(%rip),%rdi
lea    -0x21(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x21(%rbp),%esi
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe28(%rip),%rdi
lea    -0x21(%rbp),%rsi
lea    -0x22(%rbp),%rdx
lea    -0x23(%rbp),%rcx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x21(%rbp),%esi
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x22(%rbp),%esi
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x23(%rbp),%esi
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe38(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xded(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xc97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xdbe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdfa(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xc22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xd95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdaf(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xbd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xd79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
lea    0x10b8(%rip),%rdi
call   1030 <puts@plt>
lea    0xea3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
lea    0x30(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xe98(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe8f(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe87(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    0x20(%rsp),%r12
mov    %rbx,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe72(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6d(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb3(%rip),%r13
lea    0x5(%rsp),%r15
mov    %r13,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x5(%rsp),%esi
lea    0xe4b(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x5(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe14(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe32(%rip),%rdi
lea    0x7(%rsp),%rdx
lea    0x6(%rsp),%rcx
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x5(%rsp),%esi
lea    0xe0f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x7(%rsp),%esi
lea    0xe08(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x6(%rsp),%esi
lea    0xe01(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe00(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdff(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe46(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xde4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xde0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdfe(%rip),%rdi
lea    0x1c(%rsp),%rdx
lea    0x18(%rsp),%rcx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xddc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
lea    0xdd4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
lea    0xdcc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdc9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdc8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe0f(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xdad(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xda9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdc7(%rip),%rdi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xda5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xd9d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xd95(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [33 x i8] c"* * * * * Scanf Test * * * * *\0A\0A\00"
@.str.1 = [13 x i8] c"Testing %%s\0A\00"
@.str.2 = [26 x i8] c"rv = scanf(\22%%s\22, str): \00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [10 x i8] c"rv = %d\0A\00"
@.str.5 = [12 x i8] c"str = \22%s\22\0A\00"
@.str.6 = [37 x i8] c"rv = scanf(\22%%s %%s\22, str1, str2): \00"
@.str.7 = [6 x i8] c"%s %s\00"
@.str.8 = [13 x i8] c"str2= \22%s\22\0A\0A\00"
@.str.9 = [13 x i8] c"Testing %%c\0A\00"
@.str.10 = [25 x i8] c"rv = scanf(\22%%c\22, &c): \00"
@.str.11 = [3 x i8] c"%c\00"
@.str.12 = [12 x i8] c"c = '%c'\0A\00"
@.str.13 = [44 x i8] c"rv = scanf(\22%%c %%c %%c\22, &c1, &c2, &c3): \00"
@.str.14 = [9 x i8] c"%c %c %c\00"
@.str.15 = [12 x i8] c"c1 = '%c'\0A\00"
@.str.16 = [12 x i8] c"c2 = '%c'\0A\00"
@.str.17 = [13 x i8] c"c3 = '%c'\0A\0A\00"
@.str.18 = [13 x i8] c"Testing %%d\0A\00"
@.str.19 = [25 x i8] c"rv = scanf(\22%%d\22, &i): \00"
@.str.20 = [3 x i8] c"%d\00"
@.str.21 = [10 x i8] c"i = %d\0A\00"
@.str.22 = [44 x i8] c"rv = scanf(\22%%d %%d %%d\22, &i1, &i2, &i3): \00"
@.str.23 = [9 x i8] c"%d %d %d\00"
@.str.24 = [10 x i8] c"i1 = %d\0A\00"
@.str.25 = [10 x i8] c"i2 = %d\0A\00"
@.str.26 = [11 x i8] c"i3 = %d\0A\0A\00"
@.str.27 = [13 x i8] c"Testing %%x\0A\00"
@.str.28 = [25 x i8] c"rv = scanf(\22%%x\22, &x): \00"
@.str.29 = [3 x i8] c"%x\00"
@.str.30 = [10 x i8] c"x = %x\0A\00"
@.str.31 = [44 x i8] c"rv = scanf(\22%%x %%x %%x\22, &x1, &x2, &x3): \00"
@.str.32 = [9 x i8] c"%x %x %x\00"
@.str.33 = [10 x i8] c"x1 = %x\0A\00"
@.str.34 = [10 x i8] c"x2 = %x\0A\00"
@.str.35 = [11 x i8] c"x3 = %x\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
%11 = alloca i8
%12 = alloca [16 x i8]
%13 = alloca [16 x i8]
store i32 0, i32* %1
%14 = bitcast [16 x i8]* %12 to i8*
%15 = bitcast [16 x i8]* %13 to i8*
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %19)
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %21)
%23 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%27 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %26, i8* %27)
store i32 %28, i32* %2
%29 = load i32, i32* %2
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* %31)
%33 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%37 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %9)
store i32 %37, i32* %2
%38 = load i32, i32* %2
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %38)
%40 = load i8, i8* %9
%41 = sext i8 %40 to i32
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %41)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%44 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %9)
store i32 %44, i32* %2
%45 = load i32, i32* %2
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %45)
%47 = load i8, i8* %9
%48 = sext i8 %47 to i32
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0))
%51 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
store i32 %51, i32* %2
%52 = load i32, i32* %2
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %52)
%54 = load i8, i8* %9
%55 = sext i8 %54 to i32
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %55)
%57 = load i8, i8* %10
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i32 %58)
%60 = load i8, i8* %11
%61 = sext i8 %60 to i32
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 %61)
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0))
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
%65 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %3)
store i32 %65, i32* %2
%66 = load i32, i32* %2
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %66)
%68 = load i32, i32* %3
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.21, i64 0, i64 0), i32 %68)
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.22, i64 0, i64 0))
%71 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
store i32 %71, i32* %2
%72 = load i32, i32* %2
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %72)
%74 = load i32, i32* %3
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), i32 %74)
%76 = load i32, i32* %4
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i32 %76)
%78 = load i32, i32* %5
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0), i32 %78)
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.27, i64 0, i64 0))
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.28, i64 0, i64 0))
%82 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i32* %6)
store i32 %82, i32* %2
%83 = load i32, i32* %2
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %83)
%85 = load i32, i32* %6
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.30, i64 0, i64 0), i32 %85)
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.31, i64 0, i64 0))
%88 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
store i32 %88, i32* %2
%89 = load i32, i32* %2
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %89)
%91 = load i32, i32* %6
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.33, i64 0, i64 0), i32 %91)
%93 = load i32, i32* %7
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.34, i64 0, i64 0), i32 %93)
%95 = load i32, i32* %8
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.35, i64 0, i64 0), i32 %95)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"Testing %%s\0A\00"
@.str.2 = [26 x i8] c"rv = scanf(\22%%s\22, str): \00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [10 x i8] c"rv = %d\0A\00"
@.str.5 = [12 x i8] c"str = \22%s\22\0A\00"
@.str.6 = [37 x i8] c"rv = scanf(\22%%s %%s\22, str1, str2): \00"
@.str.7 = [6 x i8] c"%s %s\00"
@.str.8 = [13 x i8] c"str2= \22%s\22\0A\0A\00"
@.str.9 = [13 x i8] c"Testing %%c\0A\00"
@.str.10 = [25 x i8] c"rv = scanf(\22%%c\22, &c): \00"
@.str.11 = [3 x i8] c"%c\00"
@.str.12 = [12 x i8] c"c = '%c'\0A\00"
@.str.13 = [44 x i8] c"rv = scanf(\22%%c %%c %%c\22, &c1, &c2, &c3): \00"
@.str.14 = [9 x i8] c"%c %c %c\00"
@.str.15 = [12 x i8] c"c1 = '%c'\0A\00"
@.str.16 = [12 x i8] c"c2 = '%c'\0A\00"
@.str.17 = [13 x i8] c"c3 = '%c'\0A\0A\00"
@.str.18 = [13 x i8] c"Testing %%d\0A\00"
@.str.19 = [25 x i8] c"rv = scanf(\22%%d\22, &i): \00"
@.str.20 = [3 x i8] c"%d\00"
@.str.21 = [10 x i8] c"i = %d\0A\00"
@.str.22 = [44 x i8] c"rv = scanf(\22%%d %%d %%d\22, &i1, &i2, &i3): \00"
@.str.23 = [9 x i8] c"%d %d %d\00"
@.str.24 = [10 x i8] c"i1 = %d\0A\00"
@.str.25 = [10 x i8] c"i2 = %d\0A\00"
@.str.26 = [11 x i8] c"i3 = %d\0A\0A\00"
@.str.27 = [13 x i8] c"Testing %%x\0A\00"
@.str.28 = [25 x i8] c"rv = scanf(\22%%x\22, &x): \00"
@.str.29 = [3 x i8] c"%x\00"
@.str.30 = [10 x i8] c"x = %x\0A\00"
@.str.31 = [44 x i8] c"rv = scanf(\22%%x %%x %%x\22, &x1, &x2, &x3): \00"
@.str.32 = [9 x i8] c"%x %x %x\00"
@.str.33 = [10 x i8] c"x1 = %x\0A\00"
@.str.34 = [10 x i8] c"x2 = %x\0A\00"
@.str.35 = [11 x i8] c"x3 = %x\0A\0A\00"
@str = [32 x i8] c"* * * * * Scanf Test * * * * *\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca [16 x i8]
%11 = alloca [16 x i8]
%12 = bitcast i32* %1 to i8*
%13 = bitcast i32* %2 to i8*
%14 = bitcast i32* %3 to i8*
%15 = bitcast i32* %4 to i8*
%16 = bitcast i32* %5 to i8*
%17 = bitcast i32* %6 to i8*
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %18)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %23)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* %18)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %18, i8* %19)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %27)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* %18)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* %19)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %7)
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %33)
%35 = load i8, i8* %7
%36 = sext i8 %35 to i32
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %36)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%39 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %7)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = load i8, i8* %7
%42 = sext i8 %41 to i32
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %42)
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0))
%45 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %45)
%47 = load i8, i8* %7
%48 = sext i8 %47 to i32
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %48)
%50 = load i8, i8* %8
%51 = sext i8 %50 to i32
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i32 %51)
%53 = load i8, i8* %9
%54 = sext i8 %53 to i32
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 %54)
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
%58 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %1)
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %1
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.21, i64 0, i64 0), i32 %60)
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.22, i64 0, i64 0))
%63 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %63)
%65 = load i32, i32* %1
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), i32 %65)
%67 = load i32, i32* %2
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i32 %67)
%69 = load i32, i32* %3
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0), i32 %69)
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.27, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.28, i64 0, i64 0))
%73 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i32* %4)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %73)
%75 = load i32, i32* %4
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.30, i64 0, i64 0), i32 %75)
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.31, i64 0, i64 0))
%78 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0), i32* %4, i32* %5, i32* %6)
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %78)
%80 = load i32, i32* %4
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.33, i64 0, i64 0), i32 %80)
%82 = load i32, i32* %5
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.34, i64 0, i64 0), i32 %82)
%84 = load i32, i32* %6
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.35, i64 0, i64 0), i32 %84)
ret i32 0
}