#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, int, char, ...);
int sscanf(char *, char *, int *, char *, ...);
int main(int argc, char *argv[]) {
  int n = -1;
  int n1 = -5;
  char c = '!';
  char c1 = '?';
  int ret;
  int failures = 0;
  ret = sscanf("0x", "%i%c", &n, &c);
  printf("ret: %d, n: %d, c: %c\n", ret, n, c);
  if (ret != 2 || n != 0 || c != 'x')
    failures++;
  c = '!';
  ret = sscanf("0Xy", "%i%c%c", &n, &c, &c1);
  printf("ret: %d, n: %d, c: %c, c1: %c\n", ret, n, c, c1);
  if (ret != 3 || n != 0 || c != 'X' || c1 != 'y')
    failures++;
  c = '!';
  n = -1;
  ret = sscanf("0x15", "%d%c", &n, &c);
  printf("ret: %d, n: %d, c: %c\n", ret, n, c);
  if (ret != 2 || n != 0 || c != 'x')
    failures++;
  c = '!';
  n = -1;
  ret = sscanf("0X15", "%o%c", &n, &c);
  printf("ret: %d, n: %d, c: %c\n", ret, n, c);
  if (ret != 2 || n != 0 || c != 'X')
    failures++;
  c = '!';
  n = -1;
  ret = sscanf("0x15x", "%x%c", &n, &c);
  printf("ret: %d, n: 0x%x, c: %c\n", ret, (unsigned)n, c);
  if (ret != 2 || n != 0x15 || c != 'x')
    failures++;
  c = '!';
  c1 = '?';
  n = -1;
  ret = sscanf("0xy5", "%x%c", &n, &c, &n1);
  printf("ret: %d, n: %d, c: %c, c1: %c, n1: %d\n", ret, n, c, c1, n1);
  if (ret != 0 || n != -1 || c != '!' || c1 != '?' || n1 != -5)
    failures++;
  c = '!';
  c1 = '?';
  n = -1;
  n1 = -5;
  ret = sscanf("0xy5", "%i%c%c%d", &n, &c, &c1, &n1);
  printf("ret: %d, n: %d, c: %c, c1: %c, n1: %d\n", ret, n, c, c1, n1);
  if (ret != 4 || n != 0 || c != 'x' || c1 != 'y' || n1 != 5)
    failures++;
  return failures;
}


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   $0xffffffff,-0x14(%rbp)
movl   $0xfffffffb,-0x18(%rbp)
movb   $0x21,-0x19(%rbp)
movb   $0x3f,-0x1a(%rbp)
movl   $0x0,-0x24(%rbp)
lea    0xea6(%rip),%rdi
lea    0xea2(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x19(%rbp),%rcx
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe88(%rip),%rdi
movsbl -0x19(%rbp),%ecx
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x20(%rbp)
jne    11ac <main+0x8c>
cmpl   $0x0,-0x14(%rbp)
jne    11ac <main+0x8c>
movsbl -0x19(%rbp),%eax
cmp    $0x78,%eax
je     11b5 <main+0x95>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movb   $0x21,-0x19(%rbp)
lea    0xe5f(%rip),%rdi
lea    0xe5c(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x19(%rbp),%rcx
lea    -0x1a(%rbp),%r8
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x19(%rbp),%al
movsbl -0x1a(%rbp),%r8d
lea    0xe38(%rip),%rdi
movsbl %al,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x3,-0x20(%rbp)
jne    122a <main+0x10a>
cmpl   $0x0,-0x14(%rbp)
jne    122a <main+0x10a>
movsbl -0x19(%rbp),%eax
cmp    $0x58,%eax
jne    122a <main+0x10a>
movsbl -0x1a(%rbp),%eax
cmp    $0x79,%eax
je     1233 <main+0x113>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movb   $0x21,-0x19(%rbp)
movl   $0xffffffff,-0x14(%rbp)
lea    0xe04(%rip),%rdi
lea    0xe02(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x19(%rbp),%rcx
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xd9d(%rip),%rdi
movsbl -0x19(%rbp),%ecx
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x20(%rbp)
jne    1297 <main+0x177>
cmpl   $0x0,-0x14(%rbp)
jne    1297 <main+0x177>
movsbl -0x19(%rbp),%eax
cmp    $0x78,%eax
je     12a0 <main+0x180>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movb   $0x21,-0x19(%rbp)
movl   $0xffffffff,-0x14(%rbp)
lea    0xda1(%rip),%rdi
lea    0xd9f(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x19(%rbp),%rcx
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xd30(%rip),%rdi
movsbl -0x19(%rbp),%ecx
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x20(%rbp)
jne    1304 <main+0x1e4>
cmpl   $0x0,-0x14(%rbp)
jne    1304 <main+0x1e4>
movsbl -0x19(%rbp),%eax
cmp    $0x58,%eax
je     130d <main+0x1ed>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movb   $0x21,-0x19(%rbp)
movl   $0xffffffff,-0x14(%rbp)
lea    0xd3e(%rip),%rdi
lea    0xd3d(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x19(%rbp),%rcx
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xd23(%rip),%rdi
movsbl -0x19(%rbp),%ecx
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x20(%rbp)
jne    1371 <main+0x251>
cmpl   $0x15,-0x14(%rbp)
jne    1371 <main+0x251>
movsbl -0x19(%rbp),%eax
cmp    $0x78,%eax
je     137a <main+0x25a>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movb   $0x21,-0x19(%rbp)
movb   $0x3f,-0x1a(%rbp)
movl   $0xffffffff,-0x14(%rbp)
lea    0xcf1(%rip),%rdi
lea    0xccc(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x19(%rbp),%rcx
lea    -0x18(%rbp),%r8
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x19(%rbp),%al
movsbl -0x1a(%rbp),%r8d
mov    -0x18(%rbp),%r9d
lea    0xcc0(%rip),%rdi
movsbl %al,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
jne    1408 <main+0x2e8>
cmpl   $0xffffffff,-0x14(%rbp)
jne    1408 <main+0x2e8>
movsbl -0x19(%rbp),%eax
cmp    $0x21,%eax
jne    1408 <main+0x2e8>
movsbl -0x1a(%rbp),%eax
cmp    $0x3f,%eax
jne    1408 <main+0x2e8>
cmpl   $0xfffffffb,-0x18(%rbp)
je     1411 <main+0x2f1>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
movb   $0x21,-0x19(%rbp)
movb   $0x3f,-0x1a(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0xfffffffb,-0x18(%rbp)
lea    0xc53(%rip),%rdi
lea    0xc78(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x19(%rbp),%rcx
lea    -0x1a(%rbp),%r8
lea    -0x18(%rbp),%r9
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x19(%rbp),%al
movsbl -0x1a(%rbp),%r8d
mov    -0x18(%rbp),%r9d
lea    0xc1e(%rip),%rdi
movsbl %al,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x4,-0x20(%rbp)
jne    14aa <main+0x38a>
cmpl   $0x0,-0x14(%rbp)
jne    14aa <main+0x38a>
movsbl -0x19(%rbp),%eax
cmp    $0x78,%eax
jne    14aa <main+0x38a>
movsbl -0x1a(%rbp),%eax
cmp    $0x79,%eax
jne    14aa <main+0x38a>
cmpl   $0x5,-0x18(%rbp)
je     14b3 <main+0x393>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%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   $0xffffffff,0x10(%rsp)
ff
movl   $0xfffffffb,0x14(%rsp)
ff
movb   $0x21,0xe(%rsp)
movb   $0x3f,0xf(%rsp)
lea    0xeb1(%rip),%rdi
lea    0xead(%rip),%rsi
lea    0x10(%rsp),%r13
lea    0xe(%rsp),%r15
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    %eax,%ebx
mov    0x10(%rsp),%edx
movsbl 0xe(%rsp),%ecx
lea    0xe89(%rip),%r12
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    $0x2,%ebx
or     0x10(%rsp),%ebx
setne  %al
cmpb   $0x78,0xe(%rsp)
setne  %cl
or     %al,%cl
movzbl %cl,%ebp
movb   $0x21,0xe(%rsp)
lea    0xe71(%rip),%rdi
lea    0xe6e(%rip),%rsi
lea    0xf(%rsp),%r8
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    %eax,%ebx
mov    0x10(%rsp),%edx
movsbl 0xe(%rsp),%ecx
movsbl 0xf(%rsp),%r8d
lea    0xe4b(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    $0x3,%ebx
mov    0xe(%rsp),%al
xor    $0x58,%al
mov    0xf(%rsp),%cl
xor    $0x79,%cl
lea    0x1(%rbp),%edx
or     %al,%cl
cmovne %edx,%ebp
or     0x10(%rsp),%ebx
cmovne %edx,%ebp
movb   $0x21,0xe(%rsp)
movl   $0xffffffff,0x10(%rsp)
ff
lea    0xe2e(%rip),%rdi
lea    0xe2c(%rip),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    %eax,%ebx
mov    0x10(%rsp),%edx
movsbl 0xe(%rsp),%ecx
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    $0x2,%ebx
or     0x10(%rsp),%ebx
setne  %al
cmpb   $0x78,0xe(%rsp)
setne  %cl
or     %al,%cl
movzbl %cl,%r14d
add    %ebp,%r14d
movb   $0x21,0xe(%rsp)
movl   $0xffffffff,0x10(%rsp)
ff
lea    0xdde(%rip),%rdi
lea    0xddc(%rip),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    %eax,%ebx
mov    0x10(%rsp),%edx
movsbl 0xe(%rsp),%ecx
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    $0x2,%ebx
or     0x10(%rsp),%ebx
setne  %al
cmpb   $0x58,0xe(%rsp)
setne  %cl
or     %al,%cl
movzbl %cl,%ebp
add    %r14d,%ebp
movb   $0x21,0xe(%rsp)
movl   $0xffffffff,0x10(%rsp)
ff
lea    0xd8f(%rip),%rdi
lea    0xd8e(%rip),%r12
mov    %r12,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    %eax,%ebx
mov    0x10(%rsp),%edx
movsbl 0xe(%rsp),%ecx
lea    0xd71(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    $0x2,%ebx
mov    0x10(%rsp),%eax
xor    $0x15,%eax
or     %ebx,%eax
setne  %al
cmpb   $0x78,0xe(%rsp)
setne  %cl
or     %al,%cl
movzbl %cl,%r14d
add    %ebp,%r14d
movb   $0x21,0xe(%rsp)
movb   $0x3f,0xf(%rsp)
movl   $0xffffffff,0x10(%rsp)
ff
lea    0xd48(%rip),%rbx
lea    0x14(%rsp),%r8
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %r13,%r12
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    %eax,%r15d
mov    0x10(%rsp),%edx
movsbl 0xe(%rsp),%ecx
movsbl 0xf(%rsp),%r8d
mov    0x14(%rsp),%r9d
lea    0xd14(%rip),%r13
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x10(%rsp),%eax
not    %eax
or     %r15d,%eax
setne  %al
cmpb   $0x21,0xe(%rsp)
setne  %cl
cmpb   $0x3f,0xf(%rsp)
setne  %dl
or     %cl,%dl
or     %al,%dl
cmpl   $0xfffffffb,0x14(%rsp)
setne  %al
or     %dl,%al
movzbl %al,%ebp
add    %r14d,%ebp
movb   $0x21,0xe(%rsp)
movb   $0x3f,0xf(%rsp)
movl   $0xffffffff,0x10(%rsp)
ff
movl   $0xfffffffb,0x14(%rsp)
ff
lea    0xcde(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
lea    0xe(%rsp),%rcx
lea    0xf(%rsp),%r8
lea    0x14(%rsp),%r9
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    %eax,%ebx
mov    0x10(%rsp),%edx
movsbl 0xe(%rsp),%ecx
movsbl 0xf(%rsp),%r8d
mov    0x14(%rsp),%r9d
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    $0x4,%ebx
or     0x10(%rsp),%ebx
setne  %al
cmpb   $0x78,0xe(%rsp)
setne  %cl
cmpb   $0x79,0xf(%rsp)
setne  %dl
or     %cl,%dl
or     %al,%dl
cmpl   $0x5,0x14(%rsp)
setne  %al
or     %dl,%al
movzbl %al,%eax
add    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"0x\00"
@.str.1 = [5 x i8] c"%i%c\00"
@.str.2 = [23 x i8] c"ret: %d, n: %d, c: %c\0A\00"
@.str.3 = [4 x i8] c"0Xy\00"
@.str.4 = [7 x i8] c"%i%c%c\00"
@.str.5 = [31 x i8] c"ret: %d, n: %d, c: %c, c1: %c\0A\00"
@.str.6 = [5 x i8] c"0x15\00"
@.str.7 = [5 x i8] c"%d%c\00"
@.str.8 = [5 x i8] c"0X15\00"
@.str.9 = [5 x i8] c"%o%c\00"
@.str.10 = [6 x i8] c"0x15x\00"
@.str.11 = [5 x i8] c"%x%c\00"
@.str.12 = [25 x i8] c"ret: %d, n: 0x%x, c: %c\0A\00"
@.str.13 = [5 x i8] c"0xy5\00"
@.str.14 = [39 x i8] c"ret: %d, n: %d, c: %c, c1: %c, n1: %d\0A\00"
@.str.15 = [9 x i8] c"%i%c%c%d\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 i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %6
store i32 -5, i32* %7
store i8 33, i8* %8
store i8 63, i8* %9
store i32 0, i32* %11
%12 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %6, i8* %8)
store i32 %12, i32* %10
%13 = load i32, i32* %10
%14 = load i32, i32* %6
%15 = load i8, i8* %8
%16 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32 %14, i8 signext %15)
%17 = load i32, i32* %10
%18 = icmp ne i32 %17, 2
br i1 %18, label %26, label %19
19: ; preds = %2
%20 = load i32, i32* %6
%21 = icmp ne i32 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %19
%23 = load i8, i8* %8
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 120
br i1 %25, label %26, label %29
26: ; preds = %22, %19, %2
%27 = load i32, i32* %11
%28 = add nsw i32 %27, 1
store i32 %28, i32* %11
br label %29
29: ; preds = %26, %22
store i8 33, i8* %8
%30 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32* %6, i8* %8, i8* %9)
store i32 %30, i32* %10
%31 = load i32, i32* %10
%32 = load i32, i32* %6
%33 = load i8, i8* %8
%34 = load i8, i8* %9
%35 = sext i8 %34 to i32
%36 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32 %31, i32 %32, i8 signext %33, i32 %35)
%37 = load i32, i32* %10
%38 = icmp ne i32 %37, 3
br i1 %38, label %50, label %39
39: ; preds = %29
%40 = load i32, i32* %6
%41 = icmp ne i32 %40, 0
br i1 %41, label %50, label %42
42: ; preds = %39
%43 = load i8, i8* %8
%44 = sext i8 %43 to i32
%45 = icmp ne i32 %44, 88
br i1 %45, label %50, label %46
46: ; preds = %42
%47 = load i8, i8* %9
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 121
br i1 %49, label %50, label %53
50: ; preds = %46, %42, %39, %29
%51 = load i32, i32* %11
%52 = add nsw i32 %51, 1
store i32 %52, i32* %11
br label %53
53: ; preds = %50, %46
store i8 33, i8* %8
store i32 -1, i32* %6
%54 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32* %6, i8* %8)
store i32 %54, i32* %10
%55 = load i32, i32* %10
%56 = load i32, i32* %6
%57 = load i8, i8* %8
%58 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %55, i32 %56, i8 signext %57)
%59 = load i32, i32* %10
%60 = icmp ne i32 %59, 2
br i1 %60, label %68, label %61
61: ; preds = %53
%62 = load i32, i32* %6
%63 = icmp ne i32 %62, 0
br i1 %63, label %68, label %64
64: ; preds = %61
%65 = load i8, i8* %8
%66 = sext i8 %65 to i32
%67 = icmp ne i32 %66, 120
br i1 %67, label %68, label %71
68: ; preds = %64, %61, %53
%69 = load i32, i32* %11
%70 = add nsw i32 %69, 1
store i32 %70, i32* %11
br label %71
71: ; preds = %68, %64
store i8 33, i8* %8
store i32 -1, i32* %6
%72 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32* %6, i8* %8)
store i32 %72, i32* %10
%73 = load i32, i32* %10
%74 = load i32, i32* %6
%75 = load i8, i8* %8
%76 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %73, i32 %74, i8 signext %75)
%77 = load i32, i32* %10
%78 = icmp ne i32 %77, 2
br i1 %78, label %86, label %79
79: ; preds = %71
%80 = load i32, i32* %6
%81 = icmp ne i32 %80, 0
br i1 %81, label %86, label %82
82: ; preds = %79
%83 = load i8, i8* %8
%84 = sext i8 %83 to i32
%85 = icmp ne i32 %84, 88
br i1 %85, label %86, label %89
86: ; preds = %82, %79, %71
%87 = load i32, i32* %11
%88 = add nsw i32 %87, 1
store i32 %88, i32* %11
br label %89
89: ; preds = %86, %82
store i8 33, i8* %8
store i32 -1, i32* %6
%90 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32* %6, i8* %8)
store i32 %90, i32* %10
%91 = load i32, i32* %10
%92 = load i32, i32* %6
%93 = load i8, i8* %8
%94 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i32 %91, i32 %92, i8 signext %93)
%95 = load i32, i32* %10
%96 = icmp ne i32 %95, 2
br i1 %96, label %104, label %97
97: ; preds = %89
%98 = load i32, i32* %6
%99 = icmp ne i32 %98, 21
br i1 %99, label %104, label %100
100: ; preds = %97
%101 = load i8, i8* %8
%102 = sext i8 %101 to i32
%103 = icmp ne i32 %102, 120
br i1 %103, label %104, label %107
104: ; preds = %100, %97, %89
%105 = load i32, i32* %11
%106 = add nsw i32 %105, 1
store i32 %106, i32* %11
br label %107
107: ; preds = %104, %100
store i8 33, i8* %8
store i8 63, i8* %9
store i32 -1, i32* %6
%108 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32* %6, i8* %8, i32* %7)
store i32 %108, i32* %10
%109 = load i32, i32* %10
%110 = load i32, i32* %6
%111 = load i8, i8* %8
%112 = load i8, i8* %9
%113 = sext i8 %112 to i32
%114 = load i32, i32* %7
%115 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0), i32 %109, i32 %110, i8 signext %111, i32 %113, i32 %114)
%116 = load i32, i32* %10
%117 = icmp ne i32 %116, 0
br i1 %117, label %132, label %118
118: ; preds = %107
%119 = load i32, i32* %6
%120 = icmp ne i32 %119, -1
br i1 %120, label %132, label %121
121: ; preds = %118
%122 = load i8, i8* %8
%123 = sext i8 %122 to i32
%124 = icmp ne i32 %123, 33
br i1 %124, label %132, label %125
125: ; preds = %121
%126 = load i8, i8* %9
%127 = sext i8 %126 to i32
%128 = icmp ne i32 %127, 63
br i1 %128, label %132, label %129
129: ; preds = %125
%130 = load i32, i32* %7
%131 = icmp ne i32 %130, -5
br i1 %131, label %132, label %135
132: ; preds = %129, %125, %121, %118, %107
%133 = load i32, i32* %11
%134 = add nsw i32 %133, 1
store i32 %134, i32* %11
br label %135
135: ; preds = %132, %129
store i8 33, i8* %8
store i8 63, i8* %9
store i32 -1, i32* %6
store i32 -5, i32* %7
%136 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32* %6, i8* %8, i8* %9, i32* %7)
store i32 %136, i32* %10
%137 = load i32, i32* %10
%138 = load i32, i32* %6
%139 = load i8, i8* %8
%140 = load i8, i8* %9
%141 = sext i8 %140 to i32
%142 = load i32, i32* %7
%143 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0), i32 %137, i32 %138, i8 signext %139, i32 %141, i32 %142)
%144 = load i32, i32* %10
%145 = icmp ne i32 %144, 4
br i1 %145, label %160, label %146
146: ; preds = %135
%147 = load i32, i32* %6
%148 = icmp ne i32 %147, 0
br i1 %148, label %160, label %149
149: ; preds = %146
%150 = load i8, i8* %8
%151 = sext i8 %150 to i32
%152 = icmp ne i32 %151, 120
br i1 %152, label %160, label %153
153: ; preds = %149
%154 = load i8, i8* %9
%155 = sext i8 %154 to i32
%156 = icmp ne i32 %155, 121
br i1 %156, label %160, label %157
157: ; preds = %153
%158 = load i32, i32* %7
%159 = icmp ne i32 %158, 5
br i1 %159, label %160, label %163
160: ; preds = %157, %153, %149, %146, %135
%161 = load i32, i32* %11
%162 = add nsw i32 %161, 1
store i32 %162, i32* %11
br label %163
163: ; preds = %160, %157
%164 = load i32, i32* %11
ret i32 %164
}

