#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 */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int pl_Int_2(void *variable, int argc, char *argv[], int i, int k) {
  if (k != 0) {
    fprintf(stderr, "\"%s\" (item %d on the command line) ", argv[i], i);
    fprintf(stderr, "does not match any of the legal options.\n\n");
    return (0);
  } else {
    *(char *)variable = 2;
    return (i);
  }
}


x86 assembly (clang, -O0):
<pl_Int_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     117d <pl_Int_2+0x6d>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x24(%rbp),%ecx
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    118a <pl_Int_2+0x7a>
mov    -0x10(%rbp),%rax
movb   $0x2,(%rax)
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_Int_2>:
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
test   %r8d,%r8d
je     114f <pl_Int_2+0x3f>
mov    0x2ebe(%rip),%r14
mov    (%r14),%edi
movslq %ebx,%rcx
mov    (%rdx,%rcx,8),%rdx
lea    0xecd(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xede(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    1152 <pl_Int_2+0x42>
movb   $0x2,(%rdi)
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"\22%s\22 (item %d on the command line) \00"
@.str.1 = [43 x i8] c"does not match any of the legal options.\0A\0A\00"
define i32 @pl_Int_2(i8* %0, i32 %1, i8** %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8**
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8** %2, i8*** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
%12 = load i32, i32* %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %25
14: ; preds = %5
%15 = load i32, i32* @stderr
%16 = load i8**, i8*** %9
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = load i32, i32* %10
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %20, i32 %21)
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %28
25: ; preds = %5
%26 = load i8*, i8** %7
store i8 2, i8* %26
%27 = load i32, i32* %10
store i32 %27, i32* %6
br label %28
28: ; preds = %25, %14
%29 = load i32, i32* %6
ret i32 %29
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"\22%s\22 (item %d on the command line) \00"
@.str.1 = [43 x i8] c"does not match any of the legal options.\0A\0A\00"
define i32 @pl_Int_2(i8* nocapture writeonly %0, i32 %1, i8** nocapture %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %4, 0
br i1 %6, label %15, label %7
7: ; preds = %5
%8 = load i32, i32* @stderr
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i8*, i8** %2, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %3)
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
br label %16
15: ; preds = %5
store i8 2, i8* %0
br label %16
16: ; preds = %15, %7
%17 = phi i32 [ 0, %7 ], [ %3, %15 ]
ret i32 %17
}