pushpul(u) int u;
{
  register int m1, m2;
  m1 = 0;
  skipspace();
  do {
    switch (getreg((0x01 | 0x02 | 0x04 | 0x06 | 0x08 | 0x10 | 0x20 | 0x40 |
                    0x80 | 0x100))) {
    case 0x01:
      m2 = 0x01;
      break;
    case 0x02:
      m2 = 0x02;
      break;
    case 0x04:
      m2 = 0x04;
      break;
    case 0x06:
      m2 = 0x06;
      break;
    case 0x08:
      m2 = 0x08;
      break;
    case 0x10:
      m2 = 0x10;
      break;
    case 0x20:
      m2 = 0x20;
      break;
    case 0x80:
      if (!u)
        error("invalid register");
      m2 = 0x40;
      break;
    case 0x40:
      if (u)
        error("invalid register");
      m2 = 0x40;
      break;
    case 0x100:
      m2 = 0x80;
    }
    if (m1 & m2)
      error("same register");
    m1 |= m2;
  } while (checkchar(','));
  putcode(0, 0);
  putbyte(m1);
}


x86 assembly (clang, -O0):
<pushpul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1070 <skipspace@plt>
xor    %eax,%eax
mov    $0x1ff,%edi
call   1040 <getreg@plt>
mov    %eax,%ecx
mov    %ecx,-0x14(%rbp)
sub    $0x1,%eax
je     1235 <pushpul+0xd5>
jmp    1198 <pushpul+0x38>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
je     1241 <pushpul+0xe1>
jmp    11a9 <pushpul+0x49>
mov    -0x14(%rbp),%eax
sub    $0x4,%eax
je     124d <pushpul+0xed>
jmp    11ba <pushpul+0x5a>
mov    -0x14(%rbp),%eax
sub    $0x6,%eax
je     1259 <pushpul+0xf9>
jmp    11cb <pushpul+0x6b>
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
je     1265 <pushpul+0x105>
jmp    11dc <pushpul+0x7c>
mov    -0x14(%rbp),%eax
sub    $0x10,%eax
je     1271 <pushpul+0x111>
jmp    11ed <pushpul+0x8d>
mov    -0x14(%rbp),%eax
sub    $0x20,%eax
je     127d <pushpul+0x11d>
jmp    11fe <pushpul+0x9e>
mov    -0x14(%rbp),%eax
sub    $0x40,%eax
je     12ad <pushpul+0x14d>
jmp    120f <pushpul+0xaf>
mov    -0x14(%rbp),%eax
sub    $0x80,%eax
je     1289 <pushpul+0x129>
jmp    1222 <pushpul+0xc2>
mov    -0x14(%rbp),%eax
sub    $0x100,%eax
je     12d1 <pushpul+0x171>
jmp    12d8 <pushpul+0x178>
movl   $0x1,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
movl   $0x2,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
movl   $0x4,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
movl   $0x6,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
movl   $0x8,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
movl   $0x10,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
movl   $0x20,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
cmpl   $0x0,-0x8(%rbp)
jne    12a1 <pushpul+0x141>
lea    0xd66(%rip),%rdi
mov    $0x0,%al
call   1060 <error@plt>
movl   $0x40,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
cmpl   $0x0,-0x8(%rbp)
je     12c5 <pushpul+0x165>
lea    0xd42(%rip),%rdi
mov    $0x0,%al
call   1060 <error@plt>
movl   $0x40,-0x10(%rbp)
jmp    12d8 <pushpul+0x178>
movl   $0x80,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
cmp    $0x0,%eax
je     12f5 <pushpul+0x195>
lea    0xd23(%rip),%rdi
mov    $0x0,%al
call   1060 <error@plt>
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x2c,%edi
mov    $0x0,%al
call   1030 <checkchar@plt>
cmp    $0x0,%eax
jne    1179 <pushpul+0x19>
xor    %esi,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1050 <putcode@plt>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1080 <putbyte@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushpul>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edi,%r15d
xor    %eax,%eax
call   1070 <skipspace@plt>
lea    0xf84(%rip),%r14
lea    0xf8e(%rip),%r12
lea    0xe76(%rip),%r13
xor    %ebp,%ebp
jmp    11a2 <pushpul+0x42>
xchg   %ax,%ax
or     %ebx,%ebp
mov    $0x2c,%edi
xor    %eax,%eax
call   1030 <checkchar@plt>
test   %eax,%eax
je     1217 <pushpul+0xb7>
mov    $0x1ff,%edi
xor    %eax,%eax
call   1040 <getreg@plt>
lea    -0x1(%rax),%ecx
cmp    $0x3f,%ecx
ja     11e0 <pushpul+0x80>
movslq 0x0(%r13,%rcx,4),%rcx
add    %r13,%rcx
jmp    *%rcx
mov    %eax,%ebx
test   %ebp,%ebx
je     1190 <pushpul+0x30>
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <error@plt>
jmp    1190 <pushpul+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x80,%eax
je     1201 <pushpul+0xa1>
cmp    $0x100,%eax
jne    11c2 <pushpul+0x62>
mov    $0x80,%ebx
jmp    11c2 <pushpul+0x62>
mov    $0x40,%ebx
test   %r15d,%r15d
jne    120b <pushpul+0xab>
jmp    11c2 <pushpul+0x62>
mov    $0x40,%ebx
test   %r15d,%r15d
jne    11c2 <pushpul+0x62>
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <error@plt>
jmp    11c2 <pushpul+0x62>
xor    %edi,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <putcode@plt>
mov    %ebp,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <putbyte@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"invalid register\00"
@.str.1 = [14 x i8] c"same register\00"
define i32 @pushpul(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
%6 = call i32 (...) @skipspace()
br label %7
7: ; preds = %40, %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @getreg to i32 (i32, ...)*)(i32 511)
switch i32 %8, label %29 [
i32 1, label %9
i32 2, label %10
i32 4, label %11
i32 6, label %12
i32 8, label %13
i32 16, label %14
i32 32, label %15
i32 128, label %16
i32 64, label %22
i32 256, label %28
]
9: ; preds = %7
store i32 1, i32* %5
br label %29
10: ; preds = %7
store i32 2, i32* %5
br label %29
11: ; preds = %7
store i32 4, i32* %5
br label %29
12: ; preds = %7
store i32 6, i32* %5
br label %29
13: ; preds = %7
store i32 8, i32* %5
br label %29
14: ; preds = %7
store i32 16, i32* %5
br label %29
15: ; preds = %7
store i32 32, i32* %5
br label %29
16: ; preds = %7
%17 = load i32, i32* %3
%18 = icmp ne i32 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %16
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
store i32 64, i32* %5
br label %29
22: ; preds = %7
%23 = load i32, i32* %3
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %27
27: ; preds = %25, %22
store i32 64, i32* %5
br label %29
28: ; preds = %7
store i32 128, i32* %5
br label %29
29: ; preds = %28, %7, %27, %21, %15, %14, %13, %12, %11, %10, %9
%30 = load i32, i32* %4
%31 = load i32, i32* %5
%32 = and i32 %30, %31
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %29
%35 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %36
36: ; preds = %34, %29
%37 = load i32, i32* %5
%38 = load i32, i32* %4
%39 = or i32 %38, %37
store i32 %39, i32* %4
br label %40
40: ; preds = %36
%41 = call i32 (i32, ...) bitcast (i32 (...)* @checkchar to i32 (i32, ...)*)(i32 44)
%42 = icmp ne i32 %41, 0
br i1 %42, label %7, label %43
43: ; preds = %40
%44 = call i32 (i32, i32, ...) bitcast (i32 (...)* @putcode to i32 (i32, i32, ...)*)(i32 0, i32 0)
%45 = load i32, i32* %4
%46 = call i32 (i32, ...) bitcast (i32 (...)* @putbyte to i32 (i32, ...)*)(i32 %45)
%47 = load i32, i32* %2
ret i32 %47
}

