#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*/ atoi(char *);
scalar_t__ isalpha(int);
int /*<<< orphan*/ listBreakpoints();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ setBreakpoint(int, int /*<<< orphan*/);
int sourceFileNumber(char *);
char *strtok(int /*<<< orphan*/ *, char *);
void handleBreakCommand(int fileNumber) {
  char *parameter = strtok(NULL, ":");
  if (parameter != NULL && isalpha((int)parameter[0])) {
    fileNumber = sourceFileNumber(parameter);
    if (fileNumber == -1) {
      printf("No such file: '%s'\n", parameter);
      return;
    }
    parameter = strtok(NULL, "");
  }
  if (parameter == NULL)
    listBreakpoints();
  else
    setBreakpoint(fileNumber, atoi(parameter));
}


x86 assembly (clang, -O0):
<handleBreakCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe7a(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11ef <handleBreakCommand+0x7f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1060 <isalpha@plt>
cmp    $0x0,%rax
je     11ef <handleBreakCommand+0x7f>
mov    -0x10(%rbp),%rdi
call   1040 <sourceFileNumber@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    11db <handleBreakCommand+0x6b>
mov    -0x10(%rbp),%rsi
lea    0xe31(%rip),%rdi
call   1030 <printf@plt>
jmp    121f <handleBreakCommand+0xaf>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe2f(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1206 <handleBreakCommand+0x96>
mov    $0x0,%al
call   1090 <listBreakpoints@plt>
jmp    121f <handleBreakCommand+0xaf>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1080 <atoi@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1050 <setBreakpoint@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleBreakCommand>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xe84(%rip),%rsi
xor    %edi,%edi
call   1070 <strtok@plt>
test   %rax,%rax
je     11d4 <handleBreakCommand+0x64>
mov    %rax,%rbx
movsbl (%rax),%edi
call   1060 <isalpha@plt>
test   %rax,%rax
je     11bd <handleBreakCommand+0x4d>
mov    %rbx,%rdi
call   1040 <sourceFileNumber@plt>
cmp    $0xffffffff,%eax
je     11e1 <handleBreakCommand+0x71>
mov    %eax,%ebp
lea    0xe67(%rip),%rsi
xor    %edi,%edi
call   1070 <strtok@plt>
test   %rax,%rax
je     11d4 <handleBreakCommand+0x64>
mov    %rax,%rbx
mov    %rbx,%rdi
call   1080 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <setBreakpoint@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1090 <listBreakpoints@plt>
lea    0xe1a(%rip),%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
@.str.1 = [20 x i8] c"No such file: '%s'\0A\00"
@.str.2 = [1 x i8] zeroinitializer
define void @handleBreakCommand(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %24
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = call i64 @isalpha(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %24
14: ; preds = %7
%15 = load i8*, i8** %3
%16 = call i32 @sourceFileNumber(i8* %15)
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = load i8*, i8** %3
%21 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %20)
br label %34
22: ; preds = %14
%23 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
store i8* %23, i8** %3
br label %24
24: ; preds = %22, %7, %1
%25 = load i8*, i8** %3
%26 = icmp eq i8* %25, null
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (...) @listBreakpoints()
br label %34
29: ; preds = %24
%30 = load i32, i32* %2
%31 = load i8*, i8** %3
%32 = call i32 @atoi(i8* %31)
%33 = call i32 @setBreakpoint(i32 %30, i32 %32)
br label %34
34: ; preds = %19, %29, %27
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
@.str.1 = [20 x i8] c"No such file: '%s'\0A\00"
@.str.2 = [1 x i8] zeroinitializer
define void @handleBreakCommand(i32 %0) {
%2 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %17, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = tail call i64 @isalpha(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %4
%10 = tail call i32 @sourceFileNumber(i8* %2)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %2)
br label %24
14: ; preds = %9
%15 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %19
17: ; preds = %1, %14
%18 = tail call i32 (...) @listBreakpoints()
br label %24
19: ; preds = %4, %14
%20 = phi i8* [ %15, %14 ], [ %2, %4 ]
%21 = phi i32 [ %10, %14 ], [ %0, %4 ]
%22 = tail call i32 @atoi(i8* %20)
%23 = tail call i32 @setBreakpoint(i32 %21, i32 %22)
br label %24
24: ; preds = %17, %19, %12
ret void
}