#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*/ assert(int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ ll_get_attribute(char *, char *, int);
char *ll_get_first(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ strcmp(char *, char *);
void test_get_attribute_jurisdiction_localized() {
  char *license;
  char *j;
  license = "http://creativecommons.org/licenses/by-nd/2.0/de/";
  j = ll_get_first(ll_get_attribute(
      license, "http://creativecommons.org/ns#jurisdiction", true));
  printf("get_jurisdiction: '%s'\n", j);
  assert(strcmp(j, "http://creativecommons.org/international/de/") == 0);
  free(j);
}


x86 assembly (clang, -O0):
<test_get_attribute_jurisdiction_localized>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x1,%edx
call   1040 <ll_get_attribute@plt>
mov    %eax,%edi
call   1080 <ll_get_first@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_get_attribute_jurisdiction_localized>:
push   %rbx
lea    0xe98(%rip),%rdi
lea    0xec3(%rip),%rsi
mov    $0x1,%edx
call   1040 <ll_get_attribute@plt>
mov    %eax,%edi
call   1080 <ll_get_first@plt>
mov    %rax,%rbx
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
lea    0xedc(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1070 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"http://creativecommons.org/licenses/by-nd/2.0/de/\00"
@.str.1 = [43 x i8] c"http://creativecommons.org/ns#jurisdiction\00"
@.str.2 = [24 x i8] c"get_jurisdiction: '%s'\0A\00"
@.str.3 = [45 x i8] c"http://creativecommons.org/international/de/\00"
define void @test_get_attribute_jurisdiction_localized() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @ll_get_attribute(i8* %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = call i8* @ll_get_first(i32 %4)
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %2
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %2
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"http://creativecommons.org/licenses/by-nd/2.0/de/\00"
@.str.1 = [43 x i8] c"http://creativecommons.org/ns#jurisdiction\00"
@.str.2 = [24 x i8] c"get_jurisdiction: '%s'\0A\00"
@.str.3 = [45 x i8] c"http://creativecommons.org/international/de/\00"
define void @test_get_attribute_jurisdiction_localized() {
%1 = tail call i32 @ll_get_attribute(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i8* @ll_get_first(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%4 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 @free(i8* %2)
ret void
}