#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*/ get_num(char *, char *);
int /*<<< orphan*/ get_string(char *);
int /*<<< orphan*/ int2hex(char *, int /*<<< orphan*/, int);
char *l_askNbytes(char *, char *, int, int);
int s_len(int /*<<< orphan*/);
char *macgetJobInfo(char *arg) {
  int l;
  l = s_len(get_string(arg));
  if (l + 10 > 10240) {
    get_num("getJobInfo", arg);
    *arg = '\0';
    return arg;
  }
  int2hex(arg + l, get_num("getJobInfo", arg + l), 8);
  return l_askNbytes(arg, "64", l, -1);
}


x86 assembly (clang, -O0):
<macgetJobInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <get_string@plt>
mov    %eax,%edi
call   1050 <s_len@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xa,%eax
cmp    $0x2800,%eax
jle    11a4 <macgetJobInfo+0x54>
mov    -0x10(%rbp),%rsi
lea    0xe75(%rip),%rdi
call   1040 <get_num@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11f6 <macgetJobInfo+0xa6>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
lea    0xe3b(%rip),%rdi
call   1040 <get_num@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    $0x8,%edx
call   1070 <int2hex@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe23(%rip),%rsi
mov    $0xffffffff,%ecx
call   1030 <l_askNbytes@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macgetJobInfo>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1060 <get_string@plt>
mov    %eax,%edi
call   1050 <s_len@plt>
cmp    $0x27f7,%eax
jl     1184 <macgetJobInfo+0x34>
lea    0xe8f(%rip),%rdi
mov    %rbx,%rsi
call   1040 <get_num@plt>
movb   $0x0,(%rbx)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %eax,%r14d
movslq %eax,%rbp
add    %rbx,%rbp
lea    0xe6c(%rip),%rdi
mov    %rbp,%rsi
call   1040 <get_num@plt>
mov    %rbp,%rdi
mov    %eax,%esi
mov    $0x8,%edx
call   1070 <int2hex@plt>
lea    0xe59(%rip),%rsi
mov    %rbx,%rdi
mov    %r14d,%edx
mov    $0xffffffff,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <l_askNbytes@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"getJobInfo\00"
@.str.1 = [3 x i8] c"64\00"
define i8* @macgetJobInfo(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @get_string(i8* %5)
%7 = call i32 @s_len(i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 10
%10 = icmp sgt i32 %9, 10240
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = call i32 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %3
store i8 0, i8* %14
%15 = load i8*, i8** %3
store i8* %15, i8** %2
br label %30
16: ; preds = %1
%17 = load i8*, i8** %3
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = call i32 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %24)
%26 = call i32 @int2hex(i8* %20, i32 %25, i32 8)
%27 = load i8*, i8** %3
%28 = load i32, i32* %4
%29 = call i8* @l_askNbytes(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %28, i32 -1)
store i8* %29, i8** %2
br label %30
30: ; preds = %16, %11
%31 = load i8*, i8** %2
ret i8* %31
}

LLVM IR (-O2):
@.str = [11 x i8] c"getJobInfo\00"
@.str.1 = [3 x i8] c"64\00"
define i8* @macgetJobInfo(i8* %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i32 @s_len(i32 %2)
%4 = icmp sgt i32 %3, 10230
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
store i8 0, i8* %0
br label %13
7: ; preds = %1
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = tail call i32 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = tail call i32 @int2hex(i8* %9, i32 %10, i32 8)
%12 = tail call i8* @l_askNbytes(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 -1)
br label %13
13: ; preds = %7, %5
%14 = phi i8* [ %0, %5 ], [ %12, %7 ]
ret i8* %14
}