#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*/ sscanf(char *, char *, long *);
void ParseIntFormat(char *buf, long *num, long *size) {
  char *tmp;
  tmp = buf;
  while (*tmp++ != '(')
    ;
  sscanf(tmp, "%ld", num);
  while (*tmp++ != 'I')
    ;
  sscanf(tmp, "%ld", size);
}


x86 assembly (clang, -O0):
<ParseIntFormat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
cmp    $0x28,%eax
je     114c <ParseIntFormat+0x3c>
jmp    112c <ParseIntFormat+0x1c>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xea5(%rip),%rsi
call   1030 <sscanf@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
cmp    $0x49,%eax
je     1180 <ParseIntFormat+0x70>
jmp    1160 <ParseIntFormat+0x50>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe71(%rip),%rsi
call   1030 <sscanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParseIntFormat>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rdx
mov    %rdi,%rbx
nopl   (%rax)
cmpb   $0x28,(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <ParseIntFormat+0x10>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sscanf@plt>
nopl   0x0(%rax,%rax,1)
cmpb   $0x49,(%rbx)
lea    0x1(%rbx),%rbx
jne    1140 <ParseIntFormat+0x30>
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sscanf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define void @ParseIntFormat(i8* %0, i64* %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i8*
store i8* %0, i8** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%8 = load i8*, i8** %4
store i8* %8, i8** %7
br label %9
9: ; preds = %15, %3
%10 = load i8*, i8** %7
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %7
%12 = load i8, i8* %10
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 40
br i1 %14, label %15, label %16
15: ; preds = %9
br label %9
16: ; preds = %9
%17 = load i8*, i8** %7
%18 = load i64*, i64** %5
%19 = call i32 @sscanf(i8* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %18)
br label %20
20: ; preds = %26, %16
%21 = load i8*, i8** %7
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %7
%23 = load i8, i8* %21
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 73
br i1 %25, label %26, label %27
26: ; preds = %20
br label %20
27: ; preds = %20
%28 = load i8*, i8** %7
%29 = load i64*, i64** %6
%30 = call i32 @sscanf(i8* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %29)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define void @ParseIntFormat(i8* nocapture %0, i64* %1, i64* %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i8* [ %0, %3 ], [ %6, %4 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = icmp eq i8 %7, 40
br i1 %8, label %9, label %4
9: ; preds = %4
%10 = tail call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
br label %11
11: ; preds = %11, %9
%12 = phi i8* [ %6, %9 ], [ %13, %11 ]
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 73
br i1 %15, label %16, label %11
16: ; preds = %11
%17 = tail call i32 @sscanf(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
ret void
}