#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 */
struct udev_queue {
  int dummy;
};
struct udev_list_entry {
  int dummy;
};
struct udev {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
unsigned long long strtoull(char *, int /*<<< orphan*/ *, int);
char *udev_list_entry_get_name(struct udev_list_entry *);
struct udev_list_entry *udev_list_entry_get_next(struct udev_list_entry *);
char *udev_list_entry_get_value(struct udev_list_entry *);
unsigned long long udev_queue_get_kernel_seqnum(struct udev_queue *);
scalar_t__ udev_queue_get_queue_is_empty(struct udev_queue *);
struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *);
scalar_t__ udev_queue_get_seqnum_is_finished(struct udev_queue *,
                                             unsigned long long);
unsigned long long udev_queue_get_udev_seqnum(struct udev_queue *);
struct udev_queue *udev_queue_new(struct udev *);
int /*<<< orphan*/ udev_queue_unref(struct udev_queue *);
int test_queue(struct udev *udev) {
  struct udev_queue *udev_queue;
  unsigned long long int seqnum;
  struct udev_list_entry *list_entry;
  udev_queue = udev_queue_new(udev);
  if (udev_queue == NULL)
    return -1;
  seqnum = udev_queue_get_kernel_seqnum(udev_queue);
  printf("seqnum kernel: %llu\n", seqnum);
  seqnum = udev_queue_get_udev_seqnum(udev_queue);
  printf("seqnum udev  : %llu\n", seqnum);
  if (udev_queue_get_queue_is_empty(udev_queue))
    printf("queue is empty\n");
  printf("get queue list\n");
  for (list_entry = udev_queue_get_queued_list_entry(udev_queue);
       list_entry != NULL; list_entry = udev_list_entry_get_next(list_entry))
    printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry),
           udev_list_entry_get_value(list_entry));
  printf("\n");
  printf("get queue list again\n");
  for (list_entry = udev_queue_get_queued_list_entry(udev_queue);
       list_entry != NULL; list_entry = udev_list_entry_get_next(list_entry))
    printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry),
           udev_list_entry_get_value(list_entry));
  printf("\n");
  list_entry = udev_queue_get_queued_list_entry(udev_queue);
  if (list_entry != NULL) {
    printf("event [%llu] is queued\n", seqnum);
    seqnum = strtoull(udev_list_entry_get_value(list_entry), NULL, 10);
    if (udev_queue_get_seqnum_is_finished(udev_queue, seqnum))
      printf("event [%llu] is not finished\n", seqnum);
    else
      printf("event [%llu] is finished\n", seqnum);
  }
  printf("\n");
  udev_queue_unref(udev_queue);
  return 0;
}


