void ParseIfmt(fmt, perline, width) char *fmt;
int *perline;
int *width;
{
  char *PPL, *WID;
  upcase(fmt);
  PPL = substr_before(fmt, 'I');
  PPL = substr(PPL, 1, strlen(PPL) - 1);
  *perline = atoi(PPL);
  WID = substr_after(fmt, 'I');
  WID = substr(WID, 0, strlen(WID) - 1);
  *width = atoi(WID);
}


x86 assembly (clang, -O0):
<ParseIfmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <upcase@plt>
mov    -0x8(%rbp),%rdi
mov    $0x49,%esi
mov    $0x0,%al
call   1070 <substr_before@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    %rax,%rdx
sub    $0x1,%rdx
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <substr@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1080 <atoi@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x49,%esi
mov    $0x0,%al
call   1050 <substr_after@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    %rax,%rdx
sub    $0x1,%rdx
xor    %esi,%esi
mov    $0x0,%al
call   1040 <substr@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1080 <atoi@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParseIfmt>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %eax,%eax
call   1060 <upcase@plt>
mov    %r12,%rdi
mov    $0x49,%esi
xor    %eax,%eax
call   1070 <substr_before@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <substr@plt>
movslq %eax,%rdi
xor    %eax,%eax
call   1080 <atoi@plt>
mov    %eax,(%r15)
mov    %r12,%rdi
mov    $0x49,%esi
xor    %eax,%eax
call   1050 <substr_after@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <substr@plt>
movslq %eax,%rdi
xor    %eax,%eax
call   1080 <atoi@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ParseIfmt(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%9 = load i8*, i8** %4
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @upcase to i32 (i8*, ...)*)(i8* %9)
%11 = load i8*, i8** %4
%12 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @substr_before to i32 (i8*, i32, ...)*)(i8* %11, i32 73)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %7
%15 = load i8*, i8** %7
%16 = load i8*, i8** %7
%17 = call i64 @strlen(i8* %16)
%18 = sub i64 %17, 1
%19 = call i32 (i8*, i32, i64, ...) bitcast (i32 (...)* @substr to i32 (i8*, i32, i64, ...)*)(i8* %15, i32 1, i64 %18)
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i8*
store i8* %21, i8** %7
%22 = load i8*, i8** %7
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %22)
%24 = load i32*, i32** %5
store i32 %23, i32* %24
%25 = load i8*, i8** %4
%26 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @substr_after to i32 (i8*, i32, ...)*)(i8* %25, i32 73)
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i8*
store i8* %28, i8** %8
%29 = load i8*, i8** %8
%30 = load i8*, i8** %8
%31 = call i64 @strlen(i8* %30)
%32 = sub i64 %31, 1
%33 = call i32 (i8*, i32, i64, ...) bitcast (i32 (...)* @substr to i32 (i8*, i32, i64, ...)*)(i8* %29, i32 0, i64 %32)
%34 = sext i32 %33 to i64
%35 = inttoptr i64 %34 to i8*
store i8* %35, i8** %8
%36 = load i8*, i8** %8
%37 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %36)
%38 = load i32*, i32** %6
store i32 %37, i32* %38
ret void
}

LLVM IR (-O2):
define void @ParseIfmt(i8* %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @upcase to i32 (i8*, ...)*)(i8* %0)
%5 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @substr_before to i32 (i8*, i32, ...)*)(i8* %0, i32 73)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = tail call i64 @strlen(i8* dereferenceable(1) %7)
%9 = add i64 %8, -1
%10 = tail call i32 (i8*, i32, i64, ...) bitcast (i32 (...)* @substr to i32 (i8*, i32, i64, ...)*)(i8* %7, i32 1, i64 %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
%13 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %12)
store i32 %13, i32* %1
%14 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @substr_after to i32 (i8*, i32, ...)*)(i8* %0, i32 73)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
%17 = tail call i64 @strlen(i8* dereferenceable(1) %16)
%18 = add i64 %17, -1
%19 = tail call i32 (i8*, i32, i64, ...) bitcast (i32 (...)* @substr to i32 (i8*, i32, i64, ...)*)(i8* %16, i32 0, i64 %18)
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i8*
%22 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %21)
store i32 %22, i32* %2
ret void
}