void umask_option(value, request) char *value;
struct request_info *request;
{
  unsigned mask;
  char junk;
  if (sscanf(value, "%o%c", &mask, &junk) != 1 || (mask & 0777) != mask)
    tcpd_jump("bad umask value: \"%s\"", value);
  (void)umask(mask);
}


x86 assembly (clang, -O0):
<umask_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x15(%rbp),%rcx
mov    $0x0,%al
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    1174 <umask_option+0x44>
mov    -0x14(%rbp),%eax
and    $0x1ff,%eax
cmp    -0x14(%rbp),%eax
je     1186 <umask_option+0x56>
mov    -0x8(%rbp),%rsi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <tcpd_jump@plt>
mov    -0x14(%rbp),%edi
mov    $0x0,%al
call   1040 <umask@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umask_option>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xec1(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0xb(%rsp),%rcx
xor    %eax,%eax
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    1161 <umask_option+0x31>
mov    0xc(%rsp),%edi
cmp    $0x200,%edi
jb     1176 <umask_option+0x46>
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <tcpd_jump@plt>
mov    0xc(%rsp),%edi
xor    %eax,%eax
call   1040 <umask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.request_info = type opaque
@.str = [5 x i8] c"%o%c\00"
@.str.1 = [22 x i8] c"bad umask value: \22%s\22\00"
define void @umask_option(i8* %0, %struct.request_info* %1) {
%3 = alloca i8*
%4 = alloca %struct.request_info*
%5 = alloca i32
%6 = alloca i8
store i8* %0, i8** %3
store %struct.request_info* %1, %struct.request_info** %4
%7 = load i8*, i8** %3
%8 = call i32 (i8*, i8*, ...) @sscanf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %5, i8* %6)
%9 = icmp ne i32 %8, 1
br i1 %9, label %15, label %10
10: ; preds = %2
%11 = load i32, i32* %5
%12 = and i32 %11, 511
%13 = load i32, i32* %5
%14 = icmp ne i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %10, %2
%16 = load i8*, i8** %3
%17 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @tcpd_jump to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %15, %10
%19 = load i32, i32* %5
%20 = call i32 (i32, ...) bitcast (i32 (...)* @umask to i32 (i32, ...)*)(i32 %19)
ret void
}

LLVM IR (-O2):
%struct.request_info = type opaque
@.str = [5 x i8] c"%o%c\00"
@.str.1 = [22 x i8] c"bad umask value: \22%s\22\00"
define void @umask_option(i8* %0, %struct.request_info* nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i8
%5 = bitcast i32* %3 to i8*
%6 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i8* %4)
%7 = icmp eq i32 %6, 1
%8 = load i32, i32* %3
%9 = icmp ult i32 %8, 512
%10 = select i1 %7, i1 %9, i1 false
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @tcpd_jump to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%13 = load i32, i32* %3
br label %14
14: ; preds = %2, %11
%15 = phi i32 [ %8, %2 ], [ %13, %11 ]
%16 = call i32 (i32, ...) bitcast (i32 (...)* @umask to i32 (i32, ...)*)(i32 %15)
ret void
}