setcc(prm, x, y) int x, y, *prm;
{
  if (y < 0)
    return (y);
  if ((x > 037) && (x != 0177)) {
    printf("\n?Not in ASCII control range - %d\n", x);
    return (-2);
  }
  if ((y = cmcfm()) < 0)
    return (y);
  *prm = x;
  return (0);
}


x86 assembly (clang, -O0):
<setcc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1147 <setcc+0x27>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11a6 <setcc+0x86>
cmpl   $0x1f,-0x14(%rbp)
jle    1178 <setcc+0x58>
cmpl   $0x7f,-0x14(%rbp)
je     1178 <setcc+0x58>
mov    -0x14(%rbp),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    11a6 <setcc+0x86>
mov    $0x0,%al
call   1040 <cmcfm@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    1196 <setcc+0x76>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11a6 <setcc+0x86>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setcc>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
test   %edx,%edx
js     1164 <setcc+0x44>
mov    %esi,%ebx
mov    %rdi,%r14
cmp    $0x20,%esi
jl     1150 <setcc+0x30>
cmp    $0x7f,%ebx
je     1150 <setcc+0x30>
lea    0xec0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xfffffffe,%ebp
jmp    1164 <setcc+0x44>
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <cmcfm@plt>
test   %eax,%eax
js     1162 <setcc+0x42>
mov    %ebx,(%r14)
jmp    1164 <setcc+0x44>
mov    %eax,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"\0A?Not in ASCII control range - %d\0A\00"
define i32 @setcc(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i32, i32* %7
store i32 %11, i32* %4
br label %29
12: ; preds = %3
%13 = load i32, i32* %6
%14 = icmp sgt i32 %13, 31
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %6
%17 = icmp ne i32 %16, 127
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %6
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %19)
store i32 -2, i32* %4
br label %29
21: ; preds = %15, %12
%22 = call i32 (...) @cmcfm()
store i32 %22, i32* %7
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = load i32, i32* %7
store i32 %25, i32* %4
br label %29
26: ; preds = %21
%27 = load i32, i32* %6
%28 = load i32*, i32** %5
store i32 %27, i32* %28
store i32 0, i32* %4
br label %29
29: ; preds = %26, %24, %18, %10
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
@.str = [35 x i8] c"\0A?Not in ASCII control range - %d\0A\00"
define i32 @setcc(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 0
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = icmp sgt i32 %1, 31
%7 = icmp ne i32 %1, 127
%8 = and i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %15
11: ; preds = %5
%12 = tail call i32 (...) @cmcfm()
%13 = icmp slt i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %11
store i32 %1, i32* %0
br label %15
15: ; preds = %11, %3, %14, %9
%16 = phi i32 [ -2, %9 ], [ 0, %14 ], [ %2, %3 ], [ %12, %11 ]
ret i32 %16
}