#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct timex {
  scalar_t__ offset;
  scalar_t__ stbcnt;
  scalar_t__ errcnt;
  scalar_t__ calcnt;
  scalar_t__ jitcnt;
  scalar_t__ stabil;
  int /*<<< orphan*/ shift;
  scalar_t__ jitter;
  scalar_t__ ppsfreq;
  scalar_t__ tick;
  TYPE_1__ time;
  scalar_t__ tolerance;
  scalar_t__ precision;
  scalar_t__ constant;
  scalar_t__ status;
  scalar_t__ esterror;
  scalar_t__ maxerror;
  scalar_t__ freq;
};
typedef int intmax_t;

/* Variables and functions */
int adjtimex(struct timex *);
int /*<<< orphan*/ printf(char *, int, int, int, int, char *, int, int, int,
                          int, int, int, int, int, int /*<<< orphan*/, int, int,
                          int, int, int, int);
int main(void) {
  struct timex tx = {};
  int state = adjtimex(&tx);
  if (state < 0)
    return 77;
  printf("adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd"
         ", esterror=%jd, status=%s, constant=%jd, precision=%jd"
         ", tolerance=%jd, time={%jd, %jd}, tick=%jd, ppsfreq=%jd"
         ", jitter=%jd, shift=%d, stabil=%jd, jitcnt=%jd, calcnt=%jd"
         ", errcnt=%jd, stbcnt=%jd"
         "\\}\\) = %d \\(TIME_[A-Z]+\\)\n",
         (intmax_t)tx.offset, (intmax_t)tx.freq, (intmax_t)tx.maxerror,
         (intmax_t)tx.esterror, tx.status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0",
         (intmax_t)tx.constant, (intmax_t)tx.precision, (intmax_t)tx.tolerance,
         (intmax_t)tx.time.tv_sec, (intmax_t)tx.time.tv_usec, (intmax_t)tx.tick,
         (intmax_t)tx.ppsfreq, (intmax_t)tx.jitter, tx.shift,
         (intmax_t)tx.stabil, (intmax_t)tx.jitcnt, (intmax_t)tx.calcnt,
         (intmax_t)tx.errcnt, (intmax_t)tx.stbcnt, state);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
movl   $0x0,-0x2c(%rbp)
lea    -0xc8(%rbp),%rdi
xor    %esi,%esi
mov    $0x98,%edx
call   1040 <memset@plt>
lea    -0xc8(%rbp),%rdi
call   1050 <adjtimex@plt>
mov    %eax,-0xcc(%rbp)
cmpl   $0x0,-0xcc(%rbp)
jge    1189 <main+0x59>
movl   $0x4d,-0x2c(%rbp)
jmp    12ce <main+0x19e>
mov    -0xc8(%rbp),%rax
mov    %eax,%esi
mov    -0x38(%rbp),%rax
mov    %eax,%edx
mov    -0x40(%rbp),%rax
mov    %eax,%ecx
mov    -0x48(%rbp),%rax
mov    %eax,%r8d
mov    -0x50(%rbp),%rdi
lea    0xf7b(%rip),%r9
lea    0xf5a(%rip),%rax
cmp    $0x0,%rdi
cmovne %rax,%r9
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdi
mov    %edi,-0xe8(%rbp)
mov    -0x68(%rbp),%rdi
mov    %edi,-0xe4(%rbp)
mov    -0x70(%rbp),%rdi
mov    %edi,-0xe0(%rbp)
mov    -0x78(%rbp),%rdi
mov    %edi,-0xdc(%rbp)
mov    -0x80(%rbp),%rdi
mov    %edi,-0xd8(%rbp)
mov    -0x88(%rbp),%rdi
mov    %edi,-0xd4(%rbp)
mov    -0x90(%rbp),%rdi
mov    %edi,%r13d
mov    -0x98(%rbp),%r12d
mov    -0xa0(%rbp),%rdi
mov    %edi,%r15d
mov    -0xa8(%rbp),%rdi
mov    %edi,%r14d
mov    -0xb0(%rbp),%rdi
mov    %edi,%ebx
mov    -0xb8(%rbp),%rdi
mov    %edi,%r11d
mov    -0xc0(%rbp),%rdi
mov    %edi,%r10d
mov    -0xcc(%rbp),%edi
mov    %edi,-0xd0(%rbp)
lea    0xda9(%rip),%rdi
mov    %eax,(%rsp)
mov    -0xe8(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0xe4(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0xe0(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0xdc(%rbp),%eax
mov    %eax,0x20(%rsp)
mov    -0xd8(%rbp),%eax
mov    %eax,0x28(%rsp)
mov    -0xd4(%rbp),%eax
mov    %eax,0x30(%rsp)
mov    -0xd0(%rbp),%eax
mov    %r13d,0x38(%rsp)
mov    %r12d,0x40(%rsp)
mov    %r15d,0x48(%rsp)
mov    %r14d,0x50(%rsp)
mov    %ebx,0x58(%rsp)
mov    %r11d,0x60(%rsp)
mov    %r10d,0x68(%rsp)
mov    %eax,0x70(%rsp)
call   1030 <printf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movq   $0x0,0xc0(%rsp)
lea    0x30(%rsp),%rdi
call   1040 <adjtimex@plt>
test   %eax,%eax
js     1275 <main+0x155>
mov    0xc0(%rsp),%edx
mov    0xb8(%rsp),%ecx
cmpq   $0x0,0xa8(%rsp)
lea    0xf82(%rip),%rsi
lea    0xf61(%rip),%r9
cmove  %rsi,%r9
mov    0xb0(%rsp),%r8d
mov    0xa0(%rsp),%esi
mov    %rsi,0x28(%rsp)
mov    0x98(%rsp),%esi
mov    %rsi,0x20(%rsp)
mov    0x90(%rsp),%esi
mov    %rsi,0x18(%rsp)
mov    0x88(%rsp),%esi
mov    %rsi,0x10(%rsp)
mov    0x80(%rsp),%esi
mov    %rsi,0x8(%rsp)
mov    0x78(%rsp),%esi
mov    %rsi,(%rsp)
mov    0x70(%rsp),%r13d
mov    0x68(%rsp),%ebp
mov    0x60(%rsp),%r12d
mov    0x58(%rsp),%r15d
mov    0x50(%rsp),%r14d
mov    0x48(%rsp),%ebx
mov    0x40(%rsp),%r11d
mov    0x30(%rsp),%esi
mov    0x38(%rsp),%r10d
sub    $0x8,%rsp
lea    0xdcb(%rip),%rdi
push   %rax
push   %r10
push   %r11
push   %rbx
push   %r14
push   %r15
push   %r12
push   %rbp
push   %r13
push   0x50(%rsp)
push   0x60(%rsp)
push   0x70(%rsp)
push   0x80(%rsp)
push   0x90(%rsp)
push   0xa0(%rsp)
call   1030 <printf@plt>
add    $0x80,%rsp
xor    %eax,%eax
jmp    127a <main+0x15a>
mov    $0x4d,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timex = type { i64, i64, i64, i64, i64, i64, i32, i64, i64, i64, %struct.TYPE_2__, i64, i64, i64, i64, i64, i64, i64 }
%struct.TYPE_2__ = type { i64, i64 }
@.str = [273 x i8] c"adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd, esterror=%jd, status=%s, constant=%jd, precision=%jd, tolerance=%jd, time={%jd, %jd}, tick=%jd, ppsfreq=%jd, jitter=%jd, shift=%d, stabil=%jd, jitcnt=%jd, calcnt=%jd, errcnt=%jd, stbcnt=%jd\\}\\) = %d \\(TIME_[A-Z]+\\)\0A\00"
@.str.1 = [26 x i8] c"STA_[A-Z]+(\\|STA_[A-Z]+)*\00"
@.str.2 = [2 x i8] c"0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timex
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast %struct.timex* %2 to i8*
%5 = call i32 @adjtimex(%struct.timex* %2)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 77, i32* %1
br label %72
9: ; preds = %0
%10 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 0
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 17
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 16
%17 = load i64, i64* %16
%18 = trunc i64 %17 to i32
%19 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 15
%20 = load i64, i64* %19
%21 = trunc i64 %20 to i32
%22 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 14
%23 = load i64, i64* %22
%24 = icmp ne i64 %23, 0
%25 = zext i1 %24 to i64
%26 = select i1 %24, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%27 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 13
%28 = load i64, i64* %27
%29 = trunc i64 %28 to i32
%30 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 12
%31 = load i64, i64* %30
%32 = trunc i64 %31 to i32
%33 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 11
%34 = load i64, i64* %33
%35 = trunc i64 %34 to i32
%36 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 10
%37 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %36, i32 0, i32 1
%38 = load i64, i64* %37
%39 = trunc i64 %38 to i32
%40 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 10
%41 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %40, i32 0, i32 0
%42 = load i64, i64* %41
%43 = trunc i64 %42 to i32
%44 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 9
%45 = load i64, i64* %44
%46 = trunc i64 %45 to i32
%47 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 8
%48 = load i64, i64* %47
%49 = trunc i64 %48 to i32
%50 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 7
%51 = load i64, i64* %50
%52 = trunc i64 %51 to i32
%53 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 6
%54 = load i32, i32* %53
%55 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 5
%56 = load i64, i64* %55
%57 = trunc i64 %56 to i32
%58 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 4
%59 = load i64, i64* %58
%60 = trunc i64 %59 to i32
%61 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 3
%62 = load i64, i64* %61
%63 = trunc i64 %62 to i32
%64 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 2
%65 = load i64, i64* %64
%66 = trunc i64 %65 to i32
%67 = getelementptr inbounds %struct.timex, %struct.timex* %2, i32 0, i32 1
%68 = load i64, i64* %67
%69 = trunc i64 %68 to i32
%70 = load i32, i32* %3
%71 = call i32 @printf(i8* getelementptr inbounds ([273 x i8], [273 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %15, i32 %18, i32 %21, i8* %26, i32 %29, i32 %32, i32 %35, i32 %39, i32 %43, i32 %46, i32 %49, i32 %52, i32 %54, i32 %57, i32 %60, i32 %63, i32 %66, i32 %69, i32 %70)
store i32 0, i32* %1
br label %72
72: ; preds = %9, %8
%73 = load i32, i32* %1
ret i32 %73
}

LLVM IR (-O2):
%struct.timex = type { i64, i64, i64, i64, i64, i64, i32, i64, i64, i64, %struct.TYPE_2__, i64, i64, i64, i64, i64, i64, i64 }
%struct.TYPE_2__ = type { i64, i64 }
@.str = [273 x i8] c"adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd, esterror=%jd, status=%s, constant=%jd, precision=%jd, tolerance=%jd, time={%jd, %jd}, tick=%jd, ppsfreq=%jd, jitter=%jd, shift=%d, stabil=%jd, jitcnt=%jd, calcnt=%jd, errcnt=%jd, stbcnt=%jd\\}\\) = %d \\(TIME_[A-Z]+\\)\0A\00"
@.str.1 = [26 x i8] c"STA_[A-Z]+(\\|STA_[A-Z]+)*\00"
@.str.2 = [2 x i8] c"0\00"
define i32 @main() {
%1 = alloca %struct.timex
%2 = bitcast %struct.timex* %1 to i8*
%3 = call i32 @adjtimex(%struct.timex* %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %64, label %5
5: ; preds = %0
%6 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 17
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 16
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 15
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 14
%19 = load i64, i64* %18
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0)
%22 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 13
%23 = load i64, i64* %22
%24 = trunc i64 %23 to i32
%25 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 12
%26 = load i64, i64* %25
%27 = trunc i64 %26 to i32
%28 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 11
%29 = load i64, i64* %28
%30 = trunc i64 %29 to i32
%31 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 10, i32 1
%32 = load i64, i64* %31
%33 = trunc i64 %32 to i32
%34 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 10, i32 0
%35 = load i64, i64* %34
%36 = trunc i64 %35 to i32
%37 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 9
%38 = load i64, i64* %37
%39 = trunc i64 %38 to i32
%40 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 8
%41 = load i64, i64* %40
%42 = trunc i64 %41 to i32
%43 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 7
%44 = load i64, i64* %43
%45 = trunc i64 %44 to i32
%46 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 6
%47 = load i32, i32* %46
%48 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 5
%49 = load i64, i64* %48
%50 = trunc i64 %49 to i32
%51 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 4
%52 = load i64, i64* %51
%53 = trunc i64 %52 to i32
%54 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 3
%55 = load i64, i64* %54
%56 = trunc i64 %55 to i32
%57 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 2
%58 = load i64, i64* %57
%59 = trunc i64 %58 to i32
%60 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 1
%61 = load i64, i64* %60
%62 = trunc i64 %61 to i32
%63 = call i32 @printf(i8* getelementptr inbounds ([273 x i8], [273 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %11, i32 %14, i32 %17, i8* %21, i32 %24, i32 %27, i32 %30, i32 %33, i32 %36, i32 %39, i32 %42, i32 %45, i32 %47, i32 %50, i32 %53, i32 %56, i32 %59, i32 %62, i32 %3)
br label %64
64: ; preds = %0, %5
%65 = phi i32 [ 0, %5 ], [ 77, %0 ]
ret i32 %65
}