void get_recseen_mchlist(rep, cc) int *rep, cc;
{
  int rr, ll;
  clear_gset1();
  clear_gset2();
  add_gset2(&rr, cc);
  ll = 1;
  while (ll > 0 && rr == 1) {
    getnext_recseen_mchlist(&rr);
    card_gset2(&ll);
  }
  *rep = rr;
}


x86 assembly (clang, -O0):
<get_recseen_mchlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <clear_gset1@plt>
mov    $0x0,%al
call   1060 <clear_gset2@plt>
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1070 <add_gset2@plt>
movl   $0x1,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jle    119b <get_recseen_mchlist+0x4b>
cmpl   $0x1,-0x10(%rbp)
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    11ab <get_recseen_mchlist+0x5b>
jmp    11c6 <get_recseen_mchlist+0x76>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <getnext_recseen_mchlist@plt>
lea    -0x14(%rbp),%rdi
mov    $0x0,%al
call   1040 <card_gset2@plt>
jmp    1182 <get_recseen_mchlist+0x32>
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_recseen_mchlist>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <clear_gset1@plt>
xor    %eax,%eax
call   1060 <clear_gset2@plt>
lea    0x8(%rsp),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <add_gset2@plt>
movl   $0x1,0xc(%rsp)
mov    0x8(%rsp),%eax
cmp    $0x1,%eax
jne    11c4 <get_recseen_mchlist+0x74>
lea    0x8(%rsp),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <getnext_recseen_mchlist@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <card_gset2@plt>
cmpl   $0x0,0xc(%rsp)
mov    0x8(%rsp),%eax
jle    11c4 <get_recseen_mchlist+0x74>
cmp    $0x1,%eax
je     11a0 <get_recseen_mchlist+0x50>
mov    %eax,(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @get_recseen_mchlist(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = call i32 (...) @clear_gset1()
%8 = call i32 (...) @clear_gset2()
%9 = load i32, i32* %4
%10 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @add_gset2 to i32 (i32*, i32, ...)*)(i32* %5, i32 %9)
store i32 1, i32* %6
br label %11
11: ; preds = %19, %2
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %5
%16 = icmp eq i32 %15, 1
br label %17
17: ; preds = %14, %11
%18 = phi i1 [ false, %11 ], [ %16, %14 ]
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = call i32 (i32*, ...) bitcast (i32 (...)* @getnext_recseen_mchlist to i32 (i32*, ...)*)(i32* %5)
%21 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset2 to i32 (i32*, ...)*)(i32* %6)
br label %11
22: ; preds = %17
%23 = load i32, i32* %5
%24 = load i32*, i32** %3
store i32 %23, i32* %24
ret void
}

LLVM IR (-O2):
define void @get_recseen_mchlist(i32* nocapture writeonly %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 (...) @clear_gset1()
%8 = tail call i32 (...) @clear_gset2()
%9 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @add_gset2 to i32 (i32*, i32, ...)*)(i32* %3, i32 %1)
store i32 1, i32* %4
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %20
12: ; preds = %2, %12
%13 = call i32 (i32*, ...) bitcast (i32 (...)* @getnext_recseen_mchlist to i32 (i32*, ...)*)(i32* %3)
%14 = call i32 (i32*, ...) bitcast (i32 (...)* @card_gset2 to i32 (i32*, ...)*)(i32* %4)
%15 = load i32, i32* %4
%16 = icmp sgt i32 %15, 0
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 1
%19 = select i1 %16, i1 %18, i1 false
br i1 %19, label %12, label %20
20: ; preds = %12, %2
%21 = phi i32 [ %10, %2 ], [ %17, %12 ]
store i32 %21, i32* %0
ret void
}