#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*/ executeAl(int, char *, int, int);
int /*<<< orphan*/ executeGpl(int, char *, char);
int sscanf(char *, char *, char *, ...);
void parseLine(char *line, size_t *nbytes) {
  int nargs;
  char command[*nbytes], c;
  int a1 = 0, a2 = 0;
  nargs = sscanf(line, "%s %d %d", command, &a1, &a2);
  executeAl(nargs, command, a1, a2);
  nargs = sscanf(line, "%s %c", command, &c);
  executeGpl(nargs, command, c);
}


x86 assembly (clang, -O0):
<parseLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x40(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe7d(%rip),%rsi
lea    -0x30(%rbp),%rcx
lea    -0x34(%rbp),%r8
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    -0x40(%rbp),%rsi
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
call   1030 <executeAl@plt>
mov    -0x40(%rbp),%rdx
mov    -0x8(%rbp),%rdi
lea    0xe53(%rip),%rsi
lea    -0x29(%rbp),%rcx
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    -0x40(%rbp),%rsi
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
movsbl -0x29(%rbp),%edx
call   1050 <executeGpl@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseLine>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
mov    (%rsi),%rax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xe99(%rip),%rsi
lea    -0x1c(%rbp),%rcx
lea    -0x18(%rbp),%r8
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    %eax,%edi
mov    %rbx,%rsi
call   1030 <executeAl@plt>
lea    0xe79(%rip),%rsi
lea    -0x11(%rbp),%rcx
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sscanf@plt>
movsbl -0x11(%rbp),%edx
mov    %eax,%edi
mov    %rbx,%rsi
call   1050 <executeGpl@plt>
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s %d %d\00"
@.str.1 = [6 x i8] c"%s %c\00"
define void @parseLine(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %3
store i64* %1, i64** %4
%11 = load i64*, i64** %4
%12 = load i64, i64* %11
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %6
%14 = alloca i8, i64 %12
store i64 %12, i64* %7
store i32 0, i32* %9
store i32 0, i32* %10
%15 = load i8*, i8** %3
%16 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %14, i32* %9, i32* %10)
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = load i32, i32* %9
%19 = load i32, i32* %10
%20 = call i32 @executeAl(i32 %17, i8* %14, i32 %18, i32 %19)
%21 = load i8*, i8** %3
%22 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %14, i8* %8)
store i32 %22, i32* %5
%23 = load i32, i32* %5
%24 = load i8, i8* %8
%25 = call i32 @executeGpl(i32 %23, i8* %14, i8 signext %24)
%26 = load i8*, i8** %6
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s %d %d\00"
@.str.1 = [6 x i8] c"%s %c\00"
define void @parseLine(i8* nocapture %0, i64* nocapture %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = load i64, i64* %1
%7 = alloca i8, i64 %6
%8 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%9 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%10 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %7, i32* %4, i32* %5)
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @executeAl(i32 %10, i8* %7, i32 %11, i32 %12)
%14 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %3)
%15 = load i8, i8* %3
%16 = call i32 @executeGpl(i32 %14, i8* %7, i8 signext %15)
ret void
}