LLVM IR (-O2):
@.str = [3 x i8] c"0x\00"
@.str.1 = [5 x i8] c"%i%c\00"
@.str.2 = [23 x i8] c"ret: %d, n: %d, c: %c\0A\00"
@.str.3 = [4 x i8] c"0Xy\00"
@.str.4 = [7 x i8] c"%i%c%c\00"
@.str.5 = [31 x i8] c"ret: %d, n: %d, c: %c, c1: %c\0A\00"
@.str.6 = [5 x i8] c"0x15\00"
@.str.7 = [5 x i8] c"%d%c\00"
@.str.8 = [5 x i8] c"0X15\00"
@.str.9 = [5 x i8] c"%o%c\00"
@.str.10 = [6 x i8] c"0x15x\00"
@.str.11 = [5 x i8] c"%x%c\00"
@.str.12 = [25 x i8] c"ret: %d, n: 0x%x, c: %c\0A\00"
@.str.13 = [5 x i8] c"0xy5\00"
@.str.14 = [39 x i8] c"ret: %d, n: %d, c: %c, c1: %c, n1: %d\0A\00"
@.str.15 = [9 x i8] c"%i%c%c%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = bitcast i32* %3 to i8*
store i32 -1, i32* %3
%8 = bitcast i32* %4 to i8*
store i32 -5, i32* %4
store i8 33, i8* %5
store i8 63, i8* %6
%9 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %3, i8* %5)
%10 = load i32, i32* %3
%11 = load i8, i8* %5
%12 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10, i8 signext %11)
%13 = icmp ne i32 %9, 2
%14 = load i32, i32* %3
%15 = icmp ne i32 %14, 0
%16 = select i1 %13, i1 true, i1 %15
%17 = load i8, i8* %5
%18 = icmp ne i8 %17, 120
%19 = select i1 %16, i1 true, i1 %18
%20 = zext i1 %19 to i32
store i8 33, i8* %5
%21 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32* %3, i8* %5, i8* %6)
%22 = load i32, i32* %3
%23 = load i8, i8* %5
%24 = load i8, i8* %6
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32 %21, i32 %22, i8 signext %23, i32 %25)
%27 = icmp ne i32 %21, 3
%28 = load i32, i32* %3
%29 = icmp ne i32 %28, 0
%30 = select i1 %27, i1 true, i1 %29
%31 = load i8, i8* %5
%32 = icmp ne i8 %31, 88
%33 = select i1 %30, i1 true, i1 %32
%34 = load i8, i8* %6
%35 = icmp ne i8 %34, 121
%36 = select i1 %33, i1 true, i1 %35
%37 = select i1 %19, i32 2, i32 1
%38 = select i1 %36, i32 %37, i32 %20
store i8 33, i8* %5
store i32 -1, i32* %3
%39 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32* %3, i8* %5)
%40 = load i32, i32* %3
%41 = load i8, i8* %5
%42 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %39, i32 %40, i8 signext %41)
%43 = icmp ne i32 %39, 2
%44 = load i32, i32* %3
%45 = icmp ne i32 %44, 0
%46 = select i1 %43, i1 true, i1 %45
%47 = load i8, i8* %5
%48 = icmp ne i8 %47, 120
%49 = select i1 %46, i1 true, i1 %48
%50 = zext i1 %49 to i32
%51 = add nuw nsw i32 %38, %50
store i8 33, i8* %5
store i32 -1, i32* %3
%52 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32* %3, i8* %5)
%53 = load i32, i32* %3
%54 = load i8, i8* %5
%55 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %52, i32 %53, i8 signext %54)
%56 = icmp ne i32 %52, 2
%57 = load i32, i32* %3
%58 = icmp ne i32 %57, 0
%59 = select i1 %56, i1 true, i1 %58
%60 = load i8, i8* %5
%61 = icmp ne i8 %60, 88
%62 = select i1 %59, i1 true, i1 %61
%63 = zext i1 %62 to i32
%64 = add nuw nsw i32 %51, %63
store i8 33, i8* %5
store i32 -1, i32* %3
%65 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32* %3, i8* %5)
%66 = load i32, i32* %3
%67 = load i8, i8* %5
%68 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i32 %65, i32 %66, i8 signext %67)
%69 = icmp ne i32 %65, 2
%70 = load i32, i32* %3
%71 = icmp ne i32 %70, 21
%72 = select i1 %69, i1 true, i1 %71
%73 = load i8, i8* %5
%74 = icmp ne i8 %73, 120
%75 = select i1 %72, i1 true, i1 %74
%76 = zext i1 %75 to i32
%77 = add nuw nsw i32 %64, %76
store i8 33, i8* %5
store i8 63, i8* %6
store i32 -1, i32* %3
%78 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32* %3, i8* %5, i32* %4)
%79 = load i32, i32* %3
%80 = load i8, i8* %5
%81 = load i8, i8* %6
%82 = sext i8 %81 to i32
%83 = load i32, i32* %4
%84 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0), i32 %78, i32 %79, i8 signext %80, i32 %82, i32 %83)
%85 = icmp ne i32 %78, 0
%86 = load i32, i32* %3
%87 = icmp ne i32 %86, -1
%88 = select i1 %85, i1 true, i1 %87
%89 = load i8, i8* %5
%90 = icmp ne i8 %89, 33
%91 = select i1 %88, i1 true, i1 %90
%92 = load i8, i8* %6
%93 = icmp ne i8 %92, 63
%94 = select i1 %91, i1 true, i1 %93
%95 = load i32, i32* %4
%96 = icmp ne i32 %95, -5
%97 = select i1 %94, i1 true, i1 %96
%98 = zext i1 %97 to i32
%99 = add nuw nsw i32 %77, %98
store i8 33, i8* %5
store i8 63, i8* %6
store i32 -1, i32* %3
store i32 -5, i32* %4
%100 = call i32 (i8*, i8*, i32*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32* %3, i8* %5, i8* %6, i32* %4)
%101 = load i32, i32* %3
%102 = load i8, i8* %5
%103 = load i8, i8* %6
%104 = sext i8 %103 to i32
%105 = load i32, i32* %4
%106 = call i32 (i8*, i32, i32, i8, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0), i32 %100, i32 %101, i8 signext %102, i32 %104, i32 %105)
%107 = icmp ne i32 %100, 4
%108 = load i32, i32* %3
%109 = icmp ne i32 %108, 0
%110 = select i1 %107, i1 true, i1 %109
%111 = load i8, i8* %5
%112 = icmp ne i8 %111, 120
%113 = select i1 %110, i1 true, i1 %112
%114 = load i8, i8* %6
%115 = icmp ne i8 %114, 121
%116 = select i1 %113, i1 true, i1 %115
%117 = load i32, i32* %4
%118 = icmp ne i32 %117, 5
%119 = select i1 %116, i1 true, i1 %118
%120 = zext i1 %119 to i32
%121 = add nuw nsw i32 %99, %120
ret i32 %121
}