xunge/DecIR huggingface dataset:
void release_firmware(const struct firmware *fw) {}


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

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

LLVM IR (-O0):
%struct.firmware = type opaque
define void @release_firmware(%struct.firmware* %0) {
%2 = alloca %struct.firmware*
store %struct.firmware* %0, %struct.firmware** %2
ret void
}

LLVM IR (-O2):
%struct.firmware = type opaque
define void @release_firmware(%struct.firmware* nocapture %0) {
ret void
}
void f_int_p4(f) int f;
{ return; }


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

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

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

LLVM IR (-O2):
define void @f_int_p4(i32 %0) {
ret void
}
void GLUE_MOVE_STACK(void *b, int amt) {
  ((unsigned char *)b)[0] = 0x48;
  ((unsigned char *)b)[1] = 0x81;
  if (amt < 0) {
    ((unsigned char *)b)[2] = 0xEC;
    *(int *)((char *)b + 3) = -amt;
  } else {
    ((unsigned char *)b)[2] = 0xc4;
    *(int *)((char *)b + 3) = amt;
  }
}


x86 assembly (clang, -O0):
<GLUE_MOVE_STACK>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x48,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x81,0x1(%rax)
cmpl   $0x0,-0xc(%rbp)
jge    113d <GLUE_MOVE_STACK+0x3d>
mov    -0x8(%rbp),%rax
movb   $0xec,0x2(%rax)
xor    %ecx,%ecx
sub    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x3(%rax)
jmp    114f <GLUE_MOVE_STACK+0x4f>
mov    -0x8(%rbp),%rax
movb   $0xc4,0x2(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_MOVE_STACK>:
movw   $0x8148,(%rdi)
test   %esi,%esi
js     1111 <GLUE_MOVE_STACK+0x11>
movb   $0xc4,0x2(%rdi)
mov    %esi,0x3(%rdi)
ret
movb   $0xec,0x2(%rdi)
neg    %esi
mov    %esi,0x3(%rdi)
ret

LLVM IR (-O0):
define void @GLUE_MOVE_STACK(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 72, i8* %6
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 -127, i8* %8
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 2
store i8 -20, i8* %13
%14 = load i32, i32* %4
%15 = sub nsw i32 0, %14
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 3
%18 = bitcast i8* %17 to i32*
store i32 %15, i32* %18
br label %26
19: ; preds = %2
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 -60, i8* %21
%22 = load i32, i32* %4
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i64 3
%25 = bitcast i8* %24 to i32*
store i32 %22, i32* %25
br label %26
26: ; preds = %19, %11
ret void
}

LLVM IR (-O2):
define void @GLUE_MOVE_STACK(i8* nocapture writeonly %0, i32 %1) {
store i8 72, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 -127, i8* %3
%4 = icmp slt i32 %1, 0
%5 = getelementptr inbounds i8, i8* %0, i64 2
br i1 %4, label %6, label %8
6: ; preds = %2
store i8 -20, i8* %5
%7 = sub nsw i32 0, %1
br label %9
8: ; preds = %2
store i8 -60, i8* %5
br label %9
9: ; preds = %8, %6
%10 = phi i32 [ %1, %8 ], [ %7, %6 ]
%11 = getelementptr inbounds i8, i8* %0, i64 3
%12 = bitcast i8* %11 to i32*
store i32 %10, i32* %12
ret void
}
/* Variables and functions */
void DebugP_log2(const char *format, uintptr_t p1, uintptr_t p2) {}


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

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

LLVM IR (-O0):
define void @DebugP_log2(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
define void @DebugP_log2(i8* nocapture %0, i64 %1, i64 %2) {
ret void
}
long rotateR_fun_long(long x, int i) {
  if ((i %= 40) == 0)
    return x;
  return (x << (40 - i)) | ((0x7fffffffffl >> (i - 1)) & (x >> i));
}


x86 assembly (clang, -O0):
<rotateR_fun_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmp    $0x0,%edx
jne    112f <rotateR_fun_long+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <rotateR_fun_long+0x71>
mov    -0x10(%rbp),%rax
mov    $0x28,%ecx
sub    -0x14(%rbp),%ecx
mov    %ecx,%ecx
shl    %cl,%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
movabs $0x7fffffffff,%rdx
sar    %cl,%rdx
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
sar    %cl,%rdx
mov    -0x20(%rbp),%rcx
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateR_fun_long>:
mov    %rdi,%rax
movslq %esi,%rdx
imul   $0x66666667,%rdx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x24,%rcx
add    %esi,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%edx
je     1149 <rotateR_fun_long+0x49>
mov    $0x28,%cl
sub    %dl,%cl
mov    %rax,%rsi
shl    %cl,%rsi
lea    -0x1(%rdx),%ecx
movabs $0x7fffffffff,%rdi
shr    %cl,%rdi
mov    %edx,%ecx
sar    %cl,%rax
and    %rdi,%rax
or     %rsi,%rax
ret

LLVM IR (-O0):
define i64 @rotateR_fun_long(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = srem i32 %6, 40
store i32 %7, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %4
store i64 %10, i64* %3
br label %27
11: ; preds = %2
%12 = load i64, i64* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 40, %13
%15 = zext i32 %14 to i64
%16 = shl i64 %12, %15
%17 = load i32, i32* %5
%18 = sub nsw i32 %17, 1
%19 = zext i32 %18 to i64
%20 = ashr i64 549755813887, %19
%21 = load i64, i64* %4
%22 = load i32, i32* %5
%23 = zext i32 %22 to i64
%24 = ashr i64 %21, %23
%25 = and i64 %20, %24
%26 = or i64 %16, %25
store i64 %26, i64* %3
br label %27
27: ; preds = %11, %9
%28 = load i64, i64* %3
ret i64 %28
}

LLVM IR (-O2):
define i64 @rotateR_fun_long(i64 %0, i32 %1) {
%3 = srem i32 %1, 40
%4 = icmp eq i32 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2
%6 = sub nsw i32 40, %3
%7 = zext i32 %6 to i64
%8 = shl i64 %0, %7
%9 = add nsw i32 %3, -1
%10 = zext i32 %9 to i64
%11 = lshr i64 549755813887, %10
%12 = zext i32 %3 to i64
%13 = ashr i64 %0, %12
%14 = and i64 %11, %13
%15 = or i64 %14, %8
br label %16
16: ; preds = %2, %5
%17 = phi i64 [ %15, %5 ], [ %0, %2 ]
ret i64 %17
}
unsigned long UARTClockSourceGet(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000FC8))));
}


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

x86 assembly (clang, -O2):
<UARTClockSourceGet>:
mov    0xfc8(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @UARTClockSourceGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 4040
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @UARTClockSourceGet(i64 %0) {
%2 = add i64 %0, 4040
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
ret i64 %4
}
/* Type definitions */
typedef int uint16_t;
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void sysDelay_ms(uint16_t ms) {
  struct timespec msec;
  msec.tv_sec = 0;
  msec.tv_nsec = ms * 1000000;
  nanosleep(&msec, NULL);
}


x86 assembly (clang, -O0):
<sysDelay_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
imul   $0xf4240,-0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysDelay_ms>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
imul   $0xf4240,%edi,%eax
mov    %eax,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define void @sysDelay_ms(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = load i32, i32* %2
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %6, i32* %7
%8 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @sysDelay_ms(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = mul nsw i32 %0, 1000000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %5, i32* %6
%7 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trap_CIN_DrawCinematic(int);
int /*<<< orphan*/ trap_CIN_SetExtents(int, float, float, float, float);
void UI_DrawCinematic(int handle, float x, float y, float w, float h) {
  trap_CIN_SetExtents(handle, x, y, w, h);
  trap_CIN_DrawCinematic(handle);
}


x86 assembly (clang, -O0):
<UI_DrawCinematic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
mov    -0x4(%rbp),%edi
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
call   1040 <trap_CIN_SetExtents@plt>
mov    -0x4(%rbp),%edi
call   1030 <trap_CIN_DrawCinematic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_DrawCinematic>:
push   %rbx
mov    %edi,%ebx
call   1040 <trap_CIN_SetExtents@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <trap_CIN_DrawCinematic@plt>

LLVM IR (-O0):
define void @UI_DrawCinematic(i32 %0, float %1, float %2, float %3, float %4) {
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store i32 %0, i32* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load i32, i32* %6
%12 = load float, float* %7
%13 = load float, float* %8
%14 = load float, float* %9
%15 = load float, float* %10
%16 = call i32 @trap_CIN_SetExtents(i32 %11, float %12, float %13, float %14, float %15)
%17 = load i32, i32* %6
%18 = call i32 @trap_CIN_DrawCinematic(i32 %17)
ret void
}

LLVM IR (-O2):
define void @UI_DrawCinematic(i32 %0, float %1, float %2, float %3, float %4) {
%6 = tail call i32 @trap_CIN_SetExtents(i32 %0, float %1, float %2, float %3, float %4)
%7 = tail call i32 @trap_CIN_DrawCinematic(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ vet_maior_menor(int *, int *);
int main() {
  int maior, menor;
  vet_maior_menor(&maior, &menor);
  printf("Maior valor informado: %d\n", maior);
  printf("Menor valor informado: %d\n", menor);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <vet_maior_menor@plt>
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <vet_maior_menor@plt>
mov    0x4(%rsp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    (%rsp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Maior valor informado: %d\0A\00"
@.str.1 = [27 x i8] c"Menor valor informado: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @vet_maior_menor(i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Maior valor informado: %d\0A\00"
@.str.1 = [27 x i8] c"Menor valor informado: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @vet_maior_menor(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ mqd_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
                 unsigned int msg_prio, const struct timespec *abs_timeout) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<mq_timedsend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mq_timedsend>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@ENOSYS = global i32 0
define i32 @mq_timedsend(i32 %0, i8* %1, i64 %2, i32 %3, %struct.timespec* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca %struct.timespec*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i32 %3, i32* %9
store %struct.timespec* %4, %struct.timespec** %10
%11 = load i32, i32* @ENOSYS
%12 = call i32 @__set_errno(i32 %11)
ret i32 -1
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@ENOSYS = global i32 0
define i32 @mq_timedsend(i32 %0, i8* nocapture readnone %1, i64 %2, i32 %3, %struct.timespec* nocapture readnone %4) {
%6 = load i32, i32* @ENOSYS
%7 = tail call i32 @__set_errno(i32 %6)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rstdin_d();
int with_slimit_read_d(int n) {
  int m;
  do {
    printf("(no debe ser mayor a %d) ", n);
    m = rstdin_d();
  } while (m > n);
  return m;
}


x86 assembly (clang, -O0):
<with_slimit_read_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <rstdin_d@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     112b <with_slimit_read_d+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<with_slimit_read_d>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <rstdin_d@plt>
cmp    %ebx,%eax
jg     1130 <with_slimit_read_d+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"(no debe ser mayor a %d) \00"
define i32 @with_slimit_read_d(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @rstdin_d()
store i32 %7, i32* %3
br label %8
8: ; preds = %4
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sgt i32 %9, %10
br i1 %11, label %4, label %12
12: ; preds = %8
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [26 x i8] c"(no debe ser mayor a %d) \00"
define i32 @with_slimit_read_d(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 (...) @rstdin_d()
%5 = icmp sgt i32 %4, %0
br i1 %5, label %2, label %6
6: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *, char const *);
int /*<<< orphan*/ ll_stop();
int /*<<< orphan*/ stderr;
int die(const char *error_message_fmt_string, const char *fmt_string_arg,
        int exit_code) {
  ll_stop();
  fprintf(stderr, error_message_fmt_string, fmt_string_arg);
  return exit_code;
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1040 <ll_stop@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<die>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %eax,%eax
call   1040 <ll_stop@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
define i32 @die(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (...) @ll_stop()
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i32 @fprintf(i32 %8, i8* %9, i8* %10)
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @die(i8* %0, i8* %1, i32 returned %2) {
%4 = tail call i32 (...) @ll_stop()
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* %0, i8* %1)
ret i32 %2
}
/* Variables and functions */
int close(int);
int closeSocket(int fd) { return (close(fd)); }


x86 assembly (clang, -O0):
<closeSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeSocket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @closeSocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strstr(char const *, char const *);
int main() {
  const char *str1 = "printf shoult print text from this | to the end.";
  const char *str2 = "|";
  char *str3 = strstr(str1, str2);
  printf("%s\n", str3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xef0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf19(%rip),%rdi
lea    0xf04(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"printf shoult print text from this | to the end.\00"
@.str.1 = [2 x i8] c"|\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i8* @strstr(i8* %5, i8* %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"printf shoult print text from this | to the end.\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 35))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ scanw(char *, int *);
int menu() {
  static int m;
  printw("MENU:\n\n\t1) Registrar Cliente\n\t2) Consulta General\n\t3) Cliente "
         "Distinguido\n\t4) Salir\n\nIntroduce tu eleccion\n>>");
  scanw("%d", &m);
  return m;
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printw@plt>
lea    0xf37(%rip),%rdi
lea    0x2ef6(%rip),%rsi
call   1040 <scanw@plt>
mov    0x2eeb(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printw@plt>
lea    0xf3a(%rip),%rdi
lea    0x2ef9(%rip),%rsi
call   1040 <scanw@plt>
mov    0x2eee(%rip),%eax
pop    %rcx
ret

LLVM IR (-O0):
@menu.m = internal global i32 0
@.str = [110 x i8] c"MENU:\0A\0A\091) Registrar Cliente\0A\092) Consulta General\0A\093) Cliente Distinguido\0A\094) Salir\0A\0AIntroduce tu eleccion\0A>>\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @menu() {
%1 = call i32 @printw(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* @menu.m)
%3 = load i32, i32* @menu.m
ret i32 %3
}

LLVM IR (-O2):
@menu.m = internal global i32 0
@.str = [110 x i8] c"MENU:\0A\0A\091) Registrar Cliente\0A\092) Consulta General\0A\093) Cliente Distinguido\0A\094) Salir\0A\0AIntroduce tu eleccion\0A>>\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @menu() {
%1 = tail call i32 @printw(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* @menu.m)
%3 = load i32, i32* @menu.m
ret i32 %3
}
unsigned int int_log2(unsigned int x) {
  return x <= 1 ? 0 : (8 * sizeof(x)) - __builtin_clz(x - 1);
}


x86 assembly (clang, -O0):
<int_log2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
ja     111c <int_log2+0x1c>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1137 <int_log2+0x37>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
bsr    %eax,%eax
xor    $0x1f,%eax
movslq %eax,%rcx
mov    $0x20,%eax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_log2>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     1113 <int_log2+0x13>
add    $0xffffffff,%edi
bsr    %edi,%eax
xor    $0xffffffe0,%eax
add    $0x21,%eax
ret

LLVM IR (-O0):
define i32 @int_log2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ule i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %1
br label %12
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub i32 %7, 1
%9 = call i32 @llvm.ctlz.i32(i32 %8, i1 true)
%10 = sext i32 %9 to i64
%11 = sub i64 32, %10
br label %12
12: ; preds = %6, %5
%13 = phi i64 [ 0, %5 ], [ %11, %6 ]
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @int_log2(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = tail call i32 @llvm.ctlz.i32(i32 %4, i1 true)
%6 = sub nuw nsw i32 32, %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
int pinmux_check_ops(struct pinctrl_dev *pctldev) { return 0; }


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

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

LLVM IR (-O0):
%struct.pinctrl_dev = type opaque
define i32 @pinmux_check_ops(%struct.pinctrl_dev* %0) {
%2 = alloca %struct.pinctrl_dev*
store %struct.pinctrl_dev* %0, %struct.pinctrl_dev** %2
ret i32 0
}

LLVM IR (-O2):
%struct.pinctrl_dev = type opaque
define i32 @pinmux_check_ops(%struct.pinctrl_dev* nocapture readnone %0) {
ret i32 0
}
__typeof__(stpcpy(1, (void *)1)) test_stpcpy_137(void) {
  return stpcpy(1, (void *)1);
}


x86 assembly (clang, -O0):
<test_stpcpy_137>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %rsi,%rdi
call   1030 <stpcpy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stpcpy_137>:
push   %rax
mov    $0x1,%edi
call   1030 <strlen@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @test_stpcpy_137() {
%1 = call i8* @stpcpy(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*))
ret i8* %1
}

LLVM IR (-O2):
define i8* @test_stpcpy_137() {
%1 = tail call i64 @strlen(i8* inttoptr (i64 1 to i8*))
%2 = getelementptr inbounds i8, i8* inttoptr (i64 1 to i8*), i64 %1
ret i8* %2
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *substring(char *pattern, int start, int end) {
  int length = end - start + 1;
  char *new = malloc(sizeof(char) * length + 1);
  strncpy(new, pattern + start, length);
  new[length] = '\0';
  return new;
}


x86 assembly (clang, -O0):
<substring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<substring>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r12d
mov    %rdi,%r14
sub    %esi,%edx
movslq %edx,%rbp
lea    0x1(%rbp),%r15
lea    0x2(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movslq %r12d,%rsi
add    %r14,%rsi
mov    %rax,%rdi
mov    %r15d,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x1(%rbx,%rbp,1)
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @substring(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
%12 = add nsw i32 %11, 1
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = mul i64 1, %14
%16 = add i64 %15, 1
%17 = trunc i64 %16 to i32
%18 = call i8* @malloc(i32 %17)
store i8* %18, i8** %8
%19 = load i8*, i8** %8
%20 = load i8*, i8** %4
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i32, i32* %7
%25 = call i32 @strncpy(i8* %19, i8* %23, i32 %24)
%26 = load i8*, i8** %8
%27 = load i32, i32* %7
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
store i8 0, i8* %29
%30 = load i8*, i8** %8
ret i8* %30
}

LLVM IR (-O2):
define i8* @substring(i8* %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = add i32 %4, 2
%8 = tail call i8* @malloc(i32 %7)
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = tail call i32 @strncpy(i8* %8, i8* %10, i32 %5)
%12 = getelementptr inbounds i8, i8* %8, i64 %6
store i8 0, i8* %12
ret i8* %8
}
void XtAddGrab() {}


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

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

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

LLVM IR (-O2):
define void @XtAddGrab() {
ret void
}
const char *Assign_Name(void) { return "Assign"; }


x86 assembly (clang, -O0):
<Assign_Name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Assign_Name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Assign\00"
define i8* @Assign_Name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"Assign\00"
define i8* @Assign_Name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ ENOMEM;
scalar_t__ errno;
int /*<<< orphan*/ exit(scalar_t__);
int /*<<< orphan*/ perror(int /*<<< orphan*/ *);
void print_error_and_die(void) {
  if (!errno)
    errno = ENOMEM;
  perror(NULL);
  exit(errno);
}


x86 assembly (clang, -O0):
<print_error_and_die>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
cmpq   $0x0,(%rax)
jne    1149 <print_error_and_die+0x29>
mov    0x2ea4(%rip),%rax
mov    (%rax),%rcx
mov    0x2e92(%rip),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <perror@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%rdi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_error_and_die>:
push   %rbx
mov    0x2eb0(%rip),%rbx
cmpq   $0x0,(%rbx)
jne    113b <print_error_and_die+0x1b>
mov    0x2eab(%rip),%rax
mov    (%rax),%rax
mov    %rax,(%rbx)
xor    %edi,%edi
call   1030 <perror@plt>
mov    (%rbx),%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@ENOMEM = global i64 0
define void @print_error_and_die() {
%1 = load i64, i64* @errno
%2 = icmp ne i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = load i64, i64* @ENOMEM
store i64 %4, i64* @errno
br label %5
5: ; preds = %3, %0
%6 = call i32 @perror(i32* null)
%7 = load i64, i64* @errno
%8 = call i32 @exit(i64 %7)
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@ENOMEM = global i64 0
define void @print_error_and_die() {
%1 = load i64, i64* @errno
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = load i64, i64* @ENOMEM
store i64 %4, i64* @errno
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @perror(i32* null)
%7 = load i64, i64* @errno
%8 = tail call i32 @exit(i64 %7)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int _XEatData() {
  printf("_XEatData called\n");
  return 0;
}


x86 assembly (clang, -O0):
<_XEatData>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_XEatData>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"_XEatData called\0A\00"
define i32 @_XEatData() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"_XEatData called\00"
define i32 @_XEatData() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_22uint16_mem(unsigned short *val) {
  return ((*val) & (0x22 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_22uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 34
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned short scr_readw(unsigned short *addr) { return *addr; }


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

x86 assembly (clang, -O2):
<scr_readw>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @scr_readw(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @scr_readw(i16* nocapture %0) {
%2 = load i16, i16* %0
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ runDoWhileLoop(int);
int /*<<< orphan*/ runForLoop(int);
int /*<<< orphan*/ runWhileLoop(int);
void test(int limit) {
  runForLoop(limit);
  runWhileLoop(limit);
  runDoWhileLoop(limit);
  printf("\n");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <runForLoop@plt>
mov    -0x4(%rbp),%edi
call   1040 <runWhileLoop@plt>
mov    -0x4(%rbp),%edi
call   1060 <runDoWhileLoop@plt>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %edi,%ebx
call   1050 <runForLoop@plt>
mov    %ebx,%edi
call   1040 <runWhileLoop@plt>
mov    %ebx,%edi
call   1060 <runDoWhileLoop@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @runForLoop(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @runWhileLoop(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @runDoWhileLoop(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @test(i32 %0) {
%2 = tail call i32 @runForLoop(i32 %0)
%3 = tail call i32 @runWhileLoop(i32 %0)
%4 = tail call i32 @runDoWhileLoop(i32 %0)
%5 = tail call i32 @putchar(i32 10)
ret void
}
void PeerRMAction(struct rt_rtmp_adapter *pAd,
                  struct rt_mlme_queue_elem *Elem) {
  return;
}


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

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

LLVM IR (-O0):
%struct.rt_rtmp_adapter = type opaque
%struct.rt_mlme_queue_elem = type opaque
define void @PeerRMAction(%struct.rt_rtmp_adapter* %0, %struct.rt_mlme_queue_elem* %1) {
%3 = alloca %struct.rt_rtmp_adapter*
%4 = alloca %struct.rt_mlme_queue_elem*
store %struct.rt_rtmp_adapter* %0, %struct.rt_rtmp_adapter** %3
store %struct.rt_mlme_queue_elem* %1, %struct.rt_mlme_queue_elem** %4
ret void
}

LLVM IR (-O2):
%struct.rt_rtmp_adapter = type opaque
%struct.rt_mlme_queue_elem = type opaque
define void @PeerRMAction(%struct.rt_rtmp_adapter* nocapture %0, %struct.rt_mlme_queue_elem* nocapture %1) {
ret void
}
int flip_state(int current_state) {
  int new_state = -1;
  if (current_state != 1) {
    new_state = 1;
  } else {
    new_state = 0;
  }
  return new_state;
}


x86 assembly (clang, -O0):
<flip_state>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     1124 <flip_state+0x24>
movl   $0x1,-0x8(%rbp)
jmp    112b <flip_state+0x2b>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip_state>:
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @flip_state(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %3
br label %8
7: ; preds = %1
store i32 0, i32* %3
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @flip_state(i32 %0) {
%2 = icmp ne i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
double Min(double x, double y) {
  if (x < y)
    return (x);
  return (y);
}


x86 assembly (clang, -O0):
<Min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <Min+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <Min+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Min>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @Min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ raw();
int read(int /*<<< orphan*/, unsigned char *, int);
int _getch(void) {
  unsigned char temp;
  raw();
  if (read(0, &temp, 1) != 1)
    return 0;
  return temp;
}


x86 assembly (clang, -O0):
<_getch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <raw@plt>
xor    %edi,%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
je     1154 <_getch+0x34>
movl   $0x0,-0x4(%rbp)
jmp    115b <_getch+0x3b>
movzbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getch>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <raw@plt>
lea    0xf(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
movzbl 0xf(%rsp),%eax
cmovne %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_getch() {
%1 = alloca i32
%2 = alloca i8
%3 = call i32 (...) @raw()
%4 = call i32 @read(i32 0, i8* %2, i32 1)
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* %1
br label %10
7: ; preds = %0
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
store i32 %9, i32* %1
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @_getch() {
%1 = alloca i8
%2 = tail call i32 (...) @raw()
%3 = call i32 @read(i32 0, i8* %1, i32 1)
%4 = icmp eq i32 %3, 1
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = select i1 %4, i32 %6, i32 0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ _SC_SYMLOOP_MAX;
int sysconf(int /*<<< orphan*/);
int maxsymlinks(void) {
  int v = sysconf(_SC_SYMLOOP_MAX);
  return v;
}


x86 assembly (clang, -O0):
<maxsymlinks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxsymlinks>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_SYMLOOP_MAX = global i32 0
define i32 @maxsymlinks() {
%1 = alloca i32
%2 = load i32, i32* @_SC_SYMLOOP_MAX
%3 = call i32 @sysconf(i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@_SC_SYMLOOP_MAX = global i32 0
define i32 @maxsymlinks() {
%1 = load i32, i32* @_SC_SYMLOOP_MAX
%2 = tail call i32 @sysconf(i32 %1)
ret i32 %2
}
/* Type definitions */
struct rtattr {
  int dummy;
};
struct nlmsghdr {
  int /*<<< orphan*/ nlmsg_len;
};
typedef scalar_t__ nh;

/* Variables and functions */
scalar_t__ RTA_ALIGN(int /*<<< orphan*/);
struct rtattr *rtattr_hdr(struct nlmsghdr *nh) {
  return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len));
}


x86 assembly (clang, -O0):
<rtattr_hdr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <RTA_ALIGN@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtattr_hdr>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <RTA_ALIGN@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.rtattr = type { i32 }
%struct.nlmsghdr = type { i32 }
define %struct.rtattr* @rtattr_hdr(%struct.nlmsghdr* %0) {
%2 = alloca %struct.nlmsghdr*
store %struct.nlmsghdr* %0, %struct.nlmsghdr** %2
%3 = load %struct.nlmsghdr*, %struct.nlmsghdr** %2
%4 = bitcast %struct.nlmsghdr* %3 to i8*
%5 = load %struct.nlmsghdr*, %struct.nlmsghdr** %2
%6 = getelementptr inbounds %struct.nlmsghdr, %struct.nlmsghdr* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i64 @RTA_ALIGN(i32 %7)
%9 = getelementptr inbounds i8, i8* %4, i64 %8
%10 = bitcast i8* %9 to %struct.rtattr*
ret %struct.rtattr* %10
}

LLVM IR (-O2):
%struct.rtattr = type { i32 }
%struct.nlmsghdr = type { i32 }
define %struct.rtattr* @rtattr_hdr(%struct.nlmsghdr* %0) {
%2 = bitcast %struct.nlmsghdr* %0 to i8*
%3 = getelementptr inbounds %struct.nlmsghdr, %struct.nlmsghdr* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = tail call i64 @RTA_ALIGN(i32 %4)
%6 = getelementptr inbounds i8, i8* %2, i64 %5
%7 = bitcast i8* %6 to %struct.rtattr*
ret %struct.rtattr* %7
}
__attribute__((no_sanitize("implicit-signed-integer-truncation"))) signed char
unsigned_int_to_signed_char__no_signed_truncation_sanitizer(unsigned int src) {
  return src;
}


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

x86 assembly (clang, -O2):
<unsigned_int_to_signed_char__no_signed_truncation_sanitizer>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @unsigned_int_to_signed_char__no_signed_truncation_sanitizer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @unsigned_int_to_signed_char__no_signed_truncation_sanitizer(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
int test_imm_52uint16_mem(unsigned short *val) {
  return ((*val) & (0x52 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_52uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 82
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
char *pdu_get_tpoa_number(char *body, int oa_len, char *oa_number) {
  char *pBegin, *pEnd;
  pBegin = body;
  if (oa_len % 2) {
    oa_len++;
  }
  pEnd = pBegin + oa_len;
  strncpy(oa_number, pBegin, oa_len);
  oa_number[oa_len] = '\0';
  return pEnd;
}


x86 assembly (clang, -O0):
<pdu_get_tpoa_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1148 <pdu_get_tpoa_number+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x20(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdu_get_tpoa_number>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rdi,%rax
mov    %esi,%ecx
and    $0x1,%ecx
add    %esi,%ecx
movslq %ecx,%rbx
lea    (%rdi,%rbx,1),%r15
mov    %rdx,%rdi
mov    %rax,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%rbx,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @pdu_get_tpoa_number(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i8*, i8** %4
store i8* %9, i8** %7
%10 = load i32, i32* %5
%11 = srem i32 %10, 2
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
br label %16
16: ; preds = %13, %3
%17 = load i8*, i8** %7
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8* %20, i8** %8
%21 = load i8*, i8** %6
%22 = load i8*, i8** %7
%23 = load i32, i32* %5
%24 = call i32 @strncpy(i8* %21, i8* %22, i32 %23)
%25 = load i8*, i8** %6
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
store i8 0, i8* %28
%29 = load i8*, i8** %8
ret i8* %29
}

LLVM IR (-O2):
define i8* @pdu_get_tpoa_number(i8* %0, i32 %1, i8* %2) {
%4 = and i32 %1, 1
%5 = add nsw i32 %4, %1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = tail call i32 @strncpy(i8* %2, i8* %0, i32 %5)
%9 = getelementptr inbounds i8, i8* %2, i64 %6
store i8 0, i8* %9
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xd8() {
  Assert_real((islower(216) == 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_islower.c",
              1085, ("islower should be 0 for 0xd8"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xd8>:
push   %rax
mov    $0xd8,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x43d,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xd8\00"
define void @t_islower_0xd8() {
%1 = call i64 @islower(i32 216)
%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 1085, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xd8\00"
define void @t_islower_0xd8() {
%1 = tail call i64 @islower(i32 216)
%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 1085, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}