xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(unsigned long, unsigned char, int);
int /*<<< orphan*/ GPIOPadConfigSet(unsigned long, unsigned char, int, int);
void GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins) {
  ;
  GPIODirModeSet(ulPort, ucPins, 0x00000002);
  GPIOPadConfigSet(ulPort, ucPins, 0x00000001, 0x0000000B);
}


x86 assembly (clang, -O0):
<GPIOPinTypeI2C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%edx
movzbl -0x9(%rbp),%esi
call   1040 <GPIODirModeSet@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%edx
mov    $0xb,%ecx
movzbl -0x9(%rbp),%esi
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeI2C>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    $0xb,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeI2C(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
%6 = load i8, i8* %4
%7 = call i32 @GPIODirModeSet(i64 %5, i8 zeroext %6, i32 2)
%8 = load i64, i64* %3
%9 = load i8, i8* %4
%10 = call i32 @GPIOPadConfigSet(i64 %8, i8 zeroext %9, i32 1, i32 11)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeI2C(i64 %0, i8 zeroext %1) {
%3 = tail call i32 @GPIODirModeSet(i64 %0, i8 zeroext %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i64 %0, i8 zeroext %1, i32 1, i32 11)
ret void
}
__attribute__((no, noclone)) unsigned __int128 t154_4sub(unsigned __int128 x) {
  unsigned __int128 y =
      ((-((signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1)) - 1));
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t154_4sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movabs $0x8000000000000000,%rax
mov    %rax,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rax
sub    %rsi,%rdx
sbb    %rax,%rcx
setb   %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    1174 <t154_4sub+0x64>
jmp    117b <t154_4sub+0x6b>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t154_4sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movabs $0x8000000000000000,%rax
sub    %rax,%rbx
jae    1130 <t154_4sub+0x20>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t154_4sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 -170141183460469231731687303715884105728, i128* %6
%12 = load i128, i128* %5
%13 = load i128, i128* %6
%14 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t154_4sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %6, i128 -170141183460469231731687303715884105728)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
double _sin_cos_special(double, char *);
double _cos_special(double x) { return _sin_cos_special(x, "cos"); }


x86 assembly (clang, -O0):
<_cos_special>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <_sin_cos_special@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cos_special>:
lea    0xee9(%rip),%rdi
jmp    1030 <_sin_cos_special@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cos\00"
define double @_cos_special(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @_sin_cos_special(double %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret double %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"cos\00"
define double @_cos_special(double %0) {
%2 = tail call double @_sin_cos_special(double %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret double %2
}
/* Variables and functions */
char fConsumeChar(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
char consumeChar() { return fConsumeChar(stdin); }


x86 assembly (clang, -O0):
<consumeChar>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <fConsumeChar@plt>
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<consumeChar>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fConsumeChar@plt>

LLVM IR (-O0):
@stdin = global i32 0
define signext i8 @consumeChar() {
%1 = load i32, i32* @stdin
%2 = call signext i8 @fConsumeChar(i32 %1)
ret i8 %2
}

LLVM IR (-O2):
@stdin = global i32 0
define signext i8 @consumeChar() {
%1 = load i32, i32* @stdin
%2 = tail call signext i8 @fConsumeChar(i32 %1)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ crash();
void *realloc(void *, size_t);
int /*<<< orphan*/ warnx(char *);
void *xrealloc(void *ptr, size_t size) {
  void *p;
  if ((p = realloc(ptr, size)) == NULL) {
    warnx("realloc failed");
    crash();
  }
  return (p);
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    116e <xrealloc+0x3e>
lea    0xe9e(%rip),%rdi
call   1040 <warnx@plt>
mov    $0x0,%al
call   1030 <crash@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1050 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <xrealloc+0x21>
lea    0xebb(%rip),%rdi
call   1040 <warnx@plt>
xor    %eax,%eax
call   1030 <crash@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"realloc failed\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @warnx(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (...) @crash()
br label %13
13: ; preds = %10, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [15 x i8] c"realloc failed\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @warnx(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @crash()
br label %8
8: ; preds = %5, %2
ret i8* %3
}
int mdp4_mddi_pipe_commit(int wait) { return 0; }


x86 assembly (clang, -O0):
<mdp4_mddi_pipe_commit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdp4_mddi_pipe_commit>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @mdp4_mddi_pipe_commit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @mdp4_mddi_pipe_commit(i32 %0) {
ret i32 0
}
/* Variables and functions */
long geteuid();
long getuid();
int os_is_setuid() {
  long uid, euid;
  uid = getuid();
  euid = geteuid();
  return (euid == 0 && euid != uid);
}


x86 assembly (clang, -O0):
<os_is_setuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <geteuid@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jne    115c <os_is_setuid+0x3c>
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_is_setuid>:
push   %rbx
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <geteuid@plt>
test   %rax,%rax
sete   %al
test   %rbx,%rbx
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @os_is_setuid() {
%1 = alloca i64
%2 = alloca i64
%3 = call i64 (...) @getuid()
store i64 %3, i64* %1
%4 = call i64 (...) @geteuid()
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i64, i64* %2
%9 = load i64, i64* %1
%10 = icmp ne i64 %8, %9
br label %11
11: ; preds = %7, %0
%12 = phi i1 [ false, %0 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @os_is_setuid() {
%1 = tail call i64 (...) @getuid()
%2 = tail call i64 (...) @geteuid()
%3 = icmp eq i64 %2, 0
%4 = icmp ne i64 %1, 0
%5 = select i1 %3, i1 %4, i1 false
%6 = zext i1 %5 to i32
ret i32 %6
}
void vscan_abort(void) {}


x86 assembly (clang, -O0):
<vscan_abort>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vscan_abort>:
ret

LLVM IR (-O0):
define void @vscan_abort() {
ret void
}

LLVM IR (-O2):
define void @vscan_abort() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit8(int);
void pe_emit_main_exit() { emit8(0xc3); }


x86 assembly (clang, -O0):
<pe_emit_main_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc3,%edi
call   1030 <emit8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pe_emit_main_exit>:
mov    $0xc3,%edi
jmp    1030 <emit8@plt>

LLVM IR (-O0):
define void @pe_emit_main_exit() {
%1 = call i32 @emit8(i32 195)
ret void
}

LLVM IR (-O2):
define void @pe_emit_main_exit() {
%1 = tail call i32 @emit8(i32 195)
ret void
}
void gtk_action_disconnect_accelerator() {}


x86 assembly (clang, -O0):
<gtk_action_disconnect_accelerator>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_action_disconnect_accelerator>:
ret

LLVM IR (-O0):
define void @gtk_action_disconnect_accelerator() {
ret void
}

LLVM IR (-O2):
define void @gtk_action_disconnect_accelerator() {
ret void
}
/* Variables and functions */
int callee_2(int, char const *, float);
int callee_3(int one, const char *two, float three) {
  return callee_2(one, two, three);
}


x86 assembly (clang, -O0):
<callee_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
call   1030 <callee_2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callee_3>:
jmp    1030 <callee_2@plt>

LLVM IR (-O0):
define i32 @callee_3(i32 %0, i8* %1, float %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca float
store i32 %0, i32* %4
store i8* %1, i8** %5
store float %2, float* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load float, float* %6
%10 = call i32 @callee_2(i32 %7, i8* %8, float %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @callee_3(i32 %0, i8* %1, float %2) {
%4 = tail call i32 @callee_2(i32 %0, i8* %1, float %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void reg_write(volatile uint32_t *address, uint32_t value) { *address = value; }


x86 assembly (clang, -O0):
<reg_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_write>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @reg_write(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
store volatile i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @reg_write(i32* %0, i32 %1) {
store volatile i32 %1, i32* %0
ret void
}
/* Variables and functions */
void m2mp_client_channels_init(char *channels[256]) {
  int i;
  for (i = 0; i < 256; ++i)
    channels[i] = NULL;
}


x86 assembly (clang, -O0):
<m2mp_client_channels_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    113a <m2mp_client_channels_init+0x3a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <m2mp_client_channels_init+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m2mp_client_channels_init>:
push   %rax
mov    $0x800,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @m2mp_client_channels_init(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 256
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i8**, i8*** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %8, i64 %10
store i8* null, i8** %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @m2mp_client_channels_init(i8** nocapture writeonly %0) {
%2 = bitcast i8** %0 to i8*
ret void
}
unsigned int GrOffScreen1BPPColorTranslate(void *pvDisplayData,
                                           unsigned int ulValue) {
  ;
  return (((((((ulValue)&0x00ff0000) >> 16) * 19661) +
            ((((ulValue)&0x0000ff00) >> 8) * 38666) +
            (((ulValue)&0x000000ff) * 7209)) /
           (65536 * 128)));
}


x86 assembly (clang, -O0):
<GrOffScreen1BPPColorTranslate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff0000,%eax
shr    $0x10,%eax
imul   $0x4ccd,%eax,%eax
mov    -0xc(%rbp),%ecx
and    $0xff00,%ecx
shr    $0x8,%ecx
imul   $0x970a,%ecx,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
imul   $0x1c29,%ecx,%ecx
add    %ecx,%eax
shr    $0x17,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GrOffScreen1BPPColorTranslate>:
mov    %esi,%eax
movzbl %ah,%ecx
movzbl %al,%edx
shr    $0x10,%eax
movzbl %al,%eax
imul   $0x4ccd,%eax,%esi
imul   $0x970a,%ecx,%ecx
imul   $0x1c29,%edx,%eax
add    %ecx,%eax
add    %esi,%eax
shr    $0x17,%eax
ret

LLVM IR (-O0):
define i32 @GrOffScreen1BPPColorTranslate(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 16711680
%7 = lshr i32 %6, 16
%8 = mul i32 %7, 19661
%9 = load i32, i32* %4
%10 = and i32 %9, 65280
%11 = lshr i32 %10, 8
%12 = mul i32 %11, 38666
%13 = add i32 %8, %12
%14 = load i32, i32* %4
%15 = and i32 %14, 255
%16 = mul i32 %15, 7209
%17 = add i32 %13, %16
%18 = udiv i32 %17, 8388608
ret i32 %18
}

LLVM IR (-O2):
define i32 @GrOffScreen1BPPColorTranslate(i8* nocapture readnone %0, i32 %1) {
%3 = lshr i32 %1, 16
%4 = and i32 %3, 255
%5 = mul nuw nsw i32 %4, 19661
%6 = lshr i32 %1, 8
%7 = and i32 %6, 255
%8 = mul nuw nsw i32 %7, 38666
%9 = and i32 %1, 255
%10 = mul nuw nsw i32 %9, 7209
%11 = add nuw nsw i32 %8, %10
%12 = add nuw nsw i32 %11, %5
%13 = lshr i32 %12, 23
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(
    const uint8_t *event) {
  return event[3];
}


x86 assembly (clang, -O0):
<hfp_subevent_ag_indicator_status_changed_get_indicator_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hfp_subevent_ag_indicator_status_changed_get_indicator_index>:
mov    0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hfp_subevent_ag_indicator_status_changed_get_indicator_index(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hfp_subevent_ag_indicator_status_changed_get_indicator_index(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
void skip_space(const char **s) {
  for (;;) {
    if (**s == '\0')
      return;
    if (**s > 32)
      return;
    (*s)++;
  }
}


x86 assembly (clang, -O0):
<skip_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1120 <skip_space+0x20>
jmp    114b <skip_space+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jle    1138 <skip_space+0x38>
jmp    114b <skip_space+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <skip_space+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_space>:
mov    (%rdi),%rax
mov    (%rax),%cl
test   %cl,%cl
je     1133 <skip_space+0x33>
cmp    $0x20,%cl
jg     1133 <skip_space+0x33>
add    $0x1,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rax,(%rdi)
movzbl (%rax),%ecx
test   %cl,%cl
je     1133 <skip_space+0x33>
add    $0x1,%rax
cmp    $0x21,%cl
jl     1120 <skip_space+0x20>
ret

LLVM IR (-O0):
define void @skip_space(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %17, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
br label %21
10: ; preds = %3
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp sgt i32 %14, 32
br i1 %15, label %16, label %17
16: ; preds = %10
br label %21
17: ; preds = %10
%18 = load i8**, i8*** %2
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %18
br label %3
21: ; preds = %16, %9
ret void
}

LLVM IR (-O2):
define void @skip_space(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
%5 = icmp sgt i8 %3, 32
%6 = or i1 %4, %5
br i1 %6, label %14, label %7
7: ; preds = %1, %7
%8 = phi i8* [ %9, %7 ], [ %2, %1 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %0
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
%12 = icmp sgt i8 %10, 32
%13 = or i1 %11, %12
br i1 %13, label %14, label %7
14: ; preds = %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
char *strrchr(char const *, char);
char *take_extension(const char *target) {
  assert(target);
  char *temp = strrchr(target, '.');
  if (temp)
    return temp;
  else
    return "";
}


x86 assembly (clang, -O0):
<take_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115f <take_extension+0x3f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <take_extension+0x4a>
lea    0xe9a(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<take_extension>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
lea    0xec0(%rip),%rcx
cmove  %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @take_extension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %3
%8 = call i8* @strrchr(i8* %7, i8 signext 46)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i8*, i8** %4
store i8* %12, i8** %2
br label %14
13: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %14
14: ; preds = %13, %11
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @take_extension(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%4 = icmp eq i8* %3, null
%5 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
struct lobject *lframe_default_callback(struct lemon *lemon,
                                        struct lframe *frame,
                                        struct lobject *retval) {
  return retval;
}


x86 assembly (clang, -O0):
<lframe_default_callback>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lframe_default_callback>:
mov    %rdx,%rax
ret

LLVM IR (-O0):
%struct.lemon = type opaque
%struct.lframe = type opaque
%struct.lobject = type opaque
define %struct.lobject* @lframe_default_callback(%struct.lemon* %0, %struct.lframe* %1, %struct.lobject* %2) {
%4 = alloca %struct.lemon*
%5 = alloca %struct.lframe*
%6 = alloca %struct.lobject*
store %struct.lemon* %0, %struct.lemon** %4
store %struct.lframe* %1, %struct.lframe** %5
store %struct.lobject* %2, %struct.lobject** %6
%7 = load %struct.lobject*, %struct.lobject** %6
ret %struct.lobject* %7
}

LLVM IR (-O2):
%struct.lemon = type opaque
%struct.lframe = type opaque
%struct.lobject = type opaque
define %struct.lobject* @lframe_default_callback(%struct.lemon* nocapture readnone %0, %struct.lframe* nocapture readnone %1, %struct.lobject* readnone returned %2) {
ret %struct.lobject* %2
}
/* Variables and functions */
unsigned long __xtensa_copy_user(void *, void const *, unsigned long);
unsigned long __generic_copy_from_user_nocheck(void *to, const void *from,
                                               unsigned long n) {
  return __xtensa_copy_user(to, from, n);
}


x86 assembly (clang, -O0):
<__generic_copy_from_user_nocheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__xtensa_copy_user@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__generic_copy_from_user_nocheck>:
jmp    1030 <__xtensa_copy_user@plt>

LLVM IR (-O0):
define i64 @__generic_copy_from_user_nocheck(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @__xtensa_copy_user(i8* %7, i8* %8, i64 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @__generic_copy_from_user_nocheck(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @__xtensa_copy_user(i8* %0, i8* %1, i64 %2)
ret i64 %4
}
/* Type definitions */
struct bitstream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ write_bit(struct bitstream *, char);
void write_bitstring(struct bitstream *bs, char *str) {
  while (*str) {
    write_bit(bs, *str);
    str++;
  }
}


x86 assembly (clang, -O0):
<write_bitstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <write_bitstring+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <write_bit@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <write_bitstring+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_bitstring>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1146 <write_bitstring+0x36>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <write_bit@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <write_bitstring+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.bitstream = type { i32 }
define void @write_bitstring(%struct.bitstream* %0, i8* %1) {
%3 = alloca %struct.bitstream*
%4 = alloca i8*
store %struct.bitstream* %0, %struct.bitstream** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load %struct.bitstream*, %struct.bitstream** %3
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = call i32 @write_bit(%struct.bitstream* %10, i8 signext %12)
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
br label %5
16: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.bitstream = type { i32 }
define void @write_bitstring(%struct.bitstream* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = tail call i32 @write_bit(%struct.bitstream* %0, i8 signext %6)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int lh_char_equal(const void *k1, const void *k2) {
  return (strcmp((const char *)k1, (const char *)k2) == 0);
}


x86 assembly (clang, -O0):
<lh_char_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lh_char_equal>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @lh_char_equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @lh_char_equal(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int XGetGCValues() {}


x86 assembly (clang, -O0):
<XGetGCValues>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<XGetGCValues>:
ret

LLVM IR (-O0):
define i32 @XGetGCValues() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XGetGCValues() {
ret i32 undef
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void SysExcIntDisable(uint32_t ui32IntFlags) {
  (*((volatile unsigned long *)(0x400F9004))) &= ~(ui32IntFlags);
}


x86 assembly (clang, -O0):
<SysExcIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x400f9004,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x400f9004,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysExcIntDisable>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
not    %rax
and    %rax,0x400f9004
40
ret

LLVM IR (-O0):
define void @SysExcIntDisable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074761732 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074761732 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysExcIntDisable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074761732 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074761732 to i64*)
ret void
}
int test_imm_58int32_mem(int *val) {
  return ((*val) & (0x58 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_58int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x58,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_58int32_mem>:
testb  $0x58,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_58int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 88
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_58int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 88
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *globescape_buffer(char const *, int /*<<< orphan*/ *);
char *globescape(const char *string_to_escape) {
  return globescape_buffer(string_to_escape, NULL);
}


x86 assembly (clang, -O0):
<globescape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <globescape_buffer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<globescape>:
xor    %esi,%esi
jmp    1030 <globescape_buffer@plt>

LLVM IR (-O0):
define i8* @globescape(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @globescape_buffer(i8* %3, i32* null)
ret i8* %4
}

LLVM IR (-O2):
define i8* @globescape(i8* %0) {
%2 = tail call i8* @globescape_buffer(i8* %0, i32* null)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ _uart_putc(char);
void _puts(char *s) {
  for (; *s != '\0'; s++) {
    _uart_putc(*s);
  }
}


x86 assembly (clang, -O0):
<_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <_puts+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <_uart_putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <_uart_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <_puts+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @_puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %12, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @_uart_putc(i8 signext %10)
br label %12
12: ; preds = %8
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @_uart_putc(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
int euclid_gcd(int dividend, int divisor) {
  while (divisor != 0) {
    int remainder = dividend % divisor;
    dividend = divisor;
    divisor = remainder;
  }
  return dividend;
}


x86 assembly (clang, -O0):
<euclid_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <euclid_gcd+0x2f>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <euclid_gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<euclid_gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <euclid_gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <euclid_gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @euclid_gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %6
6: ; preds = %9, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = srem i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %4
store i32 %13, i32* %3
%14 = load i32, i32* %5
store i32 %14, i32* %4
br label %6
15: ; preds = %6
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @euclid_gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
void void_void_test(void) {
  printf("Entered %s:\n", __FUNCTION__);
  printf("Exited  %s:\n", __FUNCTION__);
}


x86 assembly (clang, -O0):
<void_void_test>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<void_void_test>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xeee(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Entered %s:\0A\00"
@__FUNCTION__.void_void_test = [15 x i8] c"void_void_test\00"
@.str.1 = [13 x i8] c"Exited %s:\0A\00"
define void @void_void_test() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.void_void_test, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.void_void_test, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Entered %s:\0A\00"
@__FUNCTION__.void_void_test = [15 x i8] c"void_void_test\00"
@.str.1 = [13 x i8] c"Exited %s:\0A\00"
define void @void_void_test() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.void_void_test, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.void_void_test, i64 0, i64 0))
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
int main() {
  char tus = 0;
  printf("Bir tusa basiniz.\n");
  tus = getchar();
  putchar(tus);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Bir tusa basiniz.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = call i32 @putchar(i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"Bir tusa basiniz.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = tail call i32 @putchar(i8 signext %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ init_vector(int *);
int /*<<< orphan*/ qsort_lib(int *, int);
int main(int argc, char **argv) {
  int vector[100];
  init_vector(vector);
  qsort_lib(vector, 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a0(%rbp),%rdi
call   1030 <init_vector@plt>
lea    -0x1a0(%rbp),%rdi
mov    $0x64,%esi
call   1040 <qsort_lib@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x190,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <init_vector@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <qsort_lib@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 0
%8 = call i32 @init_vector(i32* %7)
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 0
%10 = call i32 @qsort_lib(i32* %9, i32 100)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i32]
%4 = bitcast [100 x i32]* %3 to i8*
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%6 = call i32 @init_vector(i32* %5)
%7 = call i32 @qsort_lib(i32* %5, i32 100)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xa6() {
  Assert_real((isspace(166) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              835, ("isspace should be 0 for 0xa6"));
}


x86 assembly (clang, -O0):
<t_isspace_0xa6>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa6,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x343,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0xa6>:
push   %rax
mov    $0xa6,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x343,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xa6\00"
define void @t_isspace_0xa6() {
%1 = call i64 @isspace(i32 166)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 835, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xa6\00"
define void @t_isspace_0xa6() {
%1 = tail call i64 @isspace(i32 166)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 835, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *basename(char *);
char *uniquestr(char *);
int /*<<< orphan*/ xfree(char *);
char *xstrdup(char const *);
const char *give_basename(const char *c) {
  char *tmp = xstrdup(c);
  char *basename_tmp = basename(tmp);
  const char *result = uniquestr(basename_tmp);
  xfree(tmp);
  return result;
}


x86 assembly (clang, -O0):
<give_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <xstrdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <basename@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <uniquestr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <xfree@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<give_basename>:
push   %r14
push   %rbx
push   %rax
call   1050 <xstrdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <basename@plt>
mov    %rax,%rdi
call   1040 <uniquestr@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <xfree@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @give_basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @xstrdup(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i8* @basename(i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = call i8* @uniquestr(i8* %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %3
%13 = call i32 @xfree(i8* %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define i8* @give_basename(i8* %0) {
%2 = tail call i8* @xstrdup(i8* %0)
%3 = tail call i8* @basename(i8* %2)
%4 = tail call i8* @uniquestr(i8* %3)
%5 = tail call i32 @xfree(i8* %2)
ret i8* %4
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c, nl = 0;
  while ((c = getchar()) != EOF) {
    if (c == '\n')
      ++nl;
  }
  printf("%d\n", nl);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %14, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *getDateString() {
  time_t t = time(NULL);
  char *date = (char *)malloc(100);
  strftime(date, 100, "[%F %T]", localtime(&t));
  return date;
}


x86 assembly (clang, -O0):
<getDateString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
mov    $0x64,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%ecx
mov    $0x64,%esi
lea    0xe7b(%rip),%rdx
call   1060 <strftime@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDateString>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
mov    $0x64,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xe92(%rip),%rdx
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %eax,%ecx
call   1060 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"[%F %T]\00"
define i8* @getDateString() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i64 @malloc(i32 100)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @localtime(i32* %1)
%8 = call i32 @strftime(i8* %6, i32 100, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"[%F %T]\00"
define i8* @getDateString() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = tail call i64 @malloc(i32 100)
%5 = inttoptr i64 %4 to i8*
%6 = call i32 @localtime(i32* %1)
%7 = call i32 @strftime(i8* %5, i32 100, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_SET_BIT(int, int);
void xburst_cgm_gate_vpu() { MIPS_SET_BIT((0xB0000000 + 0x28), 2); }


x86 assembly (clang, -O0):
<xburst_cgm_gate_vpu>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0x2,%esi
call   1030 <MIPS_SET_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_gate_vpu>:
mov    $0xb0000028,%edi
mov    $0x2,%esi
jmp    1030 <MIPS_SET_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_gate_vpu() {
%1 = call i32 @MIPS_SET_BIT(i32 -1342177240, i32 2)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_gate_vpu() {
%1 = tail call i32 @MIPS_SET_BIT(i32 -1342177240, i32 2)
ret void
}