LLVM IR (-O2):
@.str = [17 x i8] c"invalid register\00"
@.str.1 = [14 x i8] c"same register\00"
define i32 @pushpul(i32 %0) {
%2 = tail call i32 (...) @skipspace()
%3 = icmp eq i32 %0, 0
br label %4
4: ; preds = %28, %1
%5 = phi i32 [ 0, %1 ], [ %29, %28 ]
%6 = phi i32 [ undef, %1 ], [ %23, %28 ]
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @getreg to i32 (i32, ...)*)(i32 511)
switch i32 %7, label %22 [
i32 1, label %8
i32 2, label %9
i32 4, label %10
i32 6, label %11
i32 8, label %12
i32 16, label %13
i32 32, label %14
i32 128, label %15
i32 64, label %18
i32 256, label %21
]
8: ; preds = %4
br label %22
9: ; preds = %4
br label %22
10: ; preds = %4
br label %22
11: ; preds = %4
br label %22
12: ; preds = %4
br label %22
13: ; preds = %4
br label %22
14: ; preds = %4
br label %22
15: ; preds = %4
br i1 %3, label %16, label %22
16: ; preds = %15
%17 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %22
18: ; preds = %4
br i1 %3, label %22, label %19
19: ; preds = %18
%20 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %22
21: ; preds = %4
br label %22
22: ; preds = %18, %19, %15, %16, %21, %4, %14, %13, %12, %11, %10, %9, %8
%23 = phi i32 [ %6, %4 ], [ 128, %21 ], [ %7, %14 ], [ %7, %13 ], [ %7, %12 ], [ %7, %11 ], [ %7, %10 ], [ %7, %9 ], [ %7, %8 ], [ 64, %16 ], [ 64, %15 ], [ 64, %19 ], [ 64, %18 ]
%24 = and i32 %23, %5
%25 = icmp eq i32 %24, 0
br i1 %25, label %28, label %26
26: ; preds = %22
%27 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
%29 = or i32 %23, %5
%30 = tail call i32 (i32, ...) bitcast (i32 (...)* @checkchar to i32 (i32, ...)*)(i32 44)
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %4
32: ; preds = %28
%33 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @putcode to i32 (i32, i32, ...)*)(i32 0, i32 0)
%34 = tail call i32 (i32, ...) bitcast (i32 (...)* @putbyte to i32 (i32, ...)*)(i32 %29)
ret i32 undef
}