#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 */
void *EnvGetNextDefmodule(void *, void *);
void *EnvGetNextDefrule(void *, void *);
int /*<<< orphan*/ EnvRemoveBreak(void *, void *);
void RemoveAllBreakpoints(void *theEnv) {
  void *theRule;
  void *theDefmodule = NULL;
  while ((theDefmodule = EnvGetNextDefmodule(theEnv, theDefmodule)) != NULL) {
    theRule = NULL;
    while ((theRule = EnvGetNextDefrule(theEnv, theRule)) != NULL) {
      EnvRemoveBreak(theEnv, theRule);
    }
  }
}


x86 assembly (clang, -O0):
<RemoveAllBreakpoints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <EnvGetNextDefmodule@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1199 <RemoveAllBreakpoints+0x69>
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <EnvGetNextDefrule@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1194 <RemoveAllBreakpoints+0x64>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <EnvRemoveBreak@plt>
jmp    1167 <RemoveAllBreakpoints+0x37>
jmp    1144 <RemoveAllBreakpoints+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemoveAllBreakpoints>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %esi,%esi
call   1030 <EnvGetNextDefmodule@plt>
test   %rax,%rax
je     11a0 <RemoveAllBreakpoints+0x70>
mov    %rax,%r14
jmp    1163 <RemoveAllBreakpoints+0x33>
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <EnvGetNextDefmodule@plt>
mov    %rax,%r14
test   %rax,%rax
je     11a0 <RemoveAllBreakpoints+0x70>
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <EnvGetNextDefrule@plt>
test   %rax,%rax
je     1150 <RemoveAllBreakpoints+0x20>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <EnvRemoveBreak@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <EnvGetNextDefrule@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1180 <RemoveAllBreakpoints+0x50>
jmp    1150 <RemoveAllBreakpoints+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @RemoveAllBreakpoints(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %4
br label %5
5: ; preds = %20, %1
%6 = load i8*, i8** %2
%7 = load i8*, i8** %4
%8 = call i8* @EnvGetNextDefmodule(i8* %6, i8* %7)
store i8* %8, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %21
10: ; preds = %5
store i8* null, i8** %3
br label %11
11: ; preds = %16, %10
%12 = load i8*, i8** %2
%13 = load i8*, i8** %3
%14 = call i8* @EnvGetNextDefrule(i8* %12, i8* %13)
store i8* %14, i8** %3
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %20
16: ; preds = %11
%17 = load i8*, i8** %2
%18 = load i8*, i8** %3
%19 = call i32 @EnvRemoveBreak(i8* %17, i8* %18)
br label %11
20: ; preds = %11
br label %5
21: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @RemoveAllBreakpoints(i8* %0) {
%2 = tail call i8* @EnvGetNextDefmodule(i8* %0, i8* null)
%3 = icmp eq i8* %2, null
br i1 %3, label %16, label %7
4: ; preds = %11, %7
%5 = tail call i8* @EnvGetNextDefmodule(i8* %0, i8* %8)
%6 = icmp eq i8* %5, null
br i1 %6, label %16, label %7
7: ; preds = %1, %4
%8 = phi i8* [ %5, %4 ], [ %2, %1 ]
%9 = tail call i8* @EnvGetNextDefrule(i8* %0, i8* null)
%10 = icmp eq i8* %9, null
br i1 %10, label %4, label %11
11: ; preds = %7, %11
%12 = phi i8* [ %14, %11 ], [ %9, %7 ]
%13 = tail call i32 @EnvRemoveBreak(i8* %0, i8* %12)
%14 = tail call i8* @EnvGetNextDefrule(i8* %0, i8* %12)
%15 = icmp eq i8* %14, null
br i1 %15, label %4, label %11
16: ; preds = %4, %1
ret void
}