#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*/ atoi(char const *const);
int dialog_checklist(char const *, char const *const, int /*<<< orphan*/,
                     int /*<<< orphan*/, int /*<<< orphan*/, int,
                     char const *const *, int);
int j_checklist(const char *t, int ac, const char *const *av) {
  return dialog_checklist(t, av[2], atoi(av[3]), atoi(av[4]), atoi(av[5]),
                          (ac - 6) / 3, av + 6, 1);
}


x86 assembly (clang, -O0):
<j_checklist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x20(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    0x28(%rax),%rdi
call   1040 <atoi@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%ecx
mov    %eax,%r8d
mov    -0xc(%rbp),%eax
sub    $0x6,%eax
mov    $0x3,%r9d
cltd
idiv   %r9d
mov    -0x1c(%rbp),%edx
mov    %eax,%r9d
mov    -0x18(%rbp),%rax
add    $0x30,%rax
mov    %rax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <dialog_checklist@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_checklist>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    0x10(%rdx),%r15
mov    0x18(%rdx),%rdi
call   1040 <atoi@plt>
mov    %eax,%r12d
mov    0x20(%rbx),%rdi
call   1040 <atoi@plt>
mov    %eax,%r13d
mov    0x28(%rbx),%rdi
call   1040 <atoi@plt>
add    $0xfffffffa,%ebp
movslq %ebp,%rcx
imul   $0x55555556,%rcx,%r9
mov    %r9,%rcx
shr    $0x3f,%rcx
shr    $0x20,%r9
add    %ecx,%r9d
add    $0x30,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
mov    %r13d,%ecx
mov    %eax,%r8d
push   $0x1
push   %rbx
call   1030 <dialog_checklist@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @j_checklist(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8**
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 2
%10 = load i8*, i8** %9
%11 = load i8**, i8*** %6
%12 = getelementptr inbounds i8*, i8** %11, i64 3
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
%15 = load i8**, i8*** %6
%16 = getelementptr inbounds i8*, i8** %15, i64 4
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
%19 = load i8**, i8*** %6
%20 = getelementptr inbounds i8*, i8** %19, i64 5
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
%23 = load i32, i32* %5
%24 = sub nsw i32 %23, 6
%25 = sdiv i32 %24, 3
%26 = load i8**, i8*** %6
%27 = getelementptr inbounds i8*, i8** %26, i64 6
%28 = call i32 @dialog_checklist(i8* %7, i8* %10, i32 %14, i32 %18, i32 %22, i32 %25, i8** %27, i32 1)
ret i32 %28
}

LLVM IR (-O2):
define i32 @j_checklist(i8* %0, i32 %1, i8** %2) {
%4 = getelementptr inbounds i8*, i8** %2, i64 2
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8*, i8** %2, i64 3
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = getelementptr inbounds i8*, i8** %2, i64 4
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = getelementptr inbounds i8*, i8** %2, i64 5
%13 = load i8*, i8** %12
%14 = tail call i32 @atoi(i8* %13)
%15 = add nsw i32 %1, -6
%16 = sdiv i32 %15, 3
%17 = getelementptr inbounds i8*, i8** %2, i64 6
%18 = tail call i32 @dialog_checklist(i8* %0, i8* %5, i32 %8, i32 %11, i32 %14, i32 %16, i8** %17, i32 1)
ret i32 %18
}