#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void check_missing(int *list_a, int *list_b, int low, int high) {
  int c;
  int range = high - low;
  for (c = 0; c < range; c++) {
    if (list_a[c] != list_b[c])
      printf("%d ", c + low);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<check_missing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1185 <check_missing+0x75>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     1172 <check_missing+0x62>
mov    -0x1c(%rbp),%esi
add    -0x14(%rbp),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1177 <check_missing+0x67>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1136 <check_missing+0x26>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_missing>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
sub    %edx,%ecx
test   %ecx,%ecx
jle    1174 <check_missing+0x54>
mov    %rsi,%r14
mov    %rdi,%r12
mov    %ecx,%ebx
mov    %edx,%r13d
lea    0xebd(%rip),%r15
xor    %ebp,%ebp
jmp    1159 <check_missing+0x39>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1174 <check_missing+0x54>
mov    (%r12,%rbp,4),%eax
cmp    (%r14,%rbp,4),%eax
je     1150 <check_missing+0x30>
lea    0x0(%r13,%rbp,1),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1150 <check_missing+0x30>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @check_missing(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %8
%12 = load i32, i32* %7
%13 = sub nsw i32 %11, %12
store i32 %13, i32* %10
store i32 0, i32* %9
br label %14
14: ; preds = %36, %4
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %39
18: ; preds = %14
%19 = load i32*, i32** %5
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
%23 = load i32, i32* %22
%24 = load i32*, i32** %6
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
%28 = load i32, i32* %27
%29 = icmp ne i32 %23, %28
br i1 %29, label %30, label %35
30: ; preds = %18
%31 = load i32, i32* %9
%32 = load i32, i32* %7
%33 = add nsw i32 %31, %32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %30, %18
br label %36
36: ; preds = %35
%37 = load i32, i32* %9
%38 = add nsw i32 %37, 1
store i32 %38, i32* %9
br label %14
39: ; preds = %14
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @check_missing(i32* nocapture %0, i32* nocapture %1, i32 %2, i32 %3) {
%5 = sub i32 %3, %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %23
7: ; preds = %4
%8 = zext i32 %5 to i64
br label %9
9: ; preds = %7, %20
%10 = phi i64 [ 0, %7 ], [ %21, %20 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %1, i64 %10
%14 = load i32, i32* %13
%15 = icmp eq i32 %12, %14
br i1 %15, label %20, label %16
16: ; preds = %9
%17 = trunc i64 %10 to i32
%18 = add nsw i32 %17, %2
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %9, %16
%21 = add nuw nsw i64 %10, 1
%22 = icmp eq i64 %21, %8
br i1 %22, label %23, label %9
23: ; preds = %20, %4
%24 = tail call i32 @putchar(i32 10)
ret void
}