x86 assembly (clang, -O0):
<test_queue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   10c0 <udev_queue_new@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11f0 <test_queue+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    13dc <test_queue+0x21c>
mov    -0x18(%rbp),%rdi
call   1080 <udev_queue_get_kernel_seqnum@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <udev_queue_get_udev_seqnum@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <udev_queue_get_queue_is_empty@plt>
cmp    $0x0,%rax
je     124f <test_queue+0x8f>
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <udev_queue_get_queued_list_entry@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     12b2 <test_queue+0xf2>
mov    -0x28(%rbp),%rdi
call   10d0 <udev_list_entry_get_name@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <udev_list_entry_get_value@plt>
mov    -0x30(%rbp),%rsi
mov    %rax,%rdx
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   10a0 <udev_list_entry_get_next@plt>
mov    %rax,-0x28(%rbp)
jmp    126a <test_queue+0xaa>
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <udev_queue_get_queued_list_entry@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1323 <test_queue+0x163>
mov    -0x28(%rbp),%rdi
call   10d0 <udev_list_entry_get_name@plt>
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <udev_list_entry_get_value@plt>
mov    -0x38(%rbp),%rsi
mov    %rax,%rdx
lea    0xd40(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   10a0 <udev_list_entry_get_next@plt>
mov    %rax,-0x28(%rbp)
jmp    12db <test_queue+0x11b>
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <udev_queue_get_queued_list_entry@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     13be <test_queue+0x1fe>
mov    -0x20(%rbp),%rsi
lea    0xd1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1050 <udev_list_entry_get_value@plt>
mov    %rax,%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1090 <udev_queue_get_seqnum_is_finished@plt>
cmp    $0x0,%rax
je     13a7 <test_queue+0x1e7>
mov    -0x20(%rbp),%rsi
lea    0xcf0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13b9 <test_queue+0x1f9>
mov    -0x20(%rbp),%rsi
lea    0xcf7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13be <test_queue+0x1fe>
lea    0xc96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1060 <udev_queue_unref@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_queue>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
call   10e0 <udev_queue_new@plt>
test   %rax,%rax
je     1388 <test_queue+0x1a8>
mov    %rax,%r15
mov    %rax,%rdi
call   10a0 <udev_queue_get_kernel_seqnum@plt>
lea    0xdf7(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   10d0 <udev_queue_get_udev_seqnum@plt>
mov    %rax,%r14
lea    0xdf0(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1100 <udev_queue_get_queue_is_empty@plt>
test   %rax,%rax
je     1248 <test_queue+0x68>
lea    0xe6e(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3e(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1050 <udev_queue_get_queued_list_entry@plt>
test   %rax,%rax
je     12a3 <test_queue+0xc3>
mov    %rax,%rbx
lea    0xdbf(%rip),%r12
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   10f0 <udev_list_entry_get_name@plt>
mov    %rax,%r13
mov    %rbx,%rdi
call   1070 <udev_list_entry_get_value@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   10c0 <udev_list_entry_get_next@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1270 <test_queue+0x90>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xde8(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1050 <udev_queue_get_queued_list_entry@plt>
test   %rax,%rax
je     1303 <test_queue+0x123>
mov    %rax,%rbx
lea    0xd5a(%rip),%r12
mov    %rbx,%rdi
call   10f0 <udev_list_entry_get_name@plt>
mov    %rax,%r13
mov    %rbx,%rdi
call   1070 <udev_list_entry_get_value@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   10c0 <udev_list_entry_get_next@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    12d0 <test_queue+0xf0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
call   1050 <udev_queue_get_queued_list_entry@plt>
test   %rax,%rax
je     1372 <test_queue+0x192>
mov    %rax,%rbx
lea    0xd19(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1070 <udev_list_entry_get_value@plt>
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1090 <strtoull@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
call   10b0 <udev_queue_get_seqnum_is_finished@plt>
test   %rax,%rax
lea    0xd16(%rip),%rax
lea    0xcf1(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
call   1080 <udev_queue_unref@plt>
xor    %eax,%eax
jmp    138d <test_queue+0x1ad>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.udev = type { i32 }
%struct.udev_queue = type { i32 }
%struct.udev_list_entry = type { i32 }
@.str = [21 x i8] c"seqnum kernel: %llu\0A\00"
@.str.1 = [21 x i8] c"seqnum udev : %llu\0A\00"
@.str.2 = [16 x i8] c"queue is empty\0A\00"
@.str.3 = [16 x i8] c"get queue list\0A\00"
@.str.4 = [19 x i8] c"queued: '%s' [%s]\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [22 x i8] c"get queue list again\0A\00"
@.str.7 = [24 x i8] c"event [%llu] is queued\0A\00"
@.str.8 = [30 x i8] c"event [%llu] is not finished\0A\00"
@.str.9 = [26 x i8] c"event [%llu] is finished\0A\00"
define i32 @test_queue(%struct.udev* %0) {
%2 = alloca i32
%3 = alloca %struct.udev*
%4 = alloca %struct.udev_queue*
%5 = alloca i64
%6 = alloca %struct.udev_list_entry*
store %struct.udev* %0, %struct.udev** %3
%7 = load %struct.udev*, %struct.udev** %3
%8 = call %struct.udev_queue* @udev_queue_new(%struct.udev* %7)
store %struct.udev_queue* %8, %struct.udev_queue** %4
%9 = load %struct.udev_queue*, %struct.udev_queue** %4
%10 = icmp eq %struct.udev_queue* %9, null
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %86
12: ; preds = %1
%13 = load %struct.udev_queue*, %struct.udev_queue** %4
%14 = call i64 @udev_queue_get_kernel_seqnum(%struct.udev_queue* %13)
store i64 %14, i64* %5
%15 = load i64, i64* %5
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 %15)
%17 = load %struct.udev_queue*, %struct.udev_queue** %4
%18 = call i64 @udev_queue_get_udev_seqnum(%struct.udev_queue* %17)
store i64 %18, i64* %5
%19 = load i64, i64* %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i64 %19)
%21 = load %struct.udev_queue*, %struct.udev_queue** %4
%22 = call i64 @udev_queue_get_queue_is_empty(%struct.udev_queue* %21)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %12
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %12
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%28 = load %struct.udev_queue*, %struct.udev_queue** %4
%29 = call %struct.udev_list_entry* @udev_queue_get_queued_list_entry(%struct.udev_queue* %28)
store %struct.udev_list_entry* %29, %struct.udev_list_entry** %6
br label %30
30: ; preds = %39, %26
%31 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%32 = icmp ne %struct.udev_list_entry* %31, null
br i1 %32, label %33, label %42
33: ; preds = %30
%34 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%35 = call i8* @udev_list_entry_get_name(%struct.udev_list_entry* %34)
%36 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%37 = call i8* @udev_list_entry_get_value(%struct.udev_list_entry* %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %35, i8* %37)
br label %39
39: ; preds = %33
%40 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%41 = call %struct.udev_list_entry* @udev_list_entry_get_next(%struct.udev_list_entry* %40)
store %struct.udev_list_entry* %41, %struct.udev_list_entry** %6
br label %30
42: ; preds = %30
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%45 = load %struct.udev_queue*, %struct.udev_queue** %4
%46 = call %struct.udev_list_entry* @udev_queue_get_queued_list_entry(%struct.udev_queue* %45)
store %struct.udev_list_entry* %46, %struct.udev_list_entry** %6
br label %47
47: ; preds = %56, %42
%48 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%49 = icmp ne %struct.udev_list_entry* %48, null
br i1 %49, label %50, label %59
50: ; preds = %47
%51 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%52 = call i8* @udev_list_entry_get_name(%struct.udev_list_entry* %51)
%53 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%54 = call i8* @udev_list_entry_get_value(%struct.udev_list_entry* %53)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %52, i8* %54)
br label %56
56: ; preds = %50
%57 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%58 = call %struct.udev_list_entry* @udev_list_entry_get_next(%struct.udev_list_entry* %57)
store %struct.udev_list_entry* %58, %struct.udev_list_entry** %6
br label %47
59: ; preds = %47
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%61 = load %struct.udev_queue*, %struct.udev_queue** %4
%62 = call %struct.udev_list_entry* @udev_queue_get_queued_list_entry(%struct.udev_queue* %61)
store %struct.udev_list_entry* %62, %struct.udev_list_entry** %6
%63 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%64 = icmp ne %struct.udev_list_entry* %63, null
br i1 %64, label %65, label %82
65: ; preds = %59
%66 = load i64, i64* %5
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i64 %66)
%68 = load %struct.udev_list_entry*, %struct.udev_list_entry** %6
%69 = call i8* @udev_list_entry_get_value(%struct.udev_list_entry* %68)
%70 = call i64 @strtoull(i8* %69, i32* null, i32 10)
store i64 %70, i64* %5
%71 = load %struct.udev_queue*, %struct.udev_queue** %4
%72 = load i64, i64* %5
%73 = call i64 @udev_queue_get_seqnum_is_finished(%struct.udev_queue* %71, i64 %72)
%74 = icmp ne i64 %73, 0
br i1 %74, label %75, label %78
75: ; preds = %65
%76 = load i64, i64* %5
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i64 %76)
br label %81
78: ; preds = %65
%79 = load i64, i64* %5
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i64 %79)
br label %81
81: ; preds = %78, %75
br label %82
82: ; preds = %81, %59
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%84 = load %struct.udev_queue*, %struct.udev_queue** %4
%85 = call i32 @udev_queue_unref(%struct.udev_queue* %84)
store i32 0, i32* %2
br label %86
86: ; preds = %82, %11
%87 = load i32, i32* %2
ret i32 %87
}

LLVM IR (-O2):
%struct.udev = type { i32 }
%struct.udev_queue = type { i32 }
%struct.udev_list_entry = type { i32 }
@.str = [21 x i8] c"seqnum kernel: %llu\0A\00"
@.str.1 = [21 x i8] c"seqnum udev : %llu\0A\00"
@.str.4 = [19 x i8] c"queued: '%s' [%s]\0A\00"
@.str.7 = [24 x i8] c"event [%llu] is queued\0A\00"
@.str.8 = [30 x i8] c"event [%llu] is not finished\0A\00"
@.str.9 = [26 x i8] c"event [%llu] is finished\0A\00"
@str = [15 x i8] c"get queue list\00"
@str.10 = [21 x i8] c"get queue list again\00"
@str.11 = [15 x i8] c"queue is empty\00"
define i32 @test_queue(%struct.udev* %0) {
%2 = tail call %struct.udev_queue* @udev_queue_new(%struct.udev* %0)
%3 = icmp eq %struct.udev_queue* %2, null
br i1 %3, label %51, label %4
4: ; preds = %1
%5 = tail call i64 @udev_queue_get_kernel_seqnum(%struct.udev_queue* %2)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = tail call i64 @udev_queue_get_udev_seqnum(%struct.udev_queue* %2)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i64 %7)
%9 = tail call i64 @udev_queue_get_queue_is_empty(%struct.udev_queue* %2)
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %4
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.11, i64 0, i64 0))
br label %13
13: ; preds = %11, %4
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%15 = tail call %struct.udev_list_entry* @udev_queue_get_queued_list_entry(%struct.udev_queue* %2)
%16 = icmp eq %struct.udev_list_entry* %15, null
br i1 %16, label %24, label %17
17: ; preds = %13, %17
%18 = phi %struct.udev_list_entry* [ %22, %17 ], [ %15, %13 ]
%19 = tail call i8* @udev_list_entry_get_name(%struct.udev_list_entry* %18)
%20 = tail call i8* @udev_list_entry_get_value(%struct.udev_list_entry* %18)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %19, i8* %20)
%22 = tail call %struct.udev_list_entry* @udev_list_entry_get_next(%struct.udev_list_entry* %18)
%23 = icmp eq %struct.udev_list_entry* %22, null
br i1 %23, label %24, label %17
24: ; preds = %17, %13
%25 = tail call i32 @putchar(i32 10)
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.10, i64 0, i64 0))
%27 = tail call %struct.udev_list_entry* @udev_queue_get_queued_list_entry(%struct.udev_queue* %2)
%28 = icmp eq %struct.udev_list_entry* %27, null
br i1 %28, label %36, label %29
29: ; preds = %24, %29
%30 = phi %struct.udev_list_entry* [ %34, %29 ], [ %27, %24 ]
%31 = tail call i8* @udev_list_entry_get_name(%struct.udev_list_entry* %30)
%32 = tail call i8* @udev_list_entry_get_value(%struct.udev_list_entry* %30)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %31, i8* %32)
%34 = tail call %struct.udev_list_entry* @udev_list_entry_get_next(%struct.udev_list_entry* %30)
%35 = icmp eq %struct.udev_list_entry* %34, null
br i1 %35, label %36, label %29
36: ; preds = %29, %24
%37 = tail call i32 @putchar(i32 10)
%38 = tail call %struct.udev_list_entry* @udev_queue_get_queued_list_entry(%struct.udev_queue* %2)
%39 = icmp eq %struct.udev_list_entry* %38, null
br i1 %39, label %48, label %40
40: ; preds = %36
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i64 %7)
%42 = tail call i8* @udev_list_entry_get_value(%struct.udev_list_entry* %38)
%43 = tail call i64 @strtoull(i8* nocapture %42, i32* null, i32 10)
%44 = tail call i64 @udev_queue_get_seqnum_is_finished(%struct.udev_queue* %2, i64 %43)
%45 = icmp eq i64 %44, 0
%46 = select i1 %45, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0)
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %46, i64 %43)
br label %48
48: ; preds = %40, %36
%49 = tail call i32 @putchar(i32 10)
%50 = tail call i32 @udev_queue_unref(%struct.udev_queue* %2)
br label %51
51: ; preds = %1, %48
%52 = phi i32 [ 0, %48 ], [ -1, %1 ]
ret i32 %